| 1 | {{define "home"}} |
| 2 | {{template "layout-start" .}} |
| 3 | <section class="hero"> |
| 4 | <img src="/assets/logo.svg" alt="BlueGit, een blauwe ster met het git-teken"> |
| 5 | <div> |
| 6 | <h1>BlueGit</h1> |
| 7 | <p>Tims eigen git, op de schijf van de mini-PC. Aanmelden gaat via auth.timfalken.com. Er is geen apart wachtwoord.</p> |
| 8 | <p><a class="btn" href="/login">Aanmelden</a></p> |
| 9 | </div> |
| 10 | </section> |
| 11 | {{if .Repos}} |
| 12 | <section class="panel"> |
| 13 | <h2>Openbare repositories</h2> |
| 14 | <ul class="clean"> |
| 15 | {{range .Repos}}<li><a href="/{{.FullPath}}">{{.FullPath}}</a> <span class="muted">{{.Description}}</span></li>{{end}} |
| 16 | </ul> |
| 17 | </section> |
| 18 | {{end}} |
| 19 | {{template "layout-end" .}} |
| 20 | {{end}} |
| 21 | |
| 22 | {{define "dashboard"}} |
| 23 | {{template "layout-start" .}} |
| 24 | <h1>Overzicht</h1> |
| 25 | <div class="grid-2"> |
| 26 | <section class="panel"> |
| 27 | <h2>Repositories</h2> |
| 28 | {{if not .Repos}}<p class="muted">Nog geen repositories.</p>{{end}} |
| 29 | <ul class="clean"> |
| 30 | {{range .Repos}}<li><a href="/{{.FullPath}}">{{.FullPath}}</a> <span class="pill">{{.Visibility}}</span><div class="muted">{{.Description}}</div></li>{{end}} |
| 31 | </ul> |
| 32 | </section> |
| 33 | <section class="panel"> |
| 34 | <h2>Groepen</h2> |
| 35 | {{if not .Groups}}<p class="muted">Nog geen groepen.</p>{{end}} |
| 36 | <ul class="clean"> |
| 37 | {{range .Groups}}<li><a href="/groups/{{.Path}}">{{.Name}}</a> <span class="muted">{{.Path}}</span></li>{{end}} |
| 38 | </ul> |
| 39 | </section> |
| 40 | </div> |
| 41 | {{template "layout-end" .}} |
| 42 | {{end}} |
| 43 | |
| 44 | {{define "new"}} |
| 45 | {{template "layout-start" .}} |
| 46 | <h1>Nieuw</h1> |
| 47 | <div class="grid-2"> |
| 48 | <form class="panel" method="post" action="/new/repo"> |
| 49 | <h2>Repository</h2> |
| 50 | <input type="hidden" name="csrf" value="{{.CSRF}}"> |
| 51 | <label>Naam <input name="name" required pattern="[A-Za-z0-9][A-Za-z0-9._-]{0,62}"></label> |
| 52 | <label>Beschrijving <input name="description"></label> |
| 53 | <label>Eigenaar |
| 54 | <select name="group"> |
| 55 | <option value="">Ikzelf</option> |
| 56 | {{range .Groups}}<option value="{{.Path}}">{{.Name}}</option>{{end}} |
| 57 | </select> |
| 58 | </label> |
| 59 | <label>Zichtbaarheid |
| 60 | <select name="visibility"><option value="private">Privé</option><option value="public">Openbaar</option></select> |
| 61 | </label> |
| 62 | <button type="submit">Aanmaken</button> |
| 63 | </form> |
| 64 | <form class="panel" method="post" action="/new/group"> |
| 65 | <h2>Groep</h2> |
| 66 | <input type="hidden" name="csrf" value="{{.CSRF}}"> |
| 67 | <label>Naam <input name="name" required></label> |
| 68 | <label>Pad <input name="path" required pattern="[a-z][a-z0-9_-]{0,62}"></label> |
| 69 | <label>Beschrijving <input name="description"></label> |
| 70 | <button type="submit">Aanmaken</button> |
| 71 | </form> |
| 72 | </div> |
| 73 | {{template "layout-end" .}} |
| 74 | {{end}} |
| 75 | |
| 76 | {{define "account"}} |
| 77 | {{template "layout-start" .}} |
| 78 | <h1>Account</h1> |
| 79 | <p class="muted">Je account komt van auth.timfalken.com. BlueGit bewaart geen wachtwoord. Git over HTTPS gebruikt een toegangstoken als wachtwoord. SSH-sleutels van de auth-server worden niet gedeeld; zet ze hier apart.</p> |
| 80 | {{if .NewToken}}<p class="code">{{.NewToken}}</p>{{end}} |
| 81 | <section class="panel"> |
| 82 | <h2>Toegangstokens</h2> |
| 83 | <form method="post" action="/settings/tokens"> |
| 84 | <input type="hidden" name="csrf" value="{{.CSRF}}"> |
| 85 | <div class="row"><input name="name" placeholder="naam, bijvoorbeeld laptop" required><button type="submit">Nieuw token</button></div> |
| 86 | </form> |
| 87 | <ul class="clean"> |
| 88 | {{range .Tokens}}<li>{{.Name}} <span class="muted">{{.Prefix}}…</span> |
| 89 | <form method="post" action="/settings/tokens/delete" class="row"> |
| 90 | <input type="hidden" name="csrf" value="{{$.CSRF}}"><input type="hidden" name="id" value="{{.ID}}"> |
| 91 | <button class="ghost" type="submit">Intrekken</button> |
| 92 | </form> |
| 93 | </li>{{end}} |
| 94 | </ul> |
| 95 | </section> |
| 96 | <section class="panel"> |
| 97 | <h2>SSH-sleutels</h2> |
| 98 | <form method="post" action="/settings/ssh"> |
| 99 | <input type="hidden" name="csrf" value="{{.CSRF}}"> |
| 100 | <label>Naam <input name="name" placeholder="mini-pc"></label> |
| 101 | <label>Publieke sleutel <textarea name="key" placeholder="ssh-ed25519 AAAA... " required></textarea></label> |
| 102 | <button type="submit">Toevoegen</button> |
| 103 | </form> |
| 104 | <ul class="clean"> |
| 105 | {{range .Keys}}<li>{{.Name}} <span class="muted">{{.Fingerprint}}</span> |
| 106 | <form method="post" action="/settings/ssh/delete"> |
| 107 | <input type="hidden" name="csrf" value="{{$.CSRF}}"><input type="hidden" name="id" value="{{.ID}}"> |
| 108 | <button class="ghost" type="submit">Verwijderen</button> |
| 109 | </form> |
| 110 | </li>{{end}} |
| 111 | </ul> |
| 112 | </section> |
| 113 | <p><a href="/settings/export">Gegevens downloaden (JSON)</a></p> |
| 114 | {{template "layout-end" .}} |
| 115 | {{end}} |
| 116 | |
| 117 | {{define "repo"}} |
| 118 | {{template "layout-start" .}} |
| 119 | <h1>{{.Repo.FullPath}}</h1> |
| 120 | {{template "repotabs" .}} |
| 121 | <p>{{.Repo.Description}}</p> |
| 122 | <p class="code">git clone {{.CloneHTTP}}{{if .CloneSSH}} |
| 123 | git clone {{.CloneSSH}}{{end}}</p> |
| 124 | <p class="muted">HTTPS: gebruik je gebruikersnaam en een toegangstoken als wachtwoord. Branch {{.Rev}}.</p> |
| 125 | {{if not .Commits}}<p class="panel">Nog geen commits. Bescherm daarna <code>{{.Repo.DefaultBranch}}</code> als alleen een beheerder daar mag schrijven.</p>{{end}} |
| 126 | <ul class="clean"> |
| 127 | {{range .Entries}}<li>{{if eq .Type "tree"}}<a href="/{{$.Repo.FullPath}}/-/tree/{{.Path}}?rev={{$.Rev}}">{{.Name}}/</a>{{else}}<a href="/{{$.Repo.FullPath}}/-/blob/{{.Path}}?rev={{$.Rev}}">{{.Name}}</a>{{end}}</li>{{end}} |
| 128 | </ul> |
| 129 | <h2>Recente commits</h2> |
| 130 | <ul class="clean"> |
| 131 | {{range .Commits}}<li><a href="/{{$.Repo.FullPath}}/-/commit/{{.SHA}}">{{.Short}}</a> {{.Subject}} <span class="muted">{{.Author}} · {{.Date}}</span></li>{{end}} |
| 132 | </ul> |
| 133 | {{template "layout-end" .}} |
| 134 | {{end}} |
| 135 | |
| 136 | {{define "tree"}} |
| 137 | {{template "layout-start" .}} |
| 138 | <h1>{{.Repo.Name}}</h1> |
| 139 | {{template "repotabs" .}} |
| 140 | <p class="muted">{{.TreePath}}</p> |
| 141 | <ul class="clean"> |
| 142 | {{range .Entries}}<li>{{if eq .Type "tree"}}<a href="/{{$.Repo.FullPath}}/-/tree/{{.Path}}?rev={{$.Rev}}">{{.Name}}/</a>{{else}}<a href="/{{$.Repo.FullPath}}/-/blob/{{.Path}}?rev={{$.Rev}}">{{.Name}}</a>{{end}}</li>{{end}} |
| 143 | </ul> |
| 144 | {{template "layout-end" .}} |
| 145 | {{end}} |
| 146 | |
| 147 | {{define "blob"}} |
| 148 | {{template "layout-start" .}} |
| 149 | <h1>{{.BlobPath}}</h1> |
| 150 | {{template "repotabs" .}} |
| 151 | {{if .Binary}}<p>Binair bestand, niet getoond.</p>{{else}}<pre>{{.Blob}}</pre>{{end}} |
| 152 | {{template "layout-end" .}} |
| 153 | {{end}} |
| 154 | |
| 155 | {{define "commits"}} |
| 156 | {{template "layout-start" .}} |
| 157 | <h1>Commits</h1> |
| 158 | {{template "repotabs" .}} |
| 159 | <ul class="clean"> |
| 160 | {{range .Commits}}<li><a href="/{{$.Repo.FullPath}}/-/commit/{{.SHA}}">{{.Short}}</a> {{.Subject}} <span class="muted">{{.Author}} · {{.Date}}</span></li>{{else}}<li class="muted">Nog geen commits.</li>{{end}} |
| 161 | </ul> |
| 162 | {{template "layout-end" .}} |
| 163 | {{end}} |
| 164 | |
| 165 | {{define "commit"}} |
| 166 | {{template "layout-start" .}} |
| 167 | <h1>{{.Commit.Subject}}</h1> |
| 168 | {{template "repotabs" .}} |
| 169 | <p class="muted">{{.Commit.SHA}} · {{.Commit.Author}} · {{.Commit.Date}}</p> |
| 170 | {{if .Commit.Body}}<pre>{{.Commit.Body}}</pre>{{end}} |
| 171 | {{template "layout-end" .}} |
| 172 | {{end}} |
| 173 | |
| 174 | {{define "branches"}} |
| 175 | {{template "layout-start" .}} |
| 176 | <h1>Branches</h1> |
| 177 | {{template "repotabs" .}} |
| 178 | <ul class="clean"> |
| 179 | {{range .Branches}}<li><a href="/{{$.Repo.FullPath}}?rev={{.Name}}">{{.Name}}</a> {{if .Protected}}<span class="pill">beschermd</span>{{end}}</li>{{else}}<li class="muted">Nog geen branches.</li>{{end}} |
| 180 | </ul> |
| 181 | {{template "layout-end" .}} |
| 182 | {{end}} |