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`)
93//line navbar.qtpl:35
94 qw422016.N().S(`
95 <a class="nav-link`)
96//line navbar.qtpl:36
97 streaminsertIfEqual(qw422016, s, Config)
98//line navbar.qtpl:36
99 qw422016.N().S(`" href="/config">config</a>
100 </div>
101 </nav>
102`)
103//line navbar.qtpl:39
104}
105
106//line navbar.qtpl:39
107func WriteNavbar(qq422016 qtio422016.Writer, s Selection) {
108//line navbar.qtpl:39
109 qw422016 := qt422016.AcquireWriter(qq422016)
110//line navbar.qtpl:39
111 StreamNavbar(qw422016, s)
112//line navbar.qtpl:39
113 qt422016.ReleaseWriter(qw422016)
114//line navbar.qtpl:39
115}
116
117//line navbar.qtpl:39
118func Navbar(s Selection) string {
119//line navbar.qtpl:39
120 qb422016 := qt422016.AcquireByteBuffer()
121//line navbar.qtpl:39
122 WriteNavbar(qb422016, s)
123//line navbar.qtpl:39
124 qs422016 := string(qb422016.B)
125//line navbar.qtpl:39
126 qt422016.ReleaseByteBuffer(qb422016)
127//line navbar.qtpl:39
128 return qs422016
129//line navbar.qtpl:39
130}
131
132//line navbar.qtpl:41
133func StreamGitItemNav(qw422016 *qt422016.Writer, name, ref string, s GitSelection) {
134//line navbar.qtpl:41
135 qw422016.N().S(`
136<div class="row">
137 <h3>`)
138//line navbar.qtpl:43
139 qw422016.E().S(name)
140//line navbar.qtpl:43
141 qw422016.N().S(` `)
142//line navbar.qtpl:43
143 if ref != "" && (s == Log || s == Tree) {
144//line navbar.qtpl:43
145 qw422016.N().S(`@ `)
146//line navbar.qtpl:43
147 qw422016.E().S(ref)
148//line navbar.qtpl:43
149 }
150//line navbar.qtpl:43
151 qw422016.N().S(`</h3>
152</div>
153<div class="row">
154 <ul class="nav">
155 <li class="nav-item">
156 <a class="nav-link`)
157//line navbar.qtpl:48
158 streaminsertIfEqual(qw422016, s, Readme)
159//line navbar.qtpl:48
160 qw422016.N().S(`" aria-current="page" href="/`)
161//line navbar.qtpl:48
162 qw422016.E().S(name)
163//line navbar.qtpl:48
164 qw422016.N().S(`/about">about</a>
165 </li>
166 <li class="nav-item">
167 <a class="nav-link`)
168//line navbar.qtpl:51
169 streaminsertIfEqual(qw422016, s, Log)
170//line navbar.qtpl:51
171 qw422016.N().S(`" aria-current="page" href="/`)
172//line navbar.qtpl:51
173 qw422016.E().S(name)
174//line navbar.qtpl:51
175 qw422016.N().S(`/log/`)
176//line navbar.qtpl:51
177 qw422016.E().S(ref)
178//line navbar.qtpl:51
179 qw422016.N().S(`">log</a>
180 </li>
181 <li class="nav-item">
182 <a class="nav-link`)
183//line navbar.qtpl:54
184 streaminsertIfEqual(qw422016, s, Summary)
185//line navbar.qtpl:54
186 qw422016.N().S(`" aria-current="page" href="/`)
187//line navbar.qtpl:54
188 qw422016.E().S(name)
189//line navbar.qtpl:54
190 qw422016.N().S(`">summary</a>
191 </li>
192 <li class="nav-item">
193 <a class="nav-link`)
194//line navbar.qtpl:57
195 streaminsertIfEqual(qw422016, s, Refs)
196//line navbar.qtpl:57
197 qw422016.N().S(`" aria-current="page" href="/`)
198//line navbar.qtpl:57
199 qw422016.E().S(name)
200//line navbar.qtpl:57
201 qw422016.N().S(`/refs">refs</a>
202 </li>
203 <li class="nav-item">
204 <a class="nav-link`)
205//line navbar.qtpl:60
206 streaminsertIfEqual(qw422016, s, Tree)
207//line navbar.qtpl:60
208 qw422016.N().S(`" aria-current="page" href="/`)
209//line navbar.qtpl:60
210 qw422016.E().S(name)
211//line navbar.qtpl:60
212 qw422016.N().S(`/tree/`)
213//line navbar.qtpl:60
214 qw422016.E().S(ref)
215//line navbar.qtpl:60
216 qw422016.N().S(`">tree</a>
217 </li>
218 </ul>
219</div>
220`)
221//line navbar.qtpl:64
222}
223
224//line navbar.qtpl:64
225func WriteGitItemNav(qq422016 qtio422016.Writer, name, ref string, s GitSelection) {
226//line navbar.qtpl:64
227 qw422016 := qt422016.AcquireWriter(qq422016)
228//line navbar.qtpl:64
229 StreamGitItemNav(qw422016, name, ref, s)
230//line navbar.qtpl:64
231 qt422016.ReleaseWriter(qw422016)
232//line navbar.qtpl:64
233}
234
235//line navbar.qtpl:64
236func GitItemNav(name, ref string, s GitSelection) string {
237//line navbar.qtpl:64
238 qb422016 := qt422016.AcquireByteBuffer()
239//line navbar.qtpl:64
240 WriteGitItemNav(qb422016, name, ref, s)
241//line navbar.qtpl:64
242 qs422016 := string(qb422016.B)
243//line navbar.qtpl:64
244 qt422016.ReleaseByteBuffer(qb422016)
245//line navbar.qtpl:64
246 return qs422016
247//line navbar.qtpl:64
248}