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:11
31func streaminsertIfEqual(qw422016 *qt422016.Writer, s, d Selection) {
32//line navbar.qtpl:11
33 if s == d {
34//line navbar.qtpl:11
35 qw422016.N().S(` selected`)
36//line navbar.qtpl:11
37 }
38//line navbar.qtpl:11
39}
40
41//line navbar.qtpl:11
42func writeinsertIfEqual(qq422016 qtio422016.Writer, s, d Selection) {
43//line navbar.qtpl:11
44 qw422016 := qt422016.AcquireWriter(qq422016)
45//line navbar.qtpl:11
46 streaminsertIfEqual(qw422016, s, d)
47//line navbar.qtpl:11
48 qt422016.ReleaseWriter(qw422016)
49//line navbar.qtpl:11
50}
51
52//line navbar.qtpl:11
53func insertIfEqual(s, d Selection) string {
54//line navbar.qtpl:11
55 qb422016 := qt422016.AcquireByteBuffer()
56//line navbar.qtpl:11
57 writeinsertIfEqual(qb422016, s, d)
58//line navbar.qtpl:11
59 qs422016 := string(qb422016.B)
60//line navbar.qtpl:11
61 qt422016.ReleaseByteBuffer(qb422016)
62//line navbar.qtpl:11
63 return qs422016
64//line navbar.qtpl:11
65}
66
67//line navbar.qtpl:14
68func StreamNavbar(qw422016 *qt422016.Writer, s Selection) {
69//line navbar.qtpl:14
70 qw422016.N().S(`
71 <nav class="container navbar navbar-expand-sm">
72 <div class="navbar-nav">
73 <a class="nav-link`)
74//line navbar.qtpl:17
75 streaminsertIfEqual(qw422016, s, Git)
76//line navbar.qtpl:17
77 qw422016.N().S(`" href="/git">git</a>
78 <a class="nav-link`)
79//line navbar.qtpl:18
80 streaminsertIfEqual(qw422016, s, List)
81//line navbar.qtpl:18
82 qw422016.N().S(`" href="/list">list</a>
83 <a class="nav-link`)
84//line navbar.qtpl:19
85 streaminsertIfEqual(qw422016, s, About)
86//line navbar.qtpl:19
87 qw422016.N().S(`" href="/about">about</a>
88 <a class="nav-link`)
89//line navbar.qtpl:20
90 streaminsertIfEqual(qw422016, s, Config)
91//line navbar.qtpl:20
92 qw422016.N().S(`" href="/config">config</a>
93 </div>
94 </nav>
95`)
96//line navbar.qtpl:23
97}
98
99//line navbar.qtpl:23
100func WriteNavbar(qq422016 qtio422016.Writer, s Selection) {
101//line navbar.qtpl:23
102 qw422016 := qt422016.AcquireWriter(qq422016)
103//line navbar.qtpl:23
104 StreamNavbar(qw422016, s)
105//line navbar.qtpl:23
106 qt422016.ReleaseWriter(qw422016)
107//line navbar.qtpl:23
108}
109
110//line navbar.qtpl:23
111func Navbar(s Selection) string {
112//line navbar.qtpl:23
113 qb422016 := qt422016.AcquireByteBuffer()
114//line navbar.qtpl:23
115 WriteNavbar(qb422016, s)
116//line navbar.qtpl:23
117 qs422016 := string(qb422016.B)
118//line navbar.qtpl:23
119 qt422016.ReleaseByteBuffer(qb422016)
120//line navbar.qtpl:23
121 return qs422016
122//line navbar.qtpl:23
123}