2023-06-30 19:41:35 +00:00
<!DOCTYPE html>
< head >
2023-07-02 21:29:35 +00:00
< title > {{ host .Host }}: sign up or log in< / title >
2024-05-11 00:53:58 +00:00
< meta name = "viewport" content = "width=device-width, initial-scale=1" / >
2023-06-30 19:41:35 +00:00
< link rel = "shortcut icon" href = "/{{.Host}}/icon.jpg" >
2023-07-27 01:07:39 +00:00
< link rel = "stylesheet" href = "/_/static/style.css?v={{ .Version }}" >
2024-05-11 00:53:58 +00:00
{{- if or (not .Dark) (is .Dark) }}
< link rel = "stylesheet" href = "/_/static/dark.css?v={{ .Version }}" { { if not . Dark } } media = "(prefers-color-scheme:dark)" { { end } } >
{{- end }}
2023-06-30 19:41:35 +00:00
< / head >
2024-05-11 00:53:58 +00:00
< body >
2023-06-30 19:41:35 +00:00
< nav >
< div class = "communities" >
< a href = "/{{.Host}}" > home< / a >
< span > - < / span >
< a href = "/{{.Host}}?listingType=All" > all< / a >
|
{{ $host := .Host }}
{{ range $i, $c := .TopCommunities}}
< a href = "/{{$host}}/c/{{$c.Community.Name}}" > {{$c.Community.Name}}< / a >
2023-07-01 02:42:45 +00:00
< span > - < / span >
2023-06-30 19:41:35 +00:00
{{ end }}
< a href = "/{{$host}}/search?searchtype=Communities" class = "more" > more »< / a >
< / div >
< div class = "spacer" >
< a href = "/{{ .Host}}/" >
2024-06-02 17:45:42 +00:00
< img class = "icon" src = "{{ if and .Site .Site.SiteView.Site.Icon.IsValid }}{{ shrink .Site.SiteView.Site.Icon.String }}{{else}}/{{ .Host}}/icon.jpg{{end}}" >
2023-06-30 19:41:35 +00:00
< / a >
< / div >
2024-06-03 15:00:46 +00:00
< a class = "title" href = "/{{.Host}}" > {{ host .Host}}< / a >
2024-06-02 17:45:42 +00:00
< span class = "spacer" > < / span >
2023-06-30 19:41:35 +00:00
< / nav >
{{ if .Alert }}
< div class = "alert" >
{{ .Alert }}
< / div >
{{ end }}
{{ if .Error }}
< div class = "error" > {{.Error}}< / div >
{{ end }}
< div class = "signup" >
2023-07-04 01:53:18 +00:00
{{ if ne .Op "2fa" }}
2023-06-30 19:41:35 +00:00
< div >
2024-06-03 15:00:46 +00:00
< h1 > create a new account< / h1 >
2023-07-23 19:05:31 +00:00
< form method = "POST" action = "/{{ .Host}}/login" >
2023-06-30 19:41:35 +00:00
< label >
username
< div > < input required name = "username" type = "text" > < / div >
< / label >
< label >
password
< div > < input required name = "password" type = "password" > < / div >
< / label >
< label >
verify password
< div > < input required name = "passwordverify" type = "password" > < / div >
< / label >
< label >
email
< div > < input { { if and . Site . Site . SiteView . LocalSite . RequireEmailVerification } } required { { end } } name = "email" type = "text" > < / div >
< / label >
2023-07-01 02:42:45 +00:00
{{ if and .Site (or (eq .Site.SiteView.LocalSite.RegistrationMode "RequireApplication") (eq .Site.SiteView.LocalSite.RegistrationMode "requireapplication")) }}
2023-06-30 19:41:35 +00:00
< div class = "question" >
{{ markdown .Host .Site.SiteView.LocalSite.ApplicationQuestion.String }}
< / div >
< label >
answer
< div > < textarea required name = "answer" > < / textarea > < / div >
< / label >
{{ end }}
{{ if and .Site .Site.SiteView.LocalSite.CaptchaEnabled .Captcha }}
2024-06-03 15:00:46 +00:00
< figure >
< img src = "data:image/png;base64,{{ .Captcha.PNG }}" >
< figcaption > < audio controls src = "data:audio/wav;base64,{{ .Captcha.WAV }}" > < / audio > < / figcaption > < / figure >
2023-06-30 19:41:35 +00:00
< label >
enter code
< div > < input required name = "captchaanswer" type = "text" > < / div >
2023-12-22 03:22:41 +00:00
< input type = "hidden" name = "captchauuid" value = "{{ .Captcha.UUID }}" >
2023-06-30 19:41:35 +00:00
< / label >
{{ end }}
{{ if and .Site .Site.SiteView.LocalSite.EnableNSFW }}
< label >
enable nsfw
< input type = "checkbox" >
< / label >
{{ end }}
< input type = "submit" name = "submit" value = "sign up" >
< / form >
< / div >
2023-07-04 01:53:18 +00:00
{{ end }}
2023-06-30 19:41:35 +00:00
< div >
2024-06-03 15:00:46 +00:00
< h1 > login< / h1 >
2023-07-07 16:26:29 +00:00
< form method = "POST" action = "/{{ .Host}}/login" >
2023-06-30 19:41:35 +00:00
< label >
username
< div > < input required name = "username" type = "text" > < / div >
< / label >
< label >
password
< div > < input required name = "password" type = "password" > < / div >
< / label >
2023-07-04 01:53:18 +00:00
{{ if eq .Op "2fa" }}
< label >
2fa code
< div > < input required name = "totp" type = "text" > < / div >
< / label >
{{ end }}
2023-06-30 19:41:35 +00:00
< input type = "submit" name = "submit" value = "log in" >
< / form >
< / div >
< / div >
< / body >
< / html >