diff options
author | Cara Salter <cara@devcara.com> | 2022-07-19 19:49:39 -0400 |
---|---|---|
committer | Cara Salter <cara@devcara.com> | 2022-07-19 19:49:39 -0400 |
commit | c742b752140ab0eee6e353c779bd897042ba6739 (patch) | |
tree | 58953fdcaedb7e6c458a29dd980b8f97fb1af2a7 /templates | |
parent | 1bd04149f8f6133b817a37a37a91397750c76c1b (diff) | |
download | nccd-c742b752140ab0eee6e353c779bd897042ba6739.tar.gz nccd-c742b752140ab0eee6e353c779bd897042ba6739.zip |
Big login system
Still needs cookies, but those are coming! (and should be set anyways!)
Diffstat (limited to 'templates')
-rw-r--r-- | templates/footer.rs.html | 7 | ||||
-rw-r--r-- | templates/header.rs.html | 14 | ||||
-rw-r--r-- | templates/index.rs.html | 21 | ||||
-rw-r--r-- | templates/login.rs.html | 22 | ||||
-rw-r--r-- | templates/register.rs.html | 27 |
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() |