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.go188
1 files changed, 145 insertions, 43 deletions
diff --git a/templates/navbar.qtpl.go b/templates/navbar.qtpl.go
index 1caade2..acf21b4 100644
--- a/templates/navbar.qtpl.go
+++ b/templates/navbar.qtpl.go
@@ -27,97 +27,199 @@ const (
Config
)
-//line navbar.qtpl:11
-func streaminsertIfEqual(qw422016 *qt422016.Writer, s, d Selection) {
-//line navbar.qtpl:11
+//line navbar.qtpl:12
+type GitSelection int
+
+const (
+ Readme GitSelection = iota
+ Log
+ Summary
+ Refs
+ Tree
+)
+
+//line navbar.qtpl:22
+func streaminsertIfEqual(qw422016 *qt422016.Writer, s, d any) {
+//line navbar.qtpl:22
if s == d {
-//line navbar.qtpl:11
+//line navbar.qtpl:22
qw422016.N().S(` selected`)
-//line navbar.qtpl:11
+//line navbar.qtpl:22
}
-//line navbar.qtpl:11
+//line navbar.qtpl:22
}
-//line navbar.qtpl:11
-func writeinsertIfEqual(qq422016 qtio422016.Writer, s, d Selection) {
-//line navbar.qtpl:11
+//line navbar.qtpl:22
+func writeinsertIfEqual(qq422016 qtio422016.Writer, s, d any) {
+//line navbar.qtpl:22
qw422016 := qt422016.AcquireWriter(qq422016)
-//line navbar.qtpl:11
+//line navbar.qtpl:22
streaminsertIfEqual(qw422016, s, d)
-//line navbar.qtpl:11
+//line navbar.qtpl:22
qt422016.ReleaseWriter(qw422016)
-//line navbar.qtpl:11
+//line navbar.qtpl:22
}
-//line navbar.qtpl:11
-func insertIfEqual(s, d Selection) string {
-//line navbar.qtpl:11
+//line navbar.qtpl:22
+func insertIfEqual(s, d any) string {
+//line navbar.qtpl:22
qb422016 := qt422016.AcquireByteBuffer()
-//line navbar.qtpl:11
+//line navbar.qtpl:22
writeinsertIfEqual(qb422016, s, d)
-//line navbar.qtpl:11
+//line navbar.qtpl:22
qs422016 := string(qb422016.B)
-//line navbar.qtpl:11
+//line navbar.qtpl:22
qt422016.ReleaseByteBuffer(qb422016)
-//line navbar.qtpl:11
+//line navbar.qtpl:22
return qs422016
-//line navbar.qtpl:11
+//line navbar.qtpl:22
}
-//line navbar.qtpl:14
+//line navbar.qtpl:24
func StreamNavbar(qw422016 *qt422016.Writer, s Selection) {
-//line navbar.qtpl:14
+//line navbar.qtpl:24
qw422016.N().S(`
<nav class="container navbar navbar-expand">
<div class="navbar-nav">
<a class="nav-link`)
-//line navbar.qtpl:17
+//line navbar.qtpl:27
streaminsertIfEqual(qw422016, s, Git)
-//line navbar.qtpl:17
+//line navbar.qtpl:27
qw422016.N().S(`" href="/">git</a>
<a class="nav-link`)
-//line navbar.qtpl:18
+//line navbar.qtpl:28
streaminsertIfEqual(qw422016, s, List)
-//line navbar.qtpl:18
+//line navbar.qtpl:28
qw422016.N().S(`" href="/list">list</a>
<a class="nav-link`)
-//line navbar.qtpl:19
+//line navbar.qtpl:29
streaminsertIfEqual(qw422016, s, About)
-//line navbar.qtpl:19
+//line navbar.qtpl:29
qw422016.N().S(`" href="/about">about</a>
<a class="nav-link`)
-//line navbar.qtpl:20
+//line navbar.qtpl:30
streaminsertIfEqual(qw422016, s, Config)
-//line navbar.qtpl:20
+//line navbar.qtpl:30
qw422016.N().S(`" href="/config">config</a>
</div>
</nav>
`)
-//line navbar.qtpl:23
+//line navbar.qtpl:33
}
-//line navbar.qtpl:23
+//line navbar.qtpl:33
func WriteNavbar(qq422016 qtio422016.Writer, s Selection) {
-//line navbar.qtpl:23
+//line navbar.qtpl:33
qw422016 := qt422016.AcquireWriter(qq422016)
-//line navbar.qtpl:23
+//line navbar.qtpl:33
StreamNavbar(qw422016, s)
-//line navbar.qtpl:23
+//line navbar.qtpl:33
qt422016.ReleaseWriter(qw422016)
-//line navbar.qtpl:23
+//line navbar.qtpl:33
}
-//line navbar.qtpl:23
+//line navbar.qtpl:33
func Navbar(s Selection) string {
-//line navbar.qtpl:23
+//line navbar.qtpl:33
qb422016 := qt422016.AcquireByteBuffer()
-//line navbar.qtpl:23
+//line navbar.qtpl:33
WriteNavbar(qb422016, s)
-//line navbar.qtpl:23
+//line navbar.qtpl:33
+ qs422016 := string(qb422016.B)
+//line navbar.qtpl:33
+ qt422016.ReleaseByteBuffer(qb422016)
+//line navbar.qtpl:33
+ return qs422016
+//line navbar.qtpl:33
+}
+
+//line navbar.qtpl:35
+func StreamGitItemNav(qw422016 *qt422016.Writer, name string, s GitSelection) {
+//line navbar.qtpl:35
+ qw422016.N().S(`
+ <ul class="nav">
+ <li class="nav-item">
+ <a class="nav-link`)
+//line navbar.qtpl:38
+ streaminsertIfEqual(qw422016, s, Readme)
+//line navbar.qtpl:38
+ qw422016.N().S(`" aria-current="page" href="/`)
+//line navbar.qtpl:38
+ qw422016.E().S(name)
+//line navbar.qtpl:38
+ qw422016.N().S(`/about">about</a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link`)
+//line navbar.qtpl:41
+ streaminsertIfEqual(qw422016, s, Log)
+//line navbar.qtpl:41
+ qw422016.N().S(`" aria-current="page" href="/`)
+//line navbar.qtpl:41
+ qw422016.E().S(name)
+//line navbar.qtpl:41
+ qw422016.N().S(`/log">log</a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link`)
+//line navbar.qtpl:44
+ streaminsertIfEqual(qw422016, s, Summary)
+//line navbar.qtpl:44
+ qw422016.N().S(`" aria-current="page" href="/`)
+//line navbar.qtpl:44
+ qw422016.E().S(name)
+//line navbar.qtpl:44
+ qw422016.N().S(`/summary">summary</a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link`)
+//line navbar.qtpl:47
+ streaminsertIfEqual(qw422016, s, Refs)
+//line navbar.qtpl:47
+ qw422016.N().S(`" aria-current="page" href="/`)
+//line navbar.qtpl:47
+ qw422016.E().S(name)
+//line navbar.qtpl:47
+ qw422016.N().S(`/refs">refs</a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link`)
+//line navbar.qtpl:50
+ streaminsertIfEqual(qw422016, s, Tree)
+//line navbar.qtpl:50
+ qw422016.N().S(`" aria-current="page" href="/`)
+//line navbar.qtpl:50
+ qw422016.E().S(name)
+//line navbar.qtpl:50
+ qw422016.N().S(`/tree">tree</a>
+ </li>
+ </ul>
+`)
+//line navbar.qtpl:53
+}
+
+//line navbar.qtpl:53
+func WriteGitItemNav(qq422016 qtio422016.Writer, name string, s GitSelection) {
+//line navbar.qtpl:53
+ qw422016 := qt422016.AcquireWriter(qq422016)
+//line navbar.qtpl:53
+ StreamGitItemNav(qw422016, name, s)
+//line navbar.qtpl:53
+ qt422016.ReleaseWriter(qw422016)
+//line navbar.qtpl:53
+}
+
+//line navbar.qtpl:53
+func GitItemNav(name string, s GitSelection) string {
+//line navbar.qtpl:53
+ qb422016 := qt422016.AcquireByteBuffer()
+//line navbar.qtpl:53
+ WriteGitItemNav(qb422016, name, s)
+//line navbar.qtpl:53
qs422016 := string(qb422016.B)
-//line navbar.qtpl:23
+//line navbar.qtpl:53
qt422016.ReleaseByteBuffer(qb422016)
-//line navbar.qtpl:23
+//line navbar.qtpl:53
return qs422016
-//line navbar.qtpl:23
+//line navbar.qtpl:53
}