1// Code generated by qtc from "navbar.qtpl". DO NOT EDIT.
2// See https://github.com/valyala/quicktemplate for details.
3
4//line navbar.qtpl:1
5package templates
6
7//line navbar.qtpl:1
8import (
9 qtio422016 "io"
10
11 qt422016 "github.com/valyala/quicktemplate"
12)
13
14//line navbar.qtpl:1
15var (
16 _ = qtio422016.Copy
17 _ = qt422016.AcquireByteBuffer
18)
19
20//line navbar.qtpl:2
21type Selection int
22
23const (
24 Git Selection = iota
25 List
26 About
27 Config
28)
29
30//line navbar.qtpl:12
31type GitSelection int
32
33const (
34 Readme GitSelection = iota
35 Log
36 Summary
37 Refs
38 Tree
39)
40
41//line navbar.qtpl:22
42func streaminsertIfEqual(qw422016 *qt422016.Writer, s, d any) {
43//line navbar.qtpl:22
44 if s == d {
45//line navbar.qtpl:22
46 qw422016.N().S(` selected`)
47//line navbar.qtpl:22
48 }
49//line navbar.qtpl:22
50}
51
52//line navbar.qtpl:22
53func writeinsertIfEqual(qq422016 qtio422016.Writer, s, d any) {
54//line navbar.qtpl:22
55 qw422016 := qt422016.AcquireWriter(qq422016)
56//line navbar.qtpl:22
57 streaminsertIfEqual(qw422016, s, d)
58//line navbar.qtpl:22
59 qt422016.ReleaseWriter(qw422016)
60//line navbar.qtpl:22
61}
62
63//line navbar.qtpl:22
64func insertIfEqual(s, d any) string {
65//line navbar.qtpl:22
66 qb422016 := qt422016.AcquireByteBuffer()
67//line navbar.qtpl:22
68 writeinsertIfEqual(qb422016, s, d)
69//line navbar.qtpl:22
70 qs422016 := string(qb422016.B)
71//line navbar.qtpl:22
72 qt422016.ReleaseByteBuffer(qb422016)
73//line navbar.qtpl:22
74 return qs422016
75//line navbar.qtpl:22
76}
77
78//line navbar.qtpl:24
79func StreamNavbar(qw422016 *qt422016.Writer, s Selection) {
80//line navbar.qtpl:24
81 qw422016.N().S(`
82 <nav class="container navbar navbar-expand">
83 <div class="navbar-nav">
84 <a class="nav-link`)
85//line navbar.qtpl:27
86 streaminsertIfEqual(qw422016, s, Git)
87//line navbar.qtpl:27
88 qw422016.N().S(`" href="/">git</a>
89`)
90//line navbar.qtpl:31
91 qw422016.N().S(`
92 <a class="nav-link`)
93//line navbar.qtpl:32
94 streaminsertIfEqual(qw422016, s, About)
95//line navbar.qtpl:32
96 qw422016.N().S(`" href="/about">about</a>
97 <a class="nav-link`)
98//line navbar.qtpl:33
99 streaminsertIfEqual(qw422016, s, Config)
100//line navbar.qtpl:33
101 qw422016.N().S(`" href="/config">config</a>
102 </div>
103 </nav>
104`)
105//line navbar.qtpl:36
106}
107
108//line navbar.qtpl:36
109func WriteNavbar(qq422016 qtio422016.Writer, s Selection) {
110//line navbar.qtpl:36
111 qw422016 := qt422016.AcquireWriter(qq422016)
112//line navbar.qtpl:36
113 StreamNavbar(qw422016, s)
114//line navbar.qtpl:36
115 qt422016.ReleaseWriter(qw422016)
116//line navbar.qtpl:36
117}
118
119//line navbar.qtpl:36
120func Navbar(s Selection) string {
121//line navbar.qtpl:36
122 qb422016 := qt422016.AcquireByteBuffer()
123//line navbar.qtpl:36
124 WriteNavbar(qb422016, s)
125//line navbar.qtpl:36
126 qs422016 := string(qb422016.B)
127//line navbar.qtpl:36
128 qt422016.ReleaseByteBuffer(qb422016)
129//line navbar.qtpl:36
130 return qs422016
131//line navbar.qtpl:36
132}
133
134//line navbar.qtpl:38
135func StreamGitItemNav(qw422016 *qt422016.Writer, name, ref string, s GitSelection) {
136//line navbar.qtpl:38
137 qw422016.N().S(`
138<div class="row">
139 <h3>`)
140//line navbar.qtpl:40
141 qw422016.E().S(name)
142//line navbar.qtpl:40
143 qw422016.N().S(` `)
144//line navbar.qtpl:40
145 if ref != "" && (s == Log || s == Tree) {
146//line navbar.qtpl:40
147 qw422016.N().S(`@ `)
148//line navbar.qtpl:40
149 qw422016.E().S(ref)
150//line navbar.qtpl:40
151 }
152//line navbar.qtpl:40
153 qw422016.N().S(`</h3>
154</div>
155<div class="row">
156 <ul class="nav">
157 <li class="nav-item">
158 <a class="nav-link`)
159//line navbar.qtpl:45
160 streaminsertIfEqual(qw422016, s, Readme)
161//line navbar.qtpl:45
162 qw422016.N().S(`" aria-current="page" href="/`)
163//line navbar.qtpl:45
164 qw422016.E().S(name)
165//line navbar.qtpl:45
166 qw422016.N().S(`/about">about</a>
167 </li>
168 <li class="nav-item">
169 <a class="nav-link`)
170//line navbar.qtpl:48
171 streaminsertIfEqual(qw422016, s, Log)
172//line navbar.qtpl:48
173 qw422016.N().S(`" aria-current="page" href="/`)
174//line navbar.qtpl:48
175 qw422016.E().S(name)
176//line navbar.qtpl:48
177 qw422016.N().S(`/log/`)
178//line navbar.qtpl:48
179 qw422016.E().S(ref)
180//line navbar.qtpl:48
181 qw422016.N().S(`">log</a>
182 </li>
183 <li class="nav-item">
184 <a class="nav-link`)
185//line navbar.qtpl:51
186 streaminsertIfEqual(qw422016, s, Summary)
187//line navbar.qtpl:51
188 qw422016.N().S(`" aria-current="page" href="/`)
189//line navbar.qtpl:51
190 qw422016.E().S(name)
191//line navbar.qtpl:51
192 qw422016.N().S(`">summary</a>
193 </li>
194 <li class="nav-item">
195 <a class="nav-link`)
196//line navbar.qtpl:54
197 streaminsertIfEqual(qw422016, s, Refs)
198//line navbar.qtpl:54
199 qw422016.N().S(`" aria-current="page" href="/`)
200//line navbar.qtpl:54
201 qw422016.E().S(name)
202//line navbar.qtpl:54
203 qw422016.N().S(`/refs">refs</a>
204 </li>
205 <li class="nav-item">
206 <a class="nav-link`)
207//line navbar.qtpl:57
208 streaminsertIfEqual(qw422016, s, Tree)
209//line navbar.qtpl:57
210 qw422016.N().S(`" aria-current="page" href="/`)
211//line navbar.qtpl:57
212 qw422016.E().S(name)
213//line navbar.qtpl:57
214 qw422016.N().S(`/tree/`)
215//line navbar.qtpl:57
216 qw422016.E().S(ref)
217//line navbar.qtpl:57
218 qw422016.N().S(`">tree</a>
219 </li>
220 </ul>
221</div>
222`)
223//line navbar.qtpl:61
224}
225
226//line navbar.qtpl:61
227func WriteGitItemNav(qq422016 qtio422016.Writer, name, ref string, s GitSelection) {
228//line navbar.qtpl:61
229 qw422016 := qt422016.AcquireWriter(qq422016)
230//line navbar.qtpl:61
231 StreamGitItemNav(qw422016, name, ref, s)
232//line navbar.qtpl:61
233 qt422016.ReleaseWriter(qw422016)
234//line navbar.qtpl:61
235}
236
237//line navbar.qtpl:61
238func GitItemNav(name, ref string, s GitSelection) string {
239//line navbar.qtpl:61
240 qb422016 := qt422016.AcquireByteBuffer()
241//line navbar.qtpl:61
242 WriteGitItemNav(qb422016, name, ref, s)
243//line navbar.qtpl:61
244 qs422016 := string(qb422016.B)
245//line navbar.qtpl:61
246 qt422016.ReleaseByteBuffer(qb422016)
247//line navbar.qtpl:61
248 return qs422016
249//line navbar.qtpl:61
250}