cerrado @ 92c57a05fab452c1de83131498552424c9c5b598

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