1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
// Code generated by qtc from "navbar.qtpl". DO NOT EDIT.
// See https://github.com/valyala/quicktemplate for details.
//line navbar.qtpl:1
package templates
//line navbar.qtpl:1
import (
qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate"
)
//line navbar.qtpl:1
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
//line navbar.qtpl:2
type Selection int
const (
Git Selection = iota
List
About
Config
)
//line navbar.qtpl:11
func streaminsertIfEqual(qw422016 *qt422016.Writer, s, d Selection) {
//line navbar.qtpl:11
if s == d {
//line navbar.qtpl:11
qw422016.N().S(` selected`)
//line navbar.qtpl:11
}
//line navbar.qtpl:11
}
//line navbar.qtpl:11
func writeinsertIfEqual(qq422016 qtio422016.Writer, s, d Selection) {
//line navbar.qtpl:11
qw422016 := qt422016.AcquireWriter(qq422016)
//line navbar.qtpl:11
streaminsertIfEqual(qw422016, s, d)
//line navbar.qtpl:11
qt422016.ReleaseWriter(qw422016)
//line navbar.qtpl:11
}
//line navbar.qtpl:11
func insertIfEqual(s, d Selection) string {
//line navbar.qtpl:11
qb422016 := qt422016.AcquireByteBuffer()
//line navbar.qtpl:11
writeinsertIfEqual(qb422016, s, d)
//line navbar.qtpl:11
qs422016 := string(qb422016.B)
//line navbar.qtpl:11
qt422016.ReleaseByteBuffer(qb422016)
//line navbar.qtpl:11
return qs422016
//line navbar.qtpl:11
}
//line navbar.qtpl:14
func StreamNavbar(qw422016 *qt422016.Writer, s Selection) {
//line navbar.qtpl:14
qw422016.N().S(`
<nav class="container navbar navbar-expand">
<div class="navbar-nav">
<a class="nav-link`)
//line navbar.qtpl:17
streaminsertIfEqual(qw422016, s, Git)
//line navbar.qtpl:17
qw422016.N().S(`" href="/">git</a>
<a class="nav-link`)
//line navbar.qtpl:18
streaminsertIfEqual(qw422016, s, List)
//line navbar.qtpl:18
qw422016.N().S(`" href="/list">list</a>
<a class="nav-link`)
//line navbar.qtpl:19
streaminsertIfEqual(qw422016, s, About)
//line navbar.qtpl:19
qw422016.N().S(`" href="/about">about</a>
<a class="nav-link`)
//line navbar.qtpl:20
streaminsertIfEqual(qw422016, s, Config)
//line navbar.qtpl:20
qw422016.N().S(`" href="/config">config</a>
</div>
</nav>
`)
//line navbar.qtpl:23
}
//line navbar.qtpl:23
func WriteNavbar(qq422016 qtio422016.Writer, s Selection) {
//line navbar.qtpl:23
qw422016 := qt422016.AcquireWriter(qq422016)
//line navbar.qtpl:23
StreamNavbar(qw422016, s)
//line navbar.qtpl:23
qt422016.ReleaseWriter(qw422016)
//line navbar.qtpl:23
}
//line navbar.qtpl:23
func Navbar(s Selection) string {
//line navbar.qtpl:23
qb422016 := qt422016.AcquireByteBuffer()
//line navbar.qtpl:23
WriteNavbar(qb422016, s)
//line navbar.qtpl:23
qs422016 := string(qb422016.B)
//line navbar.qtpl:23
qt422016.ReleaseByteBuffer(qb422016)
//line navbar.qtpl:23
return qs422016
//line navbar.qtpl:23
}
|