cerrado @ 2eea4b27109e6f958a31890844e2bb69fbc21a48

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