Mirror of https://git.jolheiser.com/ugit
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

update tailwind-ctp and change ogp meta for repo pages

+24 -20
+4 -4
flake.lock
··· 30 30 ] 31 31 }, 32 32 "locked": { 33 - "lastModified": 1695841587, 34 - "narHash": "sha256-fgiZd5AV+hi8Ne0bJ8SyAx5nppseW4aXJQEIDSr0VNA=", 33 + "lastModified": 1753803577, 34 + "narHash": "sha256-sE5IgsHacXmfsWJjVVPvb7Aa6oHElt+nfP6+3Pqa414=", 35 35 "ref": "refs/heads/main", 36 - "rev": "afca060674b20e0ccecde2d6fe88c887790219a5", 37 - "revCount": 1, 36 + "rev": "4ce9431cbb4e9e5dceadfbc413fbd34e7305fe8e", 37 + "revCount": 3, 38 38 "type": "git", 39 39 "url": "https://git.jolheiser.com/tailwind-ctp" 40 40 },
+1 -1
go.mod.sri
··· 1 - sha256-DjweXB8uqEpOIBwGabLCnVL4ZOKkPcJDf6JlAS5FmKI= 1 + sha256-SkG1ZQRtfpCtxD7a+Qrmrg5r6FSOMaJy8htPSVXTCcM=
+1 -1
internal/html/generate.go
··· 73 73 defer styles.Close() 74 74 75 75 var buf bytes.Buffer 76 - cmd := exec.Command("tailwind-ctp", "-i", tmp.Name(), "--minify") 76 + cmd := exec.Command("tailwind-ctp_3", "-i", tmp.Name(), "--minify") 77 77 cmd.Stdout = &buf 78 78 if err := cmd.Run(); err != nil { 79 79 return err
-1
internal/html/repo_tree.templ
··· 11 11 RepoBreadcrumbComponentContext 12 12 RepoTreeComponentContext 13 13 ReadmeComponentContext 14 - Description string 15 14 } 16 15 17 16 templ RepoTree(rtc RepoTreeContext) {
+5 -6
internal/html/repo_tree_templ.go
··· 19 19 RepoBreadcrumbComponentContext 20 20 RepoTreeComponentContext 21 21 ReadmeComponentContext 22 - Description string 23 22 } 24 23 25 24 func RepoTree(rtc RepoTreeContext) templ.Component { ··· 140 139 var templ_7745c5c3_Var4 templ.SafeURL 141 140 templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("/%s/tree/%s/%s", rtcc.Repo, rtcc.Ref, rtcc.Back))) 142 141 if templ_7745c5c3_Err != nil { 143 - return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_tree.templ`, Line: 44, Col: 194} 142 + return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_tree.templ`, Line: 43, Col: 194} 144 143 } 145 144 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) 146 145 if templ_7745c5c3_Err != nil { ··· 159 158 var templ_7745c5c3_Var5 string 160 159 templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(fi.Mode) 161 160 if templ_7745c5c3_Err != nil { 162 - return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_tree.templ`, Line: 47, Col: 50} 161 + return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_tree.templ`, Line: 46, Col: 50} 163 162 } 164 163 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) 165 164 if templ_7745c5c3_Err != nil { ··· 172 171 var templ_7745c5c3_Var6 string 173 172 templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(fi.Size) 174 173 if templ_7745c5c3_Err != nil { 175 - return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_tree.templ`, Line: 48, Col: 50} 174 + return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_tree.templ`, Line: 47, Col: 50} 176 175 } 177 176 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) 178 177 if templ_7745c5c3_Err != nil { ··· 185 184 var templ_7745c5c3_Var7 templ.SafeURL 186 185 templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("/%s/tree/%s/%s", rtcc.Repo, rtcc.Ref, fi.Path))) 187 186 if templ_7745c5c3_Err != nil { 188 - return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_tree.templ`, Line: 49, Col: 222} 187 + return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_tree.templ`, Line: 48, Col: 222} 189 188 } 190 189 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) 191 190 if templ_7745c5c3_Err != nil { ··· 198 197 var templ_7745c5c3_Var8 string 199 198 templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(slashDir(fi.Name(), fi.IsDir)) 200 199 if templ_7745c5c3_Err != nil { 201 - return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_tree.templ`, Line: 49, Col: 256} 200 + return templ.Error{Err: templ_7745c5c3_Err, FileName: `repo_tree.templ`, Line: 48, Col: 256} 202 201 } 203 202 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) 204 203 if templ_7745c5c3_Err != nil {
+7
internal/http/http.go
··· 116 116 } 117 117 } 118 118 119 + func (rh repoHandler) repoBaseContext(repo *git.Repo) html.BaseContext { 120 + return html.BaseContext{ 121 + Title: repo.Name(), 122 + Description: repo.Meta.Description, 123 + } 124 + } 125 + 119 126 func (rh repoHandler) repoHeaderContext(repo *git.Repo, r *http.Request) html.RepoHeaderComponentContext { 120 127 ref := chi.URLParam(r, "ref") 121 128 if ref == "" {
+6 -7
internal/http/repo.go
··· 48 48 back = filepath.Dir(path) 49 49 } 50 50 if err := html.RepoTree(html.RepoTreeContext{ 51 - Description: repo.Meta.Description, 52 - BaseContext: rh.baseContext(), 51 + BaseContext: rh.repoBaseContext(repo), 53 52 RepoHeaderComponentContext: rh.repoHeaderContext(repo, r), 54 53 RepoBreadcrumbComponentContext: rh.repoBreadcrumbContext(repo, r, path), 55 54 RepoTreeComponentContext: html.RepoTreeComponentContext{ ··· 101 100 } 102 101 103 102 if err := html.RepoFile(html.RepoFileContext{ 104 - BaseContext: rh.baseContext(), 103 + BaseContext: rh.repoBaseContext(repo), 105 104 RepoHeaderComponentContext: rh.repoHeaderContext(repo, r), 106 105 RepoBreadcrumbComponentContext: rh.repoBreadcrumbContext(repo, r, path), 107 106 Code: buf.String(), ··· 128 127 } 129 128 130 129 if err := html.RepoRefs(html.RepoRefsContext{ 131 - BaseContext: rh.baseContext(), 130 + BaseContext: rh.repoBaseContext(repo), 132 131 RepoHeaderComponentContext: rh.repoHeaderContext(repo, r), 133 132 Branches: branches, 134 133 Tags: tags, ··· 148 147 } 149 148 150 149 if err := html.RepoLog(html.RepoLogContext{ 151 - BaseContext: rh.baseContext(), 150 + BaseContext: rh.repoBaseContext(repo), 152 151 RepoHeaderComponentContext: rh.repoHeaderContext(repo, r), 153 152 Commits: commits, 154 153 }).Render(r.Context(), w); err != nil { ··· 175 174 } 176 175 177 176 if err := html.RepoCommit(html.RepoCommitContext{ 178 - BaseContext: rh.baseContext(), 177 + BaseContext: rh.repoBaseContext(repo), 179 178 RepoHeaderComponentContext: rh.repoHeaderContext(repo, r), 180 179 Commit: commit, 181 180 }).Render(r.Context(), w); err != nil { ··· 219 218 } 220 219 221 220 if err := html.RepoSearch(html.SearchContext{ 222 - BaseContext: rh.baseContext(), 221 + BaseContext: rh.repoBaseContext(repo), 223 222 RepoHeaderComponentContext: rh.repoHeaderContext(repo, r), 224 223 Results: results, 225 224 }).Render(r.Context(), w); err != nil {