cerrado @ master

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