login

<     >

2022-03-01 16:03:10 (UTC-03:00)

Marcel Rodrigues <marcelgmr@gmail.com>

show proper title on login page

diff --git a/app.lua b/app.lua
index d85371c..53f7b02 100644
--- a/app.lua
+++ b/app.lua
@@ -103,7 +103,7 @@ local routes = {
         if user ~= nil then  -- already logged in
             return "/", 303
         else
-            return lud.template.render_file("view/login.html", {})
+            return lud.template.render_file("view/login.html", {title=title})
         end
     end},
     {"POST", "/login",

diff --git a/view/login.html b/view/login.html
index 28dd562..417befd 100644
--- a/view/login.html
+++ b/view/login.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta charset="utf-8">
-  <title>cogit - login</title>
+  <title>{{$title}} - login</title>
   <style>
     .centered { text-align: center; }
     .ul-form {