BlueGit

projects-timfalken-com verhalenboek

Files

verhalenboek / web / assets / app.css

app.css

feat: add a wiki with categories, chapters and internal links
timfa project_87242033_bot_b167a9be22027ad5a4b431d0ad8426c6 · pushed by timfa · 5 weeks ago
2556ae87 History
app.css 12.4 KiB Download Raw
1:root {
2 color-scheme: light;
3 --bg: #f3eee4;
4 --bg-raised: #fffaf3;
5 --ink: #1d1915;
6 --muted: #6d6258;
7 --line: #e3d5c6;
8 --accent: #9a4032;
9 --accent-ink: #fff8f4;
10 --read: #2c6a4a;
11 --shadow: 0 16px 40px rgba(70, 42, 24, 0.08);
12 --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Liberation Serif", "Times New Roman", serif;
13 --sans: system-ui, -apple-system, "Segoe UI", "Liberation Sans", sans-serif;
14 --rounded: ui-rounded, "Comic Sans MS", "Chalkboard SE", "Segoe Print", "Comic Neue", Verdana, sans-serif;
15 --font: var(--serif);
16 --measure: 38rem;
17}
18
19:root[data-font="serif"] { --font: var(--serif); }
20:root[data-font="sans"] { --font: var(--sans); }
21:root[data-font="rounded"] { --font: var(--rounded); }
22
23:root[data-theme="dark"] {
24 color-scheme: dark;
25 --bg: #141210;
26 --bg-raised: #221e19;
27 --ink: #f6f0e6;
28 --muted: #c2b4a4;
29 --line: #3c342c;
30 --accent: #e7a07a;
31 --accent-ink: #1a120e;
32 --read: #9ed8b8;
33 --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
34}
35
36@media (prefers-color-scheme: dark) {
37 :root[data-theme="system"] {
38 color-scheme: dark;
39 --bg: #141210;
40 --bg-raised: #221e19;
41 --ink: #f6f0e6;
42 --muted: #c2b4a4;
43 --line: #3c342c;
44 --accent: #e7a07a;
45 --accent-ink: #1a120e;
46 --read: #9ed8b8;
47 --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
48 }
49}
50
51* { box-sizing: border-box; }
52html { scroll-behavior: smooth; }
53body {
54 margin: 0;
55 min-height: 100vh;
56 background:
57 radial-gradient(1200px 400px at 10% -10%, rgba(154, 64, 50, 0.08), transparent 50%),
58 var(--bg);
59 color: var(--ink);
60 font-family: var(--font);
61 font-size: 1.0625rem;
62 line-height: 1.5;
63}
64body, button, input, textarea { font-family: var(--font); }
65a { color: inherit; }
66:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
67@media (prefers-reduced-motion: reduce) {
68 html { scroll-behavior: auto; }
69 * { transition: none !important; }
70}
71
72.topbar, .gate, #app, .docs {
73 width: min(100% - 2rem, var(--measure));
74 margin-inline: auto;
75}
76.topbar {
77 display: flex;
78 justify-content: space-between;
79 align-items: baseline;
80 gap: 1rem 1.5rem;
81 flex-wrap: wrap;
82 padding: 1.1rem 0 0.4rem;
83}
84.brand {
85 display: inline-flex;
86 align-items: center;
87 gap: 0.55rem;
88 text-decoration: none;
89 font-weight: 600;
90 letter-spacing: -0.03em;
91 font-size: 1.25rem;
92}
93.brand img { width: 1.7rem; height: 1.7rem; border-radius: 0.4rem; }
94.nav { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; }
95.nav a {
96 text-decoration: none;
97 color: var(--muted);
98 padding: 0.35rem 0;
99}
100.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
101
102.gate { padding: 18vh 0 4rem; }
103.eyebrow, .day-kicker {
104 margin: 0 0 0.4rem;
105 color: var(--accent);
106 font-size: 0.78rem;
107 letter-spacing: 0.14em;
108 text-transform: uppercase;
109}
110h1, h2, h3 { font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
111.gate h1 { font-size: clamp(2.6rem, 8vw, 4.4rem); margin: 0 0 0.6rem; }
112.lede { max-width: 34rem; color: var(--muted); font-size: 1.15rem; }
113.gate-links { margin-top: 1.5rem; }
114.gate-links a { color: var(--muted); }
115
116.button, button, .continue {
117 font: inherit;
118 font-size: 1rem;
119}
120.button, .continue, .primary, .quiet, .danger {
121 display: inline-flex;
122 align-items: center;
123 justify-content: center;
124 min-height: 2.9rem;
125 padding: 0.55rem 1rem;
126 border-radius: 0.85rem;
127 border: 1px solid transparent;
128 text-decoration: none;
129 cursor: pointer;
130 background: transparent;
131 color: var(--ink);
132}
133.primary, a.primary, button.primary {
134 background: var(--accent);
135 color: var(--accent-ink);
136 border-color: var(--accent);
137}
138.quiet, button.quiet {
139 border-color: var(--line);
140 background: var(--bg-raised);
141}
142.danger { color: var(--accent); border-color: var(--line); background: var(--bg-raised); }
143button:disabled, .continue:disabled { opacity: 0.55; cursor: default; }
144.continue, .block { width: 100%; }
145
146.day-list { list-style: none; margin: 1rem 0 2rem; padding: 0; display: grid; gap: 0.7rem; }
147.day-link {
148 display: grid;
149 grid-template-columns: 1fr auto;
150 gap: 0.15rem 0.8rem;
151 padding: 0.9rem 1rem;
152 background: var(--bg-raised);
153 border: 1px solid var(--line);
154 border-radius: 1rem;
155 text-decoration: none;
156 box-shadow: var(--shadow);
157 -webkit-user-select: none;
158 user-select: none;
159 -webkit-touch-callout: none;
160 touch-action: pan-y;
161 position: relative;
162}
163.day-link.is-holding { background: color-mix(in srgb, var(--accent) 12%, var(--bg-raised)); }
164.day-link.unread { box-shadow: inset 4px 0 0 var(--accent), var(--shadow); }
165.day-link.has-friends { padding-bottom: 1.85rem; }
166.friend-reads {
167 position: absolute;
168 right: 0.72rem;
169 bottom: 0.4rem;
170 display: flex;
171 flex-direction: row;
172 flex-wrap: nowrap;
173 align-items: center;
174 justify-content: flex-end;
175 gap: 0.15rem;
176}
177.friend-dot {
178 width: 1.125rem;
179 height: 1.125rem;
180 border-radius: 50%;
181 overflow: hidden;
182 display: inline-flex;
183 align-items: center;
184 justify-content: center;
185 flex: 0 0 auto;
186 font-family: var(--sans);
187 font-size: 0.62rem;
188 font-weight: 600;
189 line-height: 1;
190 letter-spacing: 0;
191 text-transform: uppercase;
192 color: #fffaf3;
193 background: var(--muted);
194}
195.friend-dot img {
196 width: 100%;
197 height: 100%;
198 object-fit: cover;
199 display: block;
200}
201.day-date { color: var(--muted); font-size: 0.92rem; }
202.day-state { font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; }
203.day-link.unread .day-state { color: var(--accent); }
204.day-link.read .day-state { color: var(--read); }
205.day-title { grid-column: 1 / -1; font-size: 1.25rem; }
206.badge {
207 justify-self: start;
208 font-size: 0.75rem;
209 letter-spacing: 0.06em;
210 text-transform: uppercase;
211 color: var(--accent);
212}
213
214.week-label {
215 margin: 0.15rem 0 0.7rem;
216 text-align: center;
217 font-size: clamp(1.35rem, 4.6vw, 1.8rem);
218 text-wrap: balance;
219}
220.week-nav {
221 display: grid;
222 grid-template-columns: 1fr 1fr;
223 gap: 0.5rem;
224 margin: 0 0 0.9rem;
225}
226.week-nav .button {
227 width: 100%;
228 padding-inline: 0.5rem;
229 text-align: center;
230 line-height: 1.2;
231}
232.week-nav .week-prev { grid-column: 1; }
233.week-nav .week-next { grid-column: 2; }
234.continue-wrap { margin: 0.2rem 0 0.2rem; }
235.continue-note { margin: 0.45rem 0 0; color: var(--muted); font-size: 0.95rem; }
236.status, .empty { color: var(--muted); }
237.form-error { color: var(--accent); min-height: 1.4em; }
238
239.day-head h1 { font-size: clamp(1.9rem, 5vw, 2.7rem); margin: 0.2rem 0 1rem; }
240.pager { margin: 0.4rem 0 1.2rem; }
241.pager.bottom { margin: 1.6rem 0 2.5rem; }
242.story { padding: 0.4rem 0 0.8rem; border-top: 1px solid var(--line); }
243.story h2 { font-size: 1.35rem; margin: 0.9rem 0 0.7rem; }
244.story h2 span { color: var(--accent); font-weight: 500; margin-right: 0.45rem; }
245.story p { font-size: 1.15rem; line-height: 1.75; margin: 0 0 1rem; }
246
247.read-menu {
248 position: fixed;
249 z-index: 20;
250 min-width: 14rem;
251 max-width: calc(100vw - 1rem);
252 padding: 0.45rem;
253 background: var(--bg-raised);
254 color: var(--ink);
255 border: 1px solid var(--line);
256 border-radius: 0.9rem;
257 box-shadow: var(--shadow);
258}
259.read-menu[hidden] { display: none; }
260.read-menu p { margin: 0.35rem 0.55rem 0.25rem; color: var(--muted); font-size: 0.85rem; }
261.read-menu button { width: 100%; justify-content: flex-start; background: transparent; border: 0; min-height: 2.75rem; }
262
263#toast {
264 position: fixed;
265 left: 50%;
266 bottom: 1rem;
267 transform: translate(-50%, 0.6rem);
268 width: min(100% - 2rem, 28rem);
269 background: var(--ink);
270 color: var(--bg);
271 padding: 0.8rem 1rem;
272 border-radius: 0.8rem;
273 opacity: 0;
274 pointer-events: none;
275 z-index: 30;
276}
277#toast[data-show="1"] { opacity: 1; transform: translate(-50%, 0); }
278
279.panel, .editor, .settings, .keys {
280 display: grid;
281 gap: 0.9rem;
282 margin: 0.4rem 0 3rem;
283}
284label { display: grid; gap: 0.3rem; font-size: 0.95rem; }
285input, textarea {
286 width: 100%;
287 padding: 0.7rem 0.8rem;
288 border-radius: 0.75rem;
289 border: 1px solid var(--line);
290 background: var(--bg-raised);
291 color: var(--ink);
292 font-size: 1rem;
293}
294textarea { min-height: 7.5rem; line-height: 1.55; resize: vertical; }
295fieldset {
296 margin: 0;
297 padding: 0.9rem;
298 border: 1px solid var(--line);
299 border-radius: 1rem;
300 background: var(--bg-raised);
301 display: grid;
302 gap: 0.7rem;
303}
304legend { padding: 0 0.3rem; color: var(--muted); }
305.choice { display: grid; gap: 0.45rem; }
306.choice label {
307 display: flex;
308 align-items: center;
309 gap: 0.6rem;
310 min-height: 2.75rem;
311 padding: 0.35rem 0.2rem;
312}
313.choice input { width: 1.1rem; height: 1.1rem; }
314.row-actions, .paragraph-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
315.admin-day {
316 display: flex;
317 justify-content: space-between;
318 gap: 0.8rem;
319 align-items: center;
320 padding: 0.8rem 0;
321 border-bottom: 1px solid var(--line);
322}
323.admin-day a { text-decoration: none; }
324.admin-day small { color: var(--muted); }
325.user-row {
326 display: flex;
327 flex-wrap: wrap;
328 justify-content: space-between;
329 gap: 0.7rem 1rem;
330 align-items: center;
331 padding: 0.85rem 0;
332 border-bottom: 1px solid var(--line);
333}
334.user-row > div { flex: 1; min-width: 10rem; }
335.user-row strong, .user-row small, .user-row .user-role { display: block; }
336.user-row small, .user-row .user-role { color: var(--muted); }
337.user-row .user-role { margin-top: 0.15rem; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
338.user-row button { flex: none; }
339.token-once {
340 padding: 0.9rem;
341 border-radius: 1rem;
342 background: color-mix(in srgb, var(--accent) 14%, var(--bg-raised));
343 border: 1px solid var(--accent);
344 display: grid;
345 gap: 0.55rem;
346}
347.token-once textarea { font-family: ui-monospace, "Cascadia Mono", "Liberation Mono", monospace; min-height: 5rem; }
348.key-row { display: flex; justify-content: space-between; gap: 0.8rem; align-items: center; padding: 0.35rem 0; border-bottom: 1px solid var(--line); }
349.key-row p, .key-open span { display: block; margin: 0.15rem 0; }
350.key-row .revoked { color: var(--muted); text-decoration: line-through; }
351.key-open {
352 flex: 1;
353 min-width: 0;
354 margin: 0;
355 padding: 0.45rem 0.2rem;
356 border: 0;
357 background: transparent;
358 color: inherit;
359 font: inherit;
360 text-align: left;
361 cursor: pointer;
362}
363.key-open:hover span:first-child, .key-open:focus-visible span:first-child { text-decoration: underline; }
364.wiki-search, .wiki-page, .wiki-category { margin: 0.2rem 0 1.4rem; }
365.wiki-search { display: grid; gap: 0.55rem; }
366.wiki-cat-head {
367 display: flex;
368 justify-content: space-between;
369 gap: 0.7rem;
370 align-items: center;
371}
372.wiki-cat-head h2 { margin: 0.2rem 0; }
373.wiki-page-link, .wiki-result {
374 display: block;
375 padding: 0.85rem 1rem;
376 margin: 0.45rem 0;
377 background: var(--bg-raised);
378 border: 1px solid var(--line);
379 border-radius: 1rem;
380 text-decoration: none;
381}
382.wiki-page-link small, .wiki-result small, .hint { color: var(--muted); }
383.wiki-actions, .wiki-cat-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; }
384.wiki-toc {
385 display: flex;
386 flex-wrap: wrap;
387 gap: 0.4rem;
388 margin: 0.2rem 0 1.2rem;
389}
390.wiki-toc a {
391 text-decoration: none;
392 border: 1px solid var(--line);
393 background: var(--bg-raised);
394 border-radius: 999px;
395 padding: 0.35rem 0.75rem;
396 min-height: 2.25rem;
397 display: inline-flex;
398 align-items: center;
399}
400.wiki-chapter {
401 padding-top: 0.7rem;
402 margin-top: 0.35rem;
403 border-top: 1px solid var(--line);
404 scroll-margin-top: 0.75rem;
405}
406.wiki-chapter h2 { font-size: 1.35rem; margin: 0.15rem 0 0.7rem; }
407.wiki-chapter p { font-size: 1.15rem; line-height: 1.75; margin: 0 0 1rem; }
408.wiki-link { color: var(--accent); }
409.wiki-broken { color: var(--muted); border-bottom: 1px dashed var(--muted); }
410.wiki-missing {
411 font-size: 0.72em;
412 letter-spacing: 0.06em;
413 text-transform: uppercase;
414 margin-left: 0.3rem;
415}
416.wiki-chapter.is-target h2 { color: var(--accent); }
417textarea.wiki-source {
418 min-height: 16rem;
419 font-family: ui-monospace, "Cascadia Mono", "Liberation Mono", monospace;
420 font-size: 0.95rem;
421}
422.hint { margin: 0; font-size: 0.95rem; }
423.docs { padding-bottom: 3rem; }
424.docs h1 { font-size: clamp(2rem, 5vw, 3rem); }
425.docs pre {
426 overflow: auto;
427 padding: 0.9rem 1rem;
428 background: var(--bg-raised);
429 border: 1px solid var(--line);
430 border-radius: 0.9rem;
431 line-height: 1.45;
432 font-size: 0.86rem;
433}
434.docs code { font-family: ui-monospace, "Cascadia Mono", "Liberation Mono", monospace; }
435.docs table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
436.docs th, .docs td { text-align: left; vertical-align: top; padding: 0.45rem 0.4rem; border-bottom: 1px solid var(--line); }
437@media (min-width: 800px) {
438 .topbar, .gate, #app, .docs { width: min(100% - 4rem, 46rem); }
439 .story p { font-size: 1.2rem; }
440}