Use repo header on empty repos
- SHA
b19ab4aec4a5d948bd94c925abd3dccec8279345- Parents
-
51fc2ce - Tree
2aaba38
b19ab4a
b19ab4aec4a5d948bd94c925abd3dccec827934551fc2ce
2aaba38| Status | File | + | - |
|---|---|---|---|
| M |
internal/web/static/css/shithub.css
|
2 | 11 |
| M |
internal/web/templates/repo/empty.html
|
4 | 13 |
internal/web/static/css/shithub.cssmodified@@ -786,18 +786,9 @@ code { | ||
| 786 | 786 | |
| 787 | 787 | .shithub-repo-empty { |
| 788 | 788 | max-width: 56rem; |
| 789 | - margin: 2rem auto; | |
| 790 | - padding: 0 1rem; | |
| 791 | -} | |
| 792 | -.shithub-repo-empty-head h1 { | |
| 793 | - margin: 0 0 0.5rem; | |
| 794 | - font-size: 1.4rem; | |
| 795 | - font-weight: 400; | |
| 796 | - display: flex; | |
| 797 | - align-items: center; | |
| 798 | - gap: 0.4rem; | |
| 789 | + margin: 0; | |
| 790 | + padding: 0; | |
| 799 | 791 | } |
| 800 | -.shithub-repo-empty-sep { color: var(--fg-muted); } | |
| 801 | 792 | .shithub-repo-empty-desc { |
| 802 | 793 | margin: 0 0 1rem; |
| 803 | 794 | color: var(--fg-muted); |
internal/web/templates/repo/empty.htmlmodified@@ -1,18 +1,8 @@ | ||
| 1 | 1 | {{ define "page" -}} |
| 2 | -<section class="shithub-repo-empty"> | |
| 3 | - <header class="shithub-repo-empty-head"> | |
| 4 | - <h1> | |
| 5 | - <a href="/{{ .Owner }}">{{ .Owner }}</a> | |
| 6 | - <span class="shithub-repo-empty-sep">/</span> | |
| 7 | - <a href="/{{ .Owner }}/{{ .Repo.Name }}">{{ .Repo.Name }}</a> | |
| 8 | - {{ if eq (printf "%s" .Repo.Visibility) "private" }} | |
| 9 | - <span class="shithub-pill shithub-pill-private">private</span> | |
| 10 | - {{ else }} | |
| 11 | - <span class="shithub-pill">public</span> | |
| 12 | - {{ end }} | |
| 13 | - </h1> | |
| 2 | +<section class="shithub-repo-page"> | |
| 3 | + {{ template "repo-header" . }} | |
| 4 | + <section class="shithub-repo-empty"> | |
| 14 | 5 | {{ if .Repo.Description }}<p class="shithub-repo-empty-desc">{{ .Repo.Description }}</p>{{ end }} |
| 15 | - </header> | |
| 16 | 6 | |
| 17 | 7 | <div class="shithub-repo-empty-quickstart"> |
| 18 | 8 | <h2>Quick setup — if you've done this kind of thing before</h2> |
@@ -36,5 +26,6 @@ | ||
| 36 | 26 | git branch -M {{ .DefaultBranch }} |
| 37 | 27 | git push -u origin {{ .DefaultBranch }}</code></pre> |
| 38 | 28 | </div> |
| 29 | + </section> | |
| 39 | 30 | </section> |
| 40 | 31 | {{- end }} |