Commit 425370a

bryfry <bryon@fryer.io>
2026-01-27 21:30:44
index update
1 parent 6a61076
Changed files (6)
internal/gitmal/gitmal.go
@@ -8,7 +8,7 @@ import (
 
 // Run executes the gitmal binary against a bare repo.
 func Run(repoPath, name, outputDir string) error {
-	cmd := exec.Command("gitmal", "--name", name, "--output", outputDir, repoPath)
+	cmd := exec.Command("gitmal", "--theme", "github-dark", "--name", name, "--output", outputDir, repoPath)
 	cmd.Stdout = os.Stdout
 	cmd.Stderr = os.Stderr
 
internal/index/templates/category.html
@@ -3,11 +3,12 @@
 <head>
 <meta charset="utf-8">
 <meta name="viewport" content="width=device-width, initial-scale=1">
-<title>{{.Category}}</title>
+<title>forge:{{.Category}}</title>
 <style>
 body {
   font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
-  color: #24292e;
+  color: rgba(255, 255, 245, .86);
+  background: #1b1b1f;
   margin: 0;
   padding: 2rem 1rem;
 }
@@ -16,7 +17,7 @@ body {
   margin: 0 auto;
 }
 h1 {
-  border-bottom: 1px solid #e1e4e8;
+  border-bottom: 1px solid #3c3f44;
   padding-bottom: 0.5rem;
 }
 ul {
@@ -24,10 +25,10 @@ ul {
   padding: 0;
 }
 li {
-  padding: 0.4rem 0;
+  padding: 0.3rem 0;
 }
 a {
-  color: #0366d6;
+  color: #a8b1ff;
   text-decoration: none;
 }
 a:hover {
@@ -36,12 +37,15 @@ a:hover {
 .back {
   margin-bottom: 1rem;
 }
+.back a {
+  color: rgba(235, 235, 245, .6);
+}
 </style>
 </head>
 <body>
 <div class="container">
 <div class="back"><a href="../">&larr; back</a></div>
-<h1>{{.Category}}</h1>
+<h1>forge:{{.Category}}</h1>
 <ul>
 {{range .Repos}}<li><a href="{{.Name}}/">{{.Name}}</a></li>
 {{end}}</ul>
internal/index/templates/root.html
@@ -3,11 +3,12 @@
 <head>
 <meta charset="utf-8">
 <meta name="viewport" content="width=device-width, initial-scale=1">
-<title>git</title>
+<title>forge</title>
 <style>
 body {
   font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
-  color: #24292e;
+  color: rgba(255, 255, 245, .86);
+  background: #1b1b1f;
   margin: 0;
   padding: 2rem 1rem;
 }
@@ -16,18 +17,36 @@ body {
   margin: 0 auto;
 }
 h1 {
-  border-bottom: 1px solid #e1e4e8;
+  border-bottom: 1px solid #3c3f44;
   padding-bottom: 0.5rem;
 }
+details {
+  border-bottom: 1px solid #2e2e32;
+}
+summary {
+  cursor: pointer;
+  padding: 0.6rem 0;
+  color: rgba(235, 235, 245, .6);
+  font-size: 1rem;
+  list-style: disclosure-closed;
+}
+details[open] > summary {
+  list-style: disclosure-open;
+}
+.count {
+  color: rgba(235, 235, 245, .38);
+  font-size: 0.85rem;
+}
 ul {
   list-style: none;
   padding: 0;
+  margin: 0 0 0.5rem 1.25rem;
 }
 li {
-  padding: 0.4rem 0;
+  padding: 0.3rem 0;
 }
 a {
-  color: #0366d6;
+  color: #a8b1ff;
   text-decoration: none;
 }
 a:hover {
@@ -37,10 +56,13 @@ a:hover {
 </head>
 <body>
 <div class="container">
-<h1>repositories</h1>
+<h1>forge</h1>
+{{range .Categories}}<details>
+<summary>{{.Name}}/ <span class="count">({{len .Repos}})</span></summary>
 <ul>
-{{range .Categories}}<li><a href="{{.Name}}/">{{.Name}}/</a></li>
+{{range .Repos}}<li><a href="{{.Category}}/{{.Name}}/">{{.Name}}</a></li>
 {{end}}</ul>
-</div>
+</details>
+{{end}}</div>
 </body>
 </html>
internal/index/index.go
@@ -19,11 +19,17 @@ var (
 )
 
 type rootData struct {
-	Categories []categoryEntry
+	Categories []rootCategory
 }
 
-type categoryEntry struct {
-	Name string
+type rootCategory struct {
+	Name  string
+	Repos []rootRepo
+}
+
+type rootRepo struct {
+	Name     string
+	Category string
 }
 
 type categoryData struct {
@@ -53,7 +59,11 @@ func GenerateAll(outputRoot string, repos []repo.Repo) error {
 	// Generate root index.
 	rd := rootData{}
 	for _, cat := range categoryOrder {
-		rd.Categories = append(rd.Categories, categoryEntry{Name: cat})
+		rc := rootCategory{Name: cat}
+		for _, r := range grouped[cat] {
+			rc.Repos = append(rc.Repos, rootRepo{Name: r.Name, Category: r.Category})
+		}
+		rd.Categories = append(rd.Categories, rc)
 	}
 
 	err := writeTemplate(rootTmpl, filepath.Join(outputRoot, "index.html"), rd)
.gitignore
@@ -0,0 +1,1 @@
+/forge
forge
Binary file