internal/web/templates/register.html

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

32 lines · 2180 bytes

 1{{define "title"}}register · {{.Site}}{{end}}
 2{{define "width"}}bounded{{end}}
 3{{define "content"}}
 4<div class="pagehead">
 5  <h1>Create an account</h1>
 6  <span class="grow"></span>
 7  <a class="button btn" href="/login">Sign in</a>
 8</div>
 9{{if eq .Mode "invite"}}<p class="lede">This instance is invite-only. You need an invite code from an admin.</p>
10{{else}}<p class="lede">Open registration. Your account activates once you verify your email.</p>{{end}}
11{{if .Error}}<p class="error" role="alert">{{.Error}}</p>{{end}}
12<section class="setcard">
13<form method="post" action="/register" class="signupform">
14<div class="field"><label for="username">Username</label><input type="text" id="username" name="username" value="{{.Username}}" required autocomplete="username" autocapitalize="none" spellcheck="false"></div>
15{{if eq .Mode "invite"}}<div class="field"><label for="invite">Invite code</label><input type="text" id="invite" name="invite" required autocomplete="off" spellcheck="false"></div>
16{{else}}<div class="field"><label for="email">Email</label><input type="email" id="email" name="email" required autocomplete="email"></div>{{end}}
17<div class="field"><label for="key">SSH public key</label>
18<p class="hint">Paste the contents of your public key file, usually <code>~/.ssh/id_ed25519.pub</code>. It starts with <code>ssh-ed25519</code> or <code>ssh-rsa</code>.</p>
19{{/* The help is a disclosure rather than a link out: a wiki page is on
20     another origin, opens over the half-filled form, and has no way
21     back to it. */}}
22<details class="editbox"><summary>No key yet?</summary>
23<p class="meta">Run this, take the default path, and paste what the second line prints.</p>
24<pre class="code copyable" tabindex="0">ssh-keygen -t ed25519
25cat ~/.ssh/id_ed25519.pub</pre>
26</details>
27<textarea id="key" name="key" rows="3" required spellcheck="false" placeholder="ssh-ed25519 AAAA… you@host"></textarea></div>
28<p><button type="submit">Create account</button></p>
29</form>
30</section>
31<p class="meta">Prefer the terminal? <code>ssh git@{{.Host}} register --username you {{if eq .Mode "invite"}}--invite &lt;code&gt;{{else}}--email you@example.org{{end}}</code></p>
32{{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