~evanj/cms

ref: 40c0e4fc7f8f794524c1f37f2c5d7355b4985475 cms/internal/s/tmpl/html/index.html -rw-r--r-- 3.5 KiB
40c0e4fcEvan M Jones Chore(readme): Removing tag line. 1 year, 4 months ago
                                                                                
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<!DOCTYPE html>
<!DOCTYPE html>
<html lang=en>
<head>
  {{ template "html/_head.html" }}
  <title>CMS</title>
</head>
<body class=index style='max-width: 600px;'>
  <style>{{ template "css/main.css" }}</style>
  <main>
    {{ template "html/_header.html" $ }}
    <hr/>
    <article>
      {{ if .User }}
        <h1>Actions</h1>
        <details>
          <summary>Create a New Space</summary>
          <form method=POST action='/space/new' enctype='multipart/form-data'>
            <br>
            <fieldset>
              <label for='create-name'>Name</label>
              <br>
              <input id='create-name' autofocus required type=text name=name placeholder=name />
              <br>
              <br>
              <label for='create-desc'>Description</label>
              <br>
              <input id='create-desc' required type=text name=desc placeholder=description />
              <br>
              <br>
            <input type=submit value=Create />
            </fieldset>
            <br>
          </form>
        </details>
        <details>
          <summary>Logout</summary>
          <form method=POST action='/user/logout' enctype='multipart/form-data'>
            <br>
            <fieldset>
              <input autofocus type=submit value=Logout />
            </fieldset>
            <br>
          </form>
        </details>
        <br>
        <h2>Your Spaces</h2>
        {{ if .Spaces }}
          <ul>
            {{ range .Spaces }}
            <li><a href="/space/{{ .ID }}">{{ .Name }}</a></li>
            {{ end }}
          </ul>
        {{ else }}
          <p>You haven't created any spaces yet.</p>
        {{ end }}
      {{ else }}
        <h1>Account</h1>
        <details>
          <summary>Login</summary>
          <form method=POST action='/user/login' enctype='multipart/form-data'>
            <br>
            <fieldset>
              <label for='login-username'>Username</label>
              <br>
              <input id='login-username' autocomplete=on required type=text name=username placeholder=username autofocus />
              <br>
              <br>
              <label for='login-password'>Password</label>
              <br>
              <input id='login-password' autocomplete=on required type=password name=password placeholder=password />
              <br>
              <br>
              <input type=submit value=Login />
            </fieldset>
            <br>
          </form>
        </details>
        <details>
          <summary>Signup</summary>
          <form method=POST action='/user/signup' enctype='multipart/form-data'>
            <br>
            <fieldset>
              <label for='signup-username'>Username</label>
              <br>
              <input id='signup-username' autocomplete=on required type=text name=username placeholder=username autofocus />
              <br>
              <br>
              <label for='signup-password'>Password</label>
              <br>
              <input id='signup-password' autocomplete=on required type=password name=password placeholder=password />
              <br>
              <br>
              <label for='signup-verify'>Verify</label>
              <br>
              <input id='signup-verify' autocomplete=on required type=password name=verify placeholder=verify />
              <br>
              <br>
              <input type=submit value=Signup />
            </fieldset>
            <br>
          </form>
        </details>
      {{ end }}
    </article>
    <hr/>
    {{ template "html/_footer.html" }}
  </main>
</body>

</html>