source: Klonkt/src/views/pages/auth-register.ejs@ 98b7fdd

main
Last change on this file since 98b7fdd was 24cdcc6, checked in by Robin Genis <roboburr@…>, 3 months ago

setup: first-run wizard (language choice + site name) on /auth/register

A fresh install now shows a friendly wizard: choose your language (EN/NL/DE,
immediately set as the site default via default_lang), give your site a name,
and create your admin account. The site gets the klonkt brand colours. Only
shown when there are 0 users; existing installs unchanged. Tested on a fresh
DB (GET+POST).

Co-Authored-By: Claude <noreply@…>

  • Property mode set to 100644
File size: 1.8 KB
RevLine 
[7bc636b]1<div class="container auth-page">
[24cdcc6]2 <h1><%= t('setup.title') %></h1>
3 <p class="auth-intro"><%= t('setup.intro') %></p>
4
5 <div class="setup-lang" style="display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 20px">
6 <span style="opacity:.7;font-size:.9rem"><%= t('setup.lang_label') %>:</span>
7 <% (typeof langs !== 'undefined' ? langs : []).forEach(function(L){ %>
8 <a href="/lang/<%= L.code %>?r=/auth/register"
9 style="padding:5px 13px;border-radius:8px;text-decoration:none;font-weight:600;font-size:.9rem;border:1px solid <%= L.active ? 'var(--accent)' : 'var(--rule, #2b3140)' %>;color:<%= L.active ? 'var(--accent)' : 'inherit' %>"><%= L.name %></a>
10 <% }) %>
11 </div>
12
[7bc636b]13 <% if (error) { %><div class="alert alert-error"><%= error %></div><% } %>
14 <form method="post" action="/auth/register" class="auth-form">
15 <% if (typeof next !== 'undefined' && next) { %>
16 <input type="hidden" name="next" value="<%= next %>">
17 <% } %>
[24cdcc6]18 <label>
19 <span><%= t('setup.f_sitename') %></span>
20 <input type="text" name="siteName" value="<%= typeof siteName !== 'undefined' ? siteName : '' %>" required autofocus maxlength="80" placeholder="<%= t('setup.sitename_ph') %>">
21 </label>
[7bc636b]22 <label>
[137cca5]23 <span><%= t('auth.f_username') %></span>
[24cdcc6]24 <input type="text" name="username" value="<%= username %>" required autocomplete="username" pattern="[a-zA-Z0-9_-]{3,32}">
[7bc636b]25 </label>
26 <label>
[137cca5]27 <span><%= t('auth.f_email') %></span>
[7bc636b]28 <input type="email" name="email" value="<%= email %>" required autocomplete="email">
29 </label>
30 <label>
[137cca5]31 <span><%= t('auth.f_password') %></span>
[7bc636b]32 <input type="password" name="password" required minlength="8" autocomplete="new-password">
33 </label>
[24cdcc6]34 <button type="submit" class="btn btn-primary"><%= t('setup.submit') %></button>
[7bc636b]35 </form>
36</div>
Note: See TracBrowser for help on using the repository browser.