detached aa7340c

shell_templ.go RawHistoryFolder

1// Code generated by templ - DO NOT EDIT.
2
3// templ: version: v0.3.1020
4// SPDX-License-Identifier: AGPL-3.0-or-later
5
6package web
7
8//lint:file-ignore SA4006 This context is only used if a nested component is present.
9
10import "github.com/a-h/templ"
11import templruntime "github.com/a-h/templ/runtime"
12
13// Shell is the page: head, the header, the work area (content and rail), the
14// footer, the hint badge, the overlays and the key map. The content is the
15// children.
16func Shell(l Layout, rail templ.Component) templ.Component {
17	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
18		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
19		if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
20			return templ_7745c5c3_CtxErr
21		}
22		templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
23		if !templ_7745c5c3_IsBuffer {
24			defer func() {
25				templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
26				if templ_7745c5c3_Err == nil {
27					templ_7745c5c3_Err = templ_7745c5c3_BufErr
28				}
29			}()
30		}
31		ctx = templ.InitializeContext(ctx)
32		templ_7745c5c3_Var1 := templ.GetChildren(ctx)
33		if templ_7745c5c3_Var1 == nil {
34			templ_7745c5c3_Var1 = templ.NopComponent
35		}
36		ctx = templ.ClearChildren(ctx)
37		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<!doctype html><html lang=\"en\"><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><meta name=\"color-scheme\" content=\"light dark\"><title>")
38		if templ_7745c5c3_Err != nil {
39			return templ_7745c5c3_Err
40		}
41		var templ_7745c5c3_Var2 string
42		templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(l.Title)
43		if templ_7745c5c3_Err != nil {
44			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 15, Col: 19}
45		}
46		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
47		if templ_7745c5c3_Err != nil {
48			return templ_7745c5c3_Err
49		}
50		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "</title><meta name=\"theme-color\" media=\"(prefers-color-scheme: light)\" content=\"#ffffff\"><meta name=\"theme-color\" media=\"(prefers-color-scheme: dark)\" content=\"#0c0c0c\"><meta name=\"apple-mobile-web-app-title\" content=\"ermite\"><link rel=\"icon\" type=\"image/svg+xml\" href=\"")
51		if templ_7745c5c3_Err != nil {
52			return templ_7745c5c3_Err
53		}
54		var templ_7745c5c3_Var3 templ.SafeURL
55		templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(l.Assets.Icon))
56		if templ_7745c5c3_Err != nil {
57			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 19, Col: 76}
58		}
59		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
60		if templ_7745c5c3_Err != nil {
61			return templ_7745c5c3_Err
62		}
63		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "\"><link rel=\"apple-touch-icon\" href=\"")
64		if templ_7745c5c3_Err != nil {
65			return templ_7745c5c3_Err
66		}
67		var templ_7745c5c3_Var4 templ.SafeURL
68		templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(l.Assets.AppleIcon))
69		if templ_7745c5c3_Err != nil {
70			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 20, Col: 72}
71		}
72		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
73		if templ_7745c5c3_Err != nil {
74			return templ_7745c5c3_Err
75		}
76		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "\"><link rel=\"manifest\" href=\"")
77		if templ_7745c5c3_Err != nil {
78			return templ_7745c5c3_Err
79		}
80		var templ_7745c5c3_Var5 templ.SafeURL
81		templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(l.Assets.Manifest))
82		if templ_7745c5c3_Err != nil {
83			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 21, Col: 63}
84		}
85		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
86		if templ_7745c5c3_Err != nil {
87			return templ_7745c5c3_Err
88		}
89		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "\"><link rel=\"preload\" href=\"")
90		if templ_7745c5c3_Err != nil {
91			return templ_7745c5c3_Err
92		}
93		var templ_7745c5c3_Var6 templ.SafeURL
94		templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(l.Assets.Font))
95		if templ_7745c5c3_Err != nil {
96			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 22, Col: 58}
97		}
98		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
99		if templ_7745c5c3_Err != nil {
100			return templ_7745c5c3_Err
101		}
102		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "\" as=\"font\" type=\"font/woff2\" crossorigin><link rel=\"stylesheet\" href=\"")
103		if templ_7745c5c3_Err != nil {
104			return templ_7745c5c3_Err
105		}
106		var templ_7745c5c3_Var7 templ.SafeURL
107		templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(l.Assets.CSS))
108		if templ_7745c5c3_Err != nil {
109			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 23, Col: 60}
110		}
111		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
112		if templ_7745c5c3_Err != nil {
113			return templ_7745c5c3_Err
114		}
115		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "\"><meta name=\"htmx-config\" content='{\"history\":false,\"includeIndicatorCSS\":false,\"extensions\":\"sse, hx-live\"}'><script src=\"")
116		if templ_7745c5c3_Err != nil {
117			return templ_7745c5c3_Err
118		}
119		var templ_7745c5c3_Var8 string
120		templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.HTMX)
121		if templ_7745c5c3_Err != nil {
122			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 25, Col: 30}
123		}
124		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var8)
125		if templ_7745c5c3_Err != nil {
126			return templ_7745c5c3_Err
127		}
128		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "\" defer></script><script src=\"")
129		if templ_7745c5c3_Err != nil {
130			return templ_7745c5c3_Err
131		}
132		var templ_7745c5c3_Var9 string
133		templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.Live)
134		if templ_7745c5c3_Err != nil {
135			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 26, Col: 30}
136		}
137		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var9)
138		if templ_7745c5c3_Err != nil {
139			return templ_7745c5c3_Err
140		}
141		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "\" defer></script><script src=\"")
142		if templ_7745c5c3_Err != nil {
143			return templ_7745c5c3_Err
144		}
145		var templ_7745c5c3_Var10 string
146		templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.SSE)
147		if templ_7745c5c3_Err != nil {
148			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 27, Col: 29}
149		}
150		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var10)
151		if templ_7745c5c3_Err != nil {
152			return templ_7745c5c3_Err
153		}
154		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "\" defer></script><script src=\"")
155		if templ_7745c5c3_Err != nil {
156			return templ_7745c5c3_Err
157		}
158		var templ_7745c5c3_Var11 string
159		templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.Store)
160		if templ_7745c5c3_Err != nil {
161			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 28, Col: 31}
162		}
163		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var11)
164		if templ_7745c5c3_Err != nil {
165			return templ_7745c5c3_Err
166		}
167		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "\" defer></script><script src=\"")
168		if templ_7745c5c3_Err != nil {
169			return templ_7745c5c3_Err
170		}
171		var templ_7745c5c3_Var12 string
172		templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.App)
173		if templ_7745c5c3_Err != nil {
174			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 29, Col: 29}
175		}
176		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var12)
177		if templ_7745c5c3_Err != nil {
178			return templ_7745c5c3_Err
179		}
180		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "\" defer></script><script src=\"")
181		if templ_7745c5c3_Err != nil {
182			return templ_7745c5c3_Err
183		}
184		var templ_7745c5c3_Var13 string
185		templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.Files)
186		if templ_7745c5c3_Err != nil {
187			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 30, Col: 31}
188		}
189		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var13)
190		if templ_7745c5c3_Err != nil {
191			return templ_7745c5c3_Err
192		}
193		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "\" defer></script><script src=\"")
194		if templ_7745c5c3_Err != nil {
195			return templ_7745c5c3_Err
196		}
197		var templ_7745c5c3_Var14 string
198		templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.Passkey)
199		if templ_7745c5c3_Err != nil {
200			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 31, Col: 33}
201		}
202		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var14)
203		if templ_7745c5c3_Err != nil {
204			return templ_7745c5c3_Err
205		}
206		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "\" defer></script><script src=\"")
207		if templ_7745c5c3_Err != nil {
208			return templ_7745c5c3_Err
209		}
210		var templ_7745c5c3_Var15 string
211		templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.Log)
212		if templ_7745c5c3_Err != nil {
213			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 32, Col: 29}
214		}
215		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var15)
216		if templ_7745c5c3_Err != nil {
217			return templ_7745c5c3_Err
218		}
219		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "\" defer></script>")
220		if templ_7745c5c3_Err != nil {
221			return templ_7745c5c3_Err
222		}
223		if l.MR {
224			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "<script src=\"")
225			if templ_7745c5c3_Err != nil {
226				return templ_7745c5c3_Err
227			}
228			var templ_7745c5c3_Var16 string
229			templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.MR)
230			if templ_7745c5c3_Err != nil {
231				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 34, Col: 29}
232			}
233			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16)
234			if templ_7745c5c3_Err != nil {
235				return templ_7745c5c3_Err
236			}
237			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "\" defer></script>")
238			if templ_7745c5c3_Err != nil {
239				return templ_7745c5c3_Err
240			}
241		}
242		if l.IssueForm {
243			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "<script src=\"")
244			if templ_7745c5c3_Err != nil {
245				return templ_7745c5c3_Err
246			}
247			var templ_7745c5c3_Var17 string
248			templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.IssueForm)
249			if templ_7745c5c3_Err != nil {
250				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 37, Col: 36}
251			}
252			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var17)
253			if templ_7745c5c3_Err != nil {
254				return templ_7745c5c3_Err
255			}
256			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "\" defer></script>")
257			if templ_7745c5c3_Err != nil {
258				return templ_7745c5c3_Err
259			}
260		}
261		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "</head><body data-ref=\"")
262		if templ_7745c5c3_Err != nil {
263			return templ_7745c5c3_Err
264		}
265		var templ_7745c5c3_Var18 string
266		templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.RefPath)
267		if templ_7745c5c3_Err != nil {
268			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 41, Col: 23}
269		}
270		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var18)
271		if templ_7745c5c3_Err != nil {
272			return templ_7745c5c3_Err
273		}
274		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "\" data-sha=\"")
275		if templ_7745c5c3_Err != nil {
276			return templ_7745c5c3_Err
277		}
278		var templ_7745c5c3_Var19 string
279		templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.SHA)
280		if templ_7745c5c3_Err != nil {
281			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 42, Col: 19}
282		}
283		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var19)
284		if templ_7745c5c3_Err != nil {
285			return templ_7745c5c3_Err
286		}
287		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "\" data-sel=\"\" data-nav=\"\"")
288		if templ_7745c5c3_Err != nil {
289			return templ_7745c5c3_Err
290		}
291		if l.PathsURL != "" {
292			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, " data-paths=\"")
293			if templ_7745c5c3_Err != nil {
294				return templ_7745c5c3_Err
295			}
296			var templ_7745c5c3_Var20 string
297			templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.PathsURL)
298			if templ_7745c5c3_Err != nil {
299				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 46, Col: 27}
300			}
301			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var20)
302			if templ_7745c5c3_Err != nil {
303				return templ_7745c5c3_Err
304			}
305			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "\" data-blob=\"")
306			if templ_7745c5c3_Err != nil {
307				return templ_7745c5c3_Err
308			}
309			var templ_7745c5c3_Var21 string
310			templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.BlobBase)
311			if templ_7745c5c3_Err != nil {
312				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 47, Col: 26}
313			}
314			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var21)
315			if templ_7745c5c3_Err != nil {
316				return templ_7745c5c3_Err
317			}
318			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "\"")
319			if templ_7745c5c3_Err != nil {
320				return templ_7745c5c3_Err
321			}
322		}
323		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "><a class=\"skip\" href=\"#main\">skip to content</a>")
324		if templ_7745c5c3_Err != nil {
325			return templ_7745c5c3_Err
326		}
327		templ_7745c5c3_Err = Header(l).Render(ctx, templ_7745c5c3_Buffer)
328		if templ_7745c5c3_Err != nil {
329			return templ_7745c5c3_Err
330		}
331		var templ_7745c5c3_Var22 = []any{"work", templ.KV("has-rail", l.HasRail && rail != nil)}
332		templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var22...)
333		if templ_7745c5c3_Err != nil {
334			return templ_7745c5c3_Err
335		}
336		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "<div class=\"")
337		if templ_7745c5c3_Err != nil {
338			return templ_7745c5c3_Err
339		}
340		var templ_7745c5c3_Var23 string
341		templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var22).String())
342		if templ_7745c5c3_Err != nil {
343			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 1, Col: 0}
344		}
345		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var23)
346		if templ_7745c5c3_Err != nil {
347			return templ_7745c5c3_Err
348		}
349		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "\">")
350		if templ_7745c5c3_Err != nil {
351			return templ_7745c5c3_Err
352		}
353		if l.Lede != "" {
354			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "<section class=\"work-lede\" aria-label=\"Description\"><p class=\"lede\">")
355			if templ_7745c5c3_Err != nil {
356				return templ_7745c5c3_Err
357			}
358			var templ_7745c5c3_Var24 string
359			templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(l.Lede)
360			if templ_7745c5c3_Err != nil {
361				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 54, Col: 81}
362			}
363			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
364			if templ_7745c5c3_Err != nil {
365				return templ_7745c5c3_Err
366			}
367			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "</p></section>")
368			if templ_7745c5c3_Err != nil {
369				return templ_7745c5c3_Err
370			}
371		}
372		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "<main id=\"main\" tabindex=\"-1\">")
373		if templ_7745c5c3_Err != nil {
374			return templ_7745c5c3_Err
375		}
376		templ_7745c5c3_Err = templ_7745c5c3_Var1.Render(ctx, templ_7745c5c3_Buffer)
377		if templ_7745c5c3_Err != nil {
378			return templ_7745c5c3_Err
379		}
380		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "</main>")
381		if templ_7745c5c3_Err != nil {
382			return templ_7745c5c3_Err
383		}
384		if l.HasRail && rail != nil {
385			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "<aside class=\"rail\" aria-label=\"Context\">")
386			if templ_7745c5c3_Err != nil {
387				return templ_7745c5c3_Err
388			}
389			templ_7745c5c3_Err = rail.Render(ctx, templ_7745c5c3_Buffer)
390			if templ_7745c5c3_Err != nil {
391				return templ_7745c5c3_Err
392			}
393			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "</aside>")
394			if templ_7745c5c3_Err != nil {
395				return templ_7745c5c3_Err
396			}
397		}
398		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "</div>")
399		if templ_7745c5c3_Err != nil {
400			return templ_7745c5c3_Err
401		}
402		templ_7745c5c3_Err = Footer(l).Render(ctx, templ_7745c5c3_Buffer)
403		if templ_7745c5c3_Err != nil {
404			return templ_7745c5c3_Err
405		}
406		templ_7745c5c3_Err = Hint(l).Render(ctx, templ_7745c5c3_Buffer)
407		if templ_7745c5c3_Err != nil {
408			return templ_7745c5c3_Err
409		}
410		templ_7745c5c3_Err = OverlayHelp(l.MR).Render(ctx, templ_7745c5c3_Buffer)
411		if templ_7745c5c3_Err != nil {
412			return templ_7745c5c3_Err
413		}
414		templ_7745c5c3_Err = OverlayRefs(l).Render(ctx, templ_7745c5c3_Buffer)
415		if templ_7745c5c3_Err != nil {
416			return templ_7745c5c3_Err
417		}
418		templ_7745c5c3_Err = OverlayCmd(l.Cmd).Render(ctx, templ_7745c5c3_Buffer)
419		if templ_7745c5c3_Err != nil {
420			return templ_7745c5c3_Err
421		}
422		templ_7745c5c3_Err = Keys().Render(ctx, templ_7745c5c3_Buffer)
423		if templ_7745c5c3_Err != nil {
424			return templ_7745c5c3_Err
425		}
426		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "</body></html>")
427		if templ_7745c5c3_Err != nil {
428			return templ_7745c5c3_Err
429		}
430		return nil
431	})
432}
433
434// Header is the page header: the logo (home), the path, the ref switcher,
435// the "go to" palette and the owner; inside a repository, the tabs below.
436func Header(l Layout) templ.Component {
437	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
438		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
439		if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
440			return templ_7745c5c3_CtxErr
441		}
442		templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
443		if !templ_7745c5c3_IsBuffer {
444			defer func() {
445				templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
446				if templ_7745c5c3_Err == nil {
447					templ_7745c5c3_Err = templ_7745c5c3_BufErr
448				}
449			}()
450		}
451		ctx = templ.InitializeContext(ctx)
452		templ_7745c5c3_Var25 := templ.GetChildren(ctx)
453		if templ_7745c5c3_Var25 == nil {
454			templ_7745c5c3_Var25 = templ.NopComponent
455		}
456		ctx = templ.ClearChildren(ctx)
457		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "<header class=\"hdr\"><div class=\"hdr-top\"><a class=\"brand\" href=\"/\" data-g=\"h\" aria-label=\"home\" title=\"home (g h)\"><span class=\"brand-mark\" aria-hidden=\"true\"></span></a> ")
458		if templ_7745c5c3_Err != nil {
459			return templ_7745c5c3_Err
460		}
461		if len(l.Crumbs) > 0 {
462			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<nav class=\"crumbs\" aria-label=\"Path\"><ol>")
463			if templ_7745c5c3_Err != nil {
464				return templ_7745c5c3_Err
465			}
466			for _, c := range l.Crumbs {
467				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "<li>")
468				if templ_7745c5c3_Err != nil {
469					return templ_7745c5c3_Err
470				}
471				if c.Href != "" {
472					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "<a href=\"")
473					if templ_7745c5c3_Err != nil {
474						return templ_7745c5c3_Err
475					}
476					var templ_7745c5c3_Var26 templ.SafeURL
477					templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(c.Href))
478					if templ_7745c5c3_Err != nil {
479						return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 90, Col: 38}
480					}
481					_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))
482					if templ_7745c5c3_Err != nil {
483						return templ_7745c5c3_Err
484					}
485					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "\"")
486					if templ_7745c5c3_Err != nil {
487						return templ_7745c5c3_Err
488					}
489					if c.Current {
490						templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, " aria-current=\"page\"")
491						if templ_7745c5c3_Err != nil {
492							return templ_7745c5c3_Err
493						}
494					}
495					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, ">")
496					if templ_7745c5c3_Err != nil {
497						return templ_7745c5c3_Err
498					}
499					var templ_7745c5c3_Var27 string
500					templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(c.Label)
501					if templ_7745c5c3_Err != nil {
502						return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 94, Col: 19}
503					}
504					_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
505					if templ_7745c5c3_Err != nil {
506						return templ_7745c5c3_Err
507					}
508					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "</a>")
509					if templ_7745c5c3_Err != nil {
510						return templ_7745c5c3_Err
511					}
512				} else {
513					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "<span")
514					if templ_7745c5c3_Err != nil {
515						return templ_7745c5c3_Err
516					}
517					if c.Current {
518						templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, " aria-current=\"page\"")
519						if templ_7745c5c3_Err != nil {
520							return templ_7745c5c3_Err
521						}
522					}
523					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, ">")
524					if templ_7745c5c3_Err != nil {
525						return templ_7745c5c3_Err
526					}
527					var templ_7745c5c3_Var28 string
528					templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(c.Label)
529					if templ_7745c5c3_Err != nil {
530						return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 100, Col: 19}
531					}
532					_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28))
533					if templ_7745c5c3_Err != nil {
534						return templ_7745c5c3_Err
535					}
536					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "</span>")
537					if templ_7745c5c3_Err != nil {
538						return templ_7745c5c3_Err
539					}
540				}
541				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "</li>")
542				if templ_7745c5c3_Err != nil {
543					return templ_7745c5c3_Err
544				}
545			}
546			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "</ol></nav>")
547			if templ_7745c5c3_Err != nil {
548				return templ_7745c5c3_Err
549			}
550		}
551		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "<div class=\"hdr-acts\">")
552		if templ_7745c5c3_Err != nil {
553			return templ_7745c5c3_Err
554		}
555		if l.Ref != "" {
556			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "<a class=\"btn ref\" href=\"")
557			if templ_7745c5c3_Err != nil {
558				return templ_7745c5c3_Err
559			}
560			var templ_7745c5c3_Var29 templ.SafeURL
561			templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(repoHref(l.Repo, "refs")))
562			if templ_7745c5c3_Err != nil {
563				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 111, Col: 52}
564			}
565			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))
566			if templ_7745c5c3_Err != nil {
567				return templ_7745c5c3_Err
568			}
569			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "\" data-fire=\"refs\" aria-keyshortcuts=\"b\" title=\"switch branch or tag (b)\"><span class=\"ico i-branch\" aria-hidden=\"true\"></span> <span class=\"ref-name\">")
570			if templ_7745c5c3_Err != nil {
571				return templ_7745c5c3_Err
572			}
573			var templ_7745c5c3_Var30 string
574			templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(l.Ref)
575			if templ_7745c5c3_Err != nil {
576				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 117, Col: 36}
577			}
578			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))
579			if templ_7745c5c3_Err != nil {
580				return templ_7745c5c3_Err
581			}
582			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "</span> <span class=\"sha\">")
583			if templ_7745c5c3_Err != nil {
584				return templ_7745c5c3_Err
585			}
586			var templ_7745c5c3_Var31 string
587			templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(l.Short)
588			if templ_7745c5c3_Err != nil {
589				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 118, Col: 33}
590			}
591			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31))
592			if templ_7745c5c3_Err != nil {
593				return templ_7745c5c3_Err
594			}
595			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "</span></a> ")
596			if templ_7745c5c3_Err != nil {
597				return templ_7745c5c3_Err
598			}
599		}
600		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "<button type=\"button\" class=\"btn search\" data-js aria-haspopup=\"dialog\" aria-controls=\"panel-cmd\" aria-keyshortcuts=\"Control+K :\" title=\"go to a section, ref, file or repo (ctrl k or :)\" data-fire=\"cmd\"><span class=\"ico i-search\" aria-hidden=\"true\"></span> <span class=\"search-label\">Go to…</span> <kbd aria-hidden=\"true\">ctrl k</kbd></button> ")
601		if templ_7745c5c3_Err != nil {
602			return templ_7745c5c3_Err
603		}
604		if SignedIn(ctx) {
605			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "<form class=\"owner\" method=\"post\" action=\"/-/logout\"><span class=\"owner-badge\" title=\"signed in as the owner\"><span class=\"ico i-user\" aria-hidden=\"true\"></span>")
606			if templ_7745c5c3_Err != nil {
607				return templ_7745c5c3_Err
608			}
609			var templ_7745c5c3_Var32 string
610			templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(l.Owner)
611			if templ_7745c5c3_Err != nil {
612				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 137, Col: 123}
613			}
614			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))
615			if templ_7745c5c3_Err != nil {
616				return templ_7745c5c3_Err
617			}
618			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "</span> ")
619			if templ_7745c5c3_Err != nil {
620				return templ_7745c5c3_Err
621			}
622			if l.Passkeys {
623				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "<a class=\"btn icon\" href=\"/-/passkeys\" aria-label=\"Passkeys\" title=\"passkeys: add or remove the passkeys that sign you in\"><span class=\"ico i-key\" aria-hidden=\"true\"></span></a> ")
624				if templ_7745c5c3_Err != nil {
625					return templ_7745c5c3_Err
626				}
627			}
628			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "<button type=\"submit\" class=\"btn icon\" aria-label=\"Sign out\" title=\"sign out of this browser\"><span class=\"ico i-log-out\" aria-hidden=\"true\"></span></button></form>")
629			if templ_7745c5c3_Err != nil {
630				return templ_7745c5c3_Err
631			}
632		} else if l.Passkeys {
633			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "<a class=\"btn icon\" href=\"/-/login\" aria-label=\"Sign in\" title=\"sign in with a passkey\"><span class=\"ico i-log-in\" aria-hidden=\"true\"></span></a>")
634			if templ_7745c5c3_Err != nil {
635				return templ_7745c5c3_Err
636			}
637		}
638		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "</div></div>")
639		if templ_7745c5c3_Err != nil {
640			return templ_7745c5c3_Err
641		}
642		if len(l.Sections) > 0 {
643			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "<nav class=\"tabs\" aria-label=\"Sections\"><ul>")
644			if templ_7745c5c3_Err != nil {
645				return templ_7745c5c3_Err
646			}
647			for _, s := range l.Sections {
648				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "<li><a href=\"")
649				if templ_7745c5c3_Err != nil {
650					return templ_7745c5c3_Err
651				}
652				var templ_7745c5c3_Var33 templ.SafeURL
653				templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(s.Href))
654				if templ_7745c5c3_Err != nil {
655					return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 154, Col: 36}
656				}
657				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33))
658				if templ_7745c5c3_Err != nil {
659					return templ_7745c5c3_Err
660				}
661				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, "\" data-key=\"")
662				if templ_7745c5c3_Err != nil {
663					return templ_7745c5c3_Err
664				}
665				var templ_7745c5c3_Var34 string
666				templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.ResolveAttributeValue(s.Key)
667				if templ_7745c5c3_Err != nil {
668					return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 155, Col: 24}
669				}
670				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var34)
671				if templ_7745c5c3_Err != nil {
672					return templ_7745c5c3_Err
673				}
674				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "\" aria-keyshortcuts=\"")
675				if templ_7745c5c3_Err != nil {
676					return templ_7745c5c3_Err
677				}
678				var templ_7745c5c3_Var35 string
679				templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.ResolveAttributeValue(s.Key)
680				if templ_7745c5c3_Err != nil {
681					return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 156, Col: 33}
682				}
683				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var35)
684				if templ_7745c5c3_Err != nil {
685					return templ_7745c5c3_Err
686				}
687				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "\"")
688				if templ_7745c5c3_Err != nil {
689					return templ_7745c5c3_Err
690				}
691				if s.Current {
692					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, " aria-current=\"page\"")
693					if templ_7745c5c3_Err != nil {
694						return templ_7745c5c3_Err
695					}
696				}
697				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, ">")
698				if templ_7745c5c3_Err != nil {
699					return templ_7745c5c3_Err
700				}
701				var templ_7745c5c3_Var36 string
702				templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinStringErrs(s.Label)
703				if templ_7745c5c3_Err != nil {
704					return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 161, Col: 17}
705				}
706				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36))
707				if templ_7745c5c3_Err != nil {
708					return templ_7745c5c3_Err
709				}
710				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, " ")
711				if templ_7745c5c3_Err != nil {
712					return templ_7745c5c3_Err
713				}
714				if s.Count != "" {
715					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, "<span class=\"count\">")
716					if templ_7745c5c3_Err != nil {
717						return templ_7745c5c3_Err
718					}
719					var templ_7745c5c3_Var37 string
720					templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs(s.Count)
721					if templ_7745c5c3_Err != nil {
722						return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 163, Col: 38}
723					}
724					_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37))
725					if templ_7745c5c3_Err != nil {
726						return templ_7745c5c3_Err
727					}
728					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "<span class=\"sr\">")
729					if templ_7745c5c3_Err != nil {
730						return templ_7745c5c3_Err
731					}
732					var templ_7745c5c3_Var38 string
733					templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinStringErrs(" open")
734					if templ_7745c5c3_Err != nil {
735						return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 163, Col: 66}
736					}
737					_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38))
738					if templ_7745c5c3_Err != nil {
739						return templ_7745c5c3_Err
740					}
741					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "</span></span> ")
742					if templ_7745c5c3_Err != nil {
743						return templ_7745c5c3_Err
744					}
745				}
746				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "<kbd aria-hidden=\"true\">")
747				if templ_7745c5c3_Err != nil {
748					return templ_7745c5c3_Err
749				}
750				var templ_7745c5c3_Var39 string
751				templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinStringErrs(s.Key)
752				if templ_7745c5c3_Err != nil {
753					return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 165, Col: 39}
754				}
755				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39))
756				if templ_7745c5c3_Err != nil {
757					return templ_7745c5c3_Err
758				}
759				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "</kbd></a></li>")
760				if templ_7745c5c3_Err != nil {
761					return templ_7745c5c3_Err
762				}
763			}
764			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "</ul></nav>")
765			if templ_7745c5c3_Err != nil {
766				return templ_7745c5c3_Err
767			}
768		}
769		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "</header>")
770		if templ_7745c5c3_Err != nil {
771			return templ_7745c5c3_Err
772		}
773		return nil
774	})
775}
776
777// Footer is the version and the link to the source of the running version,
778// which the AGPL §13 asks every user of the service to be offered.
779func Footer(l Layout) templ.Component {
780	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
781		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
782		if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
783			return templ_7745c5c3_CtxErr
784		}
785		templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
786		if !templ_7745c5c3_IsBuffer {
787			defer func() {
788				templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
789				if templ_7745c5c3_Err == nil {
790					templ_7745c5c3_Err = templ_7745c5c3_BufErr
791				}
792			}()
793		}
794		ctx = templ.InitializeContext(ctx)
795		templ_7745c5c3_Var40 := templ.GetChildren(ctx)
796		if templ_7745c5c3_Var40 == nil {
797			templ_7745c5c3_Var40 = templ.NopComponent
798		}
799		ctx = templ.ClearChildren(ctx)
800		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "<footer class=\"foot\"><span>ermite ")
801		if templ_7745c5c3_Err != nil {
802			return templ_7745c5c3_Err
803		}
804		var templ_7745c5c3_Var41 string
805		templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.JoinStringErrs(l.Version)
806		if templ_7745c5c3_Err != nil {
807			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 179, Col: 26}
808		}
809		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var41))
810		if templ_7745c5c3_Err != nil {
811			return templ_7745c5c3_Err
812		}
813		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "</span> <a href=\"")
814		if templ_7745c5c3_Err != nil {
815			return templ_7745c5c3_Err
816		}
817		var templ_7745c5c3_Var42 templ.SafeURL
818		templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(l.SourceURL))
819		if templ_7745c5c3_Err != nil {
820			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 180, Col: 38}
821		}
822		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var42))
823		if templ_7745c5c3_Err != nil {
824			return templ_7745c5c3_Err
825		}
826		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, "\" rel=\"noopener\" title=\"source of this version (AGPL-3.0-or-later)\">source</a> <button type=\"button\" class=\"foot-keys\" data-js data-fire=\"help\" aria-haspopup=\"dialog\" aria-controls=\"panel-help\" aria-keyshortcuts=\"?\"><kbd aria-hidden=\"true\">?</kbd> keyboard shortcuts</button></footer>")
827		if templ_7745c5c3_Err != nil {
828			return templ_7745c5c3_Err
829		}
830		return nil
831	})
832}
833
834// Hint is the floating badge at the bottom right. It shows only what the
835// keyboard just did or what needs attention: the row position while j/k
836// move, the selected lines of a file, a flash message (permalink copied) and
837// a lost event stream. Empty, it takes no room.
838func Hint(l Layout) templ.Component {
839	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
840		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
841		if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
842			return templ_7745c5c3_CtxErr
843		}
844		templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
845		if !templ_7745c5c3_IsBuffer {
846			defer func() {
847				templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
848				if templ_7745c5c3_Err == nil {
849					templ_7745c5c3_Err = templ_7745c5c3_BufErr
850				}
851			}()
852		}
853		ctx = templ.InitializeContext(ctx)
854		templ_7745c5c3_Var43 := templ.GetChildren(ctx)
855		if templ_7745c5c3_Var43 == nil {
856			templ_7745c5c3_Var43 = templ.NopComponent
857		}
858		ctx = templ.ClearChildren(ctx)
859		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, "<div class=\"hint\" role=\"status\" aria-live=\"polite\"><span class=\"hint-nav\" :text=\"document.body.dataset.nav || ''\"></span> <span class=\"hint-sel\" :text=\"document.body.dataset.sel ? document.body.dataset.sel + ' · y permalink' : ''\"></span> <span class=\"hint-flash\" :text=\"document.body.dataset.flash || ''\"></span>")
860		if templ_7745c5c3_Err != nil {
861			return templ_7745c5c3_Err
862		}
863		templ_7745c5c3_Err = Live(l).Render(ctx, templ_7745c5c3_Buffer)
864		if templ_7745c5c3_Err != nil {
865			return templ_7745c5c3_Err
866		}
867		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, "</div>")
868		if templ_7745c5c3_Err != nil {
869			return templ_7745c5c3_Err
870		}
871		return nil
872	})
873}
874
875var _ = templruntime.GeneratedTemplate

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 2

Tags 46

↑↓ moveenter openesc close