aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/footer.rs.html7
-rw-r--r--templates/header.rs.html14
-rw-r--r--templates/index.rs.html21
-rw-r--r--templates/login.rs.html22
-rw-r--r--templates/register.rs.html27
5 files changed, 74 insertions, 17 deletions
diff --git a/templates/footer.rs.html b/templates/footer.rs.html
new file mode 100644
index 0000000..41c4d4e
--- /dev/null
+++ b/templates/footer.rs.html
@@ -0,0 +1,7 @@
+
+@()
+
+
+ </div>
+ </body>
+</html>
diff --git a/templates/header.rs.html b/templates/header.rs.html
new file mode 100644
index 0000000..9384bcb
--- /dev/null
+++ b/templates/header.rs.html
@@ -0,0 +1,14 @@
+@use super::statics::style_css;
+@()
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <title>NCCd Dashboard</title>
+ <link rel="stylesheet" href="/static/@style_css.name"/>
+
+ <meta name="viewport" content="width=device-width,initial-scale=1.0">
+ </head>
+
+ <body>
+
+ <div class="container">
diff --git a/templates/index.rs.html b/templates/index.rs.html
index 2971d13..4fb701c 100644
--- a/templates/index.rs.html
+++ b/templates/index.rs.html
@@ -1,21 +1,8 @@
-@use super::statics::style_css;
+@use super::{header_html, footer_html};
@()
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <title>NCCd Dashboard</title>
- <link rel="stylesheet" href="/static/@style_css.name"/>
-
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
- </head>
-
- <body>
-
- <div class="container">
+@:header_html()
<h1>NCCd (Network Communications Control Daemon)</h1>
- <h3>Please <a href="/auth/login">Log in</a></h3>
-
- </body>
-</html>
+ <h3>Please <a href="/dash/auth/login">Log in</a></h3>
+@:footer_html()
diff --git a/templates/login.rs.html b/templates/login.rs.html
new file mode 100644
index 0000000..122e2b8
--- /dev/null
+++ b/templates/login.rs.html
@@ -0,0 +1,22 @@
+@use super::{header_html, footer_html};
+
+@()
+
+@:header_html()
+<h1>NCCd Login</h1>
+<form method="POST">
+ <div>
+ <label for="username">Email</label>
+ <input type="text" name="email">
+ </div>
+ <br/>
+ <div>
+ <label for="password">Password</label>
+ <input type="password" name="password">
+ </div>
+ <div>
+ <button type="submit" class="accent">Submit</button>
+</form>
+
+Or try <a href="/dash/auth/register">creating an account</a>
+@:footer_html()
diff --git a/templates/register.rs.html b/templates/register.rs.html
new file mode 100644
index 0000000..5c2e3f2
--- /dev/null
+++ b/templates/register.rs.html
@@ -0,0 +1,27 @@
+@use super::{header_html, footer_html};
+
+@()
+
+@:header_html()
+<h1>Create your NCCd Account</h1>
+<form method="POST" action="/dash/auth/register">
+ <div>
+ <label for="email">Email</label>
+ <input type="text" id="email" name="email">
+ </div>
+ <div>
+ <label for="prefname">Preferred name</label>
+ <input type="text" id="prefname" name="prefname">
+ </div>
+ <div>
+ <label for="password">Password</label>
+ <input type="password" id="password" name="password">
+ </div>
+ <div>
+ <label for="password-confirm">Confirm password</label>
+ <input type="password" id="password-confirm" name="password-confirm">
+ </div>
+ <input type="submit" class="accent">Submit</input>
+</form>
+Or try <a href="/dash/auth/login">logging in</a>
+@:footer_html()