internal/web/templates/login.html

ac8d910ff31c2fadc452928e1d56c64b4af25495
gitbay/internal/web/templates/login.html

40 lines · 1859 bytes

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

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form