Skip to content

Commit a2b7117

Browse files
committed
Cleanup II
1 parent 9c917fb commit a2b7117

File tree

2 files changed

+48
-53
lines changed

2 files changed

+48
-53
lines changed

Diff for: sass/_layout.scss

+47-3
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,64 @@
11
body {
22
display: grid;
3+
min-height: 100vh;
34
grid-template-columns: 1fr minmax(0, $content-max-width) 1fr;
5+
grid-template-rows: auto 1fr auto;
46
grid-row-gap: var(--section-gap);
57
}
68

79
.site-header {
10+
grid-column: 1 / 4;
11+
display: grid;
12+
grid-template-columns: subgrid;
813
border-bottom: 2px solid var(--border-color);
14+
15+
> .wrapper {
16+
grid-column: 2;
17+
padding: .5rem var(--content-padding);
18+
}
919
}
1020

11-
.site-header {
21+
.page-content {
22+
grid-column: 2;
23+
}
24+
25+
.site-footer {
1226
grid-column: 1 / 4;
1327
display: grid;
1428
grid-template-columns: subgrid;
29+
justify-items: center;
30+
background-color: var(--bg-1-color);
31+
font-size: .9em;
32+
--block-gap: .5rem;
33+
--ferris-height: 1.5rem;
34+
padding-top: var(--ferris-height);
1535

16-
> .wrapper {
36+
&:before {
37+
content: "";
38+
transform: translateY(calc(-50% - var(--ferris-height)));
39+
position: absolute;
40+
height: var(--ferris-height);
41+
aspect-ratio: var(--ferris-aspect-ratio);
42+
background-color: var(--fg-color);
43+
mask-image: var(--ferris-image);
44+
mask-size: contain;
45+
}
46+
47+
@media (prefers-contrast: no-preference) and (hover: hover) {
48+
transition: opacity 125ms;
49+
50+
&:not(:focus-within):not(:hover) {
51+
opacity: .4;
52+
}
53+
}
54+
55+
.wrapper {
1756
grid-column: 2;
18-
padding: .5rem var(--content-padding);
57+
padding: var(--content-padding);
58+
max-width: 35rem;
59+
}
60+
61+
p {
62+
margin-bottom: var(--block-gap);
1963
}
2064
}

Diff for: sass/style.scss

+1-50
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,13 @@ body {
6565
display: flex;
6666
align-items: center;
6767
gap: .5em;
68-
}
69-
70-
.page-content {
71-
grid-column: 2;
68+
max-width: max-content;
7269
}
7370

7471
main {
7572
padding: 0 var(--content-padding);
7673
}
7774

78-
footer {
79-
grid-column: 1 / 4;
80-
}
81-
8275
pre, img, video {
8376
border-radius: var(--box-rounding);
8477
}
@@ -99,33 +92,6 @@ figure {
9992
}
10093
}
10194

102-
footer {
103-
// margin-top: 4rem;
104-
position: relative;
105-
padding-top: 1.5em; // TODO: variable / share with ferris icon
106-
107-
&:before {
108-
position: absolute;
109-
top: -0.8em;
110-
left: calc(50% - 1.125em);
111-
content: "";
112-
display: inline-block;
113-
height: 1.5em;
114-
aspect-ratio: var(--ferris-aspect-ratio);
115-
background-color: color-mix(in oklab, var(--accent-color), currentColor 20%);
116-
mask-image: var(--ferris-image);
117-
mask-size: contain;
118-
}
119-
120-
@media (prefers-contrast: no-preference) and (hover: hover) {
121-
transition: opacity 125ms;
122-
123-
&:not(:focus-within):not(:hover) {
124-
opacity: .4;
125-
}
126-
}
127-
}
128-
12995
.svg-icon {
13096
width: 1em;
13197
height: 1em;
@@ -144,18 +110,3 @@ footer {
144110
}
145111
}
146112

147-
.site-footer {
148-
background-color: var(--bg-1-color);
149-
font-size: .9em;
150-
--block-gap: .5rem;
151-
152-
.wrapper {
153-
padding: 1rem 2rem; // TODO: put in a variable
154-
max-width: 35rem; // TODO: variable
155-
margin: auto;
156-
}
157-
158-
p {
159-
margin-bottom: var(--block-gap);
160-
}
161-
}

0 commit comments

Comments
 (0)