detached 388d3be

overlays_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
13import (
14	"strconv"
15	"strings"
16)
17
18// OverlayHelp is the keyboard map panel; the keys of the merge request page
19// show on that page only.
20func OverlayHelp(mr bool) templ.Component {
21	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
22		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
23		if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
24			return templ_7745c5c3_CtxErr
25		}
26		templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
27		if !templ_7745c5c3_IsBuffer {
28			defer func() {
29				templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
30				if templ_7745c5c3_Err == nil {
31					templ_7745c5c3_Err = templ_7745c5c3_BufErr
32				}
33			}()
34		}
35		ctx = templ.InitializeContext(ctx)
36		templ_7745c5c3_Var1 := templ.GetChildren(ctx)
37		if templ_7745c5c3_Var1 == nil {
38			templ_7745c5c3_Var1 = templ.NopComponent
39		}
40		ctx = templ.ClearChildren(ctx)
41		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<dialog id=\"panel-help\" class=\"panel modal\" aria-label=\"Keyboard shortcuts\" hx-on:keydown=\"event.key === 'Escape' && (event.preventDefault(), this.close())\" hx-on:click=\"event.target === this && this.close()\"><div class=\"panel-head\"><h2>Keyboard shortcuts</h2><button type=\"button\" class=\"panel-x\" aria-label=\"Close\" hx-on:click=\"closest('dialog').close()\"><kbd>esc</kbd> close</button></div><div class=\"keys-pref\"><label><input type=\"checkbox\" id=\"keys-off\" aria-describedby=\"keys-note\" hx-on:change=\"ermite.setKeysOff(this.checked)\"> Turn off single-key shortcuts</label><p id=\"keys-note\" class=\"dim\">Single-key shortcuts are on. ctrl k and esc work whatever this says.</p></div><dl class=\"keys\"><div><dt><kbd>ctrl k</kbd> <kbd>:</kbd></dt><dd>go to a section, branch, tag, file or repository</dd></div><div><dt><kbd>?</kbd></dt><dd>this list</dd></div><div><dt><kbd>j</kbd> <kbd>k</kbd></dt><dd>move the row cursor down / up</dd></div><div><dt><kbd>enter</kbd></dt><dd>open the row under the cursor; on Files, a directory opens or closes in place</dd></div><div><dt><kbd>↑</kbd> <kbd>↓</kbd> <kbd>←</kbd> <kbd>→</kbd> <kbd>home</kbd> <kbd>end</kbd></dt><dd>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</dd></div><div><dt><kbd>l</kbd> <kbd>h</kbd></dt><dd>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</dd></div><div><dt><kbd>g g</kbd> <kbd>G</kbd></dt><dd>first / last row</dd></div><div><dt><kbd>/</kbd></dt><dd>filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)</dd></div><div><dt><kbd>b</kbd></dt><dd>")
42		if templ_7745c5c3_Err != nil {
43			return templ_7745c5c3_Err
44		}
45		var templ_7745c5c3_Var2 string
46		templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs("switch")
47		if templ_7745c5c3_Err != nil {
48			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/overlays.templ`, Line: 28, Col: 43}
49		}
50		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
51		if templ_7745c5c3_Err != nil {
52			return templ_7745c5c3_Err
53		}
54		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, " branch or tag</dd></div><div><dt><kbd>s</kbd> <kbd>t</kbd> <kbd>c</kbd> <kbd>r</kbd> <kbd>m</kbd> <kbd>i</kbd></dt><dd>tabs: summary, files, commits, branches &amp; tags, merge requests, issues</dd></div><div><dt><kbd>g h</kbd></dt><dd>home</dd></div><div><dt><kbd>w</kbd></dt><dd>wide mode: use the whole width of the screen, or not (remembered)</dd></div><div><dt><kbd>y</kbd></dt><dd>copy a permalink pinned to the commit</dd></div><div><dt><kbd>d</kbd> <kbd>u</kbd> <kbd>x</kbd></dt><dd>diff: split / unified / collapse or expand all</dd></div><div><dt><kbd>e</kbd> <kbd>E</kbd></dt><dd>diff: the whole file in view / every file, with the lines the hunks hide</dd></div><div><dt><kbd>n</kbd></dt><dd>merge request: next note in the diff</dd></div>")
55		if templ_7745c5c3_Err != nil {
56			return templ_7745c5c3_Err
57		}
58		if mr {
59			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "<div><dt><kbd>g f</kbd></dt><dd>merge request: the list of files (j k move, enter opens, esc back)</dd></div><div><dt><kbd>M</kbd></dt><dd>merge request: the merge menu; there 1–3 pick the mode, D deletes the branch, enter merges</dd></div><div><dt><kbd>R</kbd></dt><dd>merge request: mark the head read</dd></div>")
60			if templ_7745c5c3_Err != nil {
61				return templ_7745c5c3_Err
62			}
63		}
64		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "<div><dt><kbd>esc</kbd></dt><dd>close a dialog, leave a field</dd></div></dl></dialog>")
65		if templ_7745c5c3_Err != nil {
66			return templ_7745c5c3_Err
67		}
68		return nil
69	})
70}
71
72// OverlayRefs is the ref switcher. It exists only inside a repository.
73func OverlayRefs(l Layout) templ.Component {
74	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
75		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
76		if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
77			return templ_7745c5c3_CtxErr
78		}
79		templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
80		if !templ_7745c5c3_IsBuffer {
81			defer func() {
82				templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
83				if templ_7745c5c3_Err == nil {
84					templ_7745c5c3_Err = templ_7745c5c3_BufErr
85				}
86			}()
87		}
88		ctx = templ.InitializeContext(ctx)
89		templ_7745c5c3_Var3 := templ.GetChildren(ctx)
90		if templ_7745c5c3_Var3 == nil {
91			templ_7745c5c3_Var3 = templ.NopComponent
92		}
93		ctx = templ.ClearChildren(ctx)
94		if l.Ref != "" {
95			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "<dialog id=\"panel-refs\" class=\"panel modal\" aria-label=\"Switch ref\" hx-on:keydown=\"event.key === 'Escape' && (event.preventDefault(), this.close())\" hx-on:click=\"event.target === this && this.close()\"><div class=\"panel-head\"><label for=\"refs-filter\" class=\"sr\">filter branches and tags</label> <input id=\"refs-filter\" type=\"search\" placeholder=\"Switch branch or tag…\" autocomplete=\"off\" data-pick=\"#panel-refs li\" hx-on:input=\"ermite.filter(this)\"> <button type=\"button\" class=\"panel-x\" aria-label=\"Close\" hx-on:click=\"closest('dialog').close()\"><kbd>esc</kbd></button></div><div class=\"panel-cols\" data-picklist><section aria-label=\"Branches\"><h2>Branches <span class=\"count\">")
96			if templ_7745c5c3_Err != nil {
97				return templ_7745c5c3_Err
98			}
99			var templ_7745c5c3_Var4 string
100			templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(len(l.Heads)))
101			if templ_7745c5c3_Err != nil {
102				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/overlays.templ`, Line: 64, Col: 58}
103			}
104			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
105			if templ_7745c5c3_Err != nil {
106				return templ_7745c5c3_Err
107			}
108			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "</span></h2><ul>")
109			if templ_7745c5c3_Err != nil {
110				return templ_7745c5c3_Err
111			}
112			for _, r := range l.Heads {
113				templ_7745c5c3_Err = refItem(r).Render(ctx, templ_7745c5c3_Buffer)
114				if templ_7745c5c3_Err != nil {
115					return templ_7745c5c3_Err
116				}
117			}
118			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "</ul></section><section aria-label=\"Tags\"><h2>Tags <span class=\"count\">")
119			if templ_7745c5c3_Err != nil {
120				return templ_7745c5c3_Err
121			}
122			var templ_7745c5c3_Var5 string
123			templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(len(l.Tags)))
124			if templ_7745c5c3_Err != nil {
125				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/overlays.templ`, Line: 72, Col: 53}
126			}
127			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
128			if templ_7745c5c3_Err != nil {
129				return templ_7745c5c3_Err
130			}
131			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "</span></h2><ul>")
132			if templ_7745c5c3_Err != nil {
133				return templ_7745c5c3_Err
134			}
135			for _, r := range l.Tags {
136				templ_7745c5c3_Err = refItem(r).Render(ctx, templ_7745c5c3_Buffer)
137				if templ_7745c5c3_Err != nil {
138					return templ_7745c5c3_Err
139				}
140			}
141			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "</ul></section></div></dialog>")
142			if templ_7745c5c3_Err != nil {
143				return templ_7745c5c3_Err
144			}
145		}
146		return nil
147	})
148}
149
150func refItem(r RefItem) templ.Component {
151	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
152		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
153		if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
154			return templ_7745c5c3_CtxErr
155		}
156		templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
157		if !templ_7745c5c3_IsBuffer {
158			defer func() {
159				templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
160				if templ_7745c5c3_Err == nil {
161					templ_7745c5c3_Err = templ_7745c5c3_BufErr
162				}
163			}()
164		}
165		ctx = templ.InitializeContext(ctx)
166		templ_7745c5c3_Var6 := templ.GetChildren(ctx)
167		if templ_7745c5c3_Var6 == nil {
168			templ_7745c5c3_Var6 = templ.NopComponent
169		}
170		ctx = templ.ClearChildren(ctx)
171		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "<li><a href=\"")
172		if templ_7745c5c3_Err != nil {
173			return templ_7745c5c3_Err
174		}
175		var templ_7745c5c3_Var7 templ.SafeURL
176		templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(r.Href))
177		if templ_7745c5c3_Err != nil {
178			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/overlays.templ`, Line: 87, Col: 31}
179		}
180		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
181		if templ_7745c5c3_Err != nil {
182			return templ_7745c5c3_Err
183		}
184		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "\"")
185		if templ_7745c5c3_Err != nil {
186			return templ_7745c5c3_Err
187		}
188		if r.Current {
189			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, " aria-current=\"true\"")
190			if templ_7745c5c3_Err != nil {
191				return templ_7745c5c3_Err
192			}
193		}
194		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "><span class=\"mark\" aria-hidden=\"true\">")
195		if templ_7745c5c3_Err != nil {
196			return templ_7745c5c3_Err
197		}
198		if r.Current {
199			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "●")
200			if templ_7745c5c3_Err != nil {
201				return templ_7745c5c3_Err
202			}
203		} else {
204			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "&nbsp;")
205			if templ_7745c5c3_Err != nil {
206				return templ_7745c5c3_Err
207			}
208		}
209		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "</span>")
210		if templ_7745c5c3_Err != nil {
211			return templ_7745c5c3_Err
212		}
213		var templ_7745c5c3_Var8 string
214		templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(r.Name)
215		if templ_7745c5c3_Err != nil {
216			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/overlays.templ`, Line: 98, Col: 18}
217		}
218		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
219		if templ_7745c5c3_Err != nil {
220			return templ_7745c5c3_Err
221		}
222		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "</a></li>")
223		if templ_7745c5c3_Err != nil {
224			return templ_7745c5c3_Err
225		}
226		return nil
227	})
228}
229
230// OverlayCmd is the ":" command line: one filterable list mixing sections,
231// refs and repos.
232func OverlayCmd(items []CmdItem) templ.Component {
233	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
234		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
235		if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
236			return templ_7745c5c3_CtxErr
237		}
238		templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
239		if !templ_7745c5c3_IsBuffer {
240			defer func() {
241				templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
242				if templ_7745c5c3_Err == nil {
243					templ_7745c5c3_Err = templ_7745c5c3_BufErr
244				}
245			}()
246		}
247		ctx = templ.InitializeContext(ctx)
248		templ_7745c5c3_Var9 := templ.GetChildren(ctx)
249		if templ_7745c5c3_Var9 == nil {
250			templ_7745c5c3_Var9 = templ.NopComponent
251		}
252		ctx = templ.ClearChildren(ctx)
253		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "<dialog id=\"panel-cmd\" class=\"panel modal\" aria-label=\"Go to\" hx-on:close=\"ermiteFinder.paletteClose()\" hx-on:keydown=\"event.key === 'Escape' && (event.preventDefault(), this.close())\" hx-on:click=\"event.target === this && this.close()\"><div class=\"panel-head\"><label for=\"cmd-q\" class=\"sr\">go to</label> <input id=\"cmd-q\" type=\"search\" placeholder=\"Go to a section, branch, tag, file or repository…\" autocomplete=\"off\" spellcheck=\"false\" role=\"combobox\" aria-autocomplete=\"list\" aria-expanded=\"true\" aria-controls=\"cmd-list\" aria-activedescendant=\"cmd-o0\" hx-on:input=\"ermite.cmdFilter(this); ermiteFinder.palette(this)\" hx-on:keydown=\"ermite.cmdKey(event)\"> <button type=\"button\" class=\"panel-x\" aria-label=\"Close\" hx-on:click=\"closest('dialog').close()\"><kbd>esc</kbd></button></div><ul id=\"cmd-list\" class=\"cmd-list\" role=\"listbox\" aria-label=\"Targets\">")
254		if templ_7745c5c3_Err != nil {
255			return templ_7745c5c3_Err
256		}
257		for i, c := range items {
258			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "<li id=\"")
259			if templ_7745c5c3_Err != nil {
260				return templ_7745c5c3_Err
261			}
262			var templ_7745c5c3_Var10 string
263			templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.ResolveAttributeValue("cmd-o" + itoa(i))
264			if templ_7745c5c3_Err != nil {
265				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/overlays.templ`, Line: 127, Col: 30}
266			}
267			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var10)
268			if templ_7745c5c3_Err != nil {
269				return templ_7745c5c3_Err
270			}
271			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "\" role=\"option\" aria-selected=\"")
272			if templ_7745c5c3_Err != nil {
273				return templ_7745c5c3_Err
274			}
275			var templ_7745c5c3_Var11 string
276			templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.ResolveAttributeValue(strconv.FormatBool(i == 0))
277			if templ_7745c5c3_Err != nil {
278				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/overlays.templ`, Line: 127, Col: 89}
279			}
280			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var11)
281			if templ_7745c5c3_Err != nil {
282				return templ_7745c5c3_Err
283			}
284			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "\" data-k=\"")
285			if templ_7745c5c3_Err != nil {
286				return templ_7745c5c3_Err
287			}
288			var templ_7745c5c3_Var12 string
289			templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.ResolveAttributeValue(strings.ToLower(c.Kind + " " + c.Label))
290			if templ_7745c5c3_Err != nil {
291				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/overlays.templ`, Line: 127, Col: 140}
292			}
293			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var12)
294			if templ_7745c5c3_Err != nil {
295				return templ_7745c5c3_Err
296			}
297			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "\"")
298			if templ_7745c5c3_Err != nil {
299				return templ_7745c5c3_Err
300			}
301			if i == 0 {
302				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, " data-cursor")
303				if templ_7745c5c3_Err != nil {
304					return templ_7745c5c3_Err
305				}
306			}
307			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "><a href=\"")
308			if templ_7745c5c3_Err != nil {
309				return templ_7745c5c3_Err
310			}
311			var templ_7745c5c3_Var13 templ.SafeURL
312			templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(c.Href))
313			if templ_7745c5c3_Err != nil {
314				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/overlays.templ`, Line: 127, Col: 198}
315			}
316			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
317			if templ_7745c5c3_Err != nil {
318				return templ_7745c5c3_Err
319			}
320			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "\" tabindex=\"-1\"><span class=\"lbl\">")
321			if templ_7745c5c3_Err != nil {
322				return templ_7745c5c3_Err
323			}
324			var templ_7745c5c3_Var14 string
325			templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(c.Label)
326			if templ_7745c5c3_Err != nil {
327				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/overlays.templ`, Line: 127, Col: 242}
328			}
329			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
330			if templ_7745c5c3_Err != nil {
331				return templ_7745c5c3_Err
332			}
333			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "</span><span class=\"k\">")
334			if templ_7745c5c3_Err != nil {
335				return templ_7745c5c3_Err
336			}
337			var templ_7745c5c3_Var15 string
338			templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(c.Kind)
339			if templ_7745c5c3_Err != nil {
340				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/overlays.templ`, Line: 127, Col: 275}
341			}
342			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
343			if templ_7745c5c3_Err != nil {
344				return templ_7745c5c3_Err
345			}
346			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "</span></a></li>")
347			if templ_7745c5c3_Err != nil {
348				return templ_7745c5c3_Err
349			}
350		}
351		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "<li id=\"")
352		if templ_7745c5c3_Err != nil {
353			return templ_7745c5c3_Err
354		}
355		var templ_7745c5c3_Var16 string
356		templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.ResolveAttributeValue("cmd-o" + itoa(len(items)))
357		if templ_7745c5c3_Err != nil {
358			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/overlays.templ`, Line: 129, Col: 38}
359		}
360		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16)
361		if templ_7745c5c3_Err != nil {
362			return templ_7745c5c3_Err
363		}
364		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "\" role=\"option\" aria-selected=\"false\" data-k=\"action turn single-key shortcuts on off keyboard\"><a href=\"#\" data-fire=\"keys\" tabindex=\"-1\"><span class=\"lbl\">turn single-key shortcuts off</span><span class=\"k\">action</span></a></li></ul><p class=\"panel-foot\"><span><kbd>↑</kbd><kbd>↓</kbd> move</span><span><kbd>enter</kbd> open</span><span><kbd>esc</kbd> close</span></p></dialog>")
365		if templ_7745c5c3_Err != nil {
366			return templ_7745c5c3_Err
367		}
368		return nil
369	})
370}
371
372var _ = 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 4

Tags 45

↑↓ moveenter openesc close