source: Klonkt/src/views/pages/admin-site-edit.ejs@ dd80030

main
Last change on this file since dd80030 was 3068cc0, checked in by roboburr <roboburr@…>, 3 months ago

Slug field as URL: dimmed host prefix + slug in accent colour

The Slug (URL) field now shows website.com/<slug> — the host (real domain
via JS, hub → /user/) dimmed as a prefix, the slug itself in the accent
colour. Single unified field look.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@…>

  • Property mode set to 100644
File size: 24.8 KB
Line 
1<div class="container admin-site-edit-page">
2 <p><a href="/admin" class="btn">&larr; Beheer</a></p>
3 <h1><%= isNew ? 'Nieuwe site' : 'Uiterlijk: ' + site.title %></h1>
4
5 <% if (typeof success !== 'undefined' && success) { %><div class="audio-flash audio-flash--ok"><%= success %></div><% } %>
6 <% if (error) { %><div class="audio-flash audio-flash--err"><%= error %></div><% } %>
7
8 <form method="post" action="<%= isNew ? '/admin/sites/create' : '/admin/sites/' + site.slug + '/save' %>" class="site-form">
9
10 <fieldset>
11 <legend>Identiteit</legend>
12 <label>
13 <span>Slug (URL) <% if (!isNew) { %><em>(vast)</em><% } %></span>
14 <span class="slug-url">
15 <span class="slug-url-host" id="slug-host"
16 data-prefix="<%= (typeof tenancy !== 'undefined' && tenancy === 'hub') ? '/user/' : '/' %>">website.com/</span><input
17 type="text" name="slug" id="slug-input" class="slug-url-input" value="<%= site.slug %>" required <% if (!isNew) { %>readonly<% } %>
18 pattern="[a-z0-9_-]{2,40}" placeholder="jouwslug"
19 autocapitalize="none" autocorrect="off" spellcheck="false">
20 </span>
21 </label>
22 <label>
23 <span>Titel <small class="form-hint-inline">— getoond in de kop en als weergavenaam</small></span>
24 <input type="text" name="title" value="<%= site.title || '' %>" required maxlength="200">
25 </label>
26 <label>
27 <span>Tagline <small class="form-hint-inline">— korte oneliner</small></span>
28 <input type="text" name="tagline" value="<%= site.tagline || '' %>" maxlength="200">
29 </label>
30 <label>
31 <span>Bio / omschrijving <small class="form-hint-inline">— getoond in de profielkop en gebruikt voor SEO</small></span>
32 <textarea name="description" rows="3" maxlength="500"><%= site.description || '' %></textarea>
33 </label>
34 <label>
35 <span>Profielfoto</span>
36 <div class="photo-picker" id="photo-picker">
37 <div class="photo-thumb" id="photo-thumb" <%= site.profile_photo ? '' : 'data-empty' %>>
38 <img id="photo-preview" src="<%= site.profile_photo || '' %>" alt="" <%= site.profile_photo ? '' : 'hidden' %>>
39 <span class="photo-empty" aria-hidden="true">
40 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
41 </span>
42 </div>
43 <div class="photo-controls">
44 <input type="text" name="profile_photo" id="photo-url" value="<%= site.profile_photo || '' %>" placeholder="/media/avatars/foo.jpg of https://…">
45 <div class="photo-actions">
46 <button type="button" class="btn" id="photo-upload-trigger">📷 Uploaden</button>
47 <button type="button" class="btn" id="photo-clear" <%= site.profile_photo ? '' : 'hidden' %>>Verwijder</button>
48 <small id="photo-status" class="form-hint photo-status"></small>
49 </div>
50 <input type="file" id="photo-upload-field" accept="image/jpeg,image/png,image/webp,image/gif" hidden>
51 </div>
52 </div>
53 </label>
54 <label>
55 <span>Taal (ISO-code)</span>
56 <input type="text" name="language" value="<%= site.language || 'nl' %>" maxlength="8">
57 </label>
58 <label class="cb">
59 <input type="checkbox" name="profile_enabled" value="1" <%= site.profile_enabled ? 'checked' : '' %>>
60 <span>Profielkop tonen onder de navigatie</span>
61 </label>
62 </fieldset>
63
64 <fieldset>
65 <legend>Vormgeving</legend>
66
67 <%# ── Curated accent picker ───────────────────────────────────────
68 Was a free-form <input type="color">; now a fixed set of 8 hand-
69 picked colors that work in both light and dark themes. The hex is
70 still what's stored in the DB — we just constrain WHICH hex. %>
71 <fieldset class="accent-grid">
72 <legend>Accentkleur</legend>
73 <% const _curAccent = (site.accent || '#c2410c').toLowerCase(); %>
74 <% accents.forEach(function(a) { %>
75 <label class="accent-swatch" title="<%= a.name %>">
76 <input type="radio" name="accent" value="<%= a.color %>" <%= a.color.toLowerCase() === _curAccent ? 'checked' : '' %>>
77 <span class="accent-dot" style="background: <%= a.color %>;" aria-hidden="true"></span>
78 <span class="accent-swatch-name"><%= a.name %></span>
79 </label>
80 <% }); %>
81 </fieldset>
82
83 <%# ── Default theme for new visitors ───────────────────────────
84 'auto' (empty value) lets the browser/OS decide via prefers-color-scheme.
85 'light' / 'dark' force the site default for visitors who haven't picked
86 their own preference yet. Logged-in users with users.theme set, and
87 visitors with a localStorage override, still win over this default. %>
88 <fieldset class="theme-default">
89 <legend>Standaardthema voor nieuwe bezoekers</legend>
90 <% const td = site.theme_override || ''; %>
91 <label class="cb">
92 <input type="radio" name="theme_override" value="" <%= td === '' ? 'checked' : '' %>>
93 <span>Auto (volg device-voorkeur)</span>
94 </label>
95 <label class="cb">
96 <input type="radio" name="theme_override" value="light" <%= td === 'light' ? 'checked' : '' %>>
97 <span>Licht</span>
98 </label>
99 <label class="cb">
100 <input type="radio" name="theme_override" value="dark" <%= td === 'dark' ? 'checked' : '' %>>
101 <span>Donker</span>
102 </label>
103 </fieldset>
104
105 <fieldset class="palette-grid">
106 <legend>Palet</legend>
107 <% palettes.forEach(function(p) { %>
108 <label class="palette-swatch">
109 <input type="radio" name="palette" value="<%= p.key %>" <%= (site.palette || 'sage') === p.key ? 'checked' : '' %>>
110 <span class="palette-preview" aria-hidden="true">
111 <span class="pp-half pp-light" style="background: <%= p.light.paper %>; color: <%= p.light.ink %>;">
112 <span class="pp-letter">Aa</span>
113 <span class="pp-accent" style="background: <%= p.light.accent %>;"></span>
114 </span>
115 <span class="pp-half pp-dark" style="background: <%= p.dark.paper %>; color: <%= p.dark.ink %>;">
116 <span class="pp-letter">Aa</span>
117 <span class="pp-accent" style="background: <%= p.dark.accent %>;"></span>
118 </span>
119 </span>
120 <span class="palette-swatch-name"><%= p.name %></span>
121 </label>
122 <% }); %>
123 </fieldset>
124 </fieldset>
125
126 <fieldset>
127 <legend>Gedrag</legend>
128 <label class="cb">
129 <input type="checkbox" name="is_public" value="1" <%= site.is_public ? 'checked' : '' %>>
130 <span>Publieke site (uitvinken voor een besloten kring)</span>
131 </label>
132 <label class="cb">
133 <input type="checkbox" name="robots_index" value="1" <%= site.robots_index ? 'checked' : '' %>>
134 <span>Zoekmachines mogen indexeren (sitemap.xml is verborgen indien uit)</span>
135 </label>
136 <label class="cb">
137 <input type="checkbox" name="require_login_to_comment" value="1" <%= site.require_login_to_comment ? 'checked' : '' %>>
138 <span>Inloggen vereist om te reageren</span>
139 </label>
140 <label>
141 <span>Reactie-moderatie</span>
142 <select name="comments_moderation_mode">
143 <option value="trust" <%= (site.comments_moderation_mode || 'trust') === 'trust' ? 'selected' : '' %>>Vertrouwen (automatisch goedkeuren)</option>
144 <option value="moderate" <%= site.comments_moderation_mode === 'moderate' ? 'selected' : '' %>>Modereren (eerst in de wachtrij)</option>
145 </select>
146 </label>
147 <label class="cb">
148 <input type="checkbox" name="enable_audio_player" value="1" <%= site.enable_audio_player ? 'checked' : '' %>>
149 <span>Audiospeler + embeds inschakelen</span>
150 </label>
151 <%# Prutter is een Hub-only premium-functie — toggle alleen tonen in Hub-modus. %>
152 <% if (typeof tenancy !== 'undefined' && tenancy === 'hub') { %>
153 <label class="cb">
154 <input type="checkbox" name="enable_prutter" value="1" <%= site.enable_prutter ? 'checked' : '' %>>
155 <span>Prutter (DM&rsquo;s tussen leden) inschakelen <small class="form-hint-inline">— Hub-functie, premium</small></span>
156 </label>
157 <% } %>
158 </fieldset>
159
160 <fieldset class="profile-links-fieldset">
161 <legend>Social / streaming-links</legend>
162 <p class="form-hint">Getoond als merk-iconen op de profielkop. Voeg er zoveel toe als je wilt.</p>
163
164 <div id="profile-links-rows">
165 <% (parsedLinks || []).forEach(function(l) { %>
166 <div class="profile-link-row">
167 <select name="profile_link_platform[]">
168 <% platforms.forEach(function(p) { %>
169 <option value="<%= p.key %>" <%= l.platform === p.key ? 'selected' : '' %>><%= p.label %></option>
170 <% }); %>
171 </select>
172 <input type="text" name="profile_link_url[]" value="<%= l.url %>" placeholder="https://…" required>
173 <button type="button" class="btn btn-danger pl-remove">×</button>
174 </div>
175 <% }); %>
176 </div>
177
178 <template id="profile-link-template">
179 <div class="profile-link-row">
180 <select name="profile_link_platform[]">
181 <% platforms.forEach(function(p) { %>
182 <option value="<%= p.key %>"><%= p.label %></option>
183 <% }); %>
184 </select>
185 <input type="text" name="profile_link_url[]" placeholder="https://…" required>
186 <button type="button" class="btn btn-danger pl-remove">×</button>
187 </div>
188 </template>
189
190 <button type="button" id="profile-link-add" class="btn">+ Link toevoegen</button>
191 </fieldset>
192
193 <fieldset>
194 <legend>Feed-weergave</legend>
195 <label>
196 <span>Standaardweergave voor de homepage</span>
197 <select name="feed_view_default">
198 <option value="timeline" <%= (site.feed_view_default || 'timeline') === 'timeline' ? 'selected' : '' %>>Tijdlijn (chronologische lijst)</option>
199 <option value="grid" <%= site.feed_view_default === 'grid' ? 'selected' : '' %>>Grid (kaarten)</option>
200 </select>
201 </label>
202 <label class="cb">
203 <input type="checkbox" name="feed_view_switch" value="1" <%= site.feed_view_switch ? 'checked' : '' %>>
204 <span>Tijdlijn ↔ grid-schakelaar boven de feed tonen</span>
205 </label>
206 <label class="cb">
207 <input type="checkbox" name="show_search" value="1" <%= site.show_search ? 'checked' : '' %>>
208 <span>Zoekknop in de navigatie tonen</span>
209 </label>
210 <label class="cb">
211 <input type="checkbox" name="show_archive_link" value="1" <%= site.show_archive_link ? 'checked' : '' %>>
212 <span>Archief-link in de navigatie tonen</span>
213 </label>
214 </fieldset>
215
216 <fieldset>
217 <legend>SEO &amp; social</legend>
218 <label>
219 <span>Titel-sjabloon (gebruik {title} en {site})</span>
220 <input type="text" name="title_template" value="<%= site.title_template || '{title} — {site}' %>" maxlength="200">
221 </label>
222 <label>
223 <span>Canonieke basis-URL (voor productie-HTTPS)</span>
224 <input type="text" name="canonical" value="<%= site.canonical || '' %>" placeholder="https://jouw-domein.com">
225 </label>
226 <label>
227 <span>Twitter / X-handle (met @)</span>
228 <input type="text" name="twitter" value="<%= site.twitter || '' %>" placeholder="@jouwnaam" maxlength="64">
229 </label>
230 <details>
231 <summary>Zoekmachine-verificatie</summary>
232 <label>
233 <span>Google site-verificatie</span>
234 <input type="text" name="google_verification" value="<%= site.google_verification || '' %>" maxlength="200">
235 </label>
236 <label>
237 <span>Bing (msvalidate.01)</span>
238 <input type="text" name="bing_verification" value="<%= site.bing_verification || '' %>" maxlength="200">
239 </label>
240 <label>
241 <span>Pinterest (p:domain_verify)</span>
242 <input type="text" name="pinterest_verification" value="<%= site.pinterest_verification || '' %>" maxlength="200">
243 </label>
244 <label>
245 <span>Yandex</span>
246 <input type="text" name="yandex_verification" value="<%= site.yandex_verification || '' %>" maxlength="200">
247 </label>
248 </details>
249 </fieldset>
250
251 <fieldset>
252 <legend>Eigen CSS &amp; HTML <em>(optioneel)</em></legend>
253 <label>
254 <span>Eigen CSS (geïnjecteerd als &lt;style&gt; in &lt;head&gt;)</span>
255 <textarea name="custom_css" rows="3" placeholder=".foo { color: red; }"><%= site.custom_css || '' %></textarea>
256 </label>
257 <label>
258 <span>Eigen &lt;head&gt;-HTML (analytics, extra meta&rsquo;s)</span>
259 <textarea name="custom_head_html" rows="3" placeholder="<meta name=&quot;...&quot;>"><%= site.custom_head_html || '' %></textarea>
260 </label>
261 <label>
262 <span>Eigen footer-HTML</span>
263 <textarea name="custom_foot_html" rows="3"><%= site.custom_foot_html || '' %></textarea>
264 </label>
265 </fieldset>
266
267 <button type="submit" class="btn btn-primary"><%= isNew ? 'Site aanmaken' : 'Wijzigingen opslaan' %></button>
268 </form>
269</div>
270
271<script>
272(function() {
273 // Slug-URL-veld: toon de echte host als gedimde prefix (de slug zelf is
274 // gekleurd via CSS). Hub → host/user/<slug>, anders host/<slug>.
275 var sh = document.getElementById('slug-host');
276 if (sh) sh.textContent = location.host + (sh.dataset.prefix || '/');
277})();
278(function() {
279 // Profile-links repeater: add row from <template>, remove on click.
280 var rows = document.getElementById('profile-links-rows');
281 var tpl = document.getElementById('profile-link-template');
282 var add = document.getElementById('profile-link-add');
283 if (!rows || !tpl || !add) return;
284
285 add.addEventListener('click', function() {
286 var clone = tpl.content.cloneNode(true);
287 rows.appendChild(clone);
288 });
289 rows.addEventListener('click', function(e) {
290 if (e.target && e.target.classList.contains('pl-remove')) {
291 var row = e.target.closest('.profile-link-row');
292 if (row) row.remove();
293 }
294 });
295})();
296
297// P63 — Profile photo picker: upload via /admin/sites/upload-photo,
298// then write the returned URL into the visible input. Live thumb preview.
299(function() {
300 var picker = document.getElementById('photo-picker');
301 if (!picker) return;
302 var thumb = document.getElementById('photo-thumb');
303 var preview = document.getElementById('photo-preview');
304 var urlEl = document.getElementById('photo-url');
305 var trigger = document.getElementById('photo-upload-trigger');
306 var clear = document.getElementById('photo-clear');
307 var field = document.getElementById('photo-upload-field');
308 var status = document.getElementById('photo-status');
309
310 function showPreview(url) {
311 if (url) {
312 preview.src = url;
313 preview.hidden = false;
314 thumb.removeAttribute('data-empty');
315 clear.hidden = false;
316 } else {
317 preview.src = '';
318 preview.hidden = true;
319 thumb.setAttribute('data-empty', '');
320 clear.hidden = true;
321 }
322 }
323
324 if (urlEl) {
325 urlEl.addEventListener('input', function() {
326 showPreview(urlEl.value.trim());
327 });
328 }
329
330 if (trigger && field) {
331 trigger.addEventListener('click', function() { field.click(); });
332 field.addEventListener('change', async function() {
333 var file = field.files && field.files[0];
334 if (!file) return;
335 status.classList.remove('is-error');
336 status.textContent = 'Uploaden…';
337 try {
338 var fd = new FormData();
339 fd.append('photo', file);
340 var r = await fetch('/admin/sites/upload-photo', {
341 method: 'POST',
342 body: fd,
343 credentials: 'same-origin',
344 });
345 var j = await r.json();
346 if (!r.ok || !j.ok) throw new Error(j.error || ('Upload mislukt (' + r.status + ')'));
347 urlEl.value = j.url;
348 showPreview(j.url);
349 status.textContent = 'Geüpload ✓';
350 setTimeout(function() { status.textContent = ''; }, 2000);
351 } catch (e) {
352 status.classList.add('is-error');
353 status.textContent = 'Mislukt: ' + e.message;
354 } finally {
355 field.value = '';
356 }
357 });
358 }
359
360 if (clear) {
361 clear.addEventListener('click', function() {
362 urlEl.value = '';
363 showPreview('');
364 status.textContent = '';
365 // Note: doesn't delete the file from disk — saving the form with empty
366 // URL leaves the file orphaned on the server. Acceptable for now.
367 });
368 }
369})();
370</script>
371
372<style>
373.admin-site-edit-page { max-width: 760px; margin: 3rem auto; padding: 0 1rem; }
374.admin-site-edit-page h1 { font-family: var(--font-display, serif); font-size: 1.8rem; margin: 0 0 1.5rem; }
375
376.site-form { display: flex; flex-direction: column; gap: 1.5rem; }
377.site-form fieldset {
378 border: 1px solid var(--rule);
379 border-radius: 8px;
380 padding: 1rem 1.25rem;
381 background: var(--paper-2);
382 display: flex;
383 flex-direction: column;
384 gap: 0.75rem;
385}
386.site-form fieldset.palette-grid {
387 display: grid;
388 grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
389 background: var(--paper);
390 margin-top: 0.5rem;
391}
392/* Theme default radios — horizontal, sits between accent + palette */
393.site-form fieldset.theme-default {
394 display: flex; flex-direction: row; flex-wrap: wrap; gap: 1rem;
395 background: var(--paper);
396 margin-top: 0.5rem;
397}
398.site-form fieldset.theme-default label.cb { font-size: 0.9rem; color: var(--ink); }
399.site-form fieldset legend { font-family: var(--font-display, serif); font-size: 1rem; padding: 0 0.4rem; }
400.site-form label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; color: var(--ink-muted, var(--ink-soft)); }
401.site-form label.cb { flex-direction: row; align-items: center; gap: 0.5rem; }
402.site-form input[type="text"], .site-form input[type="color"], .site-form textarea {
403 padding: 0.55rem 0.85rem;
404 border: 1px solid var(--rule);
405 border-radius: 5px;
406 background: var(--paper);
407 color: var(--ink);
408 font-family: inherit;
409 font-size: 0.95rem;
410}
411.site-form input[type="color"] { padding: 0.2rem; height: 38px; }
412.site-form textarea { resize: vertical; min-height: 60px; font-family: var(--font-mono, monospace); font-size: 0.85rem; }
413.site-form input[readonly] { opacity: 0.6; cursor: not-allowed; background: var(--paper-2); }
414
415/* Slug als URL-veld: gedimde host-prefix + de slug zelf in de accentkleur. */
416.slug-url {
417 display: flex; align-items: stretch;
418 border: 1px solid var(--rule); border-radius: 5px;
419 background: var(--paper); overflow: hidden;
420 transition: border-color 120ms;
421}
422.slug-url:focus-within { border-color: var(--accent); }
423.slug-url-host {
424 display: inline-flex; align-items: center;
425 padding-left: 0.85rem;
426 color: var(--ink-muted, var(--ink-soft));
427 white-space: nowrap; user-select: none;
428 font-size: 0.95rem;
429}
430.site-form .slug-url-input {
431 flex: 1 1 auto; min-width: 0;
432 border: none !important; border-radius: 0 !important;
433 background: transparent !important;
434 color: var(--accent) !important; font-weight: 700;
435 padding: 0.55rem 0.85rem 0.55rem 0.1rem;
436}
437.site-form .slug-url-input:focus { outline: none; }
438.site-form .slug-url-input[readonly] {
439 opacity: 1; cursor: default; background: transparent !important;
440}
441
442/* Selects: zelfde look als de inputs, met een eigen chevron i.p.v. de kale
443 native pijl. De geopende optielijst blijft door de browser gerenderd. */
444.site-form select {
445 appearance: none;
446 -webkit-appearance: none;
447 padding: 0.55rem 2.2rem 0.55rem 0.85rem;
448 border: 1px solid var(--rule);
449 border-radius: 5px;
450 background-color: var(--paper);
451 color: var(--ink);
452 font-family: inherit;
453 font-size: 0.95rem;
454 cursor: pointer;
455 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
456 background-repeat: no-repeat;
457 background-position: right 0.7rem center;
458 transition: border-color 0.15s ease, box-shadow 0.15s ease;
459}
460.site-form select:hover { border-color: var(--ink-soft, #888); }
461.site-form select:focus,
462.site-form input[type="text"]:focus,
463.site-form textarea:focus {
464 outline: none;
465 border-color: var(--accent, #c2410c);
466 box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #c2410c) 22%, transparent);
467}
468
469/* Reuse the palette-swatch styles from account.ejs */
470.palette-swatch {
471 display: flex; flex-direction: column; gap: 0.4rem;
472 padding: 0.5rem;
473 border: 1px solid var(--rule); border-radius: 6px; background: var(--paper);
474 cursor: pointer; font-size: 0.85rem; transition: border-color 120ms;
475}
476.palette-swatch:hover { border-color: var(--accent); }
477.palette-swatch input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
478.palette-swatch:has(input[type="radio"]:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
479.palette-preview {
480 display: grid; grid-template-columns: 1fr 1fr;
481 width: 100%; height: 44px; border-radius: 4px; overflow: hidden;
482 border: 1px solid var(--rule);
483}
484.pp-half {
485 position: relative;
486 display: flex; align-items: center; justify-content: center;
487 font-family: var(--font-display, serif); font-weight: 600; font-size: 1rem;
488}
489.pp-letter { line-height: 1; }
490.pp-accent {
491 position: absolute; bottom: 4px; right: 4px;
492 width: 9px; height: 9px; border-radius: 50%;
493 border: 1px solid rgba(0,0,0,0.12);
494}
495.palette-swatch-name { font-weight: 500; color: var(--ink); text-align: center; }
496
497/* Accent picker: row of small colored swatches */
498.site-form fieldset.accent-grid {
499 display: grid;
500 grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
501 gap: 0.5rem;
502 background: var(--paper);
503 margin-top: 0.5rem;
504}
505.accent-swatch {
506 display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
507 padding: 0.55rem 0.4rem;
508 border: 1px solid var(--rule); border-radius: 6px; background: var(--paper);
509 cursor: pointer; font-size: 0.78rem;
510 transition: border-color 120ms, box-shadow 120ms;
511}
512.accent-swatch:hover { border-color: var(--accent); }
513.accent-swatch input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
514.accent-swatch:has(input[type="radio"]:checked) {
515 border-color: var(--accent);
516 box-shadow: 0 0 0 2px var(--accent);
517}
518.accent-dot {
519 width: 28px; height: 28px; border-radius: 50%;
520 border: 1px solid rgba(0,0,0,0.1);
521 box-shadow: inset 0 -2px 4px rgba(0,0,0,0.12);
522}
523.accent-swatch-name { color: var(--ink); text-align: center; font-weight: 500; }
524
525.audio-flash { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; }
526.audio-flash--ok { background: rgba(40, 160, 90, 0.15); color: #2a9d5e; border: 1px solid rgba(40, 160, 90, 0.3); }
527.audio-flash--err { background: rgba(200, 60, 60, 0.15); color: #c33; border: 1px solid rgba(200, 60, 60, 0.3); }
528
529.form-hint { font-size: 0.8rem; color: var(--ink-muted, var(--ink-soft)); margin: 0; }
530.form-hint-inline { font-size: 0.78rem; color: var(--ink-muted, var(--ink-soft)); font-weight: 400; margin-left: .25rem; }
531
532/* P63 — Profile photo picker
533 Mobile-first: thumb stacks above input/buttons. ≥520px the thumb floats
534 to the left and the controls fill the remaining width. */
535.photo-picker {
536 display: flex;
537 flex-direction: column;
538 gap: .65rem;
539 align-items: stretch;
540}
541.photo-thumb {
542 position: relative;
543 width: 88px; height: 88px;
544 border-radius: 50%;
545 border: 1px solid var(--rule);
546 background: var(--paper-2);
547 overflow: hidden;
548 flex-shrink: 0;
549 display: flex; align-items: center; justify-content: center;
550}
551.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
552.photo-thumb .photo-empty {
553 display: flex; color: var(--ink-muted, var(--ink-soft)); opacity: .55;
554}
555.photo-thumb .photo-empty svg { width: 36px; height: 36px; }
556.photo-thumb:not([data-empty]) .photo-empty { display: none; }
557.photo-thumb[data-empty] img { display: none; }
558
559.photo-controls {
560 display: flex;
561 flex-direction: column;
562 gap: .5rem;
563 flex: 1;
564 min-width: 0;
565}
566.photo-controls input[type="text"] { width: 100%; }
567.photo-actions {
568 display: flex; align-items: center; flex-wrap: wrap;
569 gap: .4rem;
570}
571.photo-actions .btn { padding: .45rem .75rem; font-size: .85rem; }
572.photo-status { margin-left: .25rem; }
573.photo-status.is-error { color: #c2410c; }
574
575@media (min-width: 520px) {
576 .photo-picker { flex-direction: row; align-items: flex-start; gap: 1rem; }
577 .photo-controls { gap: .55rem; }
578}
579.profile-link-row {
580 display: grid; grid-template-columns: 160px 1fr auto; gap: 0.5rem; margin-bottom: 0.5rem;
581}
582.profile-link-row select { padding: 0.45rem 0.6rem; }
583.profile-links-fieldset details > label { margin-top: 0.4rem; }
584</style>
Note: See TracBrowser for help on using the repository browser.