cerrado @ 306a8cdf6fac4e3ec2bfeda6c9952f603a5577e1

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