summaryrefslogtreecommitdiffstats
path: root/templates/base.rs.html
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--templates/base.rs.html10
1 files changed, 8 insertions, 2 deletions
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<Notification>, body: Content)
<!DOCTYPE html>
<html>
@@ -15,11 +16,16 @@
<body>
<nav>
@if authenticated {
- logout
+ <form action="/logout" method="post">
+ <button type="submit">logout</button>
+ </form>
} else {
<a href="/login">log in</a>
}
</nav>
+ @if let Some(notification) = notification {
+ <div class="notification @notification.kind">@notification.message</div>
+ }
@:body()
</body>