aboutsummaryrefslogtreecommitdiff
path: root/templates/navbar.qtpl.go
diff options
context:
space:
mode:
Diffstat (limited to 'templates/navbar.qtpl.go')
-rw-r--r--templates/navbar.qtpl.go123
1 files changed, 123 insertions, 0 deletions
diff --git a/templates/navbar.qtpl.go b/templates/navbar.qtpl.go
new file mode 100644
index 0000000..e2b738c
--- /dev/null
+++ b/templates/navbar.qtpl.go
@@ -0,0 +1,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-sm">
+ <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">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
+}