Skip to content

Commit 30ed1cf

Browse files
committed
update: change styles(2)
- divide layout.css into layouts/ and partials/ - add transition to home
1 parent 72646dd commit 30ed1cf

File tree

9 files changed

+67
-59
lines changed

9 files changed

+67
-59
lines changed

assets/css/layouts/home.css

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
.home {
2+
display: grid;
3+
column-gap: 4rem;
4+
grid-template-columns: auto auto;
5+
justify-content: center;
6+
justify-items: center;
7+
align-content: center;
8+
}
9+
10+
.home.links {
11+
grid-row: 2;
12+
display: flex;
13+
flex-direction: column;
14+
gap: 1rem;
15+
16+
font-size: 18px;
17+
}
18+
19+
.home.category {
20+
grid-row: 1 / span 2;
21+
font-size: 22px;
22+
23+
display: flex;
24+
flex-direction: column;
25+
26+
27+
a {
28+
padding: .5rem;
29+
border: 3px solid transparent;
30+
transition:
31+
color .2s ease-in-out,
32+
background-color .2s ease-in-out;
33+
34+
&:hover {
35+
text-decoration: none;
36+
color: light-dark(var(--light-major), var(--dark-major));
37+
background-color: light-dark(var(--light-minor), var(--dark-minor));
38+
border: 3px solid light-dark(var(--light-major), var(--dark-major));
39+
}
40+
}
41+
}

assets/css/layouts/section.css

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.section {
2+
grid-template-rows: auto 1fr auto;
3+
align-content: start;
4+
justify-items: center;
5+
}

assets/css/layouts/single.css

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.single {
2+
grid-template-rows: min-content auto;
3+
4+
.breadcrumb {
5+
place-self: center;
6+
margin: 1rem 0;
7+
}
8+
}

assets/css/partials/article.css

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ section.article {
2626
.article.content {
2727
margin-top: 1rem;
2828
flex-wrap: wrap;
29+
font-size: 1.4rem;
2930

3031
span {
3132
white-space: pre-wrap;
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
.signage {
1+
.breadcrump {
22
display: flex;
33
flex-direction: row;
4+
align-self: center;
5+
46
white-space: nowrap;
57

68
background-color: #111111;
@@ -12,7 +14,7 @@
1214
font-size: 32px;
1315
}
1416

15-
.breadcrump {
17+
.location {
1618
display: inline-flex;
1719
font-weight: bold;
1820

@@ -35,7 +37,7 @@
3537
}
3638

3739

38-
h1 {
40+
.signage {
3941
color: #fff;
4042
&::after{
4143
content: "_";
@@ -44,51 +46,3 @@
4446
}
4547

4648
}
47-
48-
49-
.home {
50-
display: grid;
51-
justify-content: center;
52-
justify-items: center;
53-
align-content: center;
54-
55-
> h2 {
56-
align-self: center;
57-
}
58-
}
59-
.home.links {
60-
display: flex;
61-
flex-direction: column;
62-
gap: 1rem;
63-
64-
font-size: 18px;
65-
}
66-
.home.category {
67-
font-size: 22px;
68-
margin-top: 4rem;
69-
70-
display: flex;
71-
flex-direction: column;
72-
gap: 1rem;
73-
}
74-
75-
76-
.section {
77-
grid-template-rows: auto auto 1fr auto;
78-
align-content: start;
79-
justify-items: center;
80-
81-
> h2 {
82-
margin: 4rem;
83-
}
84-
}
85-
86-
87-
.single {
88-
grid-template-rows: min-content auto;
89-
90-
.breadcrumb {
91-
place-self: center;
92-
margin: 1rem 0;
93-
}
94-
}

layouts/_default/home.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{ define "main" }}
22

33
<main class="home">
4-
{{ partial "signage" . }}
4+
{{ partial "breadcrump" . }}
55

66
<div class="home links">
77
<nav>

layouts/_default/section.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{{ define "main" }}
2-
{{ partial "signage" . }}
32
<main class="section">
4-
<h2>{{ .Page.Title }}</h2>
3+
{{ partial "breadcrump" . }}
54
{{ .Content }}
65
{{ partial "list" . }}
76
</main>

layouts/_default/single.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{ define "main" }}
22
<main class="single">
3-
{{ partial "signage" . }}
3+
{{ partial "breadcrump" . }}
44

55
{{ partial "article" . }}
66
</main>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<nav class="signage">
2-
<nav class="breadcrump">
1+
<div class="breadcrump">
2+
<nav class="location">
33
<!-- Ancestors -->
44
{{ range after 0 .Ancestors.Reverse }}
55
<a href="{{ .RelPermalink }}">{{ .File.ContentBaseName }}</a>
@@ -8,5 +8,5 @@
88
<a href="{{ .RelPermalink }}">{{.File.ContentBaseName }}</a>
99
</nav>
1010

11-
<h1>$&nbsp;proxyerium</h1>
12-
</nav>
11+
<h1 class="signage">$&nbsp;proxyerium</h1>
12+
</div>

0 commit comments

Comments
 (0)