| 1 | <!DOCTYPE html>
|
|---|
| 2 | <html lang="<%= lang %>">
|
|---|
| 3 | <head>
|
|---|
| 4 | <meta charset="utf-8">
|
|---|
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
|---|
| 6 | <title><%= state.strings.title %></title>
|
|---|
| 7 | <link rel="manifest" href="/ward/manifest.webmanifest">
|
|---|
| 8 | <link rel="icon" href="/ward/icon.svg" type="image/svg+xml">
|
|---|
| 9 | <meta name="theme-color" content="#5a32e6">
|
|---|
| 10 | <link rel="stylesheet" href="/ward/app.css">
|
|---|
| 11 | </head>
|
|---|
| 12 | <body>
|
|---|
| 13 | <!-- De hemel ligt ACHTER alles en draait altijd, ook in kaartenstand: de
|
|---|
| 14 | kaarten vallen straks weg en dan is hij er gewoon nog, precies zoals in
|
|---|
| 15 | Shaer. Aria-hidden want hij is decor tot je hem aanzet. -->
|
|---|
| 16 | <canvas id="sky" aria-hidden="true"></canvas>
|
|---|
| 17 |
|
|---|
| 18 | <main id="app">
|
|---|
| 19 | <div class="topbar">
|
|---|
| 20 | <h1><%= state.strings.title %></h1>
|
|---|
| 21 | <button id="theme-open" type="button" class="icon-btn" aria-label="<%= state.strings.theme %>">๐จ</button>
|
|---|
| 22 | <button id="mode" type="button" aria-pressed="false"><%= state.strings.toSky %></button>
|
|---|
| 23 | </div>
|
|---|
| 24 |
|
|---|
| 25 | <!-- De hulpknop staat BOVENAAN en niet onderaan bij de instellingen.
|
|---|
| 26 | Als je hem nodig hebt, moet je niet hoeven zoeken. -->
|
|---|
| 27 | <section class="help">
|
|---|
| 28 | <button id="help-btn" type="button"><%= state.strings.help %></button>
|
|---|
| 29 | <p class="hint" id="help-hint"></p>
|
|---|
| 30 | </section>
|
|---|
| 31 |
|
|---|
| 32 | <section id="feed">
|
|---|
| 33 | <div class="feed-head">
|
|---|
| 34 | <h2><%= state.strings.feed %></h2>
|
|---|
| 35 | <button id="compose-open" type="button" class="primary"><%= state.strings.write %></button>
|
|---|
| 36 | </div>
|
|---|
| 37 | <div class="cards" id="card-list"></div>
|
|---|
| 38 | <p class="empty" id="feed-empty" hidden><%= state.strings.feedEmpty %></p>
|
|---|
| 39 | </section>
|
|---|
| 40 |
|
|---|
| 41 | <section id="guardians">
|
|---|
| 42 | <h2><%= state.strings.guardians %></h2>
|
|---|
| 43 | <ul class="list" id="guardian-list"></ul>
|
|---|
| 44 | <p class="empty" id="guardians-empty" hidden><%= state.strings.noGuardians %></p>
|
|---|
| 45 | </section>
|
|---|
| 46 |
|
|---|
| 47 | <section id="offers" hidden>
|
|---|
| 48 | <h2><%= state.strings.offers %></h2>
|
|---|
| 49 | <ul class="list" id="offer-list"></ul>
|
|---|
| 50 | </section>
|
|---|
| 51 |
|
|---|
| 52 | <section id="waiting" hidden>
|
|---|
| 53 | <h2><%= state.strings.waiting %></h2>
|
|---|
| 54 | <ul class="list" id="waiting-list"></ul>
|
|---|
| 55 | </section>
|
|---|
| 56 | </main>
|
|---|
| 57 |
|
|---|
| 58 | <!-- De composer: schrijven met foto, geluid of video. De posttypes
|
|---|
| 59 | dicteren hoe de widget eruitziet (Robins wens), maar de kern is een
|
|---|
| 60 | tekstvak plus tot vier media; de server maakt de rest af (poster,
|
|---|
| 61 | waveform) zoals bij de app. -->
|
|---|
| 62 | <dialog id="compose-dialog">
|
|---|
| 63 | <div class="compose-head">
|
|---|
| 64 | <button id="compose-cancel" type="button" aria-label="<%= state.strings.cancel %>">โ</button>
|
|---|
| 65 | <select id="compose-vis" aria-label="<%= state.strings.visibility %>">
|
|---|
| 66 | <option value="friends"><%= state.strings.visFriends %></option>
|
|---|
| 67 | <option value="public"><%= state.strings.visPublic %></option>
|
|---|
| 68 | </select>
|
|---|
| 69 | <button id="compose-send" type="button" class="primary"><%= state.strings.post %></button>
|
|---|
| 70 | </div>
|
|---|
| 71 | <textarea id="compose-text" rows="4" maxlength="5000" placeholder="<%= state.strings.writeHere %>"></textarea>
|
|---|
| 72 | <div id="compose-media" class="compose-media"></div>
|
|---|
| 73 | <div class="compose-tools">
|
|---|
| 74 | <label class="tool" title="<%= state.strings.addPhoto %>">
|
|---|
| 75 | ๐ท<input type="file" accept="image/*" hidden data-kind="image">
|
|---|
| 76 | </label>
|
|---|
| 77 | <label class="tool" title="<%= state.strings.addAudio %>">
|
|---|
| 78 | ๐ค<input type="file" accept="audio/*" hidden data-kind="audio">
|
|---|
| 79 | </label>
|
|---|
| 80 | <label class="tool" title="<%= state.strings.addVideo %>">
|
|---|
| 81 | ๐ฌ<input type="file" accept="video/*" hidden data-kind="video">
|
|---|
| 82 | </label>
|
|---|
| 83 | <span id="compose-status" class="hint"></span>
|
|---|
| 84 | </div>
|
|---|
| 85 | </dialog>
|
|---|
| 86 |
|
|---|
| 87 | <!-- De reddingsboei zweeft boven de pagina en is sleepbaar, net als in
|
|---|
| 88 | Shaer. Een knop, geen plaatje: dan werkt hij ook met een toetsenbord en
|
|---|
| 89 | leest een schermlezer hem voor. -->
|
|---|
| 90 | <button id="buoy" type="button" aria-describedby="buoy-hint">๐</button>
|
|---|
| 91 | <p id="buoy-hint" class="sr-only"><%= state.strings.buoyHint %></p>
|
|---|
| 92 |
|
|---|
| 93 | <!-- De zwaai-hand (ยง5): alleen in berichtenstand, dezelfde hoek als de
|
|---|
| 94 | boei. Ze wisselen elkaar af: met de kaarten verdwijnt de boei, op de
|
|---|
| 95 | hemel hangt de hand. -->
|
|---|
| 96 | <button id="hand" type="button" hidden aria-describedby="hand-hint">๐</button>
|
|---|
| 97 | <p id="hand-hint" class="sr-only"><%= state.strings.handHint %></p>
|
|---|
| 98 |
|
|---|
| 99 | <!-- Het gesprek schuift OVER de hemel; die blijft eronder gewoon draaien. -->
|
|---|
| 100 | <section id="thread" hidden>
|
|---|
| 101 | <header>
|
|---|
| 102 | <button id="thread-close" type="button" aria-label="<%= state.strings.close %>">โ</button>
|
|---|
| 103 | <h2 id="thread-name"></h2>
|
|---|
| 104 | </header>
|
|---|
| 105 | <div id="thread-list"></div>
|
|---|
| 106 | <form id="thread-form">
|
|---|
| 107 | <input id="thread-text" type="text" autocomplete="off" maxlength="2000"
|
|---|
| 108 | placeholder="<%= state.strings.writeHere %>">
|
|---|
| 109 | <button type="submit" class="primary"><%= state.strings.send %></button>
|
|---|
| 110 | </form>
|
|---|
| 111 | </section>
|
|---|
| 112 |
|
|---|
| 113 | <!-- De vriendenkiezer achter de (+): aan wie wil je iets sturen? -->
|
|---|
| 114 | <dialog id="friends-dialog">
|
|---|
| 115 | <h2><%= state.strings.newTitle %></h2>
|
|---|
| 116 | <ul id="friends-list" class="list"></ul>
|
|---|
| 117 | <p class="empty" id="friends-empty" hidden><%= state.strings.noFriends %></p>
|
|---|
| 118 | <button id="friends-cancel" type="button"><%= state.strings.cancel %></button>
|
|---|
| 119 | </dialog>
|
|---|
| 120 |
|
|---|
| 121 | <!-- Het zwaai-paneel: de tekst die je kiest IS het bericht. -->
|
|---|
| 122 | <dialog id="wave-dialog">
|
|---|
| 123 | <h2 id="wave-title"></h2>
|
|---|
| 124 | <div class="wave-answers">
|
|---|
| 125 | <button data-wave="1">๐ <%= state.strings.wave %></button>
|
|---|
| 126 | <button data-text="<%= state.strings.waveCall %>"><%= state.strings.waveCall %></button>
|
|---|
| 127 | <button data-text="<%= state.strings.waveThanks %>"><%= state.strings.waveThanks %></button>
|
|---|
| 128 | </div>
|
|---|
| 129 | <button id="wave-cancel" type="button"><%= state.strings.notNow %></button>
|
|---|
| 130 | </dialog>
|
|---|
| 131 |
|
|---|
| 132 | <dialog id="help-dialog">
|
|---|
| 133 | <form method="dialog">
|
|---|
| 134 | <h2 id="help-title"></h2>
|
|---|
| 135 | <label for="help-words"><%= state.strings.helpWords %></label>
|
|---|
| 136 | <textarea id="help-words" rows="3" maxlength="500"></textarea>
|
|---|
| 137 | <menu>
|
|---|
| 138 | <button value="cancel"><%= state.strings.cancel %></button>
|
|---|
| 139 | <button id="help-send" value="send" class="primary"><%= state.strings.helpSend %></button>
|
|---|
| 140 | </menu>
|
|---|
| 141 | </form>
|
|---|
| 142 | </dialog>
|
|---|
| 143 |
|
|---|
| 144 | <!-- De mini-speler: รฉรฉn blijvende <audio> buiten de feed, zodat het geluid
|
|---|
| 145 | een herteken en een wissel naar de hemel overleeft. -->
|
|---|
| 146 | <div id="mini-player" hidden>
|
|---|
| 147 | <audio id="mini-audio" preload="none"></audio>
|
|---|
| 148 | <button id="mini-toggle" type="button" aria-label="<%= state.strings.playPause %>">โถ</button>
|
|---|
| 149 | <span id="mini-title"></span>
|
|---|
| 150 | <button id="mini-close" type="button" aria-label="<%= state.strings.close %>">โ</button>
|
|---|
| 151 | </div>
|
|---|
| 152 |
|
|---|
| 153 | <!-- De themakiezer (SkyPalette): acht kleuren, de keuze kleurt de hele ward. -->
|
|---|
| 154 | <dialog id="theme-dialog">
|
|---|
| 155 | <h2><%= state.strings.theme %></h2>
|
|---|
| 156 | <div id="theme-swatches" class="swatches"></div>
|
|---|
| 157 | <button id="theme-close" type="button"><%= state.strings.cancel %></button>
|
|---|
| 158 | </dialog>
|
|---|
| 159 |
|
|---|
| 160 | <!-- De begintoestand reist als JSON mee, zodat de pagina meteen compleet is
|
|---|
| 161 | en niet eerst leeg staat te wachten op een fetch. Geen inline script:
|
|---|
| 162 | CSP staat dat niet toe, dus het gaat als data door een script-tag met
|
|---|
| 163 | een type dat de browser niet uitvoert. -->
|
|---|
| 164 | <script type="application/json" id="ward-state"><%- JSON.stringify(state) %></script>
|
|---|
| 165 | <!-- Module, zodat app.js het hemelmodel kan importeren. -->
|
|---|
| 166 | <script type="module" src="/ward/app.js"></script>
|
|---|
| 167 | </body>
|
|---|
| 168 | </html>
|
|---|