Mirror of https://git.jolheiser.com/ugit
1// Code generated by templ - DO NOT EDIT.
2
3// templ: version: v0.3.1001
4package html
5
6//lint:file-ignore SA4006 This context is only used if a nested component is present.
7
8import "github.com/a-h/templ"
9import templruntime "github.com/a-h/templ/runtime"
10
11import "fmt"
12import "github.com/dustin/go-humanize"
13import "go.jolheiser.com/ugit/internal/git"
14
15type RepoCommitContext struct {
16 BaseContext
17 RepoHeaderComponentContext
18 Commit git.Commit
19}
20
21func RepoCommit(rcc RepoCommitContext) templ.Component {
22 return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
23 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
24 if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
25 return templ_7745c5c3_CtxErr
26 }
27 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
28 if !templ_7745c5c3_IsBuffer {
29 defer func() {
30 templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
31 if templ_7745c5c3_Err == nil {
32 templ_7745c5c3_Err = templ_7745c5c3_BufErr
33 }
34 }()
35 }
36 ctx = templ.InitializeContext(ctx)
37 templ_7745c5c3_Var1 := templ.GetChildren(ctx)
38 if templ_7745c5c3_Var1 == nil {
39 templ_7745c5c3_Var1 = templ.NopComponent
40 }
41 ctx = templ.ClearChildren(ctx)
42 templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
43 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
44 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
45 if !templ_7745c5c3_IsBuffer {
46 defer func() {
47 templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
48 if templ_7745c5c3_Err == nil {
49 templ_7745c5c3_Err = templ_7745c5c3_BufErr
50 }
51 }()
52 }
53 ctx = templ.InitializeContext(ctx)
54 templ_7745c5c3_Err = repoHeaderComponent(rcc.RepoHeaderComponentContext).Render(ctx, templ_7745c5c3_Buffer)
55 if templ_7745c5c3_Err != nil {
56 return templ_7745c5c3_Err
57 }
58 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, " <div class=\"text-text mt-5\"><a class=\"underline decoration-text/50 decoration-dashed hover:decoration-solid\" href=\"")
59 if templ_7745c5c3_Err != nil {
60 return templ_7745c5c3_Err
61 }
62 var templ_7745c5c3_Var3 templ.SafeURL
63 templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("/%s/tree/%s/", rcc.RepoHeaderComponentContext.Name, rcc.Commit.SHA)))
64 if templ_7745c5c3_Err != nil {
65 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/html/repo_commit.templ`, Line: 16, Col: 213}
66 }
67 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
68 if templ_7745c5c3_Err != nil {
69 return templ_7745c5c3_Err
70 }
71 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "\">tree</a>")
72 if templ_7745c5c3_Err != nil {
73 return templ_7745c5c3_Err
74 }
75 var templ_7745c5c3_Var4 string
76 templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(" ")
77 if templ_7745c5c3_Err != nil {
78 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/html/repo_commit.templ`, Line: 16, Col: 229}
79 }
80 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
81 if templ_7745c5c3_Err != nil {
82 return templ_7745c5c3_Err
83 }
84 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "<a class=\"underline decoration-text/50 decoration-dashed hover:decoration-solid\" href=\"")
85 if templ_7745c5c3_Err != nil {
86 return templ_7745c5c3_Err
87 }
88 var templ_7745c5c3_Var5 templ.SafeURL
89 templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("/%s/log/%s", rcc.RepoHeaderComponentContext.Name, rcc.Commit.SHA)))
90 if templ_7745c5c3_Err != nil {
91 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/html/repo_commit.templ`, Line: 16, Col: 412}
92 }
93 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
94 if templ_7745c5c3_Err != nil {
95 return templ_7745c5c3_Err
96 }
97 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "\">log</a>")
98 if templ_7745c5c3_Err != nil {
99 return templ_7745c5c3_Err
100 }
101 var templ_7745c5c3_Var6 string
102 templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(" ")
103 if templ_7745c5c3_Err != nil {
104 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/html/repo_commit.templ`, Line: 16, Col: 427}
105 }
106 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
107 if templ_7745c5c3_Err != nil {
108 return templ_7745c5c3_Err
109 }
110 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "<a class=\"underline decoration-text/50 decoration-dashed hover:decoration-solid\" href=\"")
111 if templ_7745c5c3_Err != nil {
112 return templ_7745c5c3_Err
113 }
114 var templ_7745c5c3_Var7 templ.SafeURL
115 templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("/%s/commit/%s.patch", rcc.RepoHeaderComponentContext.Name, rcc.Commit.SHA)))
116 if templ_7745c5c3_Err != nil {
117 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/html/repo_commit.templ`, Line: 16, Col: 619}
118 }
119 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
120 if templ_7745c5c3_Err != nil {
121 return templ_7745c5c3_Err
122 }
123 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "\">patch</a></div><div class=\"text-text whitespace-pre mt-5 p-3 bg-base rounded\">")
124 if templ_7745c5c3_Err != nil {
125 return templ_7745c5c3_Err
126 }
127 var templ_7745c5c3_Var8 string
128 templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(rcc.Commit.Message)
129 if templ_7745c5c3_Err != nil {
130 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/html/repo_commit.templ`, Line: 17, Col: 85}
131 }
132 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
133 if templ_7745c5c3_Err != nil {
134 return templ_7745c5c3_Err
135 }
136 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "</div>")
137 if templ_7745c5c3_Err != nil {
138 return templ_7745c5c3_Err
139 }
140 if rcc.Commit.Signature != "" {
141 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "<details class=\"text-text whitespace-pre\"><summary class=\"cursor-pointer\">Signature</summary><div class=\"p-3 bg-base rounded\"><code>")
142 if templ_7745c5c3_Err != nil {
143 return templ_7745c5c3_Err
144 }
145 var templ_7745c5c3_Var9 string
146 templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(rcc.Commit.Signature)
147 if templ_7745c5c3_Err != nil {
148 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/html/repo_commit.templ`, Line: 21, Col: 65}
149 }
150 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
151 if templ_7745c5c3_Err != nil {
152 return templ_7745c5c3_Err
153 }
154 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "</code></div></details>")
155 if templ_7745c5c3_Err != nil {
156 return templ_7745c5c3_Err
157 }
158 }
159 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, " <div class=\"text-text mt-3\"><div>")
160 if templ_7745c5c3_Err != nil {
161 return templ_7745c5c3_Err
162 }
163 var templ_7745c5c3_Var10 string
164 templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(rcc.Commit.Author)
165 if templ_7745c5c3_Err != nil {
166 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/html/repo_commit.templ`, Line: 25, Col: 27}
167 }
168 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
169 if templ_7745c5c3_Err != nil {
170 return templ_7745c5c3_Err
171 }
172 var templ_7745c5c3_Var11 string
173 templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(" ")
174 if templ_7745c5c3_Err != nil {
175 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/html/repo_commit.templ`, Line: 25, Col: 34}
176 }
177 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
178 if templ_7745c5c3_Err != nil {
179 return templ_7745c5c3_Err
180 }
181 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "<a class=\"underline decoration-text/50 decoration-dashed hover:decoration-solid\" href=\"")
182 if templ_7745c5c3_Err != nil {
183 return templ_7745c5c3_Err
184 }
185 var templ_7745c5c3_Var12 templ.SafeURL
186 templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("mailto:%s", rcc.Commit.Email)))
187 if templ_7745c5c3_Err != nil {
188 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/html/repo_commit.templ`, Line: 25, Col: 181}
189 }
190 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
191 if templ_7745c5c3_Err != nil {
192 return templ_7745c5c3_Err
193 }
194 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "\">")
195 if templ_7745c5c3_Err != nil {
196 return templ_7745c5c3_Err
197 }
198 var templ_7745c5c3_Var13 string
199 templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("<%s>", rcc.Commit.Email))
200 if templ_7745c5c3_Err != nil {
201 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/html/repo_commit.templ`, Line: 25, Col: 223}
202 }
203 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
204 if templ_7745c5c3_Err != nil {
205 return templ_7745c5c3_Err
206 }
207 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "</a></div><div title=\"")
208 if templ_7745c5c3_Err != nil {
209 return templ_7745c5c3_Err
210 }
211 var templ_7745c5c3_Var14 string
212 templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(rcc.Commit.When.Format("01/02/2006 03:04:05 PM"))
213 if templ_7745c5c3_Err != nil {
214 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/html/repo_commit.templ`, Line: 26, Col: 64}
215 }
216 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
217 if templ_7745c5c3_Err != nil {
218 return templ_7745c5c3_Err
219 }
220 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "\">")
221 if templ_7745c5c3_Err != nil {
222 return templ_7745c5c3_Err
223 }
224 var templ_7745c5c3_Var15 string
225 templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(humanize.Time(rcc.Commit.When))
226 if templ_7745c5c3_Err != nil {
227 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/html/repo_commit.templ`, Line: 26, Col: 99}
228 }
229 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
230 if templ_7745c5c3_Err != nil {
231 return templ_7745c5c3_Err
232 }
233 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "</div></div><details class=\"text-text mt-5\"><summary class=\"cursor-pointer\">")
234 if templ_7745c5c3_Err != nil {
235 return templ_7745c5c3_Err
236 }
237 var templ_7745c5c3_Var16 string
238 templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d changed files, %d additions(+), %d deletions(-)", rcc.Commit.Stats.Changed, rcc.Commit.Stats.Additions, rcc.Commit.Stats.Deletions))
239 if templ_7745c5c3_Err != nil {
240 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/html/repo_commit.templ`, Line: 29, Col: 184}
241 }
242 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
243 if templ_7745c5c3_Err != nil {
244 return templ_7745c5c3_Err
245 }
246 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "</summary><div class=\"p-3 bg-base rounded\">")
247 if templ_7745c5c3_Err != nil {
248 return templ_7745c5c3_Err
249 }
250 for _, file := range rcc.Commit.Files {
251 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "<a class=\"block underline decoration-text/50 decoration-dashed hover:decoration-solid\" href=\"")
252 if templ_7745c5c3_Err != nil {
253 return templ_7745c5c3_Err
254 }
255 var templ_7745c5c3_Var17 templ.SafeURL
256 templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinURLErrs("#" + file.Path())
257 if templ_7745c5c3_Err != nil {
258 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/html/repo_commit.templ`, Line: 32, Col: 116}
259 }
260 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
261 if templ_7745c5c3_Err != nil {
262 return templ_7745c5c3_Err
263 }
264 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "\">")
265 if templ_7745c5c3_Err != nil {
266 return templ_7745c5c3_Err
267 }
268 var templ_7745c5c3_Var18 string
269 templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(file.Path())
270 if templ_7745c5c3_Err != nil {
271 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/html/repo_commit.templ`, Line: 32, Col: 132}
272 }
273 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
274 if templ_7745c5c3_Err != nil {
275 return templ_7745c5c3_Err
276 }
277 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "</a>")
278 if templ_7745c5c3_Err != nil {
279 return templ_7745c5c3_Err
280 }
281 }
282 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "</div></details> ")
283 if templ_7745c5c3_Err != nil {
284 return templ_7745c5c3_Err
285 }
286 for _, file := range rcc.Commit.Files {
287 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "<div class=\"text-text mt-5\" id=\"")
288 if templ_7745c5c3_Err != nil {
289 return templ_7745c5c3_Err
290 }
291 var templ_7745c5c3_Var19 string
292 templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(file.Path())
293 if templ_7745c5c3_Err != nil {
294 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/html/repo_commit.templ`, Line: 37, Col: 47}
295 }
296 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
297 if templ_7745c5c3_Err != nil {
298 return templ_7745c5c3_Err
299 }
300 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "\"><span class=\"text-text/80\" title=\"")
301 if templ_7745c5c3_Err != nil {
302 return templ_7745c5c3_Err
303 }
304 var templ_7745c5c3_Var20 string
305 templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(file.Action)
306 if templ_7745c5c3_Err != nil {
307 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/html/repo_commit.templ`, Line: 38, Col: 50}
308 }
309 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
310 if templ_7745c5c3_Err != nil {
311 return templ_7745c5c3_Err
312 }
313 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "\">")
314 if templ_7745c5c3_Err != nil {
315 return templ_7745c5c3_Err
316 }
317 var templ_7745c5c3_Var21 string
318 templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(string(file.Action[0]))
319 if templ_7745c5c3_Err != nil {
320 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/html/repo_commit.templ`, Line: 38, Col: 77}
321 }
322 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
323 if templ_7745c5c3_Err != nil {
324 return templ_7745c5c3_Err
325 }
326 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "</span> ")
327 if templ_7745c5c3_Err != nil {
328 return templ_7745c5c3_Err
329 }
330 var templ_7745c5c3_Var22 string
331 templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(" ")
332 if templ_7745c5c3_Err != nil {
333 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/html/repo_commit.templ`, Line: 39, Col: 9}
334 }
335 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
336 if templ_7745c5c3_Err != nil {
337 return templ_7745c5c3_Err
338 }
339 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, " ")
340 if templ_7745c5c3_Err != nil {
341 return templ_7745c5c3_Err
342 }
343 if file.From.Path != "" {
344 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "<a class=\"underline decoration-text/50 decoration-dashed hover:decoration-solid\" href=\"")
345 if templ_7745c5c3_Err != nil {
346 return templ_7745c5c3_Err
347 }
348 var templ_7745c5c3_Var23 templ.SafeURL
349 templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("/%s/tree/%s/%s", rcc.RepoHeaderComponentContext.Name, file.From.Commit, file.From.Path)))
350 if templ_7745c5c3_Err != nil {
351 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/html/repo_commit.templ`, Line: 41, Col: 208}
352 }
353 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
354 if templ_7745c5c3_Err != nil {
355 return templ_7745c5c3_Err
356 }
357 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "\">")
358 if templ_7745c5c3_Err != nil {
359 return templ_7745c5c3_Err
360 }
361 var templ_7745c5c3_Var24 string
362 templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(file.From.Path)
363 if templ_7745c5c3_Err != nil {
364 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/html/repo_commit.templ`, Line: 41, Col: 227}
365 }
366 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
367 if templ_7745c5c3_Err != nil {
368 return templ_7745c5c3_Err
369 }
370 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "</a> ")
371 if templ_7745c5c3_Err != nil {
372 return templ_7745c5c3_Err
373 }
374 }
375 if file.From.Path != "" && file.To.Path != "" {
376 var templ_7745c5c3_Var25 string
377 templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(" -> ")
378 if templ_7745c5c3_Err != nil {
379 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/html/repo_commit.templ`, Line: 44, Col: 13}
380 }
381 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))
382 if templ_7745c5c3_Err != nil {
383 return templ_7745c5c3_Err
384 }
385 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, " ")
386 if templ_7745c5c3_Err != nil {
387 return templ_7745c5c3_Err
388 }
389 }
390 if file.To.Path != "" {
391 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "<a class=\"underline decoration-text/50 decoration-dashed hover:decoration-solid\" href=\"")
392 if templ_7745c5c3_Err != nil {
393 return templ_7745c5c3_Err
394 }
395 var templ_7745c5c3_Var26 templ.SafeURL
396 templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("/%s/tree/%s/%s", rcc.RepoHeaderComponentContext.Name, file.To.Commit, file.To.Path)))
397 if templ_7745c5c3_Err != nil {
398 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/html/repo_commit.templ`, Line: 47, Col: 204}
399 }
400 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))
401 if templ_7745c5c3_Err != nil {
402 return templ_7745c5c3_Err
403 }
404 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "\">")
405 if templ_7745c5c3_Err != nil {
406 return templ_7745c5c3_Err
407 }
408 var templ_7745c5c3_Var27 string
409 templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(file.To.Path)
410 if templ_7745c5c3_Err != nil {
411 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/html/repo_commit.templ`, Line: 47, Col: 221}
412 }
413 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
414 if templ_7745c5c3_Err != nil {
415 return templ_7745c5c3_Err
416 }
417 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "</a>")
418 if templ_7745c5c3_Err != nil {
419 return templ_7745c5c3_Err
420 }
421 }
422 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "</div><div class=\"code\">")
423 if templ_7745c5c3_Err != nil {
424 return templ_7745c5c3_Err
425 }
426 templ_7745c5c3_Err = templ.Raw(file.Patch).Render(ctx, templ_7745c5c3_Buffer)
427 if templ_7745c5c3_Err != nil {
428 return templ_7745c5c3_Err
429 }
430 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "</div>")
431 if templ_7745c5c3_Err != nil {
432 return templ_7745c5c3_Err
433 }
434 }
435 return nil
436 })
437 templ_7745c5c3_Err = base(rcc.BaseContext).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
438 if templ_7745c5c3_Err != nil {
439 return templ_7745c5c3_Err
440 }
441 return nil
442 })
443}
444
445var _ = templruntime.GeneratedTemplate