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>
|
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 }}">
|
2023-12-21 14:30:41 +00:00
|
|
|
{{ if not .Dark }}
|
|
|
|
<link rel="stylesheet" href="/_/static/dark.css?v={{ .Version }}" media="(prefers-color-scheme:dark)">
|
|
|
|
{{ end }}
|
2023-07-02 21:29:35 +00:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
2023-06-30 19:41:35 +00:00
|
|
|
</head>
|
2023-12-21 14:30:41 +00:00
|
|
|
<body {{ if is .Dark }}class="dark"{{end}}>
|
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}}/">
|
|
|
|
<img class="icon" src="{{ if .Site }}{{ .Site.SiteView.Site.Icon.String }}{{else}}/{{ .Host}}/icon.jpg{{end}}">
|
|
|
|
</a>
|
|
|
|
</div>
|
2023-07-02 21:29:35 +00:00
|
|
|
<span class="title"><a class="title" href="/{{.Host}}">{{ host .Host}}</a> - sign up or login</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>
|
|
|
|
<h2>create a new account</h2>
|
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 }}
|
|
|
|
<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>
|
2023-07-04 01:53:18 +00:00
|
|
|
{{ end }}
|
2023-06-30 19:41:35 +00:00
|
|
|
<div>
|
|
|
|
<h2>login</h2>
|
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>
|