// Code generated by qtc from "gitlist.qtpl". DO NOT EDIT. // See https://github.com/valyala/quicktemplate for details. //line templates/gitlist.qtpl:1 package templates //line templates/gitlist.qtpl:1 import "git.gabrielgio.me/cerrado/pkg/service" //line templates/gitlist.qtpl:2 import "context" //line templates/gitlist.qtpl:3 import "strings" //line templates/gitlist.qtpl:5 import ( qtio422016 "io" qt422016 "github.com/valyala/quicktemplate" ) //line templates/gitlist.qtpl:5 var ( _ = qtio422016.Copy _ = qt422016.AcquireByteBuffer ) //line templates/gitlist.qtpl:6 type GitListPage struct { Respositories []*service.Repository About []byte } //line templates/gitlist.qtpl:13 func firstLine(text string) string { lines := strings.Split(text, "\n") if len(lines) > 0 { return lines[0] } return "" } //line templates/gitlist.qtpl:22 func (p *GitListPage) StreamTitle(qw422016 *qt422016.Writer, ctx context.Context) { //line templates/gitlist.qtpl:22 qw422016.N().S(`Git | List`) //line templates/gitlist.qtpl:22 } //line templates/gitlist.qtpl:22 func (p *GitListPage) WriteTitle(qq422016 qtio422016.Writer, ctx context.Context) { //line templates/gitlist.qtpl:22 qw422016 := qt422016.AcquireWriter(qq422016) //line templates/gitlist.qtpl:22 p.StreamTitle(qw422016, ctx) //line templates/gitlist.qtpl:22 qt422016.ReleaseWriter(qw422016) //line templates/gitlist.qtpl:22 } //line templates/gitlist.qtpl:22 func (p *GitListPage) Title(ctx context.Context) string { //line templates/gitlist.qtpl:22 qb422016 := qt422016.AcquireByteBuffer() //line templates/gitlist.qtpl:22 p.WriteTitle(qb422016, ctx) //line templates/gitlist.qtpl:22 qs422016 := string(qb422016.B) //line templates/gitlist.qtpl:22 qt422016.ReleaseByteBuffer(qb422016) //line templates/gitlist.qtpl:22 return qs422016 //line templates/gitlist.qtpl:22 } //line templates/gitlist.qtpl:24 func (p *GitListPage) StreamNavbar(qw422016 *qt422016.Writer, ctx context.Context) { //line templates/gitlist.qtpl:24 StreamNavbar(qw422016, ctx, Git) //line templates/gitlist.qtpl:24 } //line templates/gitlist.qtpl:24 func (p *GitListPage) WriteNavbar(qq422016 qtio422016.Writer, ctx context.Context) { //line templates/gitlist.qtpl:24 qw422016 := qt422016.AcquireWriter(qq422016) //line templates/gitlist.qtpl:24 p.StreamNavbar(qw422016, ctx) //line templates/gitlist.qtpl:24 qt422016.ReleaseWriter(qw422016) //line templates/gitlist.qtpl:24 } //line templates/gitlist.qtpl:24 func (p *GitListPage) Navbar(ctx context.Context) string { //line templates/gitlist.qtpl:24 qb422016 := qt422016.AcquireByteBuffer() //line templates/gitlist.qtpl:24 p.WriteNavbar(qb422016, ctx) //line templates/gitlist.qtpl:24 qs422016 := string(qb422016.B) //line templates/gitlist.qtpl:24 qt422016.ReleaseByteBuffer(qb422016) //line templates/gitlist.qtpl:24 return qs422016 //line templates/gitlist.qtpl:24 } //line templates/gitlist.qtpl:26 func (p *GitListPage) StreamContent(qw422016 *qt422016.Writer, ctx context.Context) { //line templates/gitlist.qtpl:26 qw422016.N().S(`
`) //line templates/gitlist.qtpl:30 for _, r := range p.Respositories { //line templates/gitlist.qtpl:30 qw422016.N().S(`
`) //line templates/gitlist.qtpl:37 if !r.Public { //line templates/gitlist.qtpl:37 qw422016.N().S(`private`) //line templates/gitlist.qtpl:37 } //line templates/gitlist.qtpl:37 qw422016.N().S(`

`) //line templates/gitlist.qtpl:41 qw422016.E().S(r.Description) //line templates/gitlist.qtpl:41 qw422016.N().S(`

`) //line templates/gitlist.qtpl:43 qw422016.E().S(r.LastCommit.Hash.String()[0:8]) //line templates/gitlist.qtpl:43 qw422016.N().S(` - `) //line templates/gitlist.qtpl:44 qw422016.E().S(r.LastCommit.Author.Name) //line templates/gitlist.qtpl:44 qw422016.N().S(` - `) //line templates/gitlist.qtpl:45 qw422016.E().S(firstLine(r.LastCommit.Message)) //line templates/gitlist.qtpl:45 qw422016.N().S(`

log tree refs

`) //line templates/gitlist.qtpl:52 } //line templates/gitlist.qtpl:52 qw422016.N().S(`
`) //line templates/gitlist.qtpl:56 qw422016.N().Z(p.About) //line templates/gitlist.qtpl:56 qw422016.N().S(`
`) //line templates/gitlist.qtpl:62 } //line templates/gitlist.qtpl:62 func (p *GitListPage) WriteContent(qq422016 qtio422016.Writer, ctx context.Context) { //line templates/gitlist.qtpl:62 qw422016 := qt422016.AcquireWriter(qq422016) //line templates/gitlist.qtpl:62 p.StreamContent(qw422016, ctx) //line templates/gitlist.qtpl:62 qt422016.ReleaseWriter(qw422016) //line templates/gitlist.qtpl:62 } //line templates/gitlist.qtpl:62 func (p *GitListPage) Content(ctx context.Context) string { //line templates/gitlist.qtpl:62 qb422016 := qt422016.AcquireByteBuffer() //line templates/gitlist.qtpl:62 p.WriteContent(qb422016, ctx) //line templates/gitlist.qtpl:62 qs422016 := string(qb422016.B) //line templates/gitlist.qtpl:62 qt422016.ReleaseByteBuffer(qb422016) //line templates/gitlist.qtpl:62 return qs422016 //line templates/gitlist.qtpl:62 } //line templates/gitlist.qtpl:64 func (p *GitListPage) StreamScript(qw422016 *qt422016.Writer, ctx context.Context) { //line templates/gitlist.qtpl:64 qw422016.N().S(` `) //line templates/gitlist.qtpl:65 } //line templates/gitlist.qtpl:65 func (p *GitListPage) WriteScript(qq422016 qtio422016.Writer, ctx context.Context) { //line templates/gitlist.qtpl:65 qw422016 := qt422016.AcquireWriter(qq422016) //line templates/gitlist.qtpl:65 p.StreamScript(qw422016, ctx) //line templates/gitlist.qtpl:65 qt422016.ReleaseWriter(qw422016) //line templates/gitlist.qtpl:65 } //line templates/gitlist.qtpl:65 func (p *GitListPage) Script(ctx context.Context) string { //line templates/gitlist.qtpl:65 qb422016 := qt422016.AcquireByteBuffer() //line templates/gitlist.qtpl:65 p.WriteScript(qb422016, ctx) //line templates/gitlist.qtpl:65 qs422016 := string(qb422016.B) //line templates/gitlist.qtpl:65 qt422016.ReleaseByteBuffer(qb422016) //line templates/gitlist.qtpl:65 return qs422016 //line templates/gitlist.qtpl:65 }