Home

ugit @main - refs - log -
-
https://git.jolheiser.com/ugit.git
The code powering this h*ckin' site
tree log patch
update tailwind-ctp and change ogp meta for repo pages
Signature
-----BEGIN SSH SIGNATURE----- U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgBTEvCQk6VqUAdN2RuH6bj1dNkY oOpbPWj+jw4ua1B1cAAAADZ2l0AAAAAAAAAAZzaGE1MTIAAABTAAAAC3NzaC1lZDI1NTE5 AAAAQC/3ukN0KXpmKHjo70WthXDCmMz0slyBHC9U0Zwb7dvtRA5+0HONXAy6HF4GRJvott DAIt9zd+6DzPMgRml5OwU= -----END SSH SIGNATURE-----
jolheiser <git@jolheiser.com>
4 days ago
7 changed files, 24 additions(+), 20 deletions(-)
flake.lockgo.mod.sriinternal/html/generate.gointernal/html/repo_tree.templinternal/html/repo_tree_templ.gointernal/http/http.gointernal/http/repo.go
M flake.lock -> flake.lock
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/flake.lock b/flake.lock
index 136d8d5a1275fbc1710f15609e3c352e3525d165..f271bd8543f1892bea05b8dfa9992156d67e6a9f 100644
--- a/flake.lock
+++ b/flake.lock
@@ -30,11 +30,11 @@           "nixpkgs"
         ]
       },
       "locked": {
-        "lastModified": 1695841587,
-        "narHash": "sha256-fgiZd5AV+hi8Ne0bJ8SyAx5nppseW4aXJQEIDSr0VNA=",
+        "lastModified": 1753803577,
+        "narHash": "sha256-sE5IgsHacXmfsWJjVVPvb7Aa6oHElt+nfP6+3Pqa414=",
         "ref": "refs/heads/main",
-        "rev": "afca060674b20e0ccecde2d6fe88c887790219a5",
-        "revCount": 1,
+        "rev": "4ce9431cbb4e9e5dceadfbc413fbd34e7305fe8e",
+        "revCount": 3,
         "type": "git",
         "url": "https://git.jolheiser.com/tailwind-ctp"
       },
M go.mod.sri -> go.mod.sri
1
2
3
4
5
6
7
8
9
diff --git a/go.mod.sri b/go.mod.sri
index 9c722ac99721ff649eab2a2a3b972419d4448c4a..fcc8e850151439b426734cc52fe67f471cc13a15 100644
--- a/go.mod.sri
+++ b/go.mod.sri
@@ -1 +1 @@
-sha256-DjweXB8uqEpOIBwGabLCnVL4ZOKkPcJDf6JlAS5FmKI=
\ No newline at end of file
+sha256-SkG1ZQRtfpCtxD7a+Qrmrg5r6FSOMaJy8htPSVXTCcM=
\ No newline at end of file
M internal/html/generate.go -> internal/html/generate.go
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
diff --git a/internal/html/generate.go b/internal/html/generate.go
index 843f333f9559ca22bdc478e8e25d80a3fca72619..200d9136c62762ffaec7f50d0a766e321986471a 100644
--- a/internal/html/generate.go
+++ b/internal/html/generate.go
@@ -73,7 +73,7 @@ 	}
 	defer styles.Close()
 
 	var buf bytes.Buffer
-	cmd := exec.Command("tailwind-ctp", "-i", tmp.Name(), "--minify")
+	cmd := exec.Command("tailwind-ctp_3", "-i", tmp.Name(), "--minify")
 	cmd.Stdout = &buf
 	if err := cmd.Run(); err != nil {
 		return err
M internal/html/repo_tree.templ -> internal/html/repo_tree.templ
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
diff --git a/internal/html/repo_tree.templ b/internal/html/repo_tree.templ
index 170c534e357a588d8bebf03e8d36b221622fa846..2e2e154ee018a234c35e633f875c692283fe8ae2 100644
--- a/internal/html/repo_tree.templ
+++ b/internal/html/repo_tree.templ
@@ -11,7 +11,6 @@ 	RepoHeaderComponentContext
 	RepoBreadcrumbComponentContext
 	RepoTreeComponentContext
 	ReadmeComponentContext
-	Description string
 }
 
 templ RepoTree(rtc RepoTreeContext) {
M internal/html/repo_tree_templ.go -> internal/html/repo_tree_templ.go
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
diff --git a/internal/html/repo_tree_templ.go b/internal/html/repo_tree_templ.go
index a0320516f424a88ecdbed9ddaff1f611cef11de1..321e0a55fabffbc2f334bfb2a16de40b00c42e56 100644
--- a/internal/html/repo_tree_templ.go
+++ b/internal/html/repo_tree_templ.go
@@ -19,7 +19,6 @@ 	RepoHeaderComponentContext
 	RepoBreadcrumbComponentContext
 	RepoTreeComponentContext
 	ReadmeComponentContext
-	Description string
 }
 
 func RepoTree(rtc RepoTreeContext) templ.Component {
@@ -140,7 +139,7 @@ 			}
 			var templ_7745c5c3_Var4 templ.SafeURL
 			templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("/%s/tree/%s/%s", rtcc.Repo, rtcc.Ref, rtcc.Back)))
 			if templ_7745c5c3_Err != nil {
-				return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_tree.templ`, Line: 44, Col: 194}
+				return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_tree.templ`, Line: 43, Col: 194}
 			}
 			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
 			if templ_7745c5c3_Err != nil {
@@ -159,7 +158,7 @@ 			}
 			var templ_7745c5c3_Var5 string
 			templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(fi.Mode)
 			if templ_7745c5c3_Err != nil {
-				return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_tree.templ`, Line: 47, Col: 50}
+				return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_tree.templ`, Line: 46, Col: 50}
 			}
 			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
 			if templ_7745c5c3_Err != nil {
@@ -172,7 +171,7 @@ 			}
 			var templ_7745c5c3_Var6 string
 			templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(fi.Size)
 			if templ_7745c5c3_Err != nil {
-				return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_tree.templ`, Line: 48, Col: 50}
+				return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_tree.templ`, Line: 47, Col: 50}
 			}
 			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
 			if templ_7745c5c3_Err != nil {
@@ -185,7 +184,7 @@ 			}
 			var templ_7745c5c3_Var7 templ.SafeURL
 			templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("/%s/tree/%s/%s", rtcc.Repo, rtcc.Ref, fi.Path)))
 			if templ_7745c5c3_Err != nil {
-				return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_tree.templ`, Line: 49, Col: 222}
+				return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_tree.templ`, Line: 48, Col: 222}
 			}
 			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
 			if templ_7745c5c3_Err != nil {
@@ -198,7 +197,7 @@ 			}
 			var templ_7745c5c3_Var8 string
 			templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(slashDir(fi.Name(), fi.IsDir))
 			if templ_7745c5c3_Err != nil {
-				return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_tree.templ`, Line: 49, Col: 256}
+				return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_tree.templ`, Line: 48, Col: 256}
 			}
 			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
 			if templ_7745c5c3_Err != nil {
M internal/http/http.go -> internal/http/http.go
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
diff --git a/internal/http/http.go b/internal/http/http.go
index b89b8242cf37a25d0bc34562822ffe750a7d53c2..844652d081156b4bb835e3cffdfbe0f6c8fcceea 100644
--- a/internal/http/http.go
+++ b/internal/http/http.go
@@ -116,6 +116,13 @@ 		Description: rh.s.Description,
 	}
 }
 
+func (rh repoHandler) repoBaseContext(repo *git.Repo) html.BaseContext {
+	return html.BaseContext{
+		Title:       repo.Name(),
+		Description: repo.Meta.Description,
+	}
+}
+
 func (rh repoHandler) repoHeaderContext(repo *git.Repo, r *http.Request) html.RepoHeaderComponentContext {
 	ref := chi.URLParam(r, "ref")
 	if ref == "" {
M internal/http/repo.go -> internal/http/repo.go
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
diff --git a/internal/http/repo.go b/internal/http/repo.go
index fec56d2eb3412e1609ca4b86dff941ae43f2acd6..d59cb59bd0cb984bc1647f1c06df69f32776215d 100644
--- a/internal/http/repo.go
+++ b/internal/http/repo.go
@@ -48,8 +48,7 @@ 		if path != "" {
 			back = filepath.Dir(path)
 		}
 		if err := html.RepoTree(html.RepoTreeContext{
-			Description:                    repo.Meta.Description,
-			BaseContext:                    rh.baseContext(),
+			BaseContext:                    rh.repoBaseContext(repo),
 			RepoHeaderComponentContext:     rh.repoHeaderContext(repo, r),
 			RepoBreadcrumbComponentContext: rh.repoBreadcrumbContext(repo, r, path),
 			RepoTreeComponentContext: html.RepoTreeComponentContext{
@@ -101,7 +100,7 @@ 		}
 	}
 
 	if err := html.RepoFile(html.RepoFileContext{
-		BaseContext:                    rh.baseContext(),
+		BaseContext:                    rh.repoBaseContext(repo),
 		RepoHeaderComponentContext:     rh.repoHeaderContext(repo, r),
 		RepoBreadcrumbComponentContext: rh.repoBreadcrumbContext(repo, r, path),
 		Code:                           buf.String(),
@@ -128,7 +127,7 @@ 		return httperr.Error(err)
 	}
 
 	if err := html.RepoRefs(html.RepoRefsContext{
-		BaseContext:                rh.baseContext(),
+		BaseContext:                rh.repoBaseContext(repo),
 		RepoHeaderComponentContext: rh.repoHeaderContext(repo, r),
 		Branches:                   branches,
 		Tags:                       tags,
@@ -148,7 +147,7 @@ 		return httperr.Error(err)
 	}
 
 	if err := html.RepoLog(html.RepoLogContext{
-		BaseContext:                rh.baseContext(),
+		BaseContext:                rh.repoBaseContext(repo),
 		RepoHeaderComponentContext: rh.repoHeaderContext(repo, r),
 		Commits:                    commits,
 	}).Render(r.Context(), w); err != nil {
@@ -175,7 +174,7 @@ 		commit.Files[idx].Patch = patch.String()
 	}
 
 	if err := html.RepoCommit(html.RepoCommitContext{
-		BaseContext:                rh.baseContext(),
+		BaseContext:                rh.repoBaseContext(repo),
 		RepoHeaderComponentContext: rh.repoHeaderContext(repo, r),
 		Commit:                     commit,
 	}).Render(r.Context(), w); err != nil {
@@ -219,7 +218,7 @@ 		}
 	}
 
 	if err := html.RepoSearch(html.SearchContext{
-		BaseContext:                rh.baseContext(),
+		BaseContext:                rh.repoBaseContext(repo),
 		RepoHeaderComponentContext: rh.repoHeaderContext(repo, r),
 		Results:                    results,
 	}).Render(r.Context(), w); err != nil {