diff options
| author | Gabriel A. Giovanini <mail@gabrielgio.me> | 2024-05-26 00:05:31 +0200 | 
|---|---|---|
| committer | Gabriel A. Giovanini <mail@gabrielgio.me> | 2024-05-26 14:41:21 +0200 | 
| commit | 349a3d1ff36a436261b1b65b870f8f262f06584f (patch) | |
| tree | 25c4d6933c49f818e520ce662ffa15e040877f4d /templates/gitlist.qtpl.go | |
| parent | c06945c189c1d8ef3cedeb51e416ba0fec36368f (diff) | |
| download | cerrado-349a3d1ff36a436261b1b65b870f8f262f06584f.tar.gz cerrado-349a3d1ff36a436261b1b65b870f8f262f06584f.tar.bz2 cerrado-349a3d1ff36a436261b1b65b870f8f262f06584f.zip | |
feat: Add bare bones project list
Diffstat (limited to 'templates/gitlist.qtpl.go')
| -rw-r--r-- | templates/gitlist.qtpl.go | 175 | 
1 files changed, 175 insertions, 0 deletions
| 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(` +<div class="row"> +  `) +//line gitlist.qtpl:16 +		for _, r := range c { +//line gitlist.qtpl:16 +			qw422016.N().S(` +  <div class="col-md-4 g-0"> +    <div class="card"> +      <div class="card-header"> +        `) +//line gitlist.qtpl:20 +			qw422016.E().S(r.Title) +//line gitlist.qtpl:20 +			qw422016.N().S(` +      </div> +      <div class="card-body"> +        <p class="card-text">`) +//line gitlist.qtpl:23 +			qw422016.E().S(r.Description) +//line gitlist.qtpl:23 +			qw422016.N().S(`</p> +        <a href="/`) +//line gitlist.qtpl:24 +			qw422016.E().S(r.Name) +//line gitlist.qtpl:24 +			qw422016.N().S(`" class="btn btn-primary">go to repository</a> +      </div> +    </div> +  </div> +  `) +//line gitlist.qtpl:28 +		} +//line gitlist.qtpl:28 +		qw422016.N().S(` +</div> +`) +//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 +} | 
