diff options
author | Gabriel A. Giovanini <mail@gabrielgio.me> | 2024-06-07 23:02:54 +0200 |
---|---|---|
committer | Gabriel A. Giovanini <mail@gabrielgio.me> | 2024-06-07 23:02:54 +0200 |
commit | e9098e00fb6339b759df5b0df2e086cef8a7ce83 (patch) | |
tree | 97ada52833cf152cf347f418e24ccb5bc05fd5e4 /templates | |
parent | c7a8aa113a914e70e027fea93265c7232b865b5e (diff) | |
download | cerrado-e9098e00fb6339b759df5b0df2e086cef8a7ce83.tar.gz cerrado-e9098e00fb6339b759df5b0df2e086cef8a7ce83.tar.bz2 cerrado-e9098e00fb6339b759df5b0df2e086cef8a7ce83.zip |
feat: Rework some pages
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base.qtpl | 2 | ||||
-rw-r--r-- | templates/base.qtpl.go | 2 | ||||
-rw-r--r-- | templates/gititemlog.qtpl | 4 | ||||
-rw-r--r-- | templates/gititemlog.qtpl.go | 8 | ||||
-rw-r--r-- | templates/gititemtree.qtpl | 24 | ||||
-rw-r--r-- | templates/gititemtree.qtpl.go | 114 | ||||
-rw-r--r-- | templates/gitlist.qtpl | 11 | ||||
-rw-r--r-- | templates/gitlist.qtpl.go | 159 | ||||
-rw-r--r-- | templates/navbar.qtpl | 3 | ||||
-rw-r--r-- | templates/navbar.qtpl.go | 130 |
10 files changed, 239 insertions, 218 deletions
diff --git a/templates/base.qtpl b/templates/base.qtpl index 497aa6d..9b0c4f5 100644 --- a/templates/base.qtpl +++ b/templates/base.qtpl @@ -26,7 +26,7 @@ Page { %} {% code func TimeFormat(t time.Time) string { - return t.Format("2006-01-02") + return t.Format("02.01.2006") } %} diff --git a/templates/base.qtpl.go b/templates/base.qtpl.go index 5f39e8d..d2bcc73 100644 --- a/templates/base.qtpl.go +++ b/templates/base.qtpl.go @@ -68,7 +68,7 @@ func FromUInttoString(u *uint) string { //line base.qtpl:28 func TimeFormat(t time.Time) string { - return t.Format("2006-01-02") + return t.Format("02.01.2006") } //line base.qtpl:33 diff --git a/templates/gititemlog.qtpl b/templates/gititemlog.qtpl index e037c52..ef473b7 100644 --- a/templates/gititemlog.qtpl +++ b/templates/gititemlog.qtpl @@ -15,11 +15,11 @@ type GitItemLogPage struct { <div class="col-xxl-2"> {%s TimeFormat(c.Committer.When) %} </div> - <div class="col-xxl-7"> + <div class="col-xxl-7 code-view"> <pre>{%s c.Message %}</pre> </div> <div class="col-xxl-3"> - <small>{%s c.Committer.Name %}</small> + <small>{%s c.Committer.Name %} <{%s c.Committer.Email %}></small> </div> </div> {% endfor %} diff --git a/templates/gititemlog.qtpl.go b/templates/gititemlog.qtpl.go index 47e700d..e3bac41 100644 --- a/templates/gititemlog.qtpl.go +++ b/templates/gititemlog.qtpl.go @@ -76,7 +76,7 @@ func (g *GitItemLogPage) StreamGitContent(qw422016 *qt422016.Writer) { //line gititemlog.qtpl:16 qw422016.N().S(` </div> - <div class="col-xxl-7"> + <div class="col-xxl-7 code-view"> <pre>`) //line gititemlog.qtpl:19 qw422016.E().S(c.Message) @@ -88,7 +88,11 @@ func (g *GitItemLogPage) StreamGitContent(qw422016 *qt422016.Writer) { //line gititemlog.qtpl:22 qw422016.E().S(c.Committer.Name) //line gititemlog.qtpl:22 - qw422016.N().S(`</small> + qw422016.N().S(` <`) +//line gititemlog.qtpl:22 + qw422016.E().S(c.Committer.Email) +//line gititemlog.qtpl:22 + qw422016.N().S(`></small> </div> </div> `) diff --git a/templates/gititemtree.qtpl b/templates/gititemtree.qtpl index be7a27d..68b9856 100644 --- a/templates/gititemtree.qtpl +++ b/templates/gititemtree.qtpl @@ -14,15 +14,21 @@ type GitItemTreePage struct { {% func (g *GitItemTreePage) Nav(name, ref string) %}{%= GitItemNav(name, ref, Tree) %}{% endfunc %} {% func (g *GitItemTreePage) GitContent() %} -{% for _, e := range g.Tree.Entries %} <div class="row"> - <div class="col">{%s Ignore(e.Mode.ToOSFileMode()).String() %}</div> - {% if e.Mode.IsFile() %} - <div class="col-md"><a href="/{%s g.Name %}/blob/{%s g.Ref%}/{%s g.CurrentPath %}/{%s e.Name %}">{%s e.Name %}</a></div> - {% else %} - <div class="col-md"><a href="./{%s g.CurrentPath %}/{%s e.Name %}">{%s e.Name %}</a></div> - {% endif %} - <div class="col-md">{%dl Ignore(g.Tree.Size(e.Name))%} KiB</div> + <div class="col-md-12"> + <div class="tree-list"> + {% for _, e := range g.Tree.Entries %} + <div class="mode">{%s Ignore(e.Mode.ToOSFileMode()).String() %}</div> + {% if e.Mode.IsFile() %} + <div class="name blob"><a href="/{%s g.Name %}/blob/{%s g.Ref%}/{%s g.CurrentPath %}/{%s e.Name %}">{%s e.Name %}</a></div> + {% else %} + <div class="name tree"><a href="./{%s g.CurrentPath %}/{%s e.Name %}">{%s e.Name %}</a></div> + {% endif %} + <div class="commit"></div> + <div class="date"></div> + <div class="size">{%dl Ignore(g.Tree.Size(e.Name))%} KiB</div> + {% endfor %} + </div> + </div> </div> -{% endfor %} {% endfunc %} diff --git a/templates/gititemtree.qtpl.go b/templates/gititemtree.qtpl.go index cdc374f..546cb13 100644 --- a/templates/gititemtree.qtpl.go +++ b/templates/gititemtree.qtpl.go @@ -67,103 +67,109 @@ func (g *GitItemTreePage) Nav(name, ref string) string { func (g *GitItemTreePage) StreamGitContent(qw422016 *qt422016.Writer) { //line gititemtree.qtpl:16 qw422016.N().S(` -`) -//line gititemtree.qtpl:17 +<div class="row"> + <div class="col-md-12"> + <div class="tree-list"> + `) +//line gititemtree.qtpl:20 for _, e := range g.Tree.Entries { -//line gititemtree.qtpl:17 +//line gititemtree.qtpl:20 qw422016.N().S(` -<div class="row"> - <div class="col">`) -//line gititemtree.qtpl:19 + <div class="mode">`) +//line gititemtree.qtpl:21 qw422016.E().S(Ignore(e.Mode.ToOSFileMode()).String()) -//line gititemtree.qtpl:19 +//line gititemtree.qtpl:21 qw422016.N().S(`</div> - `) -//line gititemtree.qtpl:20 + `) +//line gititemtree.qtpl:22 if e.Mode.IsFile() { -//line gititemtree.qtpl:20 +//line gititemtree.qtpl:22 qw422016.N().S(` - <div class="col-md"><a href="/`) -//line gititemtree.qtpl:21 + <div class="name blob"><a href="/`) +//line gititemtree.qtpl:23 qw422016.E().S(g.Name) -//line gititemtree.qtpl:21 +//line gititemtree.qtpl:23 qw422016.N().S(`/blob/`) -//line gititemtree.qtpl:21 +//line gititemtree.qtpl:23 qw422016.E().S(g.Ref) -//line gititemtree.qtpl:21 +//line gititemtree.qtpl:23 qw422016.N().S(`/`) -//line gititemtree.qtpl:21 +//line gititemtree.qtpl:23 qw422016.E().S(g.CurrentPath) -//line gititemtree.qtpl:21 +//line gititemtree.qtpl:23 qw422016.N().S(`/`) -//line gititemtree.qtpl:21 +//line gititemtree.qtpl:23 qw422016.E().S(e.Name) -//line gititemtree.qtpl:21 +//line gititemtree.qtpl:23 qw422016.N().S(`">`) -//line gititemtree.qtpl:21 +//line gititemtree.qtpl:23 qw422016.E().S(e.Name) -//line gititemtree.qtpl:21 +//line gititemtree.qtpl:23 qw422016.N().S(`</a></div> - `) -//line gititemtree.qtpl:22 + `) +//line gititemtree.qtpl:24 } else { -//line gititemtree.qtpl:22 +//line gititemtree.qtpl:24 qw422016.N().S(` - <div class="col-md"><a href="./`) -//line gititemtree.qtpl:23 + <div class="name tree"><a href="./`) +//line gititemtree.qtpl:25 qw422016.E().S(g.CurrentPath) -//line gititemtree.qtpl:23 +//line gititemtree.qtpl:25 qw422016.N().S(`/`) -//line gititemtree.qtpl:23 +//line gititemtree.qtpl:25 qw422016.E().S(e.Name) -//line gititemtree.qtpl:23 +//line gititemtree.qtpl:25 qw422016.N().S(`">`) -//line gititemtree.qtpl:23 +//line gititemtree.qtpl:25 qw422016.E().S(e.Name) -//line gititemtree.qtpl:23 +//line gititemtree.qtpl:25 qw422016.N().S(`</a></div> - `) -//line gititemtree.qtpl:24 + `) +//line gititemtree.qtpl:26 } -//line gititemtree.qtpl:24 +//line gititemtree.qtpl:26 qw422016.N().S(` - <div class="col-md">`) -//line gititemtree.qtpl:25 + <div class="commit"></div> + <div class="date"></div> + <div class="size">`) +//line gititemtree.qtpl:29 qw422016.N().DL(Ignore(g.Tree.Size(e.Name))) -//line gititemtree.qtpl:25 +//line gititemtree.qtpl:29 qw422016.N().S(` KiB</div> -</div> -`) -//line gititemtree.qtpl:27 + `) +//line gititemtree.qtpl:30 } -//line gititemtree.qtpl:27 +//line gititemtree.qtpl:30 qw422016.N().S(` + </div> + </div> +</div> `) -//line gititemtree.qtpl:28 +//line gititemtree.qtpl:34 } -//line gititemtree.qtpl:28 +//line gititemtree.qtpl:34 func (g *GitItemTreePage) WriteGitContent(qq422016 qtio422016.Writer) { -//line gititemtree.qtpl:28 +//line gititemtree.qtpl:34 qw422016 := qt422016.AcquireWriter(qq422016) -//line gititemtree.qtpl:28 +//line gititemtree.qtpl:34 g.StreamGitContent(qw422016) -//line gititemtree.qtpl:28 +//line gititemtree.qtpl:34 qt422016.ReleaseWriter(qw422016) -//line gititemtree.qtpl:28 +//line gititemtree.qtpl:34 } -//line gititemtree.qtpl:28 +//line gititemtree.qtpl:34 func (g *GitItemTreePage) GitContent() string { -//line gititemtree.qtpl:28 +//line gititemtree.qtpl:34 qb422016 := qt422016.AcquireByteBuffer() -//line gititemtree.qtpl:28 +//line gititemtree.qtpl:34 g.WriteGitContent(qb422016) -//line gititemtree.qtpl:28 +//line gititemtree.qtpl:34 qs422016 := string(qb422016.B) -//line gititemtree.qtpl:28 +//line gititemtree.qtpl:34 qt422016.ReleaseByteBuffer(qb422016) -//line gititemtree.qtpl:28 +//line gititemtree.qtpl:34 return qs422016 -//line gititemtree.qtpl:28 +//line gititemtree.qtpl:34 } diff --git a/templates/gitlist.qtpl b/templates/gitlist.qtpl index 3d7ef82..937ba22 100644 --- a/templates/gitlist.qtpl +++ b/templates/gitlist.qtpl @@ -3,6 +3,7 @@ {% code type GitListPage struct { Respositories []*service.Repository + About []byte } %} @@ -12,7 +13,7 @@ type GitListPage struct { {% func (p *GitListPage) Content() %} <div class="row"> - <div class="col-md-8 offset-md-2"> + <div class="col-md-6 order-last order-md-first"> <div class="event-list"> {% for _, r := range p.Respositories %} <div class="event"> @@ -20,8 +21,7 @@ type GitListPage struct { <a href="/{%s r.Name %}">{%s r.Name %}</a> </h4> </hr> - <p>{%s r.LastCommitMessage %}</p> - <p><small>{%s r.LastCommitDate %}</small></p> + <p>{%s r.Description %}</p> <p> <a href="/{%s r.Name %}/log/{%s r.Ref %}">log</a> <a href="/{%s r.Name %}/tree/{%s r.Ref %}">tree</a> @@ -30,9 +30,12 @@ type GitListPage struct { </div> {% endfor %} </div> - {% endfunc %} + </div> + <div id="about" class="col-md-4 order-first order-md-last"> + {%z= p.About %} </div> </div> +{% endfunc %} {% func (p *GitListPage) Script() %} {% endfunc %} diff --git a/templates/gitlist.qtpl.go b/templates/gitlist.qtpl.go index d9f7ec1..435626e 100644 --- a/templates/gitlist.qtpl.go +++ b/templates/gitlist.qtpl.go @@ -23,109 +23,105 @@ var ( //line gitlist.qtpl:4 type GitListPage struct { Respositories []*service.Repository + About []byte } -//line gitlist.qtpl:9 +//line gitlist.qtpl:10 func (p *GitListPage) StreamTitle(qw422016 *qt422016.Writer) { -//line gitlist.qtpl:9 +//line gitlist.qtpl:10 qw422016.N().S(`Git | List`) -//line gitlist.qtpl:9 +//line gitlist.qtpl:10 } -//line gitlist.qtpl:9 +//line gitlist.qtpl:10 func (p *GitListPage) WriteTitle(qq422016 qtio422016.Writer) { -//line gitlist.qtpl:9 +//line gitlist.qtpl:10 qw422016 := qt422016.AcquireWriter(qq422016) -//line gitlist.qtpl:9 +//line gitlist.qtpl:10 p.StreamTitle(qw422016) -//line gitlist.qtpl:9 +//line gitlist.qtpl:10 qt422016.ReleaseWriter(qw422016) -//line gitlist.qtpl:9 +//line gitlist.qtpl:10 } -//line gitlist.qtpl:9 +//line gitlist.qtpl:10 func (p *GitListPage) Title() string { -//line gitlist.qtpl:9 +//line gitlist.qtpl:10 qb422016 := qt422016.AcquireByteBuffer() -//line gitlist.qtpl:9 +//line gitlist.qtpl:10 p.WriteTitle(qb422016) -//line gitlist.qtpl:9 +//line gitlist.qtpl:10 qs422016 := string(qb422016.B) -//line gitlist.qtpl:9 +//line gitlist.qtpl:10 qt422016.ReleaseByteBuffer(qb422016) -//line gitlist.qtpl:9 +//line gitlist.qtpl:10 return qs422016 -//line gitlist.qtpl:9 +//line gitlist.qtpl:10 } -//line gitlist.qtpl:11 +//line gitlist.qtpl:12 func (p *GitListPage) StreamNavbar(qw422016 *qt422016.Writer) { -//line gitlist.qtpl:11 +//line gitlist.qtpl:12 StreamNavbar(qw422016, Git) -//line gitlist.qtpl:11 +//line gitlist.qtpl:12 } -//line gitlist.qtpl:11 +//line gitlist.qtpl:12 func (p *GitListPage) WriteNavbar(qq422016 qtio422016.Writer) { -//line gitlist.qtpl:11 +//line gitlist.qtpl:12 qw422016 := qt422016.AcquireWriter(qq422016) -//line gitlist.qtpl:11 +//line gitlist.qtpl:12 p.StreamNavbar(qw422016) -//line gitlist.qtpl:11 +//line gitlist.qtpl:12 qt422016.ReleaseWriter(qw422016) -//line gitlist.qtpl:11 +//line gitlist.qtpl:12 } -//line gitlist.qtpl:11 +//line gitlist.qtpl:12 func (p *GitListPage) Navbar() string { -//line gitlist.qtpl:11 +//line gitlist.qtpl:12 qb422016 := qt422016.AcquireByteBuffer() -//line gitlist.qtpl:11 +//line gitlist.qtpl:12 p.WriteNavbar(qb422016) -//line gitlist.qtpl:11 +//line gitlist.qtpl:12 qs422016 := string(qb422016.B) -//line gitlist.qtpl:11 +//line gitlist.qtpl:12 qt422016.ReleaseByteBuffer(qb422016) -//line gitlist.qtpl:11 +//line gitlist.qtpl:12 return qs422016 -//line gitlist.qtpl:11 +//line gitlist.qtpl:12 } -//line gitlist.qtpl:13 +//line gitlist.qtpl:14 func (p *GitListPage) StreamContent(qw422016 *qt422016.Writer) { -//line gitlist.qtpl:13 +//line gitlist.qtpl:14 qw422016.N().S(` <div class="row"> - <div class="col-md-8 offset-md-2"> + <div class="col-md-6 order-last order-md-first"> <div class="event-list"> `) -//line gitlist.qtpl:17 +//line gitlist.qtpl:18 for _, r := range p.Respositories { -//line gitlist.qtpl:17 +//line gitlist.qtpl:18 qw422016.N().S(` <div class="event"> <h4> <a href="/`) -//line gitlist.qtpl:20 +//line gitlist.qtpl:21 qw422016.E().S(r.Name) -//line gitlist.qtpl:20 +//line gitlist.qtpl:21 qw422016.N().S(`">`) -//line gitlist.qtpl:20 +//line gitlist.qtpl:21 qw422016.E().S(r.Name) -//line gitlist.qtpl:20 +//line gitlist.qtpl:21 qw422016.N().S(`</a> </h4> </hr> <p>`) -//line gitlist.qtpl:23 - qw422016.E().S(r.LastCommitMessage) -//line gitlist.qtpl:23 - qw422016.N().S(`</p> - <p><small>`) //line gitlist.qtpl:24 - qw422016.E().S(r.LastCommitDate) + qw422016.E().S(r.Description) //line gitlist.qtpl:24 - qw422016.N().S(`</small></p> + qw422016.N().S(`</p> <p> <a href="/`) //line gitlist.qtpl:26 @@ -158,70 +154,75 @@ func (p *GitListPage) StreamContent(qw422016 *qt422016.Writer) { //line gitlist.qtpl:31 qw422016.N().S(` </div> - `) -//line gitlist.qtpl:33 + </div> + <div id="about" class="col-md-4 order-first order-md-last"> + `) +//line gitlist.qtpl:35 + qw422016.N().Z(p.About) +//line gitlist.qtpl:35 + qw422016.N().S(` + </div> +</div> +`) +//line gitlist.qtpl:38 } -//line gitlist.qtpl:33 +//line gitlist.qtpl:38 func (p *GitListPage) WriteContent(qq422016 qtio422016.Writer) { -//line gitlist.qtpl:33 +//line gitlist.qtpl:38 qw422016 := qt422016.AcquireWriter(qq422016) -//line gitlist.qtpl:33 +//line gitlist.qtpl:38 p.StreamContent(qw422016) -//line gitlist.qtpl:33 +//line gitlist.qtpl:38 qt422016.ReleaseWriter(qw422016) -//line gitlist.qtpl:33 +//line gitlist.qtpl:38 } -//line gitlist.qtpl:33 +//line gitlist.qtpl:38 func (p *GitListPage) Content() string { -//line gitlist.qtpl:33 +//line gitlist.qtpl:38 qb422016 := qt422016.AcquireByteBuffer() -//line gitlist.qtpl:33 +//line gitlist.qtpl:38 p.WriteContent(qb422016) -//line gitlist.qtpl:33 +//line gitlist.qtpl:38 qs422016 := string(qb422016.B) -//line gitlist.qtpl:33 +//line gitlist.qtpl:38 qt422016.ReleaseByteBuffer(qb422016) -//line gitlist.qtpl:33 +//line gitlist.qtpl:38 return qs422016 -//line gitlist.qtpl:33 +//line gitlist.qtpl:38 } -// </div> -// </div> -// - -//line gitlist.qtpl:37 +//line gitlist.qtpl:40 func (p *GitListPage) StreamScript(qw422016 *qt422016.Writer) { -//line gitlist.qtpl:37 +//line gitlist.qtpl:40 qw422016.N().S(` `) -//line gitlist.qtpl:38 +//line gitlist.qtpl:41 } -//line gitlist.qtpl:38 +//line gitlist.qtpl:41 func (p *GitListPage) WriteScript(qq422016 qtio422016.Writer) { -//line gitlist.qtpl:38 +//line gitlist.qtpl:41 qw422016 := qt422016.AcquireWriter(qq422016) -//line gitlist.qtpl:38 +//line gitlist.qtpl:41 p.StreamScript(qw422016) -//line gitlist.qtpl:38 +//line gitlist.qtpl:41 qt422016.ReleaseWriter(qw422016) -//line gitlist.qtpl:38 +//line gitlist.qtpl:41 } -//line gitlist.qtpl:38 +//line gitlist.qtpl:41 func (p *GitListPage) Script() string { -//line gitlist.qtpl:38 +//line gitlist.qtpl:41 qb422016 := qt422016.AcquireByteBuffer() -//line gitlist.qtpl:38 +//line gitlist.qtpl:41 p.WriteScript(qb422016) -//line gitlist.qtpl:38 +//line gitlist.qtpl:41 qs422016 := string(qb422016.B) -//line gitlist.qtpl:38 +//line gitlist.qtpl:41 qt422016.ReleaseByteBuffer(qb422016) -//line gitlist.qtpl:38 +//line gitlist.qtpl:41 return qs422016 -//line gitlist.qtpl:38 +//line gitlist.qtpl:41 } diff --git a/templates/navbar.qtpl b/templates/navbar.qtpl index 9681fa4..4d2a6a9 100644 --- a/templates/navbar.qtpl +++ b/templates/navbar.qtpl @@ -29,7 +29,10 @@ const ( Add this back once needed <a class="nav-link{%= insertIfEqual(s, List) %}" href="/list">list</a> {% endcomment %} +{% comment %} +Add this back if needed <a class="nav-link{%= insertIfEqual(s, About) %}" href="/about">about</a> +{% endcomment %} <a class="nav-link{%= insertIfEqual(s, Config) %}" href="/config">config</a> </div> </nav> diff --git a/templates/navbar.qtpl.go b/templates/navbar.qtpl.go index a2989db..1eacd6a 100644 --- a/templates/navbar.qtpl.go +++ b/templates/navbar.qtpl.go @@ -89,162 +89,160 @@ func StreamNavbar(qw422016 *qt422016.Writer, s Selection) { `) //line navbar.qtpl:31 qw422016.N().S(` +`) +//line navbar.qtpl:35 + qw422016.N().S(` <a class="nav-link`) -//line navbar.qtpl:32 - streaminsertIfEqual(qw422016, s, About) -//line navbar.qtpl:32 - qw422016.N().S(`" href="/about">about</a> - <a class="nav-link`) -//line navbar.qtpl:33 +//line navbar.qtpl:36 streaminsertIfEqual(qw422016, s, Config) -//line navbar.qtpl:33 +//line navbar.qtpl:36 qw422016.N().S(`" href="/config">config</a> </div> </nav> `) -//line navbar.qtpl:36 +//line navbar.qtpl:39 } -//line navbar.qtpl:36 +//line navbar.qtpl:39 func WriteNavbar(qq422016 qtio422016.Writer, s Selection) { -//line navbar.qtpl:36 +//line navbar.qtpl:39 qw422016 := qt422016.AcquireWriter(qq422016) -//line navbar.qtpl:36 +//line navbar.qtpl:39 StreamNavbar(qw422016, s) -//line navbar.qtpl:36 +//line navbar.qtpl:39 qt422016.ReleaseWriter(qw422016) -//line navbar.qtpl:36 +//line navbar.qtpl:39 } -//line navbar.qtpl:36 +//line navbar.qtpl:39 func Navbar(s Selection) string { -//line navbar.qtpl:36 +//line navbar.qtpl:39 qb422016 := qt422016.AcquireByteBuffer() -//line navbar.qtpl:36 +//line navbar.qtpl:39 WriteNavbar(qb422016, s) -//line navbar.qtpl:36 +//line navbar.qtpl:39 qs422016 := string(qb422016.B) -//line navbar.qtpl:36 +//line navbar.qtpl:39 qt422016.ReleaseByteBuffer(qb422016) -//line navbar.qtpl:36 +//line navbar.qtpl:39 return qs422016 -//line navbar.qtpl:36 +//line navbar.qtpl:39 } -//line navbar.qtpl:38 +//line navbar.qtpl:41 func StreamGitItemNav(qw422016 *qt422016.Writer, name, ref string, s GitSelection) { -//line navbar.qtpl:38 +//line navbar.qtpl:41 qw422016.N().S(` <div class="row"> <h3>`) -//line navbar.qtpl:40 +//line navbar.qtpl:43 qw422016.E().S(name) -//line navbar.qtpl:40 +//line navbar.qtpl:43 qw422016.N().S(` `) -//line navbar.qtpl:40 +//line navbar.qtpl:43 if ref != "" && (s == Log || s == Tree) { -//line navbar.qtpl:40 +//line navbar.qtpl:43 qw422016.N().S(`@ `) -//line navbar.qtpl:40 +//line navbar.qtpl:43 qw422016.E().S(ref) -//line navbar.qtpl:40 +//line navbar.qtpl:43 } -//line navbar.qtpl:40 +//line navbar.qtpl:43 qw422016.N().S(`</h3> </div> <div class="row"> <ul class="nav"> <li class="nav-item"> <a class="nav-link`) -//line navbar.qtpl:45 - streaminsertIfEqual(qw422016, s, Readme) -//line navbar.qtpl:45 - qw422016.N().S(`" aria-current="page" href="/`) -//line navbar.qtpl:45 - qw422016.E().S(name) -//line navbar.qtpl:45 - qw422016.N().S(`/about">about</a> - </li> - <li class="nav-item"> - <a class="nav-link`) //line navbar.qtpl:48 - streaminsertIfEqual(qw422016, s, Log) + streaminsertIfEqual(qw422016, s, Readme) //line navbar.qtpl:48 qw422016.N().S(`" aria-current="page" href="/`) //line navbar.qtpl:48 qw422016.E().S(name) //line navbar.qtpl:48 - qw422016.N().S(`/log/`) -//line navbar.qtpl:48 - qw422016.E().S(ref) -//line navbar.qtpl:48 - qw422016.N().S(`">log</a> + qw422016.N().S(`/about">about</a> </li> <li class="nav-item"> <a class="nav-link`) //line navbar.qtpl:51 - streaminsertIfEqual(qw422016, s, Summary) + streaminsertIfEqual(qw422016, s, Log) //line navbar.qtpl:51 qw422016.N().S(`" aria-current="page" href="/`) //line navbar.qtpl:51 qw422016.E().S(name) //line navbar.qtpl:51 - qw422016.N().S(`">summary</a> + qw422016.N().S(`/log/`) +//line navbar.qtpl:51 + qw422016.E().S(ref) +//line navbar.qtpl:51 + qw422016.N().S(`">log</a> </li> <li class="nav-item"> <a class="nav-link`) //line navbar.qtpl:54 - streaminsertIfEqual(qw422016, s, Refs) + streaminsertIfEqual(qw422016, s, Summary) //line navbar.qtpl:54 qw422016.N().S(`" aria-current="page" href="/`) //line navbar.qtpl:54 qw422016.E().S(name) //line navbar.qtpl:54 - qw422016.N().S(`/refs">refs</a> + qw422016.N().S(`">summary</a> </li> <li class="nav-item"> <a class="nav-link`) //line navbar.qtpl:57 - streaminsertIfEqual(qw422016, s, Tree) + streaminsertIfEqual(qw422016, s, Refs) //line navbar.qtpl:57 qw422016.N().S(`" aria-current="page" href="/`) //line navbar.qtpl:57 qw422016.E().S(name) //line navbar.qtpl:57 + qw422016.N().S(`/refs">refs</a> + </li> + <li class="nav-item"> + <a class="nav-link`) +//line navbar.qtpl:60 + streaminsertIfEqual(qw422016, s, Tree) +//line navbar.qtpl:60 + qw422016.N().S(`" aria-current="page" href="/`) +//line navbar.qtpl:60 + qw422016.E().S(name) +//line navbar.qtpl:60 qw422016.N().S(`/tree/`) -//line navbar.qtpl:57 +//line navbar.qtpl:60 qw422016.E().S(ref) -//line navbar.qtpl:57 +//line navbar.qtpl:60 qw422016.N().S(`">tree</a> </li> </ul> </div> `) -//line navbar.qtpl:61 +//line navbar.qtpl:64 } -//line navbar.qtpl:61 +//line navbar.qtpl:64 func WriteGitItemNav(qq422016 qtio422016.Writer, name, ref string, s GitSelection) { -//line navbar.qtpl:61 +//line navbar.qtpl:64 qw422016 := qt422016.AcquireWriter(qq422016) -//line navbar.qtpl:61 +//line navbar.qtpl:64 StreamGitItemNav(qw422016, name, ref, s) -//line navbar.qtpl:61 +//line navbar.qtpl:64 qt422016.ReleaseWriter(qw422016) -//line navbar.qtpl:61 +//line navbar.qtpl:64 } -//line navbar.qtpl:61 +//line navbar.qtpl:64 func GitItemNav(name, ref string, s GitSelection) string { -//line navbar.qtpl:61 +//line navbar.qtpl:64 qb422016 := qt422016.AcquireByteBuffer() -//line navbar.qtpl:61 +//line navbar.qtpl:64 WriteGitItemNav(qb422016, name, ref, s) -//line navbar.qtpl:61 +//line navbar.qtpl:64 qs422016 := string(qb422016.B) -//line navbar.qtpl:61 +//line navbar.qtpl:64 qt422016.ReleaseByteBuffer(qb422016) -//line navbar.qtpl:61 +//line navbar.qtpl:64 return qs422016 -//line navbar.qtpl:61 +//line navbar.qtpl:64 } |