about summary refs log tree commit diff
path: root/templates/register.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/register.html')
-rw-r--r--templates/register.html40
1 files changed, 40 insertions, 0 deletions
diff --git a/templates/register.html b/templates/register.html
new file mode 100644
index 0000000..ea5094f
--- /dev/null
+++ b/templates/register.html
@@ -0,0 +1,40 @@
+{{ define "register" }}
+
+{{ template "head" . }}
+<body>
+  {{ template "nav" . }}
+
+  <span id="register"></span>
+  <h1><a href="#register">Register</a></h1>
+
+  {{ if .logged_in }}
+  Already logged in! <a href="/">Return home</a>
+  {{ else }}
+  <form method="POST" action="/register">
+    <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="password1">Password:</label></td>
+        <td><input class="border" type="password" id="password1" name="password1"></td>
+      </tr>
+
+      <tr>
+        <td><label for="password2">Repeat Password:</label></td>
+        <td><input class="border" type="password" id="password2" name="password2"></td>
+      </tr>
+
+      <tr>
+        <td></td>
+        <td><input class="border" type="submit" value="Register"></td>
+      </tr>
+    </table>
+  </form>
+  Already registerd? <a href="/login">Login!</a>
+  {{ end }}
+</body>
+{{ template "footer" . }}
+{{ end }}