diff options
author | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-07-19 20:12:07 +0200 |
---|---|---|
committer | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-07-19 20:12:07 +0200 |
commit | e359eaaebd7270476075ca9e08b7b53fb9e69f24 (patch) | |
tree | 74f17671b47873316301d8692cee4673e77865ba /templates | |
parent | 1d9d5f40fe4092657f529bdba18f6f52511eea00 (diff) | |
download | lens-e359eaaebd7270476075ca9e08b7b53fb9e69f24.tar.gz lens-e359eaaebd7270476075ca9e08b7b53fb9e69f24.tar.bz2 lens-e359eaaebd7270476075ca9e08b7b53fb9e69f24.zip |
feat: Move register from `html/template` to qtpl
Diffstat (limited to 'templates')
-rw-r--r-- | templates/error.qtpl | 4 | ||||
-rw-r--r-- | templates/login.qtpl | 4 | ||||
-rw-r--r-- | templates/media.qtpl | 4 | ||||
-rw-r--r-- | templates/register.qtpl | 35 |
4 files changed, 38 insertions, 9 deletions
diff --git a/templates/error.qtpl b/templates/error.qtpl index b71adc8..d82ca1c 100644 --- a/templates/error.qtpl +++ b/templates/error.qtpl @@ -4,9 +4,7 @@ type ErrorPage struct { } %} -{% func (p *ErrorPage) Title() %} -Error -{% endfunc %} +{% func (p *ErrorPage) Title() %}Error{% endfunc %} {% func (p *ErrorPage) Content() %} {%s p.Err %} diff --git a/templates/login.qtpl b/templates/login.qtpl index b8aa98c..d0490f9 100644 --- a/templates/login.qtpl +++ b/templates/login.qtpl @@ -2,9 +2,7 @@ type LoginPage struct {} %} -{% func (p *LoginPage) Title() %} -Login -{% endfunc %} +{% func (p *LoginPage) Title() %}Login{% endfunc %} {% func (p *LoginPage) Content() %} <form action="/login" method="post"> diff --git a/templates/media.qtpl b/templates/media.qtpl index b9b3bf5..65b39c4 100644 --- a/templates/media.qtpl +++ b/templates/media.qtpl @@ -7,9 +7,7 @@ type MediaPage struct { } %} -{% func (p *MediaPage) Title() %} -Media -{% endfunc %} +{% func (p *MediaPage) Title() %}Media{% endfunc %} {% func (p *MediaPage) Content() %} <div class="columns is-multiline"> diff --git a/templates/register.qtpl b/templates/register.qtpl new file mode 100644 index 0000000..115edfe --- /dev/null +++ b/templates/register.qtpl @@ -0,0 +1,35 @@ +{% code +type RegisterPage struct {} +%} + +{% func (p *RegisterPage) Title() %}Login{% endfunc %} + +{% func (p *RegisterPage) Content() %} +<h1>Initial Setup</h1> +<form action="/initial" method="post"> + <div class="field"> + <label class="label">Username</label> + <div class="control"> + <input class="input" name="username" type="text"> + </div> + </div> + <div class="field"> + <label class="label">Password</label> + <div class="control"> + <input class="input" name="password" type="password"> + </div> + </div> + <div class="field"> + <label class="label">Root folder</label> + <div class="control"> + <input class="input" name="path" type="text"> + </div> + </div> + <div class="field"> + <input class="button is-pulled-right" value="Save" type="submit"> + </div> +</form> +{% endfunc %} + +{% func (p *RegisterPage) Script() %} +{% endfunc %} |