mlmym/templates/login.html

100 lines
3.3 KiB
HTML
Raw Normal View History

2023-06-30 19:41:35 +00:00
<!DOCTYPE html>
<head>
<title>{{ .Host }}: sign up or log in</title>
<link rel="shortcut icon" href="/{{.Host}}/icon.jpg">
<link rel="stylesheet" href="/_/static/style.css">
</head>
<body>
<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}}/">
<img class="icon" src="{{ if .Site }}{{ .Site.SiteView.Site.Icon.String }}{{else}}/{{ .Host}}/icon.jpg{{end}}">
</a>
</div>
<span class="title"><a class="title" href="/{{.Host}}">{{.Host}}</a> - sign up or login</span>
</nav>
{{ if .Alert }}
<div class="alert">
{{ .Alert }}
</div>
{{ end }}
{{ if .Error }}
<div class="error">{{.Error}}</div>
{{ end }}
<div class="signup">
<div>
<h2>create a new account</h2>
<form method="POST">
<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 }}
<figure><img src="data:image/png;base64,{{ .Captcha.Png }}"></figure>
<figure><audio controls src="data:audio/wav;base64,{{ .Captcha.Wav }}"></audio></figure>
<label>
enter code
<div><input required name="captchaanswer" type="text"></div>
<input type="hidden" name="captchauuid" value="{{ .Captcha.Uuid }}">
</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>
<div>
<h2>login</h2>
<form method="POST">
<label>
username
<div><input required name="username" type="text"></div>
</label>
<label>
password
<div><input required name="password" type="password"></div>
</label>
<input type="submit" name="submit" value="log in">
</form>
</div>
</div>
</body>
</html>