internal/web/templates/login.html

8e6fc2062ca26f7a848bdf6ad6345fd345351231
gitbay/internal/web/templates/login.html history · blame · raw

33 lines · 1560 bytes

 1{{define "title"}}login · {{.Site}}{{end}}
 2{{define "content"}}
 3<h1>Log in</h1>
 4{{if .Next}}<p class="meta">Log in to continue to <code>{{.Next}}</code>.</p>{{end}}
 5{{if .Error}}<p class="error" role="alert">{{.Error}}</p>{{end}}
 6{{if .Sent}}
 7<p>If that account exists, a login link is on its way. It works once and
 8expires in fifteen minutes.</p>
 9{{else}}
10{{if .EmailLogin}}
11<form method="post" action="/login">
12  <label for="identifier">Username or email address</label>
13  <input type="text" id="identifier" name="identifier" autocomplete="username" required>
14  <button type="submit">Email me a link</button>
15</form>
16<p>Or, from a machine with your registered key:</p>
17{{else}}
18<p>Browser sessions are minted over SSH — there is no password. From a machine
19with your registered key:</p>
20{{end}}
21<pre class="message">ssh git@{{.Host}} web login</pre>
22<p>then open the printed URL within five minutes.</p>
23{{end}}
24<h2>New here?</h2>
25{{if eq .Mode "open"}}<p><a href="/register">Create an account</a> — pick a username, paste your SSH
26public key, verify your email. Or from the terminal:</p>
27<pre class="message">ssh git@{{.Host}} register --username you --email you@example.org</pre>
28{{else if eq .Mode "invite"}}<p>This instance is invite-only. With a code from an admin,
29<a href="/register">create an account</a> — pick a username, paste your SSH public key. Or from
30the terminal:</p>
31<pre class="message">ssh git@{{.Host}} register --username you --invite &lt;code&gt;</pre>
32{{else}}<p>This instance is not accepting new accounts.</p>{{end}}
33{{end}}