about summary refs log tree commit diff
path: root/templates/register.html
diff options
context:
space:
mode:
authorEmile <git@emile.space>2024-08-16 19:50:26 +0200
committerEmile <git@emile.space>2024-08-16 19:50:26 +0200
commit1a57267a17c2fc17fb6e104846fabc3e363c326c (patch)
tree1e574e3a80622086dc3c81ff9cba65ef7049b1a9 /templates/register.html
initial commit
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 }}