tenseleyflow/shithub / b19ab4a

Browse files

Use repo header on empty repos

Authored by espadonne
SHA
b19ab4aec4a5d948bd94c925abd3dccec8279345
Parents
51fc2ce
Tree
2aaba38

2 changed files

StatusFile+-
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 {
786786
 
787787
 .shithub-repo-empty {
788788
   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;
799791
 }
800
-.shithub-repo-empty-sep { color: var(--fg-muted); }
801792
 .shithub-repo-empty-desc {
802793
   margin: 0 0 1rem;
803794
   color: var(--fg-muted);
internal/web/templates/repo/empty.htmlmodified
@@ -1,18 +1,8 @@
11
 {{ 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">
145
     {{ if .Repo.Description }}<p class="shithub-repo-empty-desc">{{ .Repo.Description }}</p>{{ end }}
15
-  </header>
166
 
177
   <div class="shithub-repo-empty-quickstart">
188
     <h2>Quick setup — if you've done this kind of thing before</h2>
@@ -36,5 +26,6 @@
3626
 git branch -M {{ .DefaultBranch }}
3727
 git push -u origin {{ .DefaultBranch }}</code></pre>
3828
   </div>
29
+  </section>
3930
 </section>
4031
 {{- end }}