cerrado @ 78af329f2c7bc1739bcd36baf45ab95aaff43434

  1// Code generated by qtc from "gititemsummary.qtpl". DO NOT EDIT.
  2// See https://github.com/valyala/quicktemplate for details.
  3
  4//line templates/gititemsummary.qtpl:1
  5package templates
  6
  7//line templates/gititemsummary.qtpl:1
  8import "github.com/go-git/go-git/v5/plumbing"
  9
 10//line templates/gititemsummary.qtpl:2
 11import "github.com/go-git/go-git/v5/plumbing/object"
 12
 13//line templates/gititemsummary.qtpl:3
 14import "git.gabrielgio.me/cerrado/pkg/git"
 15
 16//line templates/gititemsummary.qtpl:5
 17import (
 18	qtio422016 "io"
 19
 20	qt422016 "github.com/valyala/quicktemplate"
 21)
 22
 23//line templates/gititemsummary.qtpl:5
 24var (
 25	_ = qtio422016.Copy
 26	_ = qt422016.AcquireByteBuffer
 27)
 28
 29//line templates/gititemsummary.qtpl:6
 30type GitItemSummaryPage struct {
 31	Tags     []*git.TagReference
 32	Branches []*plumbing.Reference
 33	Commits  []*object.Commit
 34}
 35
 36//line templates/gititemsummary.qtpl:13
 37func (g *GitItemSummaryPage) StreamNav(qw422016 *qt422016.Writer, name, ref string) {
 38//line templates/gititemsummary.qtpl:13
 39	StreamGitItemNav(qw422016, name, ref, Summary)
 40//line templates/gititemsummary.qtpl:13
 41}
 42
 43//line templates/gititemsummary.qtpl:13
 44func (g *GitItemSummaryPage) WriteNav(qq422016 qtio422016.Writer, name, ref string) {
 45//line templates/gititemsummary.qtpl:13
 46	qw422016 := qt422016.AcquireWriter(qq422016)
 47//line templates/gititemsummary.qtpl:13
 48	g.StreamNav(qw422016, name, ref)
 49//line templates/gititemsummary.qtpl:13
 50	qt422016.ReleaseWriter(qw422016)
 51//line templates/gititemsummary.qtpl:13
 52}
 53
 54//line templates/gititemsummary.qtpl:13
 55func (g *GitItemSummaryPage) Nav(name, ref string) string {
 56//line templates/gititemsummary.qtpl:13
 57	qb422016 := qt422016.AcquireByteBuffer()
 58//line templates/gititemsummary.qtpl:13
 59	g.WriteNav(qb422016, name, ref)
 60//line templates/gititemsummary.qtpl:13
 61	qs422016 := string(qb422016.B)
 62//line templates/gititemsummary.qtpl:13
 63	qt422016.ReleaseByteBuffer(qb422016)
 64//line templates/gititemsummary.qtpl:13
 65	return qs422016
 66//line templates/gititemsummary.qtpl:13
 67}
 68
 69//line templates/gititemsummary.qtpl:15
 70func (g *GitItemSummaryPage) StreamGitContent(qw422016 *qt422016.Writer, name, ref string) {
 71//line templates/gititemsummary.qtpl:15
 72	qw422016.N().S(`
 73<div class="row">
 74  <div class="col-md-8">
 75    `)
 76//line templates/gititemsummary.qtpl:18
 77	StreamListTags(qw422016, name, g.Tags)
 78//line templates/gititemsummary.qtpl:18
 79	qw422016.N().S(`
 80  </div>
 81  <div class="col-md-4">
 82    <div class="event-list">
 83      `)
 84//line templates/gititemsummary.qtpl:22
 85	for _, b := range g.Branches {
 86//line templates/gititemsummary.qtpl:22
 87		qw422016.N().S(`
 88      <div class="row event">
 89          <div class="col-4">
 90           `)
 91//line templates/gititemsummary.qtpl:25
 92		qw422016.E().S(b.Name().Short())
 93//line templates/gititemsummary.qtpl:25
 94		qw422016.N().S(`
 95          </div>
 96          <div class="col-8">
 97            <div class="float-end">
 98              <a href="/`)
 99//line templates/gititemsummary.qtpl:29
100		qw422016.E().S(name)
101//line templates/gititemsummary.qtpl:29
102		qw422016.N().S(`/archive/`)
103//line templates/gititemsummary.qtpl:29
104		qw422016.E().S(b.Name().Short())
105//line templates/gititemsummary.qtpl:29
106		qw422016.N().S(`.tar.gz">tar.gz</a>
107              <a href="/`)
108//line templates/gititemsummary.qtpl:30
109		qw422016.E().S(name)
110//line templates/gititemsummary.qtpl:30
111		qw422016.N().S(`/tree/`)
112//line templates/gititemsummary.qtpl:30
113		qw422016.E().S(b.Name().Short())
114//line templates/gititemsummary.qtpl:30
115		qw422016.N().S(`/">tree</a>
116              <a href="/`)
117//line templates/gititemsummary.qtpl:31
118		qw422016.E().S(name)
119//line templates/gititemsummary.qtpl:31
120		qw422016.N().S(`/log/`)
121//line templates/gititemsummary.qtpl:31
122		qw422016.E().S(b.Name().Short())
123//line templates/gititemsummary.qtpl:31
124		qw422016.N().S(`/">log</a>
125            </div>
126          </div>
127      </div>
128      `)
129//line templates/gititemsummary.qtpl:35
130	}
131//line templates/gititemsummary.qtpl:35
132	qw422016.N().S(`
133    </div>
134  </div>
135</div>
136<div class="row">
137  <div class="event-list">
138    `)
139//line templates/gititemsummary.qtpl:41
140	for _, c := range g.Commits {
141//line templates/gititemsummary.qtpl:41
142		qw422016.N().S(`
143    `)
144//line templates/gititemsummary.qtpl:42
145		StreamCommit(qw422016, name, c, false)
146//line templates/gititemsummary.qtpl:42
147		qw422016.N().S(`
148    `)
149//line templates/gititemsummary.qtpl:43
150	}
151//line templates/gititemsummary.qtpl:43
152	qw422016.N().S(`
153  </div>
154</div>
155`)
156//line templates/gititemsummary.qtpl:46
157}
158
159//line templates/gititemsummary.qtpl:46
160func (g *GitItemSummaryPage) WriteGitContent(qq422016 qtio422016.Writer, name, ref string) {
161//line templates/gititemsummary.qtpl:46
162	qw422016 := qt422016.AcquireWriter(qq422016)
163//line templates/gititemsummary.qtpl:46
164	g.StreamGitContent(qw422016, name, ref)
165//line templates/gititemsummary.qtpl:46
166	qt422016.ReleaseWriter(qw422016)
167//line templates/gititemsummary.qtpl:46
168}
169
170//line templates/gititemsummary.qtpl:46
171func (g *GitItemSummaryPage) GitContent(name, ref string) string {
172//line templates/gititemsummary.qtpl:46
173	qb422016 := qt422016.AcquireByteBuffer()
174//line templates/gititemsummary.qtpl:46
175	g.WriteGitContent(qb422016, name, ref)
176//line templates/gititemsummary.qtpl:46
177	qs422016 := string(qb422016.B)
178//line templates/gititemsummary.qtpl:46
179	qt422016.ReleaseByteBuffer(qb422016)
180//line templates/gititemsummary.qtpl:46
181	return qs422016
182//line templates/gititemsummary.qtpl:46
183}