source: Klonkt/src/assets/css/ward.css@ 3866994

Last change on this file since 3866994 was 5b6f93b, checked in by Robin <roboburr@…>, 3 months ago

Ward-PWA: licht thema en kaarten zonder tussenruimtes

Twee wensen van Robin (12-8).

LICHT, NIET DONKER. De basis is omgedraaid: lichte achtergrond, donkere
tekst, witte kaarten. De themakleur kleurt nog steeds het accent, maar
de achtergrondtint mengt nu naar WIT in plaats van naar zwart, zodat de
gekozen kleur een vleugje geeft zonder de leesbaarheid te kosten. Alle
losse donkere kleuren (inputvelden, secundaire knoppen, de glasplaat van
het gesprek) zijn meegegaan.

KAARTEN ZONDER TUSSENRUIMTES, zoals de Shaer-apps. Was een grid met
gaten; nu CSS multi-column masonry: de kaarten raken elkaar, gepakt in
kolommen die naar breedte meer worden (net als het staggered grid van de
app). Een dunne lijn onder elke kaart en tussen de kolommen houdt ze
leesbaar zonder ruimte ertussen.

Changed files:
src/assets/css/ward.css

  • :root naar een licht palet; alle donkere resten omgezet
  • .cards als column-masonry, gap 0, hairlines

src/assets/js/ward-theme.js

  • achtergrondtint mengt naar wit ipv zwart

remarks: 906 tests groen. Kleur en dichtheid zijn oogdingen; even kijken
op dev of het licht genoeg oogt en de kolommen goed pakken.

-robo
Co-Authored-By: Claude Opus 4.8 <noreply@…>

  • Property mode set to 100644
File size: 14.9 KB
Line 
1/* De Ward PWA: rustig, groot genoeg voor een kind, LICHT (Robins wens 12-8). */
2:root {
3 --bg: #f4f5f9;
4 --card: #ffffff;
5 --ink: #1b2230;
6 --dim: #5b6472;
7 --line: #e3e6ee; /* dunne scheiding tussen aanrakende kaarten */
8 --accent: #5a32e6;
9 --on-accent: #ffffff;
10 --bg-top: #eef0f7;
11 --bg-bottom: #f7f8fb;
12 --alarm: #c47a00;
13 --ok: #2f9e52;
14}
15* { box-sizing: border-box; }
16/* Het hidden-attribuut wint ALTIJD. Zonder deze regel verslaat elke eigen
17 display-regel (zoals de flex van #thread) de browser-default display:none,
18 en dan staat een 'verborgen' overlay gewoon over de pagina heen. Dat was
19 precies de vastzittende gespreks-overlay van 12-8. */
20[hidden] { display: none !important; }
21body {
22 margin: 0; padding: 16px calc(16px + env(safe-area-inset-right)) 32px calc(16px + env(safe-area-inset-left));
23 background: linear-gradient(var(--bg-top), var(--bg-bottom)) fixed, var(--bg);
24 color: var(--ink);
25 font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
26}
27h1 { font-size: 1.4rem; margin: 8px 0 20px; }
28h2 { font-size: 1rem; margin: 24px 0 10px; color: var(--dim); font-weight: 600; }
29
30/* De hulpknop is het belangrijkste element op deze pagina en ziet er ook zo
31 uit: vol breed, grote raakzone, geen concurrentie eromheen. */
32.help button {
33 width: 100%; padding: 18px; border: 0; border-radius: 14px;
34 background: var(--accent); color: var(--on-accent); font-size: 1.1rem; font-weight: 600;
35}
36.help button:disabled { background: #d8dce6; color: var(--dim); }
37.help .hint { margin: 8px 2px 0; color: var(--dim); font-size: .85rem; }
38
39.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
40.card { background: var(--card); border-radius: 12px; padding: 12px 14px; }
41.row { display: flex; align-items: center; gap: 10px; }
42.name { font-weight: 600; margin: 0; }
43.hint { color: var(--dim); font-size: .85rem; margin: 6px 0 0; }
44.empty { color: var(--dim); }
45
46.chip { margin-left: auto; font-size: .75rem; padding: 3px 9px; border-radius: 999px; background: #eef0f6; color: var(--dim); }
47.chip.ok { background: rgba(70,194,106,.16); color: var(--ok); }
48.chip.away { background: rgba(239,159,39,.16); color: var(--alarm); }
49
50/* Misvormd krijgt de alarmkleur, onbereikbaar bewust NIET: niet-weten is geen
51 misconfiguratie. Maar het is ook geen goedkeuring, dus het staat er wel. */
52.note { margin: 8px 0 0; font-size: .85rem; padding: 6px 9px; border-radius: 8px; }
53.note.alarm { background: rgba(239,159,39,.16); color: var(--alarm); }
54.note.unknown { background: rgba(154,167,187,.14); color: var(--dim); }
55
56/* ── De feed ──────────────────────────────────────────────────────────── */
57.post { background: var(--card); border-radius: 12px; padding: 12px 14px; border: 2px solid transparent; }
58.post .avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
59.post .when { margin-left: auto; color: var(--dim); font-size: .8rem; }
60.post .cw { color: var(--alarm); font-size: .85rem; margin: 6px 0 0; }
61.post .body { margin-top: 8px; overflow-wrap: anywhere; }
62.post .body img, .post .body video { max-width: 100%; height: auto; border-radius: 8px; }
63/* Waar de boei zou landen. Zichtbaar oplichten, want mikken met een vinger
64 zonder terugkoppeling is gokken. */
65.post.hover { border-color: var(--accent); }
66
67/* ── De reddingsboei ──────────────────────────────────────────────────── */
68#buoy {
69 position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom));
70 width: 76px; height: 76px; border: 0; border-radius: 50%;
71 background: transparent; font-size: 52px; line-height: 1;
72 /* Zonder dit vecht slepen met scrollen en verlies je hem halverwege. */
73 touch-action: none; cursor: grab; z-index: 50;
74}
75#buoy.dragging { cursor: grabbing; transform: scale(1.1); }
76
77dialog#help-dialog {
78 border: 0; border-radius: 16px; padding: 18px; max-width: 420px; width: calc(100% - 32px);
79 background: var(--card); color: var(--ink);
80}
81dialog#help-dialog::backdrop { background: rgba(0,0,0,.5); }
82dialog#help-dialog h2 { margin: 0 0 10px; font-size: 1.05rem; color: var(--ink); }
83dialog#help-dialog label { display: block; color: var(--dim); font-size: .85rem; margin-bottom: 4px; }
84dialog#help-dialog textarea {
85 width: 100%; border-radius: 10px; border: 1px solid var(--line);
86 background: #fbfbfe; color: var(--ink); padding: 8px; font: inherit;
87}
88dialog#help-dialog menu { display: flex; gap: 8px; justify-content: flex-end; margin: 14px 0 0; padding: 0; }
89dialog#help-dialog button { border: 0; border-radius: 10px; padding: 10px 14px; background: #eef0f6; color: var(--ink); font: inherit; }
90dialog#help-dialog button.primary { background: var(--accent); color: var(--on-accent); font-weight: 600; }
91
92/* Voor schermlezers, niet voor het oog. */
93.sr-only {
94 position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
95 overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
96}
97
98/* ── De hemel ─────────────────────────────────────────────────────────── */
99/* Ligt achter alles en draait altijd. In kaartenstand is hij decor; in
100 berichtenstand vallen de kaarten weg en is hij de interface. */
101#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
102#app { position: relative; z-index: 1; }
103.topbar { display: flex; align-items: center; gap: 12px; }
104.topbar h1 { margin: 8px 0 20px; }
105.topbar #mode {
106 margin-left: auto; border: 0; border-radius: 999px; padding: 8px 16px;
107 background: #eef0f6; color: var(--ink); font: inherit;
108}
109/* De kaarten vallen weg, de hemel blijft: dezelfde beweging als in de app. */
110body.messages-mode .help, body.messages-mode .cards { display: none; }
111
112/* ── De zwaai-hand ────────────────────────────────────────────────────── */
113/* Zelfde hoek als de boei; ze wisselen elkaar af met de stand. */
114#hand {
115 position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom));
116 width: 76px; height: 76px; border: 0; border-radius: 50%;
117 background: transparent; font-size: 52px; line-height: 1;
118 touch-action: none; cursor: grab; z-index: 50;
119}
120#hand.dragging { cursor: grabbing; transform: scale(1.1); }
121
122/* ── Het gesprek over de hemel ────────────────────────────────────────── */
123#thread {
124 position: fixed; inset: 0; z-index: 40;
125 display: flex; flex-direction: column;
126 /* Doorschijnend: de hemel eronder blijft zichtbaar draaien, net als de
127 glazen bubbels in de app. */
128 background: rgba(244, 245, 249, .78); backdrop-filter: blur(14px);
129}
130#thread header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
131#thread header h2 { margin: 0; font-size: 1.05rem; }
132#thread-close { border: 0; background: #eef0f6; color: var(--ink); border-radius: 10px; padding: 8px 12px; font-size: 1rem; }
133#thread-list { flex: 1; overflow-y: auto; padding: 8px 16px; display: flex; flex-direction: column; gap: 8px; }
134.bubble { max-width: 78%; padding: 10px 12px; border-radius: 14px; background: var(--card); }
135.bubble.out { align-self: flex-end; background: var(--accent); color: var(--on-accent); }
136.bubble.out .when { color: rgba(255,255,255,.7); }
137.bubble.wave { font-size: 1.4rem; }
138.bubble .when { display: block; margin-top: 4px; font-size: .7rem; color: var(--dim); }
139.bubble .body img { max-width: 100%; border-radius: 8px; }
140#thread-form { display: flex; gap: 8px; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); }
141#thread-form input {
142 flex: 1; border-radius: 999px; border: 1px solid var(--line);
143 background: #fbfbfe; color: var(--ink); padding: 10px 16px; font: inherit;
144}
145#thread-form button { border: 0; border-radius: 999px; padding: 10px 18px; background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 600; }
146
147/* ── Het zwaai-paneel ─────────────────────────────────────────────────── */
148dialog#wave-dialog {
149 border: 0; border-radius: 16px; padding: 18px; max-width: 320px; width: calc(100% - 48px);
150 background: var(--card); color: var(--ink); text-align: center;
151}
152dialog#wave-dialog::backdrop { background: rgba(0,0,0,.4); }
153dialog#wave-dialog h2 { margin: 0 0 12px; font-size: 1.05rem; }
154.wave-answers { display: grid; gap: 8px; }
155.wave-answers button { border: 0; border-radius: 10px; padding: 12px; background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 600; }
156#wave-cancel { margin-top: 10px; border: 0; background: none; color: var(--dim); font: inherit; }
157
158/* ── De vriendenkiezer achter de (+) ──────────────────────────────────── */
159dialog#friends-dialog {
160 border: 0; border-radius: 16px; padding: 18px; max-width: 380px; width: calc(100% - 48px);
161 max-height: 70vh; overflow-y: auto;
162 background: var(--card); color: var(--ink);
163}
164dialog#friends-dialog::backdrop { background: rgba(0,0,0,.4); }
165dialog#friends-dialog h2 { margin: 0 0 12px; font-size: 1.05rem; }
166.friend button.row {
167 width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
168 border: 0; background: none; color: var(--ink); padding: 4px 2px; font: inherit; cursor: pointer;
169}
170.friend .avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
171.friend .wie { display: flex; flex-direction: column; }
172#friends-cancel { margin-top: 12px; border: 0; background: none; color: var(--dim); font: inherit; }
173
174/* ── De composer ──────────────────────────────────────────────────────── */
175.feed-head { display: flex; align-items: center; gap: 12px; }
176.feed-head h2 { margin: 24px 0 10px; }
177#compose-open { margin-left: auto; border: 0; border-radius: 999px; padding: 8px 16px; background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 600; }
178
179dialog#compose-dialog {
180 border: 0; border-radius: 16px; padding: 16px; max-width: 480px; width: calc(100% - 32px);
181 background: var(--card); color: var(--ink);
182}
183dialog#compose-dialog::backdrop { background: rgba(0,0,0,.5); }
184.compose-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
185.compose-head #compose-cancel { border: 0; background: #eef0f6; color: var(--ink); border-radius: 10px; padding: 8px 12px; font-size: 1rem; }
186.compose-head #compose-vis { flex: 1; border-radius: 10px; border: 1px solid var(--line); background: #fbfbfe; color: var(--ink); padding: 8px; font: inherit; }
187.compose-head .primary { border: 0; border-radius: 10px; padding: 8px 16px; background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 600; }
188.compose-head .primary:disabled { background: #3a3f4d; color: var(--dim); }
189#compose-text { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: #fbfbfe; color: var(--ink); padding: 10px; font: inherit; resize: vertical; }
190.compose-media { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
191.media-chip { position: relative; display: flex; align-items: center; gap: 6px; background: #fbfbfe; border-radius: 10px; padding: 6px 8px; }
192.media-chip img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
193.media-chip .kind { font-size: 1.2rem; }
194.media-chip .name { font-size: .8rem; color: var(--dim); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
195.media-chip .drop { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: #000; color: #fff; font-size: .75rem; line-height: 1; }
196.compose-tools { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
197.compose-tools .tool { font-size: 1.4rem; cursor: pointer; padding: 4px 8px; border-radius: 10px; background: #fbfbfe; }
198.compose-tools .hint { margin-left: auto; }
199
200/* ── Het kaartraster: meer kolommen naarmate er ruimte is ─────────────── */
201/* Robins wens (12-8): op desktop net als op mobiel en tablet MEERDERE
202 kolommen. auto-fill met een minimum vult zelf op: één kolom op een smalle
203 telefoon, twee op een tablet, drie of meer op een breed scherm. */
204/* Masonry ZONDER tussenruimtes, zoals de Shaer-apps (Robins wens 12-8): de
205 kaarten raken elkaar, gepakt in kolommen die naar breedte meer worden. CSS
206 multi-column vult zelf van boven naar beneden; een dunne lijn scheidt twee
207 aanrakende kaarten zodat ze niet in elkaar overlopen. */
208.cards {
209 column-width: 280px;
210 column-gap: 0;
211 column-rule: 1px solid var(--line);
212}
213.cards .post {
214 break-inside: avoid;
215 margin: 0;
216 border-radius: 0;
217 border-bottom: 1px solid var(--line);
218}
219/* De eerste kaart in elke kolom mag geen rand bovenlangs missen; de scheiding
220 zit onderaan, dus alleen de allerlaatste in beeld valt weg. Geen probleem:
221 de feed eindigt toch met de rand van de sectie. */
222
223/* ── De mini-speler ───────────────────────────────────────────────────── */
224#mini-player {
225 position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
226 z-index: 45; display: flex; align-items: center; gap: 10px;
227 padding: 8px 12px; border-radius: 14px;
228 background: var(--card); box-shadow: 0 6px 24px rgba(20,30,60,.18); border: 1px solid var(--line);
229 max-width: 520px; margin: 0 auto;
230}
231#mini-player #mini-toggle { border: 0; border-radius: 50%; width: 40px; height: 40px; background: var(--accent); color: var(--on-accent); font-size: 1rem; }
232#mini-player #mini-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
233#mini-player #mini-close { border: 0; background: none; color: var(--dim); font-size: 1rem; }
234
235/* ── De themakiezer ───────────────────────────────────────────────────── */
236.icon-btn { border: 0; background: #eef0f6; border-radius: 999px; width: 38px; height: 38px; font-size: 1.1rem; }
237dialog#theme-dialog {
238 border: 0; border-radius: 16px; padding: 18px; max-width: 320px; width: calc(100% - 48px);
239 background: var(--card); color: var(--ink); text-align: center;
240}
241dialog#theme-dialog::backdrop { background: rgba(0,0,0,.4); }
242dialog#theme-dialog h2 { margin: 0 0 14px; font-size: 1.05rem; }
243.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
244.swatch { width: 100%; aspect-ratio: 1; border: 3px solid transparent; border-radius: 50%; cursor: pointer; }
245.swatch.chosen { border-color: var(--ink); }
246#theme-close { margin-top: 14px; border: 0; background: none; color: var(--dim); font: inherit; }
Note: See TracBrowser for help on using the repository browser.