Commit 28e72be7ab

28e72be7ab6bc96868893853fd8d210c3656960f

parent: 727e977359

Verified · cmc ci/build: success ci/quality: success ci/test: success

cmc <hello@cleberg.net> · 2026-11-25 20:59 UTC

web: polish remaining repo sub-views, snippets/queries, and auth/landing pages

Layout: unified · split

Changed files (16)
internal/web/templates/accountdelete.html +3 −1 · view
@@ -1,6 +1,7 @@
1{{define "width"}}bounded{{end}} 1{{define "width"}}bounded{{end}}
2{{define "title"}}delete account · {{.Site}}{{end}} 2{{define "title"}}delete account · {{.Site}}{{end}}
3{{define "content"}} 3{{define "content"}}
4<section class="setcard setcard-danger">
4{{if .Scheduled}} 5{{if .Scheduled}}
5<h1>Deletion scheduled</h1> 6<h1>Deletion scheduled</h1>
6<p>{{.User}} is disabled and will be deleted at {{when .Scheduled}}.</p> 7<p>{{.User}} is disabled and will be deleted at {{when .Scheduled}}.</p>
@@ -13,11 +14,12 @@ its repositories, snippets, keys and addresses go, and what it wrote on
13other people's repositories stays under the name <code>ghost</code>. 14other people's repositories stays under the name <code>ghost</code>.
14Signing in during those seven days cancels.</p> 15Signing in during those seven days cancels.</p>
15<form method="post"> 16<form method="post">
16<p class="btngroup"><button type="submit" class="danger">Delete {{.User}}</button> <a href="/">Cancel</a></p> 17<p class="btngroup"><button type="submit" class="danger">Delete {{.User}}</button> <a class="button btn" href="/">Cancel</a></p>
17</form> 18</form>
18{{else}} 19{{else}}
19<h1>Link not valid</h1> 20<h1>Link not valid</h1>
20<p class="meta">This deletion link has expired or was already used. Nothing 21<p class="meta">This deletion link has expired or was already used. Nothing
21has changed. Request a new one from <a href="/settings#delete">settings</a>.</p> 22has changed. Request a new one from <a href="/settings#delete">settings</a>.</p>
22{{end}} 23{{end}}
24</section>
23{{end}} 25{{end}}
internal/web/templates/blame.html +4 −1 · view
@@ -9,7 +9,10 @@
9 <span class="refchip">{{template "branchicon"}} {{.Ref}}</span> 9 <span class="refchip">{{template "branchicon"}} {{.Ref}}</span>
10 <span class="crumbs"><a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}">{{.Repo.Name}}</a>/{{range .Crumbs}}<a href="{{.URL}}">{{.Name}}</a>/{{end}}<strong>{{.Base}}</strong></span> 10 <span class="crumbs"><a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}">{{.Repo.Name}}</a>/{{range .Crumbs}}<a href="{{.URL}}">{{.Name}}</a>/{{end}}<strong>{{.Base}}</strong></span>
11 <span class="spacer"></span> 11 <span class="spacer"></span>
12 <span class="actions"><a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/blob/{{.Ref}}/{{.Path}}">view</a> · <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/raw/{{.Ref}}/{{.Path}}">raw</a></span> 12 <div class="btngroup">
13 <a class="button btn" href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/blob/{{.Ref}}/{{.Path}}">view</a>
14 <a class="button btn" href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/raw/{{.Ref}}/{{.Path}}">raw</a>
15 </div>
13</div> 16</div>
14{{if .Binary}}<p class="empty-note">binary file — blame unavailable</p> 17{{if .Binary}}<p class="empty-note">binary file — blame unavailable</p>
15{{else}} 18{{else}}
internal/web/templates/fork.html +24 −9 · view
@@ -1,18 +1,33 @@
1{{define "width"}}bounded{{end}} 1{{define "width"}}bounded{{end}}
2{{define "title"}}fork {{.Repo.OwnerName}}/{{.Repo.Name}} · {{.Site}}{{end}} 2{{define "title"}}fork {{.Repo.OwnerName}}/{{.Repo.Name}} · {{.Site}}{{end}}
3{{define "content"}} 3{{define "content"}}
4<h1>Fork {{.Repo.OwnerName}}/{{.Repo.Name}}</h1> 4<div class="pagehead">
5 <h1>Fork {{.Repo.OwnerName}}/{{.Repo.Name}}</h1>
6 <span class="grow"></span>
7 <a class="button btn" href="/{{.Repo.OwnerName}}/{{.Repo.Name}}">Back to repository</a>
8</div>
5{{if .Error}}<p class="error" role="alert">{{.Error}}</p>{{end}} 9{{if .Error}}<p class="error" role="alert">{{.Error}}</p>{{end}}
10<section class="setcard">
6<p class="meta">A fork is a copy of every branch, owned by you or by an 11<p class="meta">A fork is a copy of every branch, owned by you or by an
7organization you administer. Its issues, merge requests and settings are its 12organization you administer. Its issues, merge requests and settings are its
8own.</p> 13own.</p>
9<form method="post" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/fork"> 14<form method="post" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/fork" class="setform stack">
10<p><label>Owner <select name="owner"> 15 <div class="ownername">
11 <option value="{{.Viewer}}">{{.Viewer}}</option> 16 <div class="ownerpick">
12 {{range .Orgs}}<option value="{{.}}"{{if eq . $.Owner}} selected{{end}}>{{.}}</option>{{end}} 17 <label for="fork-owner">Owner</label>
13</select></label> 18 <select id="fork-owner" name="owner">
14<label>/ Name <input name="name" required maxlength="63" pattern="[a-z0-9][a-z0-9._\-]{0,62}" value="{{.Name}}" aria-describedby="forkhint" autocomplete="off" spellcheck="false"></label> 19 <option value="{{.Viewer}}">{{.Viewer}}</option>
15<span class="hint" id="forkhint">Defaults to the source name; change it to fork twice into the same owner.</span></p> 20 {{range .Orgs}}<option value="{{.}}"{{if eq . $.Owner}} selected{{end}}>{{.}}</option>{{end}}
16<p><button type="submit">Create fork</button></p> 21 </select>
22 </div>
23 <span class="slash" aria-hidden="true">/</span>
24 <div class="namepick">
25 <label for="fork-name">Repository name</label>
26 <input id="fork-name" name="name" required maxlength="63" pattern="[a-z0-9][a-z0-9._\-]{0,62}" value="{{.Name}}" aria-describedby="forkhint" autocomplete="off" spellcheck="false">
27 </div>
28 </div>
29 <p class="hint" id="forkhint">Defaults to the source name; change it to fork twice into the same owner.</p>
30 <span class="btngroup"><button type="submit">Create fork</button></span>
17</form> 31</form>
32</section>
18{{end}} 33{{end}}
internal/web/templates/landing.html +4 −4 · view
@@ -4,7 +4,7 @@
4<div class="landing"> 4<div class="landing">
5<h1>{{template "mark"}}{{.Site}}</h1> 5<h1>{{template "mark"}}{{.Site}}</h1>
6<p class="lede">A git forge you drive from the terminal. Repositories, issues, merge requests and CI over SSH, with a fast, readable web view of the same state.</p> 6<p class="lede">A git forge you drive from the terminal. Repositories, issues, merge requests and CI over SSH, with a fast, readable web view of the same state.</p>
7<pre class="quickstart" tabindex="0">ssh git@{{.Host}} help 7<pre class="quickstart copyable" tabindex="0">ssh git@{{.Host}} help
8git clone ssh://git@{{.Host}}/owner/repo.git</pre> 8git clone ssh://git@{{.Host}}/owner/repo.git</pre>
9<div class="routes"><a class="button primary" href="/explore">Explore repositories</a>{{if .Signup}}<a class="button btn" href="/register">Create an account</a>{{end}}</div> 9<div class="routes"><a class="button primary" href="/explore">Explore repositories</a>{{if .Signup}}<a class="button btn" href="/register">Create an account</a>{{end}}</div>
10<figure class="shot"><video autoplay muted loop playsinline controls width="1248" height="688" aria-describedby="demo-caption"> 10<figure class="shot"><video autoplay muted loop playsinline controls width="1248" height="688" aria-describedby="demo-caption">
@@ -14,9 +14,9 @@ git clone ssh://git@{{.Host}}/owner/repo.git</pre>
14<figcaption id="demo-caption">Signup to release on gitbay.org from a terminal: register an SSH key, verify the mailed code, create a repository and push, file an issue, open and merge a request that closes it, then tag and publish a release.</figcaption> 14<figcaption id="demo-caption">Signup to release on gitbay.org from a terminal: register an SSH key, verify the mailed code, create a repository and push, file an issue, open and merge a request that closes it, then tag and publish a release.</figcaption>
15</figure> 15</figure>
16<div class="facets"> 16<div class="facets">
17 <section><h2>Read</h2><p>Browse and clone any public repository over HTTPS or <code>git://</code>, no account. Every commit shows whether its signature verified.</p></section> 17 <section class="setcard"><h2>Read</h2><p>Browse and clone any public repository over HTTPS or <code>git://</code>, no account. Every commit shows whether its signature verified.</p></section>
18 <section><h2>Write</h2><p>Push over SSH with the key you already have. Create a repository, file an issue, open and merge a request, all as commands.</p></section> 18 <section class="setcard"><h2>Write</h2><p>Push over SSH with the key you already have. Create a repository, file an issue, open and merge a request, all as commands.</p></section>
19 <section><h2>Review</h2><p>Read a diff, comment on a line, approve, merge, in the browser or the terminal.</p></section> 19 <section class="setcard"><h2>Review</h2><p>Read a diff, comment on a line, approve, merge, in the browser or the terminal.</p></section>
20</div> 20</div>
21{{if .Accounts}}<p class="meta">Have an account? {{if .EmailLogin}}<a href="/login">Sign in with an emailed link</a>, or run{{else}}Run{{end}} <code>ssh git@{{.Host}} web login</code>.</p>{{end}} 21{{if .Accounts}}<p class="meta">Have an account? {{if .EmailLogin}}<a href="/login">Sign in with an emailed link</a>, or run{{else}}Run{{end}} <code>ssh git@{{.Host}} web login</code>.</p>{{end}}
22</div> 22</div>
internal/web/templates/log.html +10 −7 · view
@@ -1,13 +1,16 @@
1{{define "width"}}wide{{end}} 1{{define "width"}}wide{{end}}
2{{define "title"}}log · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}} 2{{define "title"}}log · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
3{{define "content"}} 3{{define "content"}}
4<h1 class="vh">Commits</h1> 4<div class="pagehead">
5<form method="get" class="logfilter" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/log/{{.Ref}}"> 5 <h1>Commits <span class="refchip">{{.Ref}}</span></h1>
6 <label for="path">Path</label> 6 <span class="grow"></span>
7 <input type="text" id="path" name="path" value="{{.FilePath}}" placeholder="filter to a file or directory"> 7 <form method="get" class="logfilter" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/log/{{.Ref}}">
8 <button type="submit" class="btn">Filter</button> 8 <label for="path" class="vh">Path</label>
9 {{if .FilePath}}<a class="act" href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/log/{{.Ref}}">Clear</a>{{end}} 9 <input type="text" id="path" name="path" value="{{.FilePath}}" placeholder="filter to a file or directory">
10</form> 10 <button type="submit" class="btn">Filter</button>
11 {{if .FilePath}}<a class="button btn" href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/log/{{.Ref}}">Clear</a>{{end}}
12 </form>
13</div>
11{{if .FilePath}}<p class="meta">history of <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/blob/{{.Ref}}/{{.FilePath}}"><code>{{.FilePath}}</code></a></p>{{end}} 14{{if .FilePath}}<p class="meta">history of <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/blob/{{.Ref}}/{{.FilePath}}"><code>{{.FilePath}}</code></a></p>{{end}}
12<ul class="loglist"> 15<ul class="loglist">
13{{range .Commits}}{{$c := .}}<li> 16{{range .Commits}}{{$c := .}}<li>
internal/web/templates/login.html +12 −6 · view
@@ -1,9 +1,12 @@
1{{define "width"}}bounded{{end}} 1{{define "width"}}bounded{{end}}
2{{define "title"}}login · {{.Site}}{{end}} 2{{define "title"}}login · {{.Site}}{{end}}
3{{define "content"}} 3{{define "content"}}
4<h1>Sign in</h1> 4<div class="pagehead">
5 <h1>Sign in</h1>
6</div>
5{{if .Next}}<p class="meta">Sign in to continue to <code>{{.Next}}</code>.</p>{{end}} 7{{if .Next}}<p class="meta">Sign in to continue to <code>{{.Next}}</code>.</p>{{end}}
6{{if .Error}}<p class="error" role="alert">{{.Error}}</p>{{end}} 8{{if .Error}}<p class="error" role="alert">{{.Error}}</p>{{end}}
9<section class="setcard">
7{{if .Sent}} 10{{if .Sent}}
8<p>If that account exists, a login link is on its way. It works once and 11<p>If that account exists, a login link is on its way. It works once and
9expires in fifteen minutes.</p> 12expires in fifteen minutes.</p>
@@ -14,21 +17,24 @@ expires in fifteen minutes.</p>
14 <input type="text" id="identifier" name="identifier" autocomplete="username" autocapitalize="none" spellcheck="false" required></div> 17 <input type="text" id="identifier" name="identifier" autocomplete="username" autocapitalize="none" spellcheck="false" required></div>
15 <button type="submit">Email me a link</button> 18 <button type="submit">Email me a link</button>
16</form> 19</form>
17<p>Or, from a machine with your registered key:</p> 20<p class="meta">Or, from a machine with your registered key:</p>
18{{else}} 21{{else}}
19<p>Browser sessions are minted over SSH — there is no password. From a machine 22<p>Browser sessions are minted over SSH — there is no password. From a machine
20with your registered key:</p> 23with your registered key:</p>
21{{end}} 24{{end}}
22<pre class="message" tabindex="0">ssh git@{{.Host}} web login</pre> 25<pre class="message copyable" tabindex="0">ssh git@{{.Host}} web login</pre>
23<p>then open the printed URL within five minutes.</p> 26<p class="meta">Then open the printed URL within five minutes.</p>
24{{end}} 27{{end}}
28</section>
29<section class="setcard">
25<h2>New here?</h2> 30<h2>New here?</h2>
26{{if eq .Mode "open"}}<p><a href="/register">Create an account</a> — pick a username, paste your SSH 31{{if eq .Mode "open"}}<p><a href="/register">Create an account</a> — pick a username, paste your SSH
27public key, verify your email. Or from the terminal:</p> 32public key, verify your email. Or from the terminal:</p>
28<pre class="message" tabindex="0">ssh git@{{.Host}} register --username you --email you@example.org</pre> 33<pre class="message copyable" tabindex="0">ssh git@{{.Host}} register --username you --email you@example.org</pre>
29{{else if eq .Mode "invite"}}<p>This instance is invite-only. With a code from an admin, 34{{else if eq .Mode "invite"}}<p>This instance is invite-only. With a code from an admin,
30<a href="/register">create an account</a> — pick a username, paste your SSH public key. Or from 35<a href="/register">create an account</a> — pick a username, paste your SSH public key. Or from
31the terminal:</p> 36the terminal:</p>
32<pre class="message" tabindex="0">ssh git@{{.Host}} register --username you --invite &lt;code&gt;</pre> 37<pre class="message copyable" tabindex="0">ssh git@{{.Host}} register --username you --invite &lt;code&gt;</pre>
33{{else}}<p>This instance is not accepting new accounts.</p>{{end}} 38{{else}}<p>This instance is not accepting new accounts.</p>{{end}}
39</section>
34{{end}} 40{{end}}
internal/web/templates/logout.html +3 −1 · view
@@ -1,9 +1,11 @@
1{{define "width"}}bounded{{end}} 1{{define "width"}}bounded{{end}}
2{{define "title"}}log out · {{.Site}}{{end}} 2{{define "title"}}log out · {{.Site}}{{end}}
3{{define "content"}} 3{{define "content"}}
4<section class="setcard">
4<h1>Log out</h1> 5<h1>Log out</h1>
5<p class="meta">Ends this browser's session as <a href="/{{.Viewer}}">{{.Viewer}}</a>. Keys and tokens are untouched.</p> 6<p class="meta">Ends this browser's session as <a href="/{{.Viewer}}">{{.Viewer}}</a>. Keys and tokens are untouched.</p>
6<form method="post" action="/logout"> 7<form method="post" action="/logout">
7<p class="btngroup"><button type="submit" class="danger">Log out</button> <a href="/">Cancel</a></p> 8<p class="btngroup"><button type="submit" class="danger">Log out</button> <a class="button btn" href="/">Cancel</a></p>
8</form> 9</form>
10</section>
9{{end}} 11{{end}}
internal/web/templates/mrrangediff.html +6 −2 · view
@@ -1,8 +1,12 @@
1{{define "width"}}wide{{end}} 1{{define "width"}}wide{{end}}
2{{define "title"}}range-diff · !{{.MR.Number}} · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}} 2{{define "title"}}range-diff · !{{.MR.Number}} · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
3{{define "content"}} 3{{define "content"}}
4<h1>Range-diff <span class="issuenumber">!{{.MR.Number}}</span></h1> 4<div class="pagehead">
5<p class="meta"><a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/mrs/{{.MR.Number}}">back to !{{.MR.Number}} {{.MR.Title}}</a></p> 5 <h1>Range-diff <span class="issuenumber">!{{.MR.Number}}</span></h1>
6 <span class="grow"></span>
7 <a class="button btn" href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/mrs/{{.MR.Number}}">Back to !{{.MR.Number}}</a>
8</div>
9<p class="meta">{{.MR.Title}}</p>
6{{if .Error}}<p class="error" role="alert">{{.Error}}</p> 10{{if .Error}}<p class="error" role="alert">{{.Error}}</p>
7{{else if .Diff}}<pre class="code buildlog" tabindex="0">{{.Diff}}</pre> 11{{else if .Diff}}<pre class="code buildlog" tabindex="0">{{.Diff}}</pre>
8{{else}}<p class="empty-note">Nothing to compare: this merge request has one revision.</p>{{end}} 12{{else}}<p class="empty-note">Nothing to compare: this merge request has one revision.</p>{{end}}
internal/web/templates/queries.html +14 −5 · view
@@ -2,10 +2,14 @@
2{{define "title"}}{{if .Query.Name}}{{.Query.Name}} · {{end}}queries · {{.Site}}{{end}} 2{{define "title"}}{{if .Query.Name}}{{.Query.Name}} · {{end}}queries · {{.Site}}{{end}}
3{{define "content"}} 3{{define "content"}}
4{{if .Query.Name}} 4{{if .Query.Name}}
5<div class="listhead"> 5<div id="query-root">
6<div class="pagehead">
6 <h1>{{.Query.Name}} <span class="count">{{.Count}}</span></h1> 7 <h1>{{.Query.Name}} <span class="count">{{.Count}}</span></h1>
7 <span class="spacer"></span> 8 <span class="grow"></span>
8 <p class="meta"><a href="/{{.Viewer}}/-/queries">saved queries</a></p> 9 <div class="btngroup">
10 <button type="button" class="btn" data-refresh="self" data-refresh-target="query-root">Refresh</button>
11 <a class="button btn" href="/{{.Viewer}}/-/queries">Saved queries</a>
12 </div>
9</div> 13</div>
10<p class="meta"><code>{{.Query.Query}}</code> · the same read as <code>gitbay query run {{.Query.Name}}</code></p> 14<p class="meta"><code>{{.Query.Query}}</code> · the same read as <code>gitbay query run {{.Query.Name}}</code></p>
11<ul class="issuelist rows"> 15<ul class="issuelist rows">
@@ -19,10 +23,15 @@
19{{else}}<li class="empty">nothing matches</li>{{end}} 23{{else}}<li class="empty">nothing matches</li>{{end}}
20</ul> 24</ul>
21{{if .Next}}<p class="pager"><a href="{{.Next}}">older →</a></p>{{end}} 25{{if .Next}}<p class="pager"><a href="{{.Next}}">older →</a></p>{{end}}
26</div>
22{{else}} 27{{else}}
23<h1>Saved queries</h1> 28<div class="pagehead">
29 <h1>Saved queries</h1>
30 <span class="grow"></span>
31 {{if .Saved}}<input type="search" class="tablefilter" placeholder="Filter queries…" aria-label="Filter queries" data-filter-list="saved-queries">{{end}}
32</div>
24<p class="meta">Saved with <code>gitbay query save &lt;name&gt; &lt;query&gt;</code>; <code>gitbay query pin &lt;name&gt;</code> puts one on the dashboard.</p> 33<p class="meta">Saved with <code>gitbay query save &lt;name&gt; &lt;query&gt;</code>; <code>gitbay query pin &lt;name&gt;</code> puts one on the dashboard.</p>
25<ul class="issuelist rows"> 34<ul class="issuelist rows" id="saved-queries">
26{{range .Saved}}<li> 35{{range .Saved}}<li>
27 <div class="issuemain"> 36 <div class="issuemain">
28 <p class="title"><a href="/{{$.Viewer}}/-/queries/{{.Name}}">{{.Name}}</a>{{if .Pinned}} <span class="chip">pinned</span>{{end}}</p> 37 <p class="title"><a href="/{{$.Viewer}}/-/queries/{{.Name}}">{{.Name}}</a>{{if .Pinned}} <span class="chip">pinned</span>{{end}}</p>
internal/web/templates/register.html +8 −2 · view
@@ -1,10 +1,15 @@
1{{define "title"}}register · {{.Site}}{{end}} 1{{define "title"}}register · {{.Site}}{{end}}
2{{define "width"}}bounded{{end}} 2{{define "width"}}bounded{{end}}
3{{define "content"}} 3{{define "content"}}
4<h1>Create an account</h1> 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>
5{{if eq .Mode "invite"}}<p class="lede">This instance is invite-only. You need an invite code from an admin.</p> 9{{if eq .Mode "invite"}}<p class="lede">This instance is invite-only. You need an invite code from an admin.</p>
6{{else}}<p class="lede">Open registration. Your account activates once you verify your email.</p>{{end}} 10{{else}}<p class="lede">Open registration. Your account activates once you verify your email.</p>{{end}}
7{{if .Error}}<p class="error" role="alert">{{.Error}}</p>{{end}} 11{{if .Error}}<p class="error" role="alert">{{.Error}}</p>{{end}}
12<section class="setcard">
8<form method="post" action="/register" class="signupform"> 13<form method="post" action="/register" class="signupform">
9<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> 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>
10{{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> 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,11 +21,12 @@
16 back to it. */}} 21 back to it. */}}
17<details class="editbox"><summary>No key yet?</summary> 22<details class="editbox"><summary>No key yet?</summary>
18<p class="meta">Run this, take the default path, and paste what the second line prints.</p> 23<p class="meta">Run this, take the default path, and paste what the second line prints.</p>
19<pre class="code" tabindex="0">ssh-keygen -t ed25519 24<pre class="code copyable" tabindex="0">ssh-keygen -t ed25519
20cat ~/.ssh/id_ed25519.pub</pre> 25cat ~/.ssh/id_ed25519.pub</pre>
21</details> 26</details>
22<textarea id="key" name="key" rows="3" required spellcheck="false" placeholder="ssh-ed25519 AAAA… you@host"></textarea></div> 27<textarea id="key" name="key" rows="3" required spellcheck="false" placeholder="ssh-ed25519 AAAA… you@host"></textarea></div>
23<p><button type="submit">Create account</button></p> 28<p><button type="submit">Create account</button></p>
24</form> 29</form>
30</section>
25<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> 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>
26{{end}} 32{{end}}
internal/web/templates/registered.html +5 −1 · view
@@ -4,6 +4,7 @@
4<div class="landing"> 4<div class="landing">
5<h1>Welcome, {{.Username}}</h1> 5<h1>Welcome, {{.Username}}</h1>
6<pre class="quickstart" tabindex="0">{{.Message}}</pre> 6<pre class="quickstart" tabindex="0">{{.Message}}</pre>
7<section class="setcard">
7<h2>On the web</h2> 8<h2>On the web</h2>
8<ol> 9<ol>
9<li>Copy the verification code from the mail you were just sent.</li> 10<li>Copy the verification code from the mail you were just sent.</li>
@@ -12,9 +13,12 @@
12</ol> 13</ol>
13<p>Then + creates your first repository. Using the iOS app? Create a 14<p>Then + creates your first repository. Using the iOS app? Create a
14token in <a href="/settings#tokens">Settings → API tokens</a>.</p> 15token in <a href="/settings#tokens">Settings → API tokens</a>.</p>
16</section>
17<section class="setcard">
15<h2>From the terminal</h2> 18<h2>From the terminal</h2>
16<pre class="quickstart" tabindex="0">ssh git@{{.Host}} whoami 19<pre class="quickstart copyable" tabindex="0">ssh git@{{.Host}} whoami
17ssh git@{{.Host}} repo create {{.Username}}/hello 20ssh git@{{.Host}} repo create {{.Username}}/hello
18gitbay web login # mints a browser session from your terminal</pre> 21gitbay web login # mints a browser session from your terminal</pre>
22</section>
19</div> 23</div>
20{{end}} 24{{end}}
internal/web/templates/search.html +5 −1 · view
@@ -1,7 +1,11 @@
1{{define "width"}}wide{{end}} 1{{define "width"}}wide{{end}}
2{{define "title"}}search · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}} 2{{define "title"}}search · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
3{{define "content"}} 3{{define "content"}}
4<h1>Search</h1> 4<div class="pagehead">
5 <h1>Search code</h1>
6 <span class="grow"></span>
7 <a class="button btn" href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/symbols">Symbols</a>
8</div>
5<form method="get" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/search" class="searchform"> 9<form method="get" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/search" class="searchform">
6 <input type="search" name="q" aria-label="Search file contents" value="{{.Query}}" placeholder="search file contents on {{.Ref}}"> 10 <input type="search" name="q" aria-label="Search file contents" value="{{.Query}}" placeholder="search file contents on {{.Ref}}">
7 <button type="submit" class="btn">Search</button> 11 <button type="submit" class="btn">Search</button>
internal/web/templates/snippet.html +28 −17 · view
@@ -1,47 +1,58 @@
1{{define "title"}}{{if .Snippet.Description}}{{.Snippet.Description}}{{else}}{{.Snippet.PublicID}}{{end}} · {{.Owner}}{{end}} 1{{define "title"}}{{if .Snippet.Description}}{{.Snippet.Description}}{{else}}{{.Snippet.PublicID}}{{end}} · {{.Owner}}{{end}}
2{{define "content"}} 2{{define "content"}}
3<h1><a href="/{{.Owner}}">{{.Owner}}</a> / <a href="/{{.Owner}}/-/snippets">snippets</a> / {{.Snippet.PublicID}}</h1> 3<div class="pagehead">
4 <h1><a href="/{{.Owner}}">{{.Owner}}</a> / <a href="/{{.Owner}}/-/snippets">snippets</a> / {{.Snippet.PublicID}}</h1>
5 <span class="grow"></span>
6 <button type="button" class="btn" data-copy="gitbay snippet show {{.Snippet.PublicID}}">Copy CLI</button>
7</div>
4{{if .Snippet.Description}}<p class="desc lede">{{.Snippet.Description}}</p>{{end}} 8{{if .Snippet.Description}}<p class="desc lede">{{.Snippet.Description}}</p>{{end}}
5<p class="meta"><span class="chip chip-neutral">{{.Snippet.Visibility}}</span> · updated {{when .Snippet.UpdatedAt}} · <code>gitbay snippet show {{.Snippet.PublicID}}</code></p> 9<p class="meta"><span class="chip chip-neutral">{{.Snippet.Visibility}}</span> · updated {{when .Snippet.UpdatedAt}} · <code>gitbay snippet show {{.Snippet.PublicID}}</code></p>
6{{if .Notice}}<p class="error" role="alert">{{.Notice}}</p>{{end}} 10{{if .Notice}}<p class="error" role="alert">{{.Notice}}</p>{{end}}
7{{range .Files}} 11{{range .Files}}
8<section class="snippetfile" id="file-{{.Name}}"> 12<section class="snippetfile setcard" id="file-{{.Name}}">
9<div class="pathbar"> 13<div class="pathbar">
10 <span class="crumbs"><strong>{{.Name}}</strong></span> 14 <span class="crumbs"><strong>{{.Name}}</strong></span>
11 <span class="spacer"></span> 15 <span class="spacer"></span>
12 <span class="actions"><a href="/{{$.Owner}}/-/snippets/{{$.Snippet.PublicID}}/raw/{{.Name}}">raw</a></span> 16 <div class="btngroup">
17 <a class="button btn" href="/{{$.Owner}}/-/snippets/{{$.Snippet.PublicID}}/raw/{{.Name}}">raw</a>
18 {{if $.CanWrite}}<details class="popover"><summary class="popbtn popbtn-danger">Remove</summary><div class="popmenu">
19 <form method="post" action="/{{$.Owner}}/-/snippets/{{$.Snippet.PublicID}}/file/remove" class="popform popform-stack">
20 <input type="hidden" name="name" value="{{.Name}}">
21 {{template "confirmfield" .Name}}
22 <button type="submit" class="danger">Remove {{.Name}}</button>
23 </form>
24 </div></details>{{end}}
25 </div>
13</div> 26</div>
14<p class="filefacts">{{.Lines}} lines · {{.Size}} bytes</p> 27<p class="filefacts">{{.Lines}} lines · {{.Size}} bytes</p>
15{{if .TooLarge}}<p class="empty-note">too large to render here — <a href="/{{$.Owner}}/-/snippets/{{$.Snippet.PublicID}}/raw/{{.Name}}">raw</a></p>{{else}}<div class="code">{{.HTML}}</div>{{end}} 28{{if .TooLarge}}<p class="empty-note">too large to render here — <a href="/{{$.Owner}}/-/snippets/{{$.Snippet.PublicID}}/raw/{{.Name}}">raw</a></p>{{else}}<div class="code">{{.HTML}}</div>{{end}}
16{{if $.CanWrite}}<details class="editbox"><summary>edit {{.Name}}</summary> 29{{if $.CanWrite}}<details class="editbox"><summary>Edit {{.Name}}</summary>
17<form method="post" action="/{{$.Owner}}/-/snippets/{{$.Snippet.PublicID}}/file" class="commentform"> 30<form method="post" action="/{{$.Owner}}/-/snippets/{{$.Snippet.PublicID}}/file" class="commentform">
18<input type="hidden" name="name" value="{{.Name}}"> 31<input type="hidden" name="name" value="{{.Name}}">
19<p><textarea name="content" aria-label="Content of {{.Name}}" rows="12">{{.Content}}</textarea></p> 32<p><textarea name="content" aria-label="Content of {{.Name}}" rows="12">{{.Content}}</textarea></p>
20<p><button type="submit" class="btn">Save</button></p> 33<p class="btngroup"><button type="submit">Save</button> <span class="meta">⌘↵ to save</span></p>
21</form>
22<form method="post" action="/{{$.Owner}}/-/snippets/{{$.Snippet.PublicID}}/file/remove">
23<input type="hidden" name="name" value="{{.Name}}">
24<p>{{template "confirmfield" .Name}} <button type="submit" class="danger">Remove {{.Name}}</button></p>
25</form> 34</form>
26</details>{{end}} 35</details>{{end}}
27</section> 36</section>
28{{end}} 37{{end}}
29{{if .CanWrite}} 38{{if .CanWrite}}
30<details class="editbox"><summary>add a file</summary> 39<details class="editbox"><summary>Add a file</summary>
31<form method="post" action="/{{.Owner}}/-/snippets/{{.Snippet.PublicID}}/file" class="commentform"> 40<form method="post" action="/{{.Owner}}/-/snippets/{{.Snippet.PublicID}}/file" class="commentform">
32<p><input type="text" name="name" aria-label="File name" placeholder="filename" required autocomplete="off" spellcheck="false"></p> 41<p><input type="text" name="name" aria-label="File name" placeholder="filename" required autocomplete="off" spellcheck="false"></p>
33<p><textarea name="content" aria-label="Content" rows="12" required></textarea></p> 42<p><textarea name="content" aria-label="Content" rows="12" required></textarea></p>
34<p><button type="submit" class="btn">Add file</button></p> 43<p><button type="submit">Add file</button></p>
35</form></details> 44</form></details>
36<details class="editbox"><summary>settings</summary> 45<details class="editbox"><summary>Settings</summary>
37<form method="post" action="/{{.Owner}}/-/snippets/{{.Snippet.PublicID}}/edit"> 46<form method="post" action="/{{.Owner}}/-/snippets/{{.Snippet.PublicID}}/edit" class="setform stack">
38<p><input type="text" name="description" aria-label="Description" value="{{.Snippet.Description}}" placeholder="description"></p> 47<label for="snip-desc">Description</label>
39<p><select name="visibility" aria-label="Visibility"> 48<input type="text" id="snip-desc" name="description" aria-label="Description" value="{{.Snippet.Description}}" placeholder="description">
49<label for="snip-vis">Visibility</label>
50<select id="snip-vis" name="visibility" aria-label="Visibility">
40<option value="public"{{if eq .Snippet.Visibility "public"}} selected{{end}}>public</option> 51<option value="public"{{if eq .Snippet.Visibility "public"}} selected{{end}}>public</option>
41<option value="unlisted"{{if eq .Snippet.Visibility "unlisted"}} selected{{end}}>unlisted</option> 52<option value="unlisted"{{if eq .Snippet.Visibility "unlisted"}} selected{{end}}>unlisted</option>
42<option value="private"{{if eq .Snippet.Visibility "private"}} selected{{end}}>private</option> 53<option value="private"{{if eq .Snippet.Visibility "private"}} selected{{end}}>private</option>
43</select></p> 54</select>
44<p><button type="submit" class="btn">Save</button></p> 55<span class="btngroup"><button type="submit">Save</button></span>
45</form> 56</form>
46<form method="post" action="/{{.Owner}}/-/snippets/{{.Snippet.PublicID}}/delete"> 57<form method="post" action="/{{.Owner}}/-/snippets/{{.Snippet.PublicID}}/delete">
47<p>{{template "confirmfield" .Snippet.PublicID}} <button type="submit" class="danger">Delete snippet</button></p> 58<p>{{template "confirmfield" .Snippet.PublicID}} <button type="submit" class="danger">Delete snippet</button></p>
internal/web/templates/snippetnew.html +16 −10 · view
@@ -1,17 +1,23 @@
1{{define "width"}}bounded{{end}} 1{{define "width"}}bounded{{end}}
2{{define "title"}}new snippet · {{.Owner}}{{end}} 2{{define "title"}}new snippet · {{.Owner}}{{end}}
3{{define "content"}} 3{{define "content"}}
4<h1>New snippet</h1> 4<div class="pagehead">
5 <h1>New snippet</h1>
6 <span class="grow"></span>
7 <a class="button btn" href="/{{.Owner}}/-/snippets">Back to snippets</a>
8</div>
5{{if .Error}}<p class="error" role="alert">{{.Error}}</p>{{end}} 9{{if .Error}}<p class="error" role="alert">{{.Error}}</p>{{end}}
10<section class="setcard">
6<form method="post" action="/{{.Owner}}/-/snippets/new" class="commentform"> 11<form method="post" action="/{{.Owner}}/-/snippets/new" class="commentform">
7<p><input type="text" name="name" aria-label="File name" placeholder="filename" value="{{.Name}}" required autocomplete="off" spellcheck="false"></p> 12 <p><input type="text" name="name" aria-label="File name" placeholder="filename" value="{{.Name}}" required autocomplete="off" spellcheck="false"></p>
8<p><input type="text" name="description" aria-label="Description" placeholder="description" value="{{.Description}}"></p> 13 <p><input type="text" name="description" aria-label="Description" placeholder="description" value="{{.Description}}"></p>
9<p><select name="visibility" aria-label="Visibility"> 14 <p><select name="visibility" aria-label="Visibility">
10<option value="unlisted"{{if or (eq .Visibility "unlisted") (eq .Visibility "")}} selected{{end}}>unlisted</option> 15 <option value="unlisted"{{if or (eq .Visibility "unlisted") (eq .Visibility "")}} selected{{end}}>unlisted</option>
11<option value="public"{{if eq .Visibility "public"}} selected{{end}}>public</option> 16 <option value="public"{{if eq .Visibility "public"}} selected{{end}}>public</option>
12<option value="private"{{if eq .Visibility "private"}} selected{{end}}>private</option> 17 <option value="private"{{if eq .Visibility "private"}} selected{{end}}>private</option>
13</select></p> 18 </select></p>
14<p><textarea name="content" aria-label="Content" rows="16" required>{{.Content}}</textarea></p> 19 <p><textarea name="content" aria-label="Content" rows="16" required>{{.Content}}</textarea></p>
15<p><button type="submit">Create snippet</button></p> 20 <p class="btngroup"><button type="submit">Create snippet</button> <span class="meta">⌘↵ to create</span></p>
16</form> 21</form>
22</section>
17{{end}} 23{{end}}
internal/web/templates/symbols.html +5 −1 · view
@@ -1,7 +1,11 @@
1{{define "width"}}wide{{end}} 1{{define "width"}}wide{{end}}
2{{define "title"}}symbols · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}} 2{{define "title"}}symbols · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
3{{define "content"}} 3{{define "content"}}
4<h1>Symbols</h1> 4<div class="pagehead">
5 <h1>Symbols</h1>
6 <span class="grow"></span>
7 <a class="button btn" href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/search">Search code</a>
8</div>
5<form method="get" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/symbols" class="searchform"> 9<form method="get" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/symbols" class="searchform">
6 <input type="search" name="q" aria-label="Find a definition" value="{{.Query}}" placeholder="a name or its start, on {{.Repo.DefaultBranch}}"> 10 <input type="search" name="q" aria-label="Find a definition" value="{{.Query}}" placeholder="a name or its start, on {{.Repo.DefaultBranch}}">
7 <select name="kind" aria-label="Kind"> 11 <select name="kind" aria-label="Kind">
internal/web/templates/wiki.html +2 −2 · view
@@ -11,8 +11,8 @@ push <code>.gitbay/wiki/Home.md</code> (or .org).</p>
11<div class="rendered">{{.PageHTML}}</div> 11<div class="rendered">{{.PageHTML}}</div>
12</section> 12</section>
13</div> 13</div>
14<nav class="wikinav"> 14<nav class="wikinav setcard">
15<p class="meta">pages</p> 15<h2 class="colhead">Pages</h2>
16{{range .Nav}}{{if .Dir}}<p class="meta wikidir">{{.Dir}}</p>{{end}} 16{{range .Nav}}{{if .Dir}}<p class="meta wikidir">{{.Dir}}</p>{{end}}
17<ul>{{range .Pages}}<li><a {{if eq .Name $.Page}}class="active" {{end}}href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/wiki/{{.Name}}">{{.Label}}</a></li>{{end}}</ul>{{end}} 17<ul>{{range .Pages}}<li><a {{if eq .Name $.Page}}class="active" {{end}}href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/wiki/{{.Name}}">{{.Label}}</a></li>{{end}}</ul>{{end}}
18<p class="meta">edit under <code>.gitbay/wiki/</code> by push.</p> 18<p class="meta">edit under <code>.gitbay/wiki/</code> by push.</p>
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