aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-07-19 19:50:54 +0200
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-07-19 19:50:54 +0200
commit1d9d5f40fe4092657f529bdba18f6f52511eea00 (patch)
tree718b5af2c43f64bbe16de927ffa7f0cb8ed5fc72 /templates
parent3e435fc0d032a6cac0bdd15cdb138905ecdb7267 (diff)
downloadlens-1d9d5f40fe4092657f529bdba18f6f52511eea00.tar.gz
lens-1d9d5f40fe4092657f529bdba18f6f52511eea00.tar.bz2
lens-1d9d5f40fe4092657f529bdba18f6f52511eea00.zip
feat: Move login from `html/template` to qtpl
Diffstat (limited to 'templates')
-rw-r--r--templates/login.qtpl (renamed from templates/login.html)17
1 files changed, 13 insertions, 4 deletions
diff --git a/templates/login.html b/templates/login.qtpl
index 607faa1..b8aa98c 100644
--- a/templates/login.html
+++ b/templates/login.qtpl
@@ -1,6 +1,12 @@
-{{template "layout.html" .}}
-{{define "title"}} Login {{end}}
-{{define "content"}}
+{% code
+type LoginPage struct {}
+%}
+
+{% func (p *LoginPage) Title() %}
+Login
+{% endfunc %}
+
+{% func (p *LoginPage) Content() %}
<form action="/login" method="post">
<div class="field">
<label class="label">Username</label>
@@ -21,4 +27,7 @@
<input class="button is-pulled-right" value="login" type="submit">
</div>
</form>
-{{end}}
+{% endfunc %}
+
+{% func (p *LoginPage) Script() %}
+{% endfunc %}