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

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

De Ward PWA: het gesprek over de hemel, en de zwaai-hand

Plak 4. Een tik op een gezicht opent nu echt iets.

HET GESPREK is een overlay OVER de levende hemel, geen aparte pagina:
de hemel eronder blijft dezelfde draaiende instantie, en het paneel is
doorschijnend met blur, zoals de glazen bubbels in de app. Dezelfde
bron als de C2S-lezing die Shaer gebruikt (conversationHistory):
inkomend de ap_mentions, uitgaand de eigen directe notes. Openen is
lezen: markRead neemt het maximum, dus een oud toestel kan nooit iets
weer ongelezen maken. Verversen is pollen om de acht seconden zolang
het gesprek open staat; het ritme van een gesprek is geen milliseconde,
en een socket kan later zonder iets te slopen.

DE ZWAAI-HAND hangt in dezelfde hoek als de boei en ze wisselen elkaar
af met de stand: met de kaarten verdwijnt de boei, op de hemel hangt de
hand. Slepen op een gezicht opent het paneel met de drie antwoorden, en
de tekst die je kiest IS het bericht. De treffer is sky.pick(): exact
dezelfde rekensom als een tik, dus mikken gedraagt zich overal gelijk.

Changed files:
src/routes/ward.js

  • /api/thread: beide kanten, cursor, markRead bij openen
  • /api/message: direct bericht of zwaai (shaer:wave reist mee)

src/assets/js/ward-sky.js

  • pick() als publieke mikfunctie

src/assets/js/ward.js

  • thread-overlay met poll, verstuurvak, Escape sluit
  • de hand: slepen, mikken, paneel, versturen

src/views/pages/ward.ejs

  • thread, hand en zwaai-paneel in de schil

src/assets/css/ward.css

  • doorschijnend gesprek, bubbels, hand, paneel

src/services/i18n.js

  • tien sleutels in nl, en, de

test/ward-pwa.test.js

  • het gesprek draagt beide kanten en de zwaai-vlag overleeft; versturen eist een echte ontvanger en echte tekst

remarks: 897 tests groen. Nog niet geport: de (+) voor een nieuw
gesprek, Friends/Orbit-panelen, de composer met media, de mini-speler
en de themakleur; beads volgen. Slepen met een echte vinger is aan
Robin op dev.

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

  • Property mode set to 100644
File size: 8.2 KB
RevLine 
[303bfc4]1/* De Ward PWA: rustig, groot genoeg voor een kind, donker als de rest. */
2:root {
3 --bg: #141a24;
4 --card: #1c2431;
5 --ink: #eef2f8;
6 --dim: #9aa7bb;
7 --accent: #5a32e6;
8 --alarm: #ef9f27;
9 --ok: #46c26a;
10}
11* { box-sizing: border-box; }
12body {
13 margin: 0; padding: 16px calc(16px + env(safe-area-inset-right)) 32px calc(16px + env(safe-area-inset-left));
14 background: var(--bg); color: var(--ink);
15 font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
16}
17h1 { font-size: 1.4rem; margin: 8px 0 20px; }
18h2 { font-size: 1rem; margin: 24px 0 10px; color: var(--dim); font-weight: 600; }
19
20/* De hulpknop is het belangrijkste element op deze pagina en ziet er ook zo
21 uit: vol breed, grote raakzone, geen concurrentie eromheen. */
22.help button {
23 width: 100%; padding: 18px; border: 0; border-radius: 14px;
24 background: var(--accent); color: #fff; font-size: 1.1rem; font-weight: 600;
25}
26.help button:disabled { background: #3a3f4d; color: var(--dim); }
27.help .hint { margin: 8px 2px 0; color: var(--dim); font-size: .85rem; }
28
29.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
30.card { background: var(--card); border-radius: 12px; padding: 12px 14px; }
31.row { display: flex; align-items: center; gap: 10px; }
32.name { font-weight: 600; margin: 0; }
33.hint { color: var(--dim); font-size: .85rem; margin: 6px 0 0; }
34.empty { color: var(--dim); }
35
36.chip { margin-left: auto; font-size: .75rem; padding: 3px 9px; border-radius: 999px; background: #2a3342; color: var(--dim); }
37.chip.ok { background: rgba(70,194,106,.16); color: var(--ok); }
38.chip.away { background: rgba(239,159,39,.16); color: var(--alarm); }
39
40/* Misvormd krijgt de alarmkleur, onbereikbaar bewust NIET: niet-weten is geen
41 misconfiguratie. Maar het is ook geen goedkeuring, dus het staat er wel. */
42.note { margin: 8px 0 0; font-size: .85rem; padding: 6px 9px; border-radius: 8px; }
43.note.alarm { background: rgba(239,159,39,.16); color: var(--alarm); }
44.note.unknown { background: rgba(154,167,187,.14); color: var(--dim); }
[a5a6249]45
46/* ── De feed ──────────────────────────────────────────────────────────── */
47.cards { display: grid; gap: 12px; }
48.post { background: var(--card); border-radius: 12px; padding: 12px 14px; border: 2px solid transparent; }
49.post .avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
50.post .when { margin-left: auto; color: var(--dim); font-size: .8rem; }
51.post .cw { color: var(--alarm); font-size: .85rem; margin: 6px 0 0; }
52.post .body { margin-top: 8px; overflow-wrap: anywhere; }
53.post .body img, .post .body video { max-width: 100%; height: auto; border-radius: 8px; }
54/* Waar de boei zou landen. Zichtbaar oplichten, want mikken met een vinger
55 zonder terugkoppeling is gokken. */
56.post.hover { border-color: var(--accent); }
57
58/* ── De reddingsboei ──────────────────────────────────────────────────── */
59#buoy {
60 position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom));
61 width: 76px; height: 76px; border: 0; border-radius: 50%;
62 background: transparent; font-size: 52px; line-height: 1;
63 /* Zonder dit vecht slepen met scrollen en verlies je hem halverwege. */
64 touch-action: none; cursor: grab; z-index: 50;
65}
66#buoy.dragging { cursor: grabbing; transform: scale(1.1); }
67
68dialog#help-dialog {
69 border: 0; border-radius: 16px; padding: 18px; max-width: 420px; width: calc(100% - 32px);
70 background: var(--card); color: var(--ink);
71}
72dialog#help-dialog::backdrop { background: rgba(0,0,0,.5); }
73dialog#help-dialog h2 { margin: 0 0 10px; font-size: 1.05rem; color: var(--ink); }
74dialog#help-dialog label { display: block; color: var(--dim); font-size: .85rem; margin-bottom: 4px; }
75dialog#help-dialog textarea {
76 width: 100%; border-radius: 10px; border: 1px solid #2a3342;
77 background: #131a25; color: var(--ink); padding: 8px; font: inherit;
78}
79dialog#help-dialog menu { display: flex; gap: 8px; justify-content: flex-end; margin: 14px 0 0; padding: 0; }
80dialog#help-dialog button { border: 0; border-radius: 10px; padding: 10px 14px; background: #2a3342; color: var(--ink); font: inherit; }
81dialog#help-dialog button.primary { background: var(--accent); color: #fff; font-weight: 600; }
82
83/* Voor schermlezers, niet voor het oog. */
84.sr-only {
85 position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
86 overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
87}
[084b046]88
89/* ── De hemel ─────────────────────────────────────────────────────────── */
90/* Ligt achter alles en draait altijd. In kaartenstand is hij decor; in
91 berichtenstand vallen de kaarten weg en is hij de interface. */
92#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
93#app { position: relative; z-index: 1; }
94.topbar { display: flex; align-items: center; gap: 12px; }
95.topbar h1 { margin: 8px 0 20px; }
96.topbar #mode {
97 margin-left: auto; border: 0; border-radius: 999px; padding: 8px 16px;
98 background: #2a3342; color: var(--ink); font: inherit;
99}
100/* De kaarten vallen weg, de hemel blijft: dezelfde beweging als in de app. */
101body.messages-mode .help, body.messages-mode .cards { display: none; }
[5218863]102
103/* ── De zwaai-hand ────────────────────────────────────────────────────── */
104/* Zelfde hoek als de boei; ze wisselen elkaar af met de stand. */
105#hand {
106 position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom));
107 width: 76px; height: 76px; border: 0; border-radius: 50%;
108 background: transparent; font-size: 52px; line-height: 1;
109 touch-action: none; cursor: grab; z-index: 50;
110}
111#hand.dragging { cursor: grabbing; transform: scale(1.1); }
112
113/* ── Het gesprek over de hemel ────────────────────────────────────────── */
114#thread {
115 position: fixed; inset: 0; z-index: 40;
116 display: flex; flex-direction: column;
117 /* Doorschijnend: de hemel eronder blijft zichtbaar draaien, net als de
118 glazen bubbels in de app. */
119 background: rgba(20, 26, 36, .72); backdrop-filter: blur(14px);
120}
121#thread header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
122#thread header h2 { margin: 0; font-size: 1.05rem; }
123#thread-close { border: 0; background: #2a3342; color: var(--ink); border-radius: 10px; padding: 8px 12px; font-size: 1rem; }
124#thread-list { flex: 1; overflow-y: auto; padding: 8px 16px; display: flex; flex-direction: column; gap: 8px; }
125.bubble { max-width: 78%; padding: 10px 12px; border-radius: 14px; background: var(--card); }
126.bubble.out { align-self: flex-end; background: var(--accent); }
127.bubble.wave { font-size: 1.4rem; }
128.bubble .when { display: block; margin-top: 4px; font-size: .7rem; color: rgba(255,255,255,.55); }
129.bubble .body img { max-width: 100%; border-radius: 8px; }
130#thread-form { display: flex; gap: 8px; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); }
131#thread-form input {
132 flex: 1; border-radius: 999px; border: 1px solid #2a3342;
133 background: #131a25; color: var(--ink); padding: 10px 16px; font: inherit;
134}
135#thread-form button { border: 0; border-radius: 999px; padding: 10px 18px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; }
136
137/* ── Het zwaai-paneel ─────────────────────────────────────────────────── */
138dialog#wave-dialog {
139 border: 0; border-radius: 16px; padding: 18px; max-width: 320px; width: calc(100% - 48px);
140 background: var(--card); color: var(--ink); text-align: center;
141}
142dialog#wave-dialog::backdrop { background: rgba(0,0,0,.4); }
143dialog#wave-dialog h2 { margin: 0 0 12px; font-size: 1.05rem; }
144.wave-answers { display: grid; gap: 8px; }
145.wave-answers button { border: 0; border-radius: 10px; padding: 12px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; }
146#wave-cancel { margin-top: 10px; border: 0; background: none; color: var(--dim); font: inherit; }
Note: See TracBrowser for help on using the repository browser.