v0.27.0 0039612

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		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "</head><body data-ref=\"")
243		if templ_7745c5c3_Err != nil {
244			return templ_7745c5c3_Err
245		}
246		var templ_7745c5c3_Var17 string
247		templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.RefPath)
248		if templ_7745c5c3_Err != nil {
249			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 38, Col: 23}
250		}
251		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var17)
252		if templ_7745c5c3_Err != nil {
253			return templ_7745c5c3_Err
254		}
255		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "\" data-sha=\"")
256		if templ_7745c5c3_Err != nil {
257			return templ_7745c5c3_Err
258		}
259		var templ_7745c5c3_Var18 string
260		templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.SHA)
261		if templ_7745c5c3_Err != nil {
262			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 39, Col: 19}
263		}
264		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var18)
265		if templ_7745c5c3_Err != nil {
266			return templ_7745c5c3_Err
267		}
268		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "\" data-sel=\"\" data-nav=\"\"")
269		if templ_7745c5c3_Err != nil {
270			return templ_7745c5c3_Err
271		}
272		if l.PathsURL != "" {
273			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, " data-paths=\"")
274			if templ_7745c5c3_Err != nil {
275				return templ_7745c5c3_Err
276			}
277			var templ_7745c5c3_Var19 string
278			templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.PathsURL)
279			if templ_7745c5c3_Err != nil {
280				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 43, Col: 27}
281			}
282			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var19)
283			if templ_7745c5c3_Err != nil {
284				return templ_7745c5c3_Err
285			}
286			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "\" data-blob=\"")
287			if templ_7745c5c3_Err != nil {
288				return templ_7745c5c3_Err
289			}
290			var templ_7745c5c3_Var20 string
291			templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.BlobBase)
292			if templ_7745c5c3_Err != nil {
293				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 44, Col: 26}
294			}
295			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var20)
296			if templ_7745c5c3_Err != nil {
297				return templ_7745c5c3_Err
298			}
299			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "\"")
300			if templ_7745c5c3_Err != nil {
301				return templ_7745c5c3_Err
302			}
303		}
304		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "><a class=\"skip\" href=\"#main\">skip to content</a>")
305		if templ_7745c5c3_Err != nil {
306			return templ_7745c5c3_Err
307		}
308		templ_7745c5c3_Err = Header(l).Render(ctx, templ_7745c5c3_Buffer)
309		if templ_7745c5c3_Err != nil {
310			return templ_7745c5c3_Err
311		}
312		var templ_7745c5c3_Var21 = []any{"work", templ.KV("has-rail", l.HasRail && rail != nil)}
313		templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var21...)
314		if templ_7745c5c3_Err != nil {
315			return templ_7745c5c3_Err
316		}
317		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<div class=\"")
318		if templ_7745c5c3_Err != nil {
319			return templ_7745c5c3_Err
320		}
321		var templ_7745c5c3_Var22 string
322		templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var21).String())
323		if templ_7745c5c3_Err != nil {
324			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 1, Col: 0}
325		}
326		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var22)
327		if templ_7745c5c3_Err != nil {
328			return templ_7745c5c3_Err
329		}
330		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "\">")
331		if templ_7745c5c3_Err != nil {
332			return templ_7745c5c3_Err
333		}
334		if l.Lede != "" {
335			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "<section class=\"work-lede\" aria-label=\"Description\"><p class=\"lede\">")
336			if templ_7745c5c3_Err != nil {
337				return templ_7745c5c3_Err
338			}
339			var templ_7745c5c3_Var23 string
340			templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(l.Lede)
341			if templ_7745c5c3_Err != nil {
342				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 51, Col: 81}
343			}
344			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
345			if templ_7745c5c3_Err != nil {
346				return templ_7745c5c3_Err
347			}
348			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "</p></section>")
349			if templ_7745c5c3_Err != nil {
350				return templ_7745c5c3_Err
351			}
352		}
353		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "<main id=\"main\" tabindex=\"-1\">")
354		if templ_7745c5c3_Err != nil {
355			return templ_7745c5c3_Err
356		}
357		templ_7745c5c3_Err = templ_7745c5c3_Var1.Render(ctx, templ_7745c5c3_Buffer)
358		if templ_7745c5c3_Err != nil {
359			return templ_7745c5c3_Err
360		}
361		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "</main>")
362		if templ_7745c5c3_Err != nil {
363			return templ_7745c5c3_Err
364		}
365		if l.HasRail && rail != nil {
366			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "<aside class=\"rail\" aria-label=\"Context\">")
367			if templ_7745c5c3_Err != nil {
368				return templ_7745c5c3_Err
369			}
370			templ_7745c5c3_Err = rail.Render(ctx, templ_7745c5c3_Buffer)
371			if templ_7745c5c3_Err != nil {
372				return templ_7745c5c3_Err
373			}
374			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "</aside>")
375			if templ_7745c5c3_Err != nil {
376				return templ_7745c5c3_Err
377			}
378		}
379		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "</div>")
380		if templ_7745c5c3_Err != nil {
381			return templ_7745c5c3_Err
382		}
383		templ_7745c5c3_Err = Footer(l).Render(ctx, templ_7745c5c3_Buffer)
384		if templ_7745c5c3_Err != nil {
385			return templ_7745c5c3_Err
386		}
387		templ_7745c5c3_Err = Hint(l).Render(ctx, templ_7745c5c3_Buffer)
388		if templ_7745c5c3_Err != nil {
389			return templ_7745c5c3_Err
390		}
391		templ_7745c5c3_Err = OverlayHelp(l.MR).Render(ctx, templ_7745c5c3_Buffer)
392		if templ_7745c5c3_Err != nil {
393			return templ_7745c5c3_Err
394		}
395		templ_7745c5c3_Err = OverlayRefs(l).Render(ctx, templ_7745c5c3_Buffer)
396		if templ_7745c5c3_Err != nil {
397			return templ_7745c5c3_Err
398		}
399		templ_7745c5c3_Err = OverlayCmd(l.Cmd).Render(ctx, templ_7745c5c3_Buffer)
400		if templ_7745c5c3_Err != nil {
401			return templ_7745c5c3_Err
402		}
403		templ_7745c5c3_Err = Keys().Render(ctx, templ_7745c5c3_Buffer)
404		if templ_7745c5c3_Err != nil {
405			return templ_7745c5c3_Err
406		}
407		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "</body></html>")
408		if templ_7745c5c3_Err != nil {
409			return templ_7745c5c3_Err
410		}
411		return nil
412	})
413}
414
415// Header is the page header: the logo (home), the path, the ref switcher,
416// the "go to" palette and the owner; inside a repository, the tabs below.
417func Header(l Layout) templ.Component {
418	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
419		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
420		if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
421			return templ_7745c5c3_CtxErr
422		}
423		templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
424		if !templ_7745c5c3_IsBuffer {
425			defer func() {
426				templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
427				if templ_7745c5c3_Err == nil {
428					templ_7745c5c3_Err = templ_7745c5c3_BufErr
429				}
430			}()
431		}
432		ctx = templ.InitializeContext(ctx)
433		templ_7745c5c3_Var24 := templ.GetChildren(ctx)
434		if templ_7745c5c3_Var24 == nil {
435			templ_7745c5c3_Var24 = templ.NopComponent
436		}
437		ctx = templ.ClearChildren(ctx)
438		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "<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> ")
439		if templ_7745c5c3_Err != nil {
440			return templ_7745c5c3_Err
441		}
442		if len(l.Crumbs) > 0 {
443			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "<nav class=\"crumbs\" aria-label=\"Path\"><ol>")
444			if templ_7745c5c3_Err != nil {
445				return templ_7745c5c3_Err
446			}
447			for _, c := range l.Crumbs {
448				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "<li>")
449				if templ_7745c5c3_Err != nil {
450					return templ_7745c5c3_Err
451				}
452				if c.Href != "" {
453					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<a href=\"")
454					if templ_7745c5c3_Err != nil {
455						return templ_7745c5c3_Err
456					}
457					var templ_7745c5c3_Var25 templ.SafeURL
458					templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(c.Href))
459					if templ_7745c5c3_Err != nil {
460						return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 87, Col: 38}
461					}
462					_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))
463					if templ_7745c5c3_Err != nil {
464						return templ_7745c5c3_Err
465					}
466					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "\"")
467					if templ_7745c5c3_Err != nil {
468						return templ_7745c5c3_Err
469					}
470					if c.Current {
471						templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, " aria-current=\"page\"")
472						if templ_7745c5c3_Err != nil {
473							return templ_7745c5c3_Err
474						}
475					}
476					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, ">")
477					if templ_7745c5c3_Err != nil {
478						return templ_7745c5c3_Err
479					}
480					var templ_7745c5c3_Var26 string
481					templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(c.Label)
482					if templ_7745c5c3_Err != nil {
483						return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 91, Col: 19}
484					}
485					_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))
486					if templ_7745c5c3_Err != nil {
487						return templ_7745c5c3_Err
488					}
489					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "</a>")
490					if templ_7745c5c3_Err != nil {
491						return templ_7745c5c3_Err
492					}
493				} else {
494					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "<span")
495					if templ_7745c5c3_Err != nil {
496						return templ_7745c5c3_Err
497					}
498					if c.Current {
499						templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, " aria-current=\"page\"")
500						if templ_7745c5c3_Err != nil {
501							return templ_7745c5c3_Err
502						}
503					}
504					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, ">")
505					if templ_7745c5c3_Err != nil {
506						return templ_7745c5c3_Err
507					}
508					var templ_7745c5c3_Var27 string
509					templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(c.Label)
510					if templ_7745c5c3_Err != nil {
511						return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 97, Col: 19}
512					}
513					_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
514					if templ_7745c5c3_Err != nil {
515						return templ_7745c5c3_Err
516					}
517					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "</span>")
518					if templ_7745c5c3_Err != nil {
519						return templ_7745c5c3_Err
520					}
521				}
522				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "</li>")
523				if templ_7745c5c3_Err != nil {
524					return templ_7745c5c3_Err
525				}
526			}
527			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "</ol></nav>")
528			if templ_7745c5c3_Err != nil {
529				return templ_7745c5c3_Err
530			}
531		}
532		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "<div class=\"hdr-acts\">")
533		if templ_7745c5c3_Err != nil {
534			return templ_7745c5c3_Err
535		}
536		if l.Ref != "" {
537			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "<a class=\"btn ref\" href=\"")
538			if templ_7745c5c3_Err != nil {
539				return templ_7745c5c3_Err
540			}
541			var templ_7745c5c3_Var28 templ.SafeURL
542			templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(repoHref(l.Repo, "refs")))
543			if templ_7745c5c3_Err != nil {
544				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 108, Col: 52}
545			}
546			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28))
547			if templ_7745c5c3_Err != nil {
548				return templ_7745c5c3_Err
549			}
550			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "\" 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\">")
551			if templ_7745c5c3_Err != nil {
552				return templ_7745c5c3_Err
553			}
554			var templ_7745c5c3_Var29 string
555			templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(l.Ref)
556			if templ_7745c5c3_Err != nil {
557				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 114, Col: 36}
558			}
559			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))
560			if templ_7745c5c3_Err != nil {
561				return templ_7745c5c3_Err
562			}
563			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "</span> <span class=\"sha\">")
564			if templ_7745c5c3_Err != nil {
565				return templ_7745c5c3_Err
566			}
567			var templ_7745c5c3_Var30 string
568			templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(l.Short)
569			if templ_7745c5c3_Err != nil {
570				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 115, Col: 33}
571			}
572			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))
573			if templ_7745c5c3_Err != nil {
574				return templ_7745c5c3_Err
575			}
576			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "</span></a> ")
577			if templ_7745c5c3_Err != nil {
578				return templ_7745c5c3_Err
579			}
580		}
581		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "<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> ")
582		if templ_7745c5c3_Err != nil {
583			return templ_7745c5c3_Err
584		}
585		if SignedIn(ctx) {
586			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "<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>")
587			if templ_7745c5c3_Err != nil {
588				return templ_7745c5c3_Err
589			}
590			var templ_7745c5c3_Var31 string
591			templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(l.Owner)
592			if templ_7745c5c3_Err != nil {
593				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 134, Col: 123}
594			}
595			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31))
596			if templ_7745c5c3_Err != nil {
597				return templ_7745c5c3_Err
598			}
599			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "</span> ")
600			if templ_7745c5c3_Err != nil {
601				return templ_7745c5c3_Err
602			}
603			if l.Passkeys {
604				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "<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> ")
605				if templ_7745c5c3_Err != nil {
606					return templ_7745c5c3_Err
607				}
608			}
609			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "<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>")
610			if templ_7745c5c3_Err != nil {
611				return templ_7745c5c3_Err
612			}
613		} else if l.Passkeys {
614			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "<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>")
615			if templ_7745c5c3_Err != nil {
616				return templ_7745c5c3_Err
617			}
618		}
619		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "</div></div>")
620		if templ_7745c5c3_Err != nil {
621			return templ_7745c5c3_Err
622		}
623		if len(l.Sections) > 0 {
624			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "<nav class=\"tabs\" aria-label=\"Sections\"><ul>")
625			if templ_7745c5c3_Err != nil {
626				return templ_7745c5c3_Err
627			}
628			for _, s := range l.Sections {
629				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "<li><a href=\"")
630				if templ_7745c5c3_Err != nil {
631					return templ_7745c5c3_Err
632				}
633				var templ_7745c5c3_Var32 templ.SafeURL
634				templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(s.Href))
635				if templ_7745c5c3_Err != nil {
636					return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 151, Col: 36}
637				}
638				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))
639				if templ_7745c5c3_Err != nil {
640					return templ_7745c5c3_Err
641				}
642				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "\" data-key=\"")
643				if templ_7745c5c3_Err != nil {
644					return templ_7745c5c3_Err
645				}
646				var templ_7745c5c3_Var33 string
647				templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.ResolveAttributeValue(s.Key)
648				if templ_7745c5c3_Err != nil {
649					return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 152, Col: 24}
650				}
651				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var33)
652				if templ_7745c5c3_Err != nil {
653					return templ_7745c5c3_Err
654				}
655				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "\" aria-keyshortcuts=\"")
656				if templ_7745c5c3_Err != nil {
657					return templ_7745c5c3_Err
658				}
659				var templ_7745c5c3_Var34 string
660				templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.ResolveAttributeValue(s.Key)
661				if templ_7745c5c3_Err != nil {
662					return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 153, Col: 33}
663				}
664				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var34)
665				if templ_7745c5c3_Err != nil {
666					return templ_7745c5c3_Err
667				}
668				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, "\"")
669				if templ_7745c5c3_Err != nil {
670					return templ_7745c5c3_Err
671				}
672				if s.Current {
673					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, " aria-current=\"page\"")
674					if templ_7745c5c3_Err != nil {
675						return templ_7745c5c3_Err
676					}
677				}
678				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, ">")
679				if templ_7745c5c3_Err != nil {
680					return templ_7745c5c3_Err
681				}
682				var templ_7745c5c3_Var35 string
683				templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(s.Label)
684				if templ_7745c5c3_Err != nil {
685					return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 158, Col: 17}
686				}
687				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35))
688				if templ_7745c5c3_Err != nil {
689					return templ_7745c5c3_Err
690				}
691				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, " ")
692				if templ_7745c5c3_Err != nil {
693					return templ_7745c5c3_Err
694				}
695				if s.Count != "" {
696					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "<span class=\"count\">")
697					if templ_7745c5c3_Err != nil {
698						return templ_7745c5c3_Err
699					}
700					var templ_7745c5c3_Var36 string
701					templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinStringErrs(s.Count)
702					if templ_7745c5c3_Err != nil {
703						return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 160, Col: 38}
704					}
705					_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36))
706					if templ_7745c5c3_Err != nil {
707						return templ_7745c5c3_Err
708					}
709					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "<span class=\"sr\">")
710					if templ_7745c5c3_Err != nil {
711						return templ_7745c5c3_Err
712					}
713					var templ_7745c5c3_Var37 string
714					templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs(" open")
715					if templ_7745c5c3_Err != nil {
716						return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 160, Col: 66}
717					}
718					_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37))
719					if templ_7745c5c3_Err != nil {
720						return templ_7745c5c3_Err
721					}
722					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, "</span></span> ")
723					if templ_7745c5c3_Err != nil {
724						return templ_7745c5c3_Err
725					}
726				}
727				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "<kbd aria-hidden=\"true\">")
728				if templ_7745c5c3_Err != nil {
729					return templ_7745c5c3_Err
730				}
731				var templ_7745c5c3_Var38 string
732				templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinStringErrs(s.Key)
733				if templ_7745c5c3_Err != nil {
734					return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 162, Col: 39}
735				}
736				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38))
737				if templ_7745c5c3_Err != nil {
738					return templ_7745c5c3_Err
739				}
740				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "</kbd></a></li>")
741				if templ_7745c5c3_Err != nil {
742					return templ_7745c5c3_Err
743				}
744			}
745			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "</ul></nav>")
746			if templ_7745c5c3_Err != nil {
747				return templ_7745c5c3_Err
748			}
749		}
750		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "</header>")
751		if templ_7745c5c3_Err != nil {
752			return templ_7745c5c3_Err
753		}
754		return nil
755	})
756}
757
758// Footer is the version and the link to the source of the running version,
759// which the AGPL §13 asks every user of the service to be offered.
760func Footer(l Layout) templ.Component {
761	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
762		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
763		if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
764			return templ_7745c5c3_CtxErr
765		}
766		templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
767		if !templ_7745c5c3_IsBuffer {
768			defer func() {
769				templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
770				if templ_7745c5c3_Err == nil {
771					templ_7745c5c3_Err = templ_7745c5c3_BufErr
772				}
773			}()
774		}
775		ctx = templ.InitializeContext(ctx)
776		templ_7745c5c3_Var39 := templ.GetChildren(ctx)
777		if templ_7745c5c3_Var39 == nil {
778			templ_7745c5c3_Var39 = templ.NopComponent
779		}
780		ctx = templ.ClearChildren(ctx)
781		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "<footer class=\"foot\"><span>ermite ")
782		if templ_7745c5c3_Err != nil {
783			return templ_7745c5c3_Err
784		}
785		var templ_7745c5c3_Var40 string
786		templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinStringErrs(l.Version)
787		if templ_7745c5c3_Err != nil {
788			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 176, Col: 26}
789		}
790		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40))
791		if templ_7745c5c3_Err != nil {
792			return templ_7745c5c3_Err
793		}
794		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "</span> <a href=\"")
795		if templ_7745c5c3_Err != nil {
796			return templ_7745c5c3_Err
797		}
798		var templ_7745c5c3_Var41 templ.SafeURL
799		templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(l.SourceURL))
800		if templ_7745c5c3_Err != nil {
801			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 177, Col: 38}
802		}
803		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var41))
804		if templ_7745c5c3_Err != nil {
805			return templ_7745c5c3_Err
806		}
807		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "\" 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>")
808		if templ_7745c5c3_Err != nil {
809			return templ_7745c5c3_Err
810		}
811		return nil
812	})
813}
814
815// Hint is the floating badge at the bottom right. It shows only what the
816// keyboard just did or what needs attention: the row position while j/k
817// move, the selected lines of a file, a flash message (permalink copied) and
818// a lost event stream. Empty, it takes no room.
819func Hint(l Layout) templ.Component {
820	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
821		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
822		if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
823			return templ_7745c5c3_CtxErr
824		}
825		templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
826		if !templ_7745c5c3_IsBuffer {
827			defer func() {
828				templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
829				if templ_7745c5c3_Err == nil {
830					templ_7745c5c3_Err = templ_7745c5c3_BufErr
831				}
832			}()
833		}
834		ctx = templ.InitializeContext(ctx)
835		templ_7745c5c3_Var42 := templ.GetChildren(ctx)
836		if templ_7745c5c3_Var42 == nil {
837			templ_7745c5c3_Var42 = templ.NopComponent
838		}
839		ctx = templ.ClearChildren(ctx)
840		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "<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>")
841		if templ_7745c5c3_Err != nil {
842			return templ_7745c5c3_Err
843		}
844		templ_7745c5c3_Err = Live(l).Render(ctx, templ_7745c5c3_Buffer)
845		if templ_7745c5c3_Err != nil {
846			return templ_7745c5c3_Err
847		}
848		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, "</div>")
849		if templ_7745c5c3_Err != nil {
850			return templ_7745c5c3_Err
851		}
852		return nil
853	})
854}
855
856var _ = 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 3

Tags 44

↑↓ moveenter openesc close