Changeset 39dab6b in Klonkt for src/assets/css


Ignore:
Timestamp:
08/12/2026 09:43:20 PM (3 months ago)
Author:
Robin <roboburr@…>
Children:
5e0fea7
Parents:
2086ea2
Message:

Ward-PWA: de mini-speler, de themakleur en een breder kaartraster

Drie dingen in een ronde.

DE THEMAKLEUR (SkyPalette). De acht presets en de luminantie-regel komen
LETTERLIJK uit Shaer: dezelfde kleuren, en dezelfde beslissing welke
tekst erop leesbaar is (donker op zon, wit op nacht). Een handgehouden
lijstje zou uit de pas lopen; luminantie beslist. De keuze kleurt het
accent (knoppen, bubbels, de (+)), tint de achtergrond zacht, en laat de
hemel zijn placeholder-schijfjes bijkleuren. Opgeslagen per apparaat.

DE MINI-SPELER. Een feed-kaart rendert een gewone audio, maar de feed
wordt bij elke verversing opnieuw getekend en dan sterft dat element:
de muziek stopt midden in een nummer. Daarom is er EEN blijvende speler
buiten de feed; een audiotegel geeft alleen zijn bron door (gevangen in
de capture-fase) en pauzeert zichzelf. Zo overleeft het geluid een
herteken en een wissel naar de hemel, precies als in de app.

HET KAARTRASTER (Robins wens, 12-8). Op desktop net als op mobiel en
tablet MEER kolommen: auto-fill met een minimum van 280px vult zelf op,
een op een smalle telefoon, twee op een tablet, drie of meer breed.

New file:
src/assets/js/ward-theme.js

  • presets, onSky (luminantie), load/save/apply

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

  • wireTheme (swatches), wireMiniPlayer (gedeelde audio)
  • de hemel skint bij op een themawissel

src/assets/js/ward-sky.js

  • buildAtlas neemt het accent; reskin() bij een kleurwissel

src/views/pages/ward.ejs

  • themaknop, themadialoog, mini-speler-balk

src/assets/css/ward.css

  • accent/achtergrond als variabelen, mini-speler, swatches, responsief raster (auto-fill minmax 280px)

src/services/i18n.js

  • kleur + play/pause in nl, en, de

test/ward-theme.test.js

  • acht presets, en de tekstkleur volgt luminantie

remarks: 905 tests groen. Slepen en het echt doorspelen van audio zijn
in code getest, niet met oor en vinger; dat is aan Robin op dev.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/assets/css/ward.css

    r2086ea2 r39dab6b  
    66  --dim: #9aa7bb;
    77  --accent: #5a32e6;
     8  --on-accent: #ffffff;
     9  --bg-top: #1a2233;
     10  --bg-bottom: #0d1017;
    811  --alarm: #ef9f27;
    912  --ok: #46c26a;
    … …  
    1720body {
    1821  margin: 0; padding: 16px calc(16px + env(safe-area-inset-right)) 32px calc(16px + env(safe-area-inset-left));
    19   background: var(--bg); color: var(--ink);
     22  background: linear-gradient(var(--bg-top), var(--bg-bottom)) fixed, var(--bg);
     23  color: var(--ink);
    2024  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    2125}
    … …  
    2731.help button {
    2832  width: 100%; padding: 18px; border: 0; border-radius: 14px;
    29   background: var(--accent); color: #fff; font-size: 1.1rem; font-weight: 600;
     33  background: var(--accent); color: var(--on-accent); font-size: 1.1rem; font-weight: 600;
    3034}
    3135.help button:disabled { background: #3a3f4d; color: var(--dim); }
    … …  
    5054
    5155/* ── De feed ──────────────────────────────────────────────────────────── */
    52 .cards { display: grid; gap: 12px; }
    5356.post { background: var(--card); border-radius: 12px; padding: 12px 14px; border: 2px solid transparent; }
    5457.post .avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
    … …  
    8487dialog#help-dialog menu { display: flex; gap: 8px; justify-content: flex-end; margin: 14px 0 0; padding: 0; }
    8588dialog#help-dialog button { border: 0; border-radius: 10px; padding: 10px 14px; background: #2a3342; color: var(--ink); font: inherit; }
    86 dialog#help-dialog button.primary { background: var(--accent); color: #fff; font-weight: 600; }
     89dialog#help-dialog button.primary { background: var(--accent); color: var(--on-accent); font-weight: 600; }
    8790
    8891/* Voor schermlezers, niet voor het oog. */
    … …  
    138141  background: #131a25; color: var(--ink); padding: 10px 16px; font: inherit;
    139142}
    140 #thread-form button { border: 0; border-radius: 999px; padding: 10px 18px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; }
     143#thread-form button { border: 0; border-radius: 999px; padding: 10px 18px; background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 600; }
    141144
    142145/* ── Het zwaai-paneel ─────────────────────────────────────────────────── */
    … …  
    148151dialog#wave-dialog h2 { margin: 0 0 12px; font-size: 1.05rem; }
    149152.wave-answers { display: grid; gap: 8px; }
    150 .wave-answers button { border: 0; border-radius: 10px; padding: 12px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; }
     153.wave-answers button { border: 0; border-radius: 10px; padding: 12px; background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 600; }
    151154#wave-cancel { margin-top: 10px; border: 0; background: none; color: var(--dim); font: inherit; }
    152155
    … …  
    170173.feed-head { display: flex; align-items: center; gap: 12px; }
    171174.feed-head h2 { margin: 24px 0 10px; }
    172 #compose-open { margin-left: auto; border: 0; border-radius: 999px; padding: 8px 16px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; }
     175#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; }
    173176
    174177dialog#compose-dialog {
    … …  
    180183.compose-head #compose-cancel { border: 0; background: #2a3342; color: var(--ink); border-radius: 10px; padding: 8px 12px; font-size: 1rem; }
    181184.compose-head #compose-vis { flex: 1; border-radius: 10px; border: 1px solid #2a3342; background: #131a25; color: var(--ink); padding: 8px; font: inherit; }
    182 .compose-head .primary { border: 0; border-radius: 10px; padding: 8px 16px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; }
     185.compose-head .primary { border: 0; border-radius: 10px; padding: 8px 16px; background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 600; }
    183186.compose-head .primary:disabled { background: #3a3f4d; color: var(--dim); }
    184187#compose-text { width: 100%; border-radius: 12px; border: 1px solid #2a3342; background: #131a25; color: var(--ink); padding: 10px; font: inherit; resize: vertical; }
    … …  
    192195.compose-tools .tool { font-size: 1.4rem; cursor: pointer; padding: 4px 8px; border-radius: 10px; background: #131a25; }
    193196.compose-tools .hint { margin-left: auto; }
     197
     198/* ── Het kaartraster: meer kolommen naarmate er ruimte is ─────────────── */
     199/* Robins wens (12-8): op desktop net als op mobiel en tablet MEERDERE
     200   kolommen. auto-fill met een minimum vult zelf op: één kolom op een smalle
     201   telefoon, twee op een tablet, drie of meer op een breed scherm. */
     202.cards {
     203  display: grid;
     204  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
     205  gap: 12px;
     206  align-items: start;
     207}
     208
     209/* ── De mini-speler ───────────────────────────────────────────────────── */
     210#mini-player {
     211  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
     212  z-index: 45; display: flex; align-items: center; gap: 10px;
     213  padding: 8px 12px; border-radius: 14px;
     214  background: var(--card); box-shadow: 0 6px 24px rgba(0,0,0,.4);
     215  max-width: 520px; margin: 0 auto;
     216}
     217#mini-player #mini-toggle { border: 0; border-radius: 50%; width: 40px; height: 40px; background: var(--accent); color: var(--on-accent); font-size: 1rem; }
     218#mini-player #mini-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
     219#mini-player #mini-close { border: 0; background: none; color: var(--dim); font-size: 1rem; }
     220
     221/* ── De themakiezer ───────────────────────────────────────────────────── */
     222.icon-btn { border: 0; background: #2a3342; border-radius: 999px; width: 38px; height: 38px; font-size: 1.1rem; }
     223dialog#theme-dialog {
     224  border: 0; border-radius: 16px; padding: 18px; max-width: 320px; width: calc(100% - 48px);
     225  background: var(--card); color: var(--ink); text-align: center;
     226}
     227dialog#theme-dialog::backdrop { background: rgba(0,0,0,.4); }
     228dialog#theme-dialog h2 { margin: 0 0 14px; font-size: 1.05rem; }
     229.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
     230.swatch { width: 100%; aspect-ratio: 1; border: 3px solid transparent; border-radius: 50%; cursor: pointer; }
     231.swatch.chosen { border-color: var(--ink); }
     232#theme-close { margin-top: 14px; border: 0; background: none; color: var(--dim); font: inherit; }
Note: See TracChangeset for help on using the changeset viewer.