about summary refs log tree commit diff
path: root/templates/login.html
blob: a4fc3581cf35e9b361963a00fd2f3cc83d2d0701 (plain)
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
{{ define "login" }}

{{ template "head" . }}
<body>
  {{ template "nav" . }}

  <span id="login"></span>
  <h1><a href="#login">Login</a></h1>

  {{ if .err }}{{ .err }}{{ end }}
  {{ if .logged_in }}
  Already logged in! <a href="/">Return home</a>
  {{ else }}
  <form method="POST" action="/login">

    <table>
      <tr>
        <td><label for="username">Name:</label></td>
        <td><input class="border" type="text" id="username" name="username" autofocus></td>
      </tr>
      <tr>
        <td><label for="password">Password:</label></td>
        <td><input class="border" type="password" id="password" name="password"></td>
      </tr>
      <tr>
        <td></td>
        <td><input class="border" type="submit" value="Login"></td>
      </tr>
      <tr>
        <td></td>
        <td>{{ .res }}</td>
      </tr>
    </table>
  </form>
  Not registered yet? <a href="/register">Register Now!</a>
  {{ end }}

  
</body>
{{ template "footer" . }}
{{ end }}