From 2407c1a4a55d17817b31f7ca5cac9d68b27f536c Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Mon, 11 Dec 2023 06:02:00 +0000 Subject: implement signup --- templates/base.rs.html | 10 ++++++++-- templates/login.rs.html | 7 ++++--- templates/signup.rs.html | 7 ++++--- templates/users.rs.html | 2 +- 4 files changed, 17 insertions(+), 9 deletions(-) (limited to 'templates') diff --git a/templates/base.rs.html b/templates/base.rs.html index 5b1a324..64a8d4e 100644 --- a/templates/base.rs.html +++ b/templates/base.rs.html @@ -1,6 +1,7 @@ @use super::statics::*; +@use crate::Notification; -@(authenticated: bool, body: Content) +@(authenticated: bool, notification: Option, body: Content) @@ -15,11 +16,16 @@ + @if let Some(notification) = notification { +
@notification.message
+ } @:body() diff --git a/templates/login.rs.html b/templates/login.rs.html index 349263c..c87866c 100644 --- a/templates/login.rs.html +++ b/templates/login.rs.html @@ -1,8 +1,9 @@ @use super::base_html; +@use crate::Notification; -@() +@(notification: Option) -@:base_html(false, { +@:base_html(false, None, {
@@ -12,4 +13,4 @@
-}) \ No newline at end of file +}) diff --git a/templates/signup.rs.html b/templates/signup.rs.html index 354dae6..a482fc2 100644 --- a/templates/signup.rs.html +++ b/templates/signup.rs.html @@ -1,8 +1,9 @@ @use super::base_html; +@use crate::Notification; -@() +@(notification: Option) -@:base_html(false, { +@:base_html(false, notification, {
@@ -10,4 +11,4 @@
-}) \ No newline at end of file +}) diff --git a/templates/users.rs.html b/templates/users.rs.html index 9b9be30..ab1ab0f 100644 --- a/templates/users.rs.html +++ b/templates/users.rs.html @@ -3,7 +3,7 @@ @(users: Vec) -@:base_html(false, { +@:base_html(false, None, {
    @for user in users {
  • @user.username
  • -- cgit