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