From 349a3d1ff36a436261b1b65b870f8f262f06584f Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Sun, 26 May 2024 00:05:31 +0200 Subject: feat: Add bare bones project list --- templates/gitlist.qtpl.go | 175 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 templates/gitlist.qtpl.go (limited to 'templates/gitlist.qtpl.go') diff --git a/templates/gitlist.qtpl.go b/templates/gitlist.qtpl.go new file mode 100644 index 0000000..b02eead --- /dev/null +++ b/templates/gitlist.qtpl.go @@ -0,0 +1,175 @@ +// Code generated by qtc from "gitlist.qtpl". DO NOT EDIT. +// See https://github.com/valyala/quicktemplate for details. + +//line gitlist.qtpl:1 +package templates + +//line gitlist.qtpl:1 +import "git.gabrielgio.me/cerrado/pkg/service" + +//line gitlist.qtpl:2 +import "git.gabrielgio.me/cerrado/pkg/u" + +//line gitlist.qtpl:5 +import ( + qtio422016 "io" + + qt422016 "github.com/valyala/quicktemplate" +) + +//line gitlist.qtpl:5 +var ( + _ = qtio422016.Copy + _ = qt422016.AcquireByteBuffer +) + +//line gitlist.qtpl:6 +type GitListPage struct { + Respositories []*service.Repository +} + +//line gitlist.qtpl:11 +func (p *GitListPage) StreamTitle(qw422016 *qt422016.Writer) { +//line gitlist.qtpl:11 + qw422016.N().S(`Git | List`) +//line gitlist.qtpl:11 +} + +//line gitlist.qtpl:11 +func (p *GitListPage) WriteTitle(qq422016 qtio422016.Writer) { +//line gitlist.qtpl:11 + qw422016 := qt422016.AcquireWriter(qq422016) +//line gitlist.qtpl:11 + p.StreamTitle(qw422016) +//line gitlist.qtpl:11 + qt422016.ReleaseWriter(qw422016) +//line gitlist.qtpl:11 +} + +//line gitlist.qtpl:11 +func (p *GitListPage) Title() string { +//line gitlist.qtpl:11 + qb422016 := qt422016.AcquireByteBuffer() +//line gitlist.qtpl:11 + p.WriteTitle(qb422016) +//line gitlist.qtpl:11 + qs422016 := string(qb422016.B) +//line gitlist.qtpl:11 + qt422016.ReleaseByteBuffer(qb422016) +//line gitlist.qtpl:11 + return qs422016 +//line gitlist.qtpl:11 +} + +//line gitlist.qtpl:13 +func (p *GitListPage) StreamContent(qw422016 *qt422016.Writer) { +//line gitlist.qtpl:13 + qw422016.N().S(` +`) +//line gitlist.qtpl:14 + for _, c := range u.ChunkBy(p.Respositories, 3) { +//line gitlist.qtpl:14 + qw422016.N().S(` +
+ `) +//line gitlist.qtpl:16 + for _, r := range c { +//line gitlist.qtpl:16 + qw422016.N().S(` +
+
+
+ `) +//line gitlist.qtpl:20 + qw422016.E().S(r.Title) +//line gitlist.qtpl:20 + qw422016.N().S(` +
+
+

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

+ go to repository +
+
+
+ `) +//line gitlist.qtpl:28 + } +//line gitlist.qtpl:28 + qw422016.N().S(` +
+`) +//line gitlist.qtpl:30 + } +//line gitlist.qtpl:30 + qw422016.N().S(` +`) +//line gitlist.qtpl:31 +} + +//line gitlist.qtpl:31 +func (p *GitListPage) WriteContent(qq422016 qtio422016.Writer) { +//line gitlist.qtpl:31 + qw422016 := qt422016.AcquireWriter(qq422016) +//line gitlist.qtpl:31 + p.StreamContent(qw422016) +//line gitlist.qtpl:31 + qt422016.ReleaseWriter(qw422016) +//line gitlist.qtpl:31 +} + +//line gitlist.qtpl:31 +func (p *GitListPage) Content() string { +//line gitlist.qtpl:31 + qb422016 := qt422016.AcquireByteBuffer() +//line gitlist.qtpl:31 + p.WriteContent(qb422016) +//line gitlist.qtpl:31 + qs422016 := string(qb422016.B) +//line gitlist.qtpl:31 + qt422016.ReleaseByteBuffer(qb422016) +//line gitlist.qtpl:31 + return qs422016 +//line gitlist.qtpl:31 +} + +//line gitlist.qtpl:33 +func (p *GitListPage) StreamScript(qw422016 *qt422016.Writer) { +//line gitlist.qtpl:33 + qw422016.N().S(` +`) +//line gitlist.qtpl:34 +} + +//line gitlist.qtpl:34 +func (p *GitListPage) WriteScript(qq422016 qtio422016.Writer) { +//line gitlist.qtpl:34 + qw422016 := qt422016.AcquireWriter(qq422016) +//line gitlist.qtpl:34 + p.StreamScript(qw422016) +//line gitlist.qtpl:34 + qt422016.ReleaseWriter(qw422016) +//line gitlist.qtpl:34 +} + +//line gitlist.qtpl:34 +func (p *GitListPage) Script() string { +//line gitlist.qtpl:34 + qb422016 := qt422016.AcquireByteBuffer() +//line gitlist.qtpl:34 + p.WriteScript(qb422016) +//line gitlist.qtpl:34 + qs422016 := string(qb422016.B) +//line gitlist.qtpl:34 + qt422016.ReleaseByteBuffer(qb422016) +//line gitlist.qtpl:34 + return qs422016 +//line gitlist.qtpl:34 +} -- cgit v1.2.3