~evanj/cms

ref: 7fc5d7258891c1c58ba07d1e9035517327be7a19 cms/internal/s/tmpl/html/index.html -rw-r--r-- 2.1 KiB
7fc5d725Evan M Jones WIP(*): Project init. 10 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
<!DOCTYPE html>
<html lang=en>

<head>
  <meta charset="utf-8">
  <title>CMS</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
</head>

<body>
  <style>
    form input { display: block; margin: 10px 0; }
  </style>

  <main>
    <header>
      <h1>CMS</h1>
      <p>A flexible CMS for everyone.</p>
    </header>
    <hr/>
    <article>


      {{ if .User }}

        <p>Welcome back, {{ .User.Name }}.</p>

        <p>Available Spaces:</p>

        {{ 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 }}

        <form method=POST action='/space/new' enctype='multipart/form-data'>
          <legend>Create Space</legend>
          <input required type=text name=name placeholder=name />
          <input required type=text name=desc placeholder=description />
          <input type=submit value=Go />
        </form>

        <form method=POST action='/user/logout' enctype='multipart/form-data'>
          <legend>Logout</legend>
          <input type=submit value=Go />
        </form>

      {{ else }}

        <form method=POST action='/user/login' enctype='multipart/form-data'>
          <legend>Login</legend>
          <input autocomplete=on required type=text name=username placeholder=username autofocus />
          <input autocomplete=on required type=password name=password placeholder=password />
          <input type=submit value=Go />
        </form>

        <form method=POST action='/user/signup' enctype='multipart/form-data'>
          <legend>Signup</legend>
          <input autocomplete=on required type=text name=username placeholder=username autofocus />
          <input autocomplete=on required type=password name=password placeholder=password />
          <input autocomplete=on required type=password name=verify placeholder=verify />
          <input type=submit value=Go />
        </form>

      {{ end }}

    </article>
    <hr/>
    <footer>
      <center>© 2015-2020 Evan Jones</center>
    </footer>
  </main>
</body>

</html>