summaryrefslogtreecommitdiffstats
path: root/templates/admin/setup.html
blob: 4294238354d35de624a3ca43a6befd1a073cd68a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{{define "setup.html"}}
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Setup</title>
  <link rel="stylesheet" href="/assets/styles/admin.css">
  <style>
    body { max-width: 480px; margin: 4rem auto; padding: 0 1rem; }
    h1 { margin-bottom: 1.5rem; }
    .error { color: #c0392b; margin-bottom: 1rem; }
    .hint { font-size: 0.8rem; color: #888; margin: 0.2rem 0 0.8rem; }
    .form-actions { margin-top: 1.5rem; }
  </style>
</head>
<body>
  <h1>Setup</h1>
  {{if .Error}}<p class="error">{{.Error}}</p>{{end}}
  <form method="POST" action="/setup" enctype="multipart/form-data">

    <label for="username">Admin username</label>
    <input type="text" id="username" name="username" value="{{.Username}}" required autofocus autocomplete="username">

    <label for="password">Password</label>
    <input type="password" id="password" name="password" required autocomplete="new-password">

    <label for="confirm">Confirm password</label>
    <input type="password" id="confirm" name="confirm" required autocomplete="new-password">

    <label for="site_title">Site title</label>
    <input type="text" id="site_title" name="site_title" value="{{.SiteTitle}}" placeholder="My blog">

    <label for="site_description">Site description</label>
    <input type="text" id="site_description" name="site_description" value="{{.SiteDescription}}" placeholder="A short description">

    <label for="logo">Logo image</label>
    <input type="file" id="logo" name="logo" accept="image/png,image/jpeg,image/webp">
    <p class="hint">Shown on the front page. Leave blank to keep the default.</p>

    <div class="form-actions">
      <button type="submit" class="btn btn-primary">Create site</button>
    </div>
  </form>
</body>
</html>
{{end}}