about summary refs log tree commit diff
path: root/templates/src/login.rs
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2024-08-18 00:30:15 +0300
committerVika <vika@fireburn.ru>2024-08-18 00:30:15 +0300
commite43313210269b8e48fe35b17ac416c9ba88ae4f3 (patch)
tree51941c5149351bb32260fb8cbd4293eed80563e0 /templates/src/login.rs
parentcd8029a930b966225d0a57afb1ee29808fe2a409 (diff)
feat: logins!!
yes you can finally sign in

this is also supposed to show private posts intended for you!

maybe i can also reveal my email to those who sign in! :3
Diffstat (limited to 'templates/src/login.rs')
-rw-r--r--templates/src/login.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/templates/src/login.rs b/templates/src/login.rs
index 042c308..ed5dc4e 100644
--- a/templates/src/login.rs
+++ b/templates/src/login.rs
@@ -14,4 +14,18 @@ markup::define! {
             }
         }
     }
+
+    LogoutPage {
+        script[type="module"] {
+            @markup::raw(r#"const form = document.getElementById("logout");
+form.submit();
+"#)
+        }
+        form[id="logout", method="POST"] {
+            p { "You will be logged out automatically if you have JavaScript on." }
+            noscript { p { "However, you don't seem to have it running. No worries, just press the button to be logged out." } }
+
+            input[type="submit", value="Sign out"];
+        }
+    }
 }