cerrado @ v0.0.10

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