From e9098e00fb6339b759df5b0df2e086cef8a7ce83 Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Fri, 7 Jun 2024 23:02:54 +0200 Subject: feat: Rework some pages --- Makefile | 2 + pkg/handler/git/handler.go | 40 ++++++++++- pkg/handler/router.go | 2 +- pkg/service/git.go | 36 ++++++---- scss/main.scss | 50 +++++++++++-- scss/tree.scss | 59 ++++++++++++++++ templates/base.qtpl | 2 +- templates/base.qtpl.go | 2 +- templates/gititemlog.qtpl | 4 +- templates/gititemlog.qtpl.go | 8 ++- templates/gititemtree.qtpl | 24 ++++--- templates/gititemtree.qtpl.go | 114 ++++++++++++++++-------------- templates/gitlist.qtpl | 11 +-- templates/gitlist.qtpl.go | 159 +++++++++++++++++++++--------------------- templates/navbar.qtpl | 3 + templates/navbar.qtpl.go | 130 +++++++++++++++++----------------- 16 files changed, 406 insertions(+), 240 deletions(-) create mode 100644 scss/tree.scss diff --git a/Makefile b/Makefile index 53b0767..8f6d462 100644 --- a/Makefile +++ b/Makefile @@ -12,9 +12,11 @@ run: sass tmpl test: go test -v --tags=unit ./... +# this is meant for "prod" build sass-slug: mkdir -p static sassc \ + --style compressed \ -I scss scss/main.scss static/main.$(COMMIT).css sass: diff --git a/pkg/handler/git/handler.go b/pkg/handler/git/handler.go index 28cc99e..7bdf372 100644 --- a/pkg/handler/git/handler.go +++ b/pkg/handler/git/handler.go @@ -2,8 +2,10 @@ package git import ( "bytes" + "io" "log/slog" "net/http" + "os" "path/filepath" "git.gabrielgio.me/cerrado/pkg/ext" @@ -15,11 +17,15 @@ import ( "github.com/alecthomas/chroma/v2/styles" "github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5/plumbing/object" + "github.com/gomarkdown/markdown" + markdownhtml "github.com/gomarkdown/markdown/html" + "github.com/gomarkdown/markdown/parser" ) type ( GitHandler struct { gitService gitService + readmePath string } gitService interface { @@ -31,11 +37,16 @@ type ( ListTags(name string) ([]*object.Tag, error) ListBranches(name string) ([]*plumbing.Reference, error) } + + configurationRepository interface { + GetRootReadme() string + } ) -func NewGitHandler(gitService gitService) *GitHandler { +func NewGitHandler(gitService gitService, confRepo configurationRepository) *GitHandler { return &GitHandler{ gitService: gitService, + readmePath: confRepo.GetRootReadme(), } } @@ -46,7 +57,32 @@ func (g *GitHandler) List(w http.ResponseWriter, _ *http.Request) { return } - gitList := &templates.GitListPage{repos} + f, err := os.Open(g.readmePath) + if err != nil { + slog.Error("Error loading readme file", "error", err) + return + } + + bs, err := io.ReadAll(f) + if err != nil { + slog.Error("Error reading readme file bytes", "error", err) + return + } + + extensions := parser.CommonExtensions | parser.AutoHeadingIDs | parser.NoEmptyLineBeforeBlock + p := parser.NewWithExtensions(extensions) + doc := p.Parse(bs) + + htmlFlag := markdownhtml.CommonFlags | markdownhtml.HrefTargetBlank + opts := markdownhtml.RendererOptions{Flags: htmlFlag} + renderer := markdownhtml.NewRenderer(opts) + + bs = markdown.Render(doc, renderer) + + gitList := &templates.GitListPage{ + Respositories: repos, + About: bs, + } templates.WritePageTemplate(w, gitList) } diff --git a/pkg/handler/router.go b/pkg/handler/router.go index de5117c..bf13ad5 100644 --- a/pkg/handler/router.go +++ b/pkg/handler/router.go @@ -20,7 +20,7 @@ func MountHandler( configRepo *serverconfig.ConfigurationRepository, ) (http.Handler, error) { var ( - gitHandler = git.NewGitHandler(gitService) + gitHandler = git.NewGitHandler(gitService, configRepo) aboutHandler = about.NewAboutHandler(configRepo) configHander = config.ConfigFile(configRepo) ) diff --git a/pkg/service/git.go b/pkg/service/git.go index f886785..31a1cbb 100644 --- a/pkg/service/git.go +++ b/pkg/service/git.go @@ -1,21 +1,24 @@ package service import ( + "log/slog" + "os" "path" "git.gabrielgio.me/cerrado/pkg/config" "git.gabrielgio.me/cerrado/pkg/git" + "git.gabrielgio.me/cerrado/pkg/u" "github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5/plumbing/object" ) type ( Repository struct { - Name string - Title string - LastCommitMessage string - LastCommitDate string - Ref string + Name string + Title string + Description string + LastCommitDate string + Ref string } GitService struct { @@ -46,9 +49,6 @@ func (g *GitService) ListRepositories() ([]*Repository, error) { if err != nil { return nil, err } - if err != nil { - return nil, err - } obj, err := repo.LastCommit() if err != nil { @@ -60,13 +60,23 @@ func (g *GitService) ListRepositories() ([]*Repository, error) { return nil, err } + d := path.Join(r.Path, "description") + description := "" + if u.FileExist(d) { + if b, err := os.ReadFile(d); err == nil { + description = string(b) + } else { + slog.Error("Error loading description file", "err", err) + } + } + baseName := path.Base(r.Path) repos[i] = &Repository{ - Name: baseName, - Title: baseName, - LastCommitMessage: obj.Message, - LastCommitDate: obj.Author.When.Format(timeFormat), - Ref: head.Name().Short(), + Name: baseName, + Title: baseName, + Description: description, + LastCommitDate: obj.Author.When.Format(timeFormat), + Ref: head.Name().Short(), } } diff --git a/scss/main.scss b/scss/main.scss index bb7d7f0..b3ba649 100644 --- a/scss/main.scss +++ b/scss/main.scss @@ -19,8 +19,31 @@ $headings-margin-bottom: 0; @import "bootstrap/scss/_nav.scss"; @import "bootstrap/scss/_navbar.scss"; @import "bootstrap/scss/_grid.scss"; +@import "tree.scss"; + +// overwrite to reduce the ammount of css generated by loading all utilities +$utilities: ( + "order": ( + responsive: true, + property: order, + values: ( + first: -1, + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + last: 6, + ), + ), +); + +@import "bootstrap/scss/utilities/_api.scss"; body { + // prevents wierd font resizing on overflow + -webkit-text-size-adjust: 100%; font-family: $font-family-monospace; font-size: $base-font-size; margin: 0; @@ -63,23 +86,27 @@ body { } .logs { - >div:nth-child(odd) { + >div { background: #f8f9fa; } >div { - padding: 10px; + padding: 5px; + margin: $spacer; + } + + @include media-breakpoint-down(md) { + >div { + margin: $spacer 0 $spacer 0; + } } pre { - white-space: break-spaces; + font-size: $base-font-size; margin: 0; } } -.logs pre::first-line { - font-weight: bold; -} .logs>div>div:first-child { margin-bottom: 15px; } @@ -87,3 +114,14 @@ body { margin-top: 15px; } +#about { + padding: 0 $spacer $spacer $spacer; + > p:first-child { + margin-top: 0 + } + + @include media-breakpoint-down(md) { + padding: $spacer; + max-width: calc(100% - calc(2 * #{$spacer})); + } +} diff --git a/scss/tree.scss b/scss/tree.scss new file mode 100644 index 0000000..bbca162 --- /dev/null +++ b/scss/tree.scss @@ -0,0 +1,59 @@ +// TODO: refer to sourcehut code AGPL +.tree-list { + display: grid; + // mode name + grid-template-columns: auto 1fr fit-content(40em) auto auto; + font-family: $font-family-monospace; + + svg { + color: #777; + } + + .size { + text-align: right; + } + + .name.blob a { + color: $gray-900; + } + + .mode, .commit, .commit a, .date, .size { + color: $gray-700; + } + + .name.blob { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + } + + .commit { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + } + + & > div { + padding: 0.1rem 0.5rem; + background: transparent; + + &.id { + text-align: right; + } + + &.comments { + text-align: center; + } + + @for $i from 1 through 5 { + &:nth-child(5n+#{$i}) { + grid-column-start: $i; + } + + // Striped rows + &:nth-child(10n+#{$i}) { + background: rgba(0,0,0,.05); + } + } + } +} 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 {
{%s TimeFormat(c.Committer.When) %}
-
+
{%s c.Message %}
- {%s c.Committer.Name %} + {%s c.Committer.Name %} <{%s c.Committer.Email %}>
{% 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(` -
+
`)
 //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(`
+		qw422016.N().S(` <`)
+//line gititemlog.qtpl:22
+		qw422016.E().S(c.Committer.Email)
+//line gititemlog.qtpl:22
+		qw422016.N().S(`>
       
`) 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 %}
-
{%s Ignore(e.Mode.ToOSFileMode()).String() %}
- {% if e.Mode.IsFile() %} - - {% else %} - - {% endif %} -
{%dl Ignore(g.Tree.Size(e.Name))%} KiB
+
+
+ {% for _, e := range g.Tree.Entries %} +
{%s Ignore(e.Mode.ToOSFileMode()).String() %}
+ {% if e.Mode.IsFile() %} + + {% else %} + + {% endif %} +
+
+
{%dl Ignore(g.Tree.Size(e.Name))%} KiB
+ {% endfor %} +
+
-{% 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 +
+
+
+ `) +//line gititemtree.qtpl:20 for _, e := range g.Tree.Entries { -//line gititemtree.qtpl:17 +//line gititemtree.qtpl:20 qw422016.N().S(` -
-
`) -//line gititemtree.qtpl:19 +
`) +//line gititemtree.qtpl:21 qw422016.E().S(Ignore(e.Mode.ToOSFileMode()).String()) -//line gititemtree.qtpl:19 +//line gititemtree.qtpl:21 qw422016.N().S(`
- `) -//line gititemtree.qtpl:20 + `) +//line gititemtree.qtpl:22 if e.Mode.IsFile() { -//line gititemtree.qtpl:20 +//line gititemtree.qtpl:22 qw422016.N().S(` - - `) -//line gititemtree.qtpl:22 + `) +//line gititemtree.qtpl:24 } else { -//line gititemtree.qtpl:22 +//line gititemtree.qtpl:24 qw422016.N().S(` - - `) -//line gititemtree.qtpl:24 + `) +//line gititemtree.qtpl:26 } -//line gititemtree.qtpl:24 +//line gititemtree.qtpl:26 qw422016.N().S(` -
`) -//line gititemtree.qtpl:25 +
+
+
`) +//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
-
-`) -//line gititemtree.qtpl:27 + `) +//line gititemtree.qtpl:30 } -//line gititemtree.qtpl:27 +//line gititemtree.qtpl:30 qw422016.N().S(` +
+
+
`) -//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() %}
-
+
{% for _, r := range p.Respositories %}
@@ -20,8 +21,7 @@ type GitListPage struct { {%s r.Name %} -

{%s r.LastCommitMessage %}

-

{%s r.LastCommitDate %}

+

{%s r.Description %}

log tree @@ -30,9 +30,12 @@ type GitListPage struct {

{% endfor %}
- {% endfunc %} +
+
+ {%z= p.About %}
+{% 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(`
-
+
`) -//line gitlist.qtpl:17 +//line gitlist.qtpl:18 for _, r := range p.Respositories { -//line gitlist.qtpl:17 +//line gitlist.qtpl:18 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(`

`) -//line gitlist.qtpl:23 - qw422016.E().S(r.LastCommitMessage) -//line gitlist.qtpl:23 - qw422016.N().S(`

-

`) //line gitlist.qtpl:24 - qw422016.E().S(r.LastCommitDate) + qw422016.E().S(r.Description) //line gitlist.qtpl:24 - qw422016.N().S(`

+ qw422016.N().S(`

+ `) +//line gitlist.qtpl:35 + qw422016.N().Z(p.About) +//line gitlist.qtpl:35 + qw422016.N().S(` +

+
+`) +//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 } -//
-//
-// - -//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 list {% endcomment %} +{% comment %} +Add this back if needed about +{% endcomment %} config
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(` about - config
`) -//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(`

`) -//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(`

`) -//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 } -- cgit v1.2.3