| 1 | {{ define "page" -}} |
| 2 | <section class="shithub-global-page"> |
| 3 | <div class="shithub-global-shell shithub-global-shell-wide"> |
| 4 | <aside class="shithub-global-sidebar" aria-label="Repository views"> |
| 5 | <nav class="shithub-global-side-nav"> |
| 6 | {{ range .Views }} |
| 7 | <a href="{{ .Href }}" class="shithub-global-side-link{{ if .Selected }} is-selected{{ end }}"{{ if .Selected }} aria-current="page"{{ end }}> |
| 8 | {{ octicon .Icon }} <span>{{ .Label }}</span> |
| 9 | </a> |
| 10 | {{ end }} |
| 11 | </nav> |
| 12 | <div class="shithub-global-side-section"> |
| 13 | <h2>Views</h2> |
| 14 | <button type="button" class="shithub-global-side-add" disabled aria-label="Create saved view">{{ octicon "plus" }}</button> |
| 15 | <p>No saved views</p> |
| 16 | </div> |
| 17 | </aside> |
| 18 | |
| 19 | <main class="shithub-global-main"> |
| 20 | <header class="shithub-global-head"> |
| 21 | <h1>{{ .Heading }}</h1> |
| 22 | <a href="{{ .NewRepoHref }}" class="shithub-button shithub-button-primary">New repository</a> |
| 23 | </header> |
| 24 | |
| 25 | <form action="/repos" method="get" class="shithub-global-query"> |
| 26 | {{ range .Views }}{{ if .Selected }}{{ if ne .Key "contributions" }}<input type="hidden" name="view" value="{{ .Key }}">{{ end }}{{ end }}{{ end }} |
| 27 | <label class="sr-only" for="global-repos-query">Search repositories</label> |
| 28 | <input id="global-repos-query" type="text" name="q" value="{{ .Query }}" placeholder="Find a repository..." autocomplete="off"> |
| 29 | <button type="submit" aria-label="Search repositories">{{ octicon "search" }}</button> |
| 30 | </form> |
| 31 | |
| 32 | <section class="shithub-global-panel" aria-label="Repositories"> |
| 33 | <div class="shithub-global-panel-head"> |
| 34 | <strong>{{ .TotalCount }} repositories</strong> |
| 35 | <div class="shithub-global-filter-set" aria-label="Repository layout"> |
| 36 | <button type="button" disabled>{{ octicon "list-unordered" }} Relevance {{ octicon "triangle-down" }}</button> |
| 37 | <button type="button" disabled aria-label="List view">{{ octicon "list-unordered" }}</button> |
| 38 | </div> |
| 39 | </div> |
| 40 | |
| 41 | {{ if .Repos }} |
| 42 | <ol class="shithub-global-repo-list"> |
| 43 | {{ range .Repos }} |
| 44 | <li class="shithub-global-repo-row"> |
| 45 | <div class="shithub-global-repo-main"> |
| 46 | <h2><a href="{{ .URL }}">{{ .Owner }}/{{ .Name }}</a> {{ if eq .Visibility "private" }}<span class="shithub-pill shithub-pill-private">Private</span>{{ else }}<span class="shithub-pill">Public</span>{{ end }}</h2> |
| 47 | {{ if .Description }}<p>{{ .Description }}</p>{{ end }} |
| 48 | <ul class="shithub-global-repo-meta"> |
| 49 | {{ if .PrimaryLanguage }}<li><span class="shithub-lang-dot" aria-hidden="true"></span>{{ .PrimaryLanguage }}</li>{{ end }} |
| 50 | {{ if .LicenseKey }}<li>{{ octicon "law" }} {{ .LicenseKey }}</li>{{ end }} |
| 51 | <li>{{ octicon "repo-forked" }} {{ .ForkCount }}</li> |
| 52 | <li>{{ octicon "star" }} {{ .StarCount }}</li> |
| 53 | <li>{{ octicon "eye" }} {{ .WatcherCount }}</li> |
| 54 | {{ if .IsFork }}<li>Fork</li>{{ end }} |
| 55 | <li>Updated {{ relativeTime .UpdatedAt }}</li> |
| 56 | </ul> |
| 57 | </div> |
| 58 | <span class="shithub-global-sparkline" aria-hidden="true"></span> |
| 59 | </li> |
| 60 | {{ end }} |
| 61 | </ol> |
| 62 | {{ else }} |
| 63 | <div class="shithub-global-empty"> |
| 64 | <h2>{{ .EmptyTitle }}</h2> |
| 65 | <p>{{ .EmptyBody }}</p> |
| 66 | </div> |
| 67 | {{ end }} |
| 68 | </section> |
| 69 | </main> |
| 70 | </div> |
| 71 | </section> |
| 72 | {{- end }} |