cerrado @ 058274fcc304279b1f4fe5effb683bee1a67f494

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