v0.21.0 ef38ad0

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

↑↓ moveenter openesc close