Skip to content
This repository was archived by the owner on Mar 12, 2026. It is now read-only.

Commit 632828c

Browse files
committed
refactor: massive template rewrite
code is still a mess, but it looks a tad nicer now. still a LOT to do
1 parent 69c2250 commit 632828c

11 files changed

Lines changed: 231 additions & 249 deletions

File tree

css/default.scss

Lines changed: 110 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,25 @@
1-
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap");
2-
3-
@mixin for-phone-only {
4-
@media (max-width: 499px) {
5-
@content;
6-
}
7-
}
8-
9-
@mixin for-desktop-up {
10-
@media (min-width: 1200px) {
11-
@content;
12-
}
13-
}
14-
151
$background-color: oklch(22.49% 0.008 297.21);
162
$foreground-color: oklch(98.51% 0 0);
173
$primary-color: oklch(82.67% 0.096 307.5);
184
$secondary-color: oklch(from $primary-color l c 240);
195

6+
@import "syntax";
7+
208
:root {
21-
font-size: 16px;
9+
font-size: 16px; // acts as a sort of scale because everything uses rem.
2210
}
2311

2412
* {
2513
box-sizing: border-box;
2614
transition: 0.1s ease-in-out;
27-
// outline: 1px solid rgba(255, 0, 0, 0.2);
15+
/* outline: 1px solid rgba(255, 1, 0, 0.2); */
16+
padding: 0;
17+
margin: 0;
2818
}
2919

3020
body {
3121
display: flex;
3222
flex-direction: column;
33-
font-family: "Space Grotesk", sans-serif;
3423
align-items: center;
3524
$opacity: 25%;
3625
background-color: black;
@@ -45,87 +34,38 @@ body {
4534
background-attachment: fixed;
4635
color: white;
4736
color: $foreground-color;
48-
padding: 4rem 1rem 1rem 1rem;
49-
margin: 0;
37+
$gaps: 1rem;
38+
padding: $gaps;
39+
padding-top: 5rem;
40+
gap: $gaps;
5041

51-
// Stops central content from shifting around when&if a scrollbar appears
52-
width: 100vw;
5342
overflow-x: hidden;
5443

55-
@include for-phone-only {
56-
padding: 0.25rem;
57-
flex-direction: row;
58-
}
59-
}
60-
61-
content {
62-
display: flex;
63-
width: 100%;
64-
max-width: 60rem;
65-
flex-direction: row-reverse;
66-
67-
& > * {
68-
background-color: $background-color;
69-
outline: 2px solid $background-color;
70-
outline-offset: 2px;
71-
72-
@include for-phone-only {
73-
outline: 0px;
74-
}
75-
}
76-
77-
& > nav {
78-
padding: 1.25rem 0.75rem;
79-
}
80-
81-
& > article {
82-
flex: auto;
83-
padding: 1.25rem;
84-
height: fit-content;
85-
}
86-
87-
@include for-phone-only {
44+
&>* {
45+
display: flex;
8846
flex-direction: column;
89-
}
90-
}
91-
92-
footer {
93-
position: fixed;
94-
bottom: 0px;
95-
opacity: 0.7;
96-
font-size: 0.9rem;
97-
padding: 0.5rem;
98-
width: 100%;
99-
text-align: right;
100-
color: white;
101-
mix-blend-mode: overlay;
102-
pointer-events: none;
103-
104-
p {
105-
padding: 0;
106-
margin: 0;
107-
}
108-
109-
a {
110-
color: inherit;
111-
pointer-events: all;
112-
}
113-
114-
@include for-phone-only {
115-
display: none;
47+
gap: 1rem;
48+
background-color: $background-color;
49+
width: 100%;
50+
max-width: 50rem;
51+
padding: 1.5rem 2.5rem;
52+
outline: 0.2rem solid $background-color;
53+
outline-offset: 0.2rem;
11654
}
11755
}
11856

11957
// --- NAVIGATION BAR ---
12058
// This whole navbar section needs refactoring, because I'm already confused by it
12159
nav {
12260
display: flex;
123-
position: sticky;
124-
top: 4rem;
61+
width: unset;
62+
padding: 1rem;
63+
position: fixed;
64+
top: 1rem; // TODO: actually have this floating next to the side like the old site
65+
right: 1rem;
12566
flex-direction: column;
12667
align-items: center;
12768
gap: 1rem;
128-
margin-left: 1rem;
12969
height: fit-content;
13070

13171
svg {
@@ -147,36 +87,6 @@ nav {
14787
hr {
14888
width: 100%;
14989
}
150-
151-
@include for-phone-only {
152-
// TODO: i absolutely hate this: it feels extremely hacky.
153-
top: 0.25rem;
154-
margin-bottom: 0.4rem !important;
155-
// end
156-
z-index: 1;
157-
margin: 0;
158-
flex-direction: row;
159-
160-
a {
161-
writing-mode: horizontal-tb;
162-
163-
&:first-child {
164-
margin-right: auto;
165-
}
166-
}
167-
168-
span {
169-
display: none;
170-
}
171-
172-
hr {
173-
display: none;
174-
}
175-
176-
img {
177-
display: none;
178-
}
179-
}
18090
}
18191

18292
// --- STANDARD ELEMENTS ---
@@ -199,62 +109,48 @@ p {
199109
}
200110

201111
ul {
112+
display: flex;
113+
flex-direction: column;
114+
gap: 0.5rem;
202115
list-style-type: none;
203116
margin: 0;
204117
padding: 0;
205118

206-
& > li:before {
207-
content: "-";
119+
&>li:before {
120+
content: "~";
208121
color: oklch(82.67% 0.087 180);
209122
padding-left: 0.5rem;
210123
padding-right: 0.25rem;
211124
}
212125
}
213126

214-
h1 {
215-
font-size: 1.25rem;
216-
}
217-
218127
@for $i from 1 through 6 {
219128
h#{$i} {
220129
@include std-style;
221130
padding-top: 0.5rem;
222-
font-size: 1rem;
223131

224132
&:before {
225-
$stars: "";
133+
$hashes: "";
226134

227135
@for $_ from 1 through $i {
228-
$stars: $stars + "*";
136+
$hashes: $hashes + "#";
229137
}
230138

231-
content: "#{$stars} ";
232-
color: oklch(82.67% 0.087 #{280 + ($i - 1) * 20});
233-
opacity: 0.75;
139+
content: "#{$hashes} ";
140+
color: oklch(82.67% 0.087 #{280 + ($i - 1) * 40});
234141
}
235142
}
236143
}
237144

238-
img {
239-
user-select: none;
240-
pointer-events: none;
241-
}
242-
243-
code {
244-
font-family: "Space Mono", monospace;
245-
246-
@include for-phone-only {
247-
word-break: break-all;
145+
@for $i from 1 through 15 {
146+
ul>li:nth-child(n+#{$i}):before {
147+
color: oklch(82.67% 0.087 #{100 + ($i - 1) * 80});
248148
}
249149
}
250150

251-
div.sourceCode {
252-
padding: 1rem;
253-
}
254-
255-
div.sourceCode,
256-
code {
257-
background-color: oklch(from $background-color calc(l - 0.05) c h);
151+
img {
152+
user-select: none;
153+
pointer-events: none;
258154
}
259155

260156
hr {
@@ -271,3 +167,74 @@ hr {
271167
align-items: center;
272168
gap: 15px;
273169
}
170+
171+
// FONTS!!!!!!!!!!!!!!!!! TODO: split up
172+
@import url("https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible+Next:ital,wght@0,200..800;1,200..800&display=swap");
173+
@import url("https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible+Mono:ital,wght@0,200..800;1,200..800&display=swap");
174+
175+
* {
176+
font-family: "Atkinson Hyperlegible Next", sans-serif;
177+
font-optical-sizing: auto;
178+
text-transform: lowercase;
179+
}
180+
181+
182+
p,
183+
ul,
184+
span {
185+
text-align: justify;
186+
font-size: 1.25rem;
187+
}
188+
189+
code {
190+
font-family: "Atkinson Hyperlegible Mono", monospace;
191+
}
192+
193+
h1,
194+
h2,
195+
h3,
196+
h4,
197+
h5,
198+
h6 {
199+
font-size: 1.75rem;
200+
}
201+
202+
address {
203+
opacity: 0.5;
204+
text-align: right;
205+
width: auto;
206+
margin-top: -2.1lh; // TODO: i can fix this when it becomes a problem :)
207+
margin-bottom: 0.5rem; // SO HACKY
208+
}
209+
210+
footer {
211+
gap: 0;
212+
}
213+
214+
footer>* {
215+
text-align: center;
216+
font-size: 1rem;
217+
opacity: 0.5;
218+
}
219+
220+
// SYNTAX!!!!!!!
221+
div.sourceCode {
222+
// prettier-ignore
223+
background-image:
224+
url("/images/noise.png"),
225+
radial-gradient(circle at center center, oklch(22.49% 0.008 297.21), transparent),
226+
radial-gradient(circle at bottom left, #27577D, transparent),
227+
radial-gradient(circle at top right, #952EA4 0%, transparent),
228+
radial-gradient(circle at center right, #6949A5 0%, transparent),
229+
radial-gradient(circle at top center, #336BA0 0%, transparent);
230+
background-attachment: fixed;
231+
padding: 0.2rem;
232+
overflow: hidden;
233+
234+
&>* {
235+
background-color: $background-color;
236+
background-attachment: fixed;
237+
padding: 1.2rem;
238+
overflow: scroll;
239+
}
240+
}

css/fonts.scss

Whitespace-only changes.

css/syntax.css renamed to css/syntax.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,5 +241,3 @@ code span.wa {
241241
font-weight: bold;
242242
font-style: italic;
243243
}
244-
245-
/* Warning */

flake.nix

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55
haskell-flake.url = "github:srid/haskell-flake"; # https://community.flake.parts/haskell-flake
66
treefmt-nix.url = "github:numtide/treefmt-nix";
77
};
8-
outputs = inputs @ {
9-
flake-parts,
10-
...
11-
}:
8+
outputs = inputs @ {flake-parts, ...}:
129
flake-parts.lib.mkFlake {inherit inputs;} {
1310
systems = [
1411
"x86_64-linux"

0 commit comments

Comments
 (0)