site
scripts to generate personal blog and git repositories
git clone https://9o.is/git/site.git
style.css
(6367B)
1 :root {
2 --gray-50: #131314;
3 --gray-100: #414142;
4 --gray-200: #b2b2b3;
5 --gray-300: #e3e3e3;
6 --blue-50: #0b1422;
7 --blue-100: #2d4264;
8 --blue-200: #89b4fa;
9 --blue-300: #cce7ff;
10 --green-50: #0c170c;
11 --green-100: #2f482d;
12 --green-200: #88c084;
13 --green-300: #b7f2b2;
14 --red-50: #240d14;
15 --red-100: #663141;
16 --red-200: #fc93b0;
17 --red-300: #ffdae7;
18 --teal-50: #0e1614;
19 --teal-100: #2e4642;
20 --teal-200: #7dbfb4;
21 --teal-300: #beede5;
22
23 --font-mono: monospace;
24 --font-sans: ui-sans-serif, system-ui, sans-serif;
25
26 --spacing: 0.25rem;
27 --container: 80rem;
28
29 --text-base: 1rem;
30 --text-xs: 0.75rem;
31 --text-sm: 0.875rem;
32 --text-lg: 1.125rem;
33
34 --lineheight-base: 1.25;
35 --lineheight-lg: calc(var(--lineheight-base) * 1.2);
36
37 color-scheme: light dark;
38 }
39
40 @supports (color: oklch(0% 0 0)) {
41 :root {
42 --gray-50: oklch(0.1872 0.002 286.2);
43 --gray-100: oklch(0.3757 0.0017 286.32);
44 --gray-200: oklch(0.7639 0.0014 286.37);
45 --gray-300: oklch(0.9158 0 0);
46 --blue-50: oklch(0.1904 0.0317 258.97);
47 --blue-100: oklch(0.3781 0.0644 259.71);
48 --blue-200: oklch(0.7664 0.1113 259.88);
49 --blue-300: oklch(0.9158 0.0436 245.12);
50 --green-50: oklch(0.19 0.0271 144.42);
51 --green-100: oklch(0.373 0.0547 142.66);
52 --green-200: oklch(0.7535 0.1026 142.89);
53 --green-300: oklch(0.9048 0.1048 142.71);
54 --red-50: oklch(0.1977 0.0402 2.11);
55 --red-100: oklch(0.3881 0.0782 2.21);
56 --red-200: oklch(0.7813 0.1298 2.77);
57 --red-300: oklch(0.9229 0.0443 354.83);
58 --teal-50: oklch(0.1913 0.0127 177.82);
59 --teal-100: oklch(0.3731 0.0305 183.11);
60 --teal-200: oklch(0.7572 0.0692 182.78);
61 --teal-300: oklch(0.911 0.0495 183.71);
62 }
63 }
64
65 :root {
66 --color-bg: var(--gray-50);
67 --color-fg: var(--gray-300);
68 --color-border: var(--gray-100);
69 --color-accent: var(--blue-200);
70 --color-green: var(--green-200);
71 --color-red: var(--red-200);
72 --color-teal: var(--teal-200);
73 }
74
75 @media (prefers-color-scheme: light) {
76 :root {
77 --color-bg: var(--gray-300);
78 --color-fg: var(--gray-50);
79 --color-border: var(--gray-200);
80 --color-accent: var(--blue-100);
81 --color-green: var(--green-100);
82 --color-red: var(--red-100);
83 --color-teal: var(--teal-100);
84 }
85 }
86
87 *,
88 ::after,
89 ::before,
90 ::backdrop,
91 ::file-selector-button {
92 box-sizing: border-box;
93 margin: 0;
94 padding: 0;
95 border: 0 solid;
96 }
97
98 html,
99 :host {
100 line-height: var(--lineheight-base);
101 -webkit-text-size-adjust: 100%;
102 tab-size: 4;
103 font-family: var(--font-mono);
104 font-feature-settings: normal;
105 font-variation-settings: normal;
106 font-size: var(--text-base);
107 -webkit-tap-highlight-color: transparent;
108 }
109
110 hr {
111 height: 0;
112 color: inherit;
113 border-top-width: 1px;
114 margin-top: calc(var(--spacing) * 4);
115 margin-bottom: calc(var(--spacing) * 4);
116 border-color: var(--color-border);
117 }
118
119 abbr:where([title]) {
120 -webkit-text-decoration: underline dotted;
121 text-decoration: underline dotted;
122 }
123
124 h1,
125 h2,
126 h3,
127 h4,
128 h5,
129 h6 {
130 font-size: inherit;
131 display: block;
132 font-weight: 700;
133 letter-spacing: calc(var(--spacing) / 6);
134 }
135
136 h1,
137 h2 {
138 text-transform: uppercase;
139 text-wrap: balance;
140 max-inline-size: 50ch;
141 line-height: var(--lineheight-lg);
142 }
143
144 a {
145 color: var(--color-accent);
146 -webkit-text-decoration: underline;
147 text-decoration: underline;
148 cursor: pointer;
149 }
150
151 b,
152 strong {
153 font-weight: 600;
154 }
155
156 code,
157 kbd,
158 samp,
159 pre {
160 font-family: var(--font-mono);
161 font-feature-settings: normal;
162 font-variation-settings: normal;
163 font-size: var(--text-base);
164 }
165
166 small {
167 font-size: 80%;
168 }
169
170 sub,
171 sup {
172 font-size: 75%;
173 line-height: 0;
174 position: relative;
175 vertical-align: baseline;
176 }
177
178 sub {
179 bottom: calc(-1 * var(--spacing));
180 }
181
182 sup {
183 top: calc(-2 * var(--spacing));
184 }
185
186 table {
187 text-indent: 0;
188 border-color: inherit;
189 border-collapse: collapse;
190 }
191
192 :-moz-focusring {
193 outline: auto;
194 }
195
196 progress {
197 vertical-align: baseline;
198 }
199
200 summary {
201 display: list-item;
202 }
203
204 ol,
205 ul,
206 menu {
207 list-style: none;
208 }
209
210 img,
211 svg,
212 video,
213 canvas,
214 audio,
215 iframe,
216 embed,
217 object {
218 display: block;
219 vertical-align: middle;
220 }
221
222 img,
223 video {
224 max-width: 100%;
225 height: auto;
226 }
227
228 ::selection {
229 background-color: var(--color-accent);
230 color: var(--color-bg);
231 }
232
233 ::-moz-selection {
234 background-color: var(--color-accent);
235 color: var(--color-bg);
236 }
237
238 body {
239 background-color: var(--color-bg);
240 color: var(--color-fg);
241 max-width: var(--container);
242 margin-inline: auto;
243 padding: calc(2 * var(--spacing));
244 }
245
246 header.main {
247 border-bottom: var(--color-border) 1px solid;
248 padding-bottom: calc(2 * var(--spacing));
249 margin-bottom: calc(2 * var(--spacing));
250
251 & > :not(h1) {
252 font-size: var(--text-xs);
253 }
254 }
255
256 nav ul {
257 display: flex;
258
259 & > li::after {
260 content: "|";
261 margin: 0 calc(2 * var(--spacing));
262 }
263
264 & > li:last-child::after {
265 content: "";
266 margin: 0;
267 }
268 }
269
270 nav[aria-label="Main"] {
271 & > .nav-inner {
272 display: flex;
273 margin-bottom: calc(4 * var(--spacing));
274 }
275
276 & > .nav-inner::after {
277 content: '';
278 background: repeating-linear-gradient(
279 90deg, var(--color-accent), var(--color-accent)
280 1px, transparent 0, transparent 8px);
281 display: block;
282 width: 100%;
283 margin-left: var(--text-base);
284 }
285
286 ul > li:first-child {
287 display: inline-flex;
288
289 a {
290 display: inline-flex;
291 align-items: center;
292 gap: 8px;
293 }
294 }
295 }
296
297 main ol > li,
298 main ul > li {
299 margin: var(--spacing) 0;
300 }
301
302 main.blog-posts, main.git-repos {
303 article {
304 margin-bottom: calc(8 * var(--spacing));
305
306 p {
307 margin-top: calc(4 * var(--spacing));
308 margin-left: calc(4 * var(--spacing));
309 font-size: var(--text-sm);
310 }
311
312 time {
313 font-size: var(--text-sm);
314 }
315 }
316 }
317
318 main.git {
319 table {
320 font-size: var(--text-sm);
321 }
322
323 a.d,
324 a.h,
325 a.i,
326 a.line {
327 text-decoration: none;
328 }
329
330 #blob a {
331 color: var(--color-border);
332 }
333
334 #blob a:hover,
335 #blob a:target {
336 color: var(--color-accent);
337 }
338
339 table thead td {
340 font-weight: bold;
341 }
342
343 table td {
344 padding: 0 0.4em;
345 }
346
347 table td {
348 vertical-align: top;
349 white-space: nowrap;
350 padding-top: 0.1em;
351 }
352
353 #index tr td:nth-child(2),
354 #tags tr td:nth-child(3),
355 #branches tr td:nth-child(3),
356 #log tr td:nth-child(2) {
357 white-space: normal;
358 }
359
360 td.num {
361 text-align: right;
362 }
363
364 pre {
365 font-size: var(--text-sm);
366 }
367
368 pre a.h {
369 color: var(--color-teal);
370 font-weight: bold;
371 }
372
373 .A,
374 span.i,
375 pre a.i {
376 color: var(--color-green);
377 }
378
379 .D,
380 span.d,
381 pre a.d {
382 color: var(--color-red);
383 }
384
385 section.git-file {
386 padding-top: calc(2 * var(--spacing));
387
388 p {
389 font-size: var(--text-sm);
390 }
391 }
392 }