tenseleyflow/shithub / 7ca1941

Browse files

Show repo contributor count

Authored by espadonne
SHA
7ca1941238a423ddaffc59e31b2a3067018dee9a
Parents
193d385
Tree
c315ee7

2 changed files

StatusFile+-
M internal/web/static/css/shithub.css 11 0
M internal/web/templates/_repo_about_sidebar.html 4 1
internal/web/static/css/shithub.cssmodified
@@ -1436,6 +1436,17 @@ button.shithub-repo-action {
14361436
 .shithub-repo-about-section-heading {
14371437
   margin-bottom: 0.5rem;
14381438
 }
1439
+.shithub-repo-section-count {
1440
+  min-width: 1.25rem;
1441
+  padding: 0 0.35rem;
1442
+  border-radius: 999px;
1443
+  background: var(--neutral-muted);
1444
+  color: var(--fg-default);
1445
+  font-size: 0.75rem;
1446
+  font-weight: 600;
1447
+  line-height: 1.5;
1448
+  text-align: center;
1449
+}
14391450
 .shithub-repo-contributors {
14401451
   display: flex;
14411452
   flex-direction: column;
internal/web/templates/_repo_about_sidebar.htmlmodified
@@ -47,7 +47,10 @@
4747
     </section>
4848
 
4949
     <section class="shithub-border-grid-row">
50
-      <h2 class="shithub-repo-about-section-heading">Contributors</h2>
50
+      <h2 class="shithub-repo-about-section-heading">
51
+        <span>Contributors</span>
52
+        {{ if .RepoAbout.Contributors }}<span class="shithub-repo-section-count">{{ len .RepoAbout.Contributors }}</span>{{ end }}
53
+      </h2>
5154
       {{ if .RepoAbout.Contributors }}
5255
       <div class="shithub-repo-contributors">
5356
         {{ range .RepoAbout.Contributors }}