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