cerrado @ 4534dffb865eb1a50bfbc291a5c3798183081caf

  1// Code generated by qtc from "gitlist.qtpl". DO NOT EDIT.
  2// See https://github.com/valyala/quicktemplate for details.
  3
  4//line gitlist.qtpl:1
  5package templates
  6
  7//line gitlist.qtpl:1
  8import "git.gabrielgio.me/cerrado/pkg/service"
  9
 10//line gitlist.qtpl:2
 11import "git.gabrielgio.me/cerrado/pkg/u"
 12
 13//line gitlist.qtpl:5
 14import (
 15	qtio422016 "io"
 16
 17	qt422016 "github.com/valyala/quicktemplate"
 18)
 19
 20//line gitlist.qtpl:5
 21var (
 22	_ = qtio422016.Copy
 23	_ = qt422016.AcquireByteBuffer
 24)
 25
 26//line gitlist.qtpl:6
 27type GitListPage struct {
 28	Respositories []*service.Repository
 29}
 30
 31//line gitlist.qtpl:11
 32func (p *GitListPage) StreamTitle(qw422016 *qt422016.Writer) {
 33//line gitlist.qtpl:11
 34	qw422016.N().S(`Git | List`)
 35//line gitlist.qtpl:11
 36}
 37
 38//line gitlist.qtpl:11
 39func (p *GitListPage) WriteTitle(qq422016 qtio422016.Writer) {
 40//line gitlist.qtpl:11
 41	qw422016 := qt422016.AcquireWriter(qq422016)
 42//line gitlist.qtpl:11
 43	p.StreamTitle(qw422016)
 44//line gitlist.qtpl:11
 45	qt422016.ReleaseWriter(qw422016)
 46//line gitlist.qtpl:11
 47}
 48
 49//line gitlist.qtpl:11
 50func (p *GitListPage) Title() string {
 51//line gitlist.qtpl:11
 52	qb422016 := qt422016.AcquireByteBuffer()
 53//line gitlist.qtpl:11
 54	p.WriteTitle(qb422016)
 55//line gitlist.qtpl:11
 56	qs422016 := string(qb422016.B)
 57//line gitlist.qtpl:11
 58	qt422016.ReleaseByteBuffer(qb422016)
 59//line gitlist.qtpl:11
 60	return qs422016
 61//line gitlist.qtpl:11
 62}
 63
 64//line gitlist.qtpl:13
 65func (p *GitListPage) StreamContent(qw422016 *qt422016.Writer) {
 66//line gitlist.qtpl:13
 67	qw422016.N().S(`
 68`)
 69//line gitlist.qtpl:14
 70	for _, c := range u.ChunkBy(p.Respositories, 3) {
 71//line gitlist.qtpl:14
 72		qw422016.N().S(`
 73<div class="row">
 74  `)
 75//line gitlist.qtpl:16
 76		for _, r := range c {
 77//line gitlist.qtpl:16
 78			qw422016.N().S(`
 79  <div class="col-md g-1">
 80    <div class="card">
 81      <div class="card-header">
 82        <a href="/`)
 83//line gitlist.qtpl:20
 84			qw422016.E().S(r.Name)
 85//line gitlist.qtpl:20
 86			qw422016.N().S(`" class="btn btn-primary">`)
 87//line gitlist.qtpl:20
 88			qw422016.E().S(r.Title)
 89//line gitlist.qtpl:20
 90			qw422016.N().S(`</a>
 91      </div>
 92      <div class="card-body">
 93        <p class="card-text lead">`)
 94//line gitlist.qtpl:23
 95			qw422016.E().S(r.LastCommitMessage)
 96//line gitlist.qtpl:23
 97			qw422016.N().S(`</p> 
 98        <p class="card-text"><small>`)
 99//line gitlist.qtpl:24
100			qw422016.E().S(r.LastCommitDate)
101//line gitlist.qtpl:24
102			qw422016.N().S(`</small></p> 
103        <a href="#" class="card-link">summary</a>
104        <a href="#" class="card-link">log</a>
105        <a href="#" class="card-link">tree</a>
106      </div>
107    </div>
108  </div>
109  `)
110//line gitlist.qtpl:31
111		}
112//line gitlist.qtpl:31
113		qw422016.N().S(`
114</div>
115`)
116//line gitlist.qtpl:33
117	}
118//line gitlist.qtpl:33
119	qw422016.N().S(`
120`)
121//line gitlist.qtpl:34
122}
123
124//line gitlist.qtpl:34
125func (p *GitListPage) WriteContent(qq422016 qtio422016.Writer) {
126//line gitlist.qtpl:34
127	qw422016 := qt422016.AcquireWriter(qq422016)
128//line gitlist.qtpl:34
129	p.StreamContent(qw422016)
130//line gitlist.qtpl:34
131	qt422016.ReleaseWriter(qw422016)
132//line gitlist.qtpl:34
133}
134
135//line gitlist.qtpl:34
136func (p *GitListPage) Content() string {
137//line gitlist.qtpl:34
138	qb422016 := qt422016.AcquireByteBuffer()
139//line gitlist.qtpl:34
140	p.WriteContent(qb422016)
141//line gitlist.qtpl:34
142	qs422016 := string(qb422016.B)
143//line gitlist.qtpl:34
144	qt422016.ReleaseByteBuffer(qb422016)
145//line gitlist.qtpl:34
146	return qs422016
147//line gitlist.qtpl:34
148}
149
150//line gitlist.qtpl:36
151func (p *GitListPage) StreamScript(qw422016 *qt422016.Writer) {
152//line gitlist.qtpl:36
153	qw422016.N().S(`
154`)
155//line gitlist.qtpl:37
156}
157
158//line gitlist.qtpl:37
159func (p *GitListPage) WriteScript(qq422016 qtio422016.Writer) {
160//line gitlist.qtpl:37
161	qw422016 := qt422016.AcquireWriter(qq422016)
162//line gitlist.qtpl:37
163	p.StreamScript(qw422016)
164//line gitlist.qtpl:37
165	qt422016.ReleaseWriter(qw422016)
166//line gitlist.qtpl:37
167}
168
169//line gitlist.qtpl:37
170func (p *GitListPage) Script() string {
171//line gitlist.qtpl:37
172	qb422016 := qt422016.AcquireByteBuffer()
173//line gitlist.qtpl:37
174	p.WriteScript(qb422016)
175//line gitlist.qtpl:37
176	qs422016 := string(qb422016.B)
177//line gitlist.qtpl:37
178	qt422016.ReleaseByteBuffer(qb422016)
179//line gitlist.qtpl:37
180	return qs422016
181//line gitlist.qtpl:37
182}