| 1 | <div class="container admin-page">
|
|---|
| 2 | <h1><%= t('aset.title') %></h1>
|
|---|
| 3 | <p><a href="/admin" class="btn">← <%= t('aset.back_admin') %></a></p>
|
|---|
| 4 |
|
|---|
| 5 | <% if (success) { %><div class="alert alert-success"><%= success %></div><% } %>
|
|---|
| 6 | <% if (typeof error !== 'undefined' && error) { %><div class="alert alert-error"><%= error %></div><% } %>
|
|---|
| 7 |
|
|---|
| 8 | <section class="set-card">
|
|---|
| 9 | <h2><%= t('aset.mode') %></h2>
|
|---|
| 10 | <p class="set-help">
|
|---|
| 11 | <%= t('aset.mode_help') %>
|
|---|
| 12 | </p>
|
|---|
| 13 |
|
|---|
| 14 | <form method="post" action="/admin/settings" class="set-form">
|
|---|
| 15 | <label class="set-opt">
|
|---|
| 16 | <input type="radio" name="tenancy" value="solo" <%= tenancy === 'solo' ? 'checked' : '' %>>
|
|---|
| 17 | <span>
|
|---|
| 18 | <strong><%= t('aset.solo') %></strong> — <%= t('aset.solo_title') %>
|
|---|
| 19 | <small><%= t('aset.solo_desc') %></small>
|
|---|
| 20 | </span>
|
|---|
| 21 | </label>
|
|---|
| 22 | <% var _hubLocked = (typeof premiumUnlocked !== 'undefined') && !premiumUnlocked && tenancy !== 'hub'; %>
|
|---|
| 23 | <label class="set-opt">
|
|---|
| 24 | <input type="radio" name="tenancy" value="hub" <%= tenancy === 'hub' ? 'checked' : '' %> <%= _hubLocked ? 'disabled' : '' %>>
|
|---|
| 25 | <span>
|
|---|
| 26 | <strong><%= t('aset.hub') %></strong> — <%= t('aset.hub_title') %> <code>/user/</code>.
|
|---|
| 27 | <% if (_hubLocked) { %><span style="display:inline-block;font-size:.7rem;font-weight:700;color:var(--accent);border:1px solid var(--accent);border-radius:999px;padding:.05rem .45rem;margin-left:.3rem;vertical-align:1px;">🔒 <%= t('aset.premium_badge') %></span><% } %>
|
|---|
| 28 | <small><%= t('aset.hub_desc') %><% if (_hubLocked) { %> <em><%= t('aset.hub_locked_note') %></em><% } %></small>
|
|---|
| 29 | </span>
|
|---|
| 30 | </label>
|
|---|
| 31 | <label class="set-opt">
|
|---|
| 32 | <input type="radio" name="tenancy" value="circle" <%= tenancy === 'circle' ? 'checked' : '' %>>
|
|---|
| 33 | <span>
|
|---|
| 34 | <strong><%= t('aset.circle') %></strong> — <%= t('aset.circle_title') %>
|
|---|
| 35 | <small><%= t('aset.circle_desc') %></small>
|
|---|
| 36 | </span>
|
|---|
| 37 | </label>
|
|---|
| 38 | <button type="submit" class="btn btn-primary"><%= t('aset.save') %></button>
|
|---|
| 39 | </form>
|
|---|
| 40 | </section>
|
|---|
| 41 |
|
|---|
| 42 | <%# ── Default language for visitors ── %>
|
|---|
| 43 | <section class="set-card" style="margin-top:1rem">
|
|---|
| 44 | <h2><%= t('aset.default_lang') %></h2>
|
|---|
| 45 | <p class="set-help"><%= t('aset.default_lang_hint') %></p>
|
|---|
| 46 | <form method="post" action="/admin/settings" class="set-form">
|
|---|
| 47 | <label class="set-field">
|
|---|
| 48 | <span><%= t('aset.default_lang') %></span>
|
|---|
| 49 | <select name="default_lang">
|
|---|
| 50 | <option value=""<%= !defaultLang ? ' selected' : '' %>><%= t('aset.default_lang_auto') %></option>
|
|---|
| 51 | <% langs.forEach(function(l){ %>
|
|---|
| 52 | <option value="<%= l.code %>"<%= defaultLang === l.code ? ' selected' : '' %>><%= l.name %></option>
|
|---|
| 53 | <% }); %>
|
|---|
| 54 | </select>
|
|---|
| 55 | </label>
|
|---|
| 56 | <button type="submit" class="btn btn-primary"><%= t('aset.save') %></button>
|
|---|
| 57 | </form>
|
|---|
| 58 | </section>
|
|---|
| 59 |
|
|---|
| 60 | <%# ── Timezone ── %>
|
|---|
| 61 | <section class="set-card" style="margin-top:1rem">
|
|---|
| 62 | <h2><%= t('aset.timezone') %></h2>
|
|---|
| 63 | <p class="set-help"><%= t('aset.timezone_hint') %></p>
|
|---|
| 64 | <form method="post" action="/admin/settings" class="set-form">
|
|---|
| 65 | <label class="set-field">
|
|---|
| 66 | <span><%= t('aset.timezone') %></span>
|
|---|
| 67 | <select name="timezone">
|
|---|
| 68 | <option value=""<%= !timezone ? ' selected' : '' %>><%= t('aset.timezone_auto') %></option>
|
|---|
| 69 | <%
|
|---|
| 70 | var _tz = ['Europe/Amsterdam','Europe/Brussels','Europe/Berlin','Europe/Paris','Europe/London','Europe/Madrid','Europe/Rome','Europe/Lisbon','Europe/Warsaw','Europe/Athens','UTC','America/New_York','America/Chicago','America/Los_Angeles','America/Sao_Paulo','Asia/Tokyo','Asia/Dubai','Australia/Sydney'];
|
|---|
| 71 | if (timezone && _tz.indexOf(timezone) < 0) _tz.unshift(timezone);
|
|---|
| 72 | %>
|
|---|
| 73 | <% _tz.forEach(function(z){ %><option value="<%= z %>"<%= timezone === z ? ' selected' : '' %>><%= z %></option><% }); %>
|
|---|
| 74 | </select>
|
|---|
| 75 | </label>
|
|---|
| 76 | <button type="submit" class="btn btn-primary"><%= t('aset.save') %></button>
|
|---|
| 77 | </form>
|
|---|
| 78 | </section>
|
|---|
| 79 |
|
|---|
| 80 | <%# Mode-specific config — placed directly below the Mode card so it visually
|
|---|
| 81 | belongs to the selected mode (Hub under hub, Circle under circle). %>
|
|---|
| 82 | <% if (tenancy === 'hub') { %>
|
|---|
| 83 | <section class="set-card set-card--mode" style="margin-top:1rem">
|
|---|
| 84 | <h2><%= t('aset.hub_home') %></h2>
|
|---|
| 85 | <p class="set-help">
|
|---|
| 86 | <%= t('aset.hub_home_help_1') %> (<code>/</code>) <%= t('aset.hub_home_help_2') %> <code>/user/</code>.
|
|---|
| 87 | </p>
|
|---|
| 88 | <form method="post" action="/admin/settings" class="set-form" enctype="multipart/form-data">
|
|---|
| 89 | <label class="set-field">
|
|---|
| 90 | <span><%= t('aset.name') %></span>
|
|---|
| 91 | <input type="text" name="hub_title" maxlength="80" value="<%= hubTitle %>" placeholder="<%= t('aset.name_ph') %>">
|
|---|
| 92 | </label>
|
|---|
| 93 | <label class="set-field">
|
|---|
| 94 | <span><%= t('aset.tagline') %></span>
|
|---|
| 95 | <input type="text" name="hub_tagline" maxlength="120" value="<%= hubTagline %>" placeholder="<%= t('aset.tagline_ph') %>">
|
|---|
| 96 | </label>
|
|---|
| 97 | <label class="set-field">
|
|---|
| 98 | <span><%= t('aset.intro') %></span>
|
|---|
| 99 | <textarea name="hub_intro" maxlength="400" rows="3" placeholder="<%= t('aset.intro_ph') %>"><%= hubIntro %></textarea>
|
|---|
| 100 | </label>
|
|---|
| 101 | <label class="set-field">
|
|---|
| 102 | <span><%= t('aset.hero_image') %> <small style="font-weight:400;color:var(--ink-muted)">— <%= t('aset.hero_image_hint') %></small></span>
|
|---|
| 103 | <input type="text" name="hub_hero_image" maxlength="300" value="<%= hubHeroImage %>" placeholder="/media/... of https://...">
|
|---|
| 104 | </label>
|
|---|
| 105 | <label class="set-field">
|
|---|
| 106 | <span><%= t('aset.hero_upload') %> <small style="font-weight:400;color:var(--ink-muted)">— <%= t('aset.hero_upload_hint') %></small></span>
|
|---|
| 107 | <input type="file" name="hub_hero_file" accept="image/png,image/jpeg,image/webp,image/gif">
|
|---|
| 108 | </label>
|
|---|
| 109 | <label class="set-field">
|
|---|
| 110 | <span><%= t('aset.hero_overlay') %> <small style="font-weight:400;color:var(--ink-muted)">— <%= t('aset.hero_overlay_hint') %></small></span>
|
|---|
| 111 | <span style="display:flex;align-items:center;gap:0.75rem">
|
|---|
| 112 | <input type="range" name="hub_hero_overlay" min="0" max="100" step="5" value="<%= hubHeroOverlay %>" style="flex:1"
|
|---|
| 113 | oninput="this.parentNode.querySelector('.ov-val').textContent=this.value+'%';var o=document.getElementById('hero-ov-preview');if(o)o.style.opacity=this.value/100">
|
|---|
| 114 | <span class="ov-val" style="min-width:3.5ch;text-align:right;font-variant-numeric:tabular-nums"><%= hubHeroOverlay %>%</span>
|
|---|
| 115 | </span>
|
|---|
| 116 | </label>
|
|---|
| 117 | <% if (hubHeroImage) { %>
|
|---|
| 118 | <div class="set-field">
|
|---|
| 119 | <span style="font-weight:400;color:var(--ink-muted);font-size:0.9rem"><%= t('aset.preview_overlay') %></span>
|
|---|
| 120 | <div style="position:relative;width:100%;aspect-ratio:16/7;margin-top:0.4rem;border-radius:8px;overflow:hidden;border:1px solid var(--rule);background:var(--paper-2)">
|
|---|
| 121 | <img src="<%= hubHeroImage %>" alt="<%= t('aset.hero_preview_alt') %>" style="display:block;width:100%;height:100%;object-fit:cover">
|
|---|
| 122 | <div id="hero-ov-preview" style="position:absolute;inset:0;background:#000;opacity:<%= (hubHeroOverlay/100).toFixed(2) %>;pointer-events:none"></div>
|
|---|
| 123 | </div>
|
|---|
| 124 | </div>
|
|---|
| 125 | <% } %>
|
|---|
| 126 | <button type="submit" class="btn btn-primary"><%= t('aset.save') %></button>
|
|---|
| 127 | </form>
|
|---|
| 128 | </section>
|
|---|
| 129 | <% } %>
|
|---|
| 130 |
|
|---|
| 131 | <% if (tenancy === 'circle') { %>
|
|---|
| 132 | <section class="set-card set-card--mode" style="margin-top:1rem">
|
|---|
| 133 | <h2>🔗 <%= t('aset.your_circle') %></h2>
|
|---|
| 134 | <p class="set-help">
|
|---|
| 135 | <%= t('aset.your_circle_help') %>
|
|---|
| 136 | </p>
|
|---|
| 137 | <div class="set-actions">
|
|---|
| 138 | <a href="/admin/circle" class="btn btn-primary"><%= t('aset.manage_circle') %> →</a>
|
|---|
| 139 | </div>
|
|---|
| 140 | </section>
|
|---|
| 141 | <% } %>
|
|---|
| 142 |
|
|---|
| 143 | <%# Premium (Patreon) — only visible when the self-hoster enables the premium layer
|
|---|
| 144 | (env KLONKT_PREMIUM_ENABLED=on). Hidden by default; nothing gated. %>
|
|---|
| 145 | <% if (premium && premium.enabled) { %>
|
|---|
| 146 | <section class="set-card" style="margin-top:1rem">
|
|---|
| 147 | <h2><%= t('aset.premium') %></h2>
|
|---|
| 148 | <p class="set-help"><%= t('aset.premium_help_1') %> <strong><%= t('aset.premium_lifetime') %></strong> <%= t('aset.premium_help_2') %></p>
|
|---|
| 149 | <% if (premium.premium) { %>
|
|---|
| 150 | <p class="set-help"><strong>✓ <%= t('aset.premium_active') %></strong>
|
|---|
| 151 | <% if (premium.supportCents) { %><%= t('aset.lifetime_support') %> $<%= (premium.supportCents/100).toFixed(2) %>.<% } %></p>
|
|---|
| 152 | <a href="/admin/patreon/disconnect" class="btn"><%= t('aset.patreon_disconnect') %></a>
|
|---|
| 153 | <% } else if (premium.connected) { %>
|
|---|
| 154 | <p class="set-help"><%= t('aset.patreon_no_lifetime') %><% if (premium.supportCents) { %>
|
|---|
| 155 | (<%= t('aset.now') %> $<%= (premium.supportCents/100).toFixed(2) %>)<% } %>. <%= t('aset.patreon_support_again') %></p>
|
|---|
| 156 | <a href="/admin/patreon/connect" class="btn btn-primary"><%= t('aset.patreon_reconnect') %></a>
|
|---|
| 157 | <% } else { %>
|
|---|
| 158 | <p class="set-help"><%= t('aset.patreon_not_connected') %></p>
|
|---|
| 159 | <a href="/admin/patreon/connect" class="btn btn-primary"><%= t('aset.patreon_connect') %></a>
|
|---|
| 160 | <% } %>
|
|---|
| 161 | </section>
|
|---|
| 162 | <% } %>
|
|---|
| 163 |
|
|---|
| 164 | <%# Google login has its own admin page (compact link shown here). %>
|
|---|
| 165 | <section class="set-card" style="margin-top:1rem">
|
|---|
| 166 | <h2><%= t('aset.google_login') %></h2>
|
|---|
| 167 | <p class="set-help"><%= t('aset.google_login_help') %>
|
|---|
| 168 | <% if (google && google.configured) { %><strong><%= t('aset.status_set') %> ✓</strong><% } else { %><%= t('aset.not_set_yet') %><% } %></p>
|
|---|
| 169 | <div class="set-actions"><a href="/admin/settings/google" class="btn btn-primary"><%= t('aset.google_login_setup') %> →</a></div>
|
|---|
| 170 | </section>
|
|---|
| 171 |
|
|---|
| 172 | <%# Newsletter signup in the footer (premium). %>
|
|---|
| 173 | <% if (typeof premiumUnlocked === 'undefined' || premiumUnlocked) { %>
|
|---|
| 174 | <section class="set-card" style="margin-top:1rem">
|
|---|
| 175 | <h2><%= t('aset.newsletter') %></h2>
|
|---|
| 176 | <p class="set-help"><%= t('aset.newsletter_help_1') %> <strong><%= t('aset.newsletter_footer_field') %></strong> <%= t('aset.newsletter_help_2') %> <code><%= (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : '' %>/nieuwsbrief</code>.)</p>
|
|---|
| 177 | <form method="post" action="/admin/settings/footer" class="set-form">
|
|---|
| 178 | <label class="set-toggle" style="display:flex;align-items:center;gap:.6rem;cursor:pointer">
|
|---|
| 179 | <input type="checkbox" name="footer_newsletter" value="1" <%= footerNewsletter ? 'checked' : '' %>>
|
|---|
| 180 | <span><%= t('aset.newsletter_show_footer') %></span>
|
|---|
| 181 | </label>
|
|---|
| 182 | <div class="set-actions"><button type="submit" class="btn btn-primary"><%= t('aset.save') %></button></div>
|
|---|
| 183 | </form>
|
|---|
| 184 | </section>
|
|---|
| 185 | <% } %>
|
|---|
| 186 |
|
|---|
| 187 | <%# E-mail / SMTP — required for sending newsletters, notify-mails and password resets. %>
|
|---|
| 188 | <section class="set-card" style="margin-top:1rem">
|
|---|
| 189 | <h2><%= t('aset.email_smtp') %></h2>
|
|---|
| 190 | <p class="set-help"><%= t('aset.smtp_help_1') %> <strong><%= t('aset.smtp_help_newsletter') %></strong><%= t('aset.smtp_help_2') %> <strong><%= t('aset.smtp_help_notify') %></strong><%= t('aset.smtp_help_3') %>
|
|---|
| 191 | <% if (smtp && smtp.configured) { %><br><strong><%= t('aset.status_set') %> ✓</strong><% if (smtp.fromEnv) { %> <small>(<%= t('aset.via_env') %>)</small><% } %><% } else { %><br><%= t('aset.smtp_not_set') %><% } %></p>
|
|---|
| 192 |
|
|---|
| 193 | <form method="post" action="/admin/settings/smtp" class="set-form">
|
|---|
| 194 | <label><span><%= t('aset.smtp_host') %></span>
|
|---|
| 195 | <input type="text" name="smtp_host" value="<%= smtp ? smtp.host : '' %>" placeholder="smtp.jouwprovider.nl" autocomplete="off">
|
|---|
| 196 | </label>
|
|---|
| 197 | <label><span><%= t('aset.smtp_port') %> <small style="font-weight:400">— <%= t('aset.smtp_port_hint') %></small></span>
|
|---|
| 198 | <input type="text" name="smtp_port" value="<%= (smtp && smtp.port) ? smtp.port : '' %>" placeholder="587" autocomplete="off" inputmode="numeric">
|
|---|
| 199 | </label>
|
|---|
| 200 | <label><span><%= t('aset.smtp_user') %></span>
|
|---|
| 201 | <input type="text" name="smtp_user" value="<%= smtp ? smtp.user : '' %>" placeholder="jij@jouwprovider.nl" autocomplete="off">
|
|---|
| 202 | </label>
|
|---|
| 203 | <label><span><%= t('aset.smtp_pass') %> <% if (smtp && smtp.passSet) { %><small style="font-weight:400">— <%= t('aset.smtp_pass_set_hint') %></small><% } %></span>
|
|---|
| 204 | <input type="password" name="smtp_pass" placeholder="<%= (smtp && smtp.passSet) ? t('aset.smtp_pass_ph_set') : t('aset.smtp_pass_ph') %>" autocomplete="off">
|
|---|
| 205 | </label>
|
|---|
| 206 | <label><span><%= t('aset.smtp_from') %> <small style="font-weight:400">— <%= t('aset.smtp_from_hint') %></small></span>
|
|---|
| 207 | <input type="text" name="smtp_from" value="<%= smtp ? smtp.from : '' %>" placeholder="<%= t('aset.smtp_from_ph') %>" autocomplete="off">
|
|---|
| 208 | </label>
|
|---|
| 209 | <div class="set-actions">
|
|---|
| 210 | <button type="submit" class="btn btn-primary"><%= t('aset.smtp_save') %></button>
|
|---|
| 211 | <% if (smtp && (smtp.host || smtp.passSet)) { %>
|
|---|
| 212 | <button type="submit" name="clear" value="1" class="btn" formnovalidate><%= t('aset.clear') %></button>
|
|---|
| 213 | <% } %>
|
|---|
| 214 | </div>
|
|---|
| 215 | </form>
|
|---|
| 216 |
|
|---|
| 217 | <% if (smtp && smtp.configured) { %>
|
|---|
| 218 | <form method="post" action="/admin/settings/smtp/test" class="set-form" style="margin-top:.8rem">
|
|---|
| 219 | <label><span><%= t('aset.test_mail_to') %></span>
|
|---|
| 220 | <input type="email" name="to" placeholder="jij@email.nl" autocomplete="off">
|
|---|
| 221 | </label>
|
|---|
| 222 | <div class="set-actions"><button type="submit" class="btn">✉ <%= t('aset.send_test_mail') %></button></div>
|
|---|
| 223 | </form>
|
|---|
| 224 | <% } %>
|
|---|
| 225 | </section>
|
|---|
| 226 |
|
|---|
| 227 | </div>
|
|---|
| 228 |
|
|---|
| 229 | <style>
|
|---|
| 230 | .admin-page { max-width: 700px; margin: 3rem auto; padding: 0 1rem; }
|
|---|
| 231 | .admin-page h1 { font-family: var(--font-display, serif); font-size: 2rem; margin: 0 0 0.25rem; }
|
|---|
| 232 | .admin-tagline { color: var(--ink-muted); margin: 0 0 2rem; }
|
|---|
| 233 | .admin-tagline a { color: var(--accent); }
|
|---|
| 234 | .set-card { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 12px; padding: 1.25rem; }
|
|---|
| 235 | /* Mode-specific card (Hub/Circle): accent border on the left so it visually
|
|---|
| 236 | belongs to the selected mode, directly below the Mode card. */
|
|---|
| 237 | .set-card--mode { border-left: 3px solid var(--accent); }
|
|---|
| 238 | .set-card h2 { font-family: var(--font-display, serif); font-size: 1.25rem; margin: 0 0 0.5rem; }
|
|---|
| 239 | .set-help { color: var(--ink-muted); font-size: 0.9rem; margin: 0 0 1.25rem; }
|
|---|
| 240 | /* Google setup guide (collapsible) */
|
|---|
| 241 | .set-google-guide { margin: 0 0 1rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); }
|
|---|
| 242 | .set-google-guide > summary { cursor: pointer; padding: 0.6rem 0.85rem; font-size: 0.9rem; font-weight: 600; color: var(--accent); list-style: none; }
|
|---|
| 243 | .set-google-guide > summary::-webkit-details-marker { display: none; }
|
|---|
| 244 | .set-google-guide > summary::before { content: "▸ "; }
|
|---|
| 245 | .set-google-guide[open] > summary::before { content: "▾ "; }
|
|---|
| 246 | .set-google-steps { margin: 0; padding: 0 1rem 0.6rem 2rem; font-size: 0.88rem; color: var(--ink); line-height: 1.5; }
|
|---|
| 247 | .set-google-steps li { margin: 0.35rem 0; }
|
|---|
| 248 | .set-google-guide code { background: var(--paper-2); padding: 0.05rem 0.35rem; border-radius: 4px; font-size: 0.85em; }
|
|---|
| 249 | .set-google-guide .set-help { padding: 0 0.85rem; }
|
|---|
| 250 | .set-form { display: flex; flex-direction: column; gap: 1rem; max-width: 460px; }
|
|---|
| 251 | /* Bare <label>s inside a set-form inherit the same neat stacked style as .set-field:
|
|---|
| 252 | label text on top, input full-width. (.set-toggle = checkbox row, excluded.) */
|
|---|
| 253 | .set-form > label:not(.set-toggle):not(.set-opt) { display: flex; flex-direction: column; gap: 0.3rem; }
|
|---|
| 254 | .set-form > label:not(.set-toggle):not(.set-opt) > span { font-size: 0.8rem; font-weight: 600; color: var(--ink-soft, var(--ink-muted)); }
|
|---|
| 255 | .set-form > label:not(.set-toggle):not(.set-opt) > span small { font-weight: 400; }
|
|---|
| 256 | .set-form > label:not(.set-toggle):not(.set-opt) input {
|
|---|
| 257 | width: 100%; box-sizing: border-box; padding: 0.55rem 0.7rem;
|
|---|
| 258 | border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); color: var(--ink);
|
|---|
| 259 | font: inherit; font-size: 0.95rem;
|
|---|
| 260 | }
|
|---|
| 261 | .set-form > label:not(.set-toggle):not(.set-opt) input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
|
|---|
| 262 | .set-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.25rem; }
|
|---|
| 263 | .set-opt { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.85rem 1rem; border: 1px solid var(--rule); border-radius: 8px; cursor: pointer; background: var(--paper); }
|
|---|
| 264 | .set-opt:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
|
|---|
| 265 | .set-opt input { margin-top: 0.25rem; flex-shrink: 0; }
|
|---|
| 266 | .set-opt span { display: flex; flex-direction: column; gap: 0.2rem; }
|
|---|
| 267 | .set-opt small { color: var(--ink-muted); font-size: 0.82rem; }
|
|---|
| 268 | .set-opt code { background: var(--paper-2); padding: 0.05rem 0.35rem; border-radius: 3px; font-size: 0.85em; }
|
|---|
| 269 | .set-form .btn { align-self: flex-start; }
|
|---|
| 270 | .set-field { display: flex; flex-direction: column; gap: 0.3rem; }
|
|---|
| 271 | .set-field > span { font-size: 0.8rem; font-weight: 600; color: var(--ink-soft, var(--ink-muted)); }
|
|---|
| 272 | .set-field input, .set-field textarea {
|
|---|
| 273 | width: 100%; box-sizing: border-box; padding: 0.55rem 0.7rem;
|
|---|
| 274 | border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); color: var(--ink);
|
|---|
| 275 | font: inherit; font-size: 0.95rem;
|
|---|
| 276 | }
|
|---|
| 277 | .set-field textarea { resize: vertical; }
|
|---|
| 278 | .set-field input:focus, .set-field textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
|
|---|
| 279 | /* Selects styled the same as inputs instead of the bare native dropdown:
|
|---|
| 280 | custom chevron, accent focus ring, full width. */
|
|---|
| 281 | .set-form select {
|
|---|
| 282 | appearance: none; -webkit-appearance: none;
|
|---|
| 283 | width: 100%; box-sizing: border-box;
|
|---|
| 284 | padding: 0.55rem 2.2rem 0.55rem 0.7rem;
|
|---|
| 285 | border: 1px solid var(--rule); border-radius: 6px;
|
|---|
| 286 | background-color: var(--paper); color: var(--ink);
|
|---|
| 287 | font: inherit; font-size: 0.95rem; cursor: pointer;
|
|---|
| 288 | 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");
|
|---|
| 289 | background-repeat: no-repeat; background-position: right 0.7rem center;
|
|---|
| 290 | transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|---|
| 291 | }
|
|---|
| 292 | .set-form select:hover { border-color: var(--ink-soft, #888); }
|
|---|
| 293 | .set-form select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
|
|---|
| 294 | .set-form select option { background: var(--paper); color: var(--ink); }
|
|---|
| 295 | .alert { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; }
|
|---|
| 296 | .alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
|
|---|
| 297 | </style>
|
|---|