Migration
This is my new public git source viewer. Source coming soon. Please contact with concerns/bugs.
Contact me
internal/share/new.html
d658fcc4ea9f3bb562fd00dce8f863934560c56c
· 2.2 KB · 64 lines
raw
| 1 | <!doctype html> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta charset="utf-8"> |
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 6 | <title>Share · {{ .Site }}</title> |
| 7 | <link rel="stylesheet" href="/static/css/base.css"> |
| 8 | <link rel="stylesheet" href="/static/css/share.css"> |
| 9 | </head> |
| 10 | <body> |
| 11 | <main class="wrap"> |
| 12 | <header class="hero"> |
| 13 | <h1 class="page-title">Share a hidden repository</h1> |
| 14 | <p class="page-subtitle">Anyone with the link can view exactly the repositories you select below — no login required.</p> |
| 15 | </header> |
| 16 | |
| 17 | {{ if .Result }} |
| 18 | <div class="notice notice-fix"> |
| 19 | <strong class="notice-title">Link ready</strong> |
| 20 | <p class="share-link"><a href="{{ .Result }}">{{ .Result }}</a></p> |
| 21 | <p class="share-hint">Send this URL to whoever needs it. If you set a password, tell them separately — it isn't part of the link.</p> |
| 22 | </div> |
| 23 | <p><a href="/share/new">Create another</a></p> |
| 24 | {{ else }} |
| 25 | {{ if .Error }} |
| 26 | <div class="notice notice-critical"> |
| 27 | <strong class="notice-title">Not created</strong> |
| 28 | <p>{{ .Error }}</p> |
| 29 | </div> |
| 30 | {{ end }} |
| 31 | |
| 32 | {{ if not .Repos }} |
| 33 | <p>You don't have any hidden repositories to share.</p> |
| 34 | {{ else }} |
| 35 | <form method="post" action="/share/new" class="share-form"> |
| 36 | <fieldset class="share-repos"> |
| 37 | <legend>Repositories</legend> |
| 38 | {{ $sel := .Selected }} |
| 39 | {{ range .Repos }} |
| 40 | <label class="share-repo"> |
| 41 | <input type="checkbox" name="repo" value="{{ .Slug }}"{{ if index $sel .Slug }} checked{{ end }}> |
| 42 | <span class="share-repo-title">{{ .Title }}</span> |
| 43 | <span class="share-maxage">up to {{ humanDuration .MaxAge }}</span> |
| 44 | </label> |
| 45 | {{ end }} |
| 46 | </fieldset> |
| 47 | |
| 48 | <label class="share-field"> |
| 49 | <span>Password (optional)</span> |
| 50 | <input type="password" name="password" autocomplete="new-password"> |
| 51 | </label> |
| 52 | |
| 53 | <label class="share-field"> |
| 54 | <span>Expires in (optional — e.g. "24h", "168h")</span> |
| 55 | <input type="text" name="ttl" placeholder="defaults to the shortest selected repo's ceiling"> |
| 56 | </label> |
| 57 | |
| 58 | <button class="chip admin-save" type="submit">Create link</button> |
| 59 | </form> |
| 60 | {{ end }} |
| 61 | {{ end }} |
| 62 | </main> |
| 63 | </body> |
| 64 | </html> |