aboutsummaryrefslogtreecommitdiff
path: root/templates/gitlist.qtpl.go
blob: 601dbb2fa8c947e791800ebded6aabbd64005919 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
// Code generated by qtc from "gitlist.qtpl". DO NOT EDIT.
// See https://github.com/valyala/quicktemplate for details.

//line templates/gitlist.qtpl:1
package templates

//line templates/gitlist.qtpl:1
import "git.gabrielgio.me/cerrado/pkg/service"

//line templates/gitlist.qtpl:2
import "context"

//line templates/gitlist.qtpl:4
import (
	qtio422016 "io"

	qt422016 "github.com/valyala/quicktemplate"
)

//line templates/gitlist.qtpl:4
var (
	_ = qtio422016.Copy
	_ = qt422016.AcquireByteBuffer
)

//line templates/gitlist.qtpl:5
type GitListPage struct {
	Respositories []*service.Repository
	About         []byte
}

//line templates/gitlist.qtpl:11
func (p *GitListPage) StreamTitle(qw422016 *qt422016.Writer, ctx context.Context) {
//line templates/gitlist.qtpl:11
	qw422016.N().S(`Git | List`)
//line templates/gitlist.qtpl:11
}

//line templates/gitlist.qtpl:11
func (p *GitListPage) WriteTitle(qq422016 qtio422016.Writer, ctx context.Context) {
//line templates/gitlist.qtpl:11
	qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/gitlist.qtpl:11
	p.StreamTitle(qw422016, ctx)
//line templates/gitlist.qtpl:11
	qt422016.ReleaseWriter(qw422016)
//line templates/gitlist.qtpl:11
}

//line templates/gitlist.qtpl:11
func (p *GitListPage) Title(ctx context.Context) string {
//line templates/gitlist.qtpl:11
	qb422016 := qt422016.AcquireByteBuffer()
//line templates/gitlist.qtpl:11
	p.WriteTitle(qb422016, ctx)
//line templates/gitlist.qtpl:11
	qs422016 := string(qb422016.B)
//line templates/gitlist.qtpl:11
	qt422016.ReleaseByteBuffer(qb422016)
//line templates/gitlist.qtpl:11
	return qs422016
//line templates/gitlist.qtpl:11
}

//line templates/gitlist.qtpl:13
func (p *GitListPage) StreamNavbar(qw422016 *qt422016.Writer, ctx context.Context) {
//line templates/gitlist.qtpl:13
	StreamNavbar(qw422016, ctx, Git)
//line templates/gitlist.qtpl:13
}

//line templates/gitlist.qtpl:13
func (p *GitListPage) WriteNavbar(qq422016 qtio422016.Writer, ctx context.Context) {
//line templates/gitlist.qtpl:13
	qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/gitlist.qtpl:13
	p.StreamNavbar(qw422016, ctx)
//line templates/gitlist.qtpl:13
	qt422016.ReleaseWriter(qw422016)
//line templates/gitlist.qtpl:13
}

//line templates/gitlist.qtpl:13
func (p *GitListPage) Navbar(ctx context.Context) string {
//line templates/gitlist.qtpl:13
	qb422016 := qt422016.AcquireByteBuffer()
//line templates/gitlist.qtpl:13
	p.WriteNavbar(qb422016, ctx)
//line templates/gitlist.qtpl:13
	qs422016 := string(qb422016.B)
//line templates/gitlist.qtpl:13
	qt422016.ReleaseByteBuffer(qb422016)
//line templates/gitlist.qtpl:13
	return qs422016
//line templates/gitlist.qtpl:13
}

//line templates/gitlist.qtpl:15
func (p *GitListPage) StreamContent(qw422016 *qt422016.Writer, ctx context.Context) {
//line templates/gitlist.qtpl:15
	qw422016.N().S(`
<div class="row">
  <div class="col-md-6 order-last order-md-first">
    <div class="event-list">
      `)
//line templates/gitlist.qtpl:19
	for _, r := range p.Respositories {
//line templates/gitlist.qtpl:19
		qw422016.N().S(`
      <div class="event">
        <h4>
          <a href="/`)
//line templates/gitlist.qtpl:22
		qw422016.E().S(r.Name)
//line templates/gitlist.qtpl:22
		qw422016.N().S(`/">`)
//line templates/gitlist.qtpl:22
		qw422016.E().S(r.Name)
//line templates/gitlist.qtpl:22
		qw422016.N().S(`</a>
        </h4>
        </hr>
        <p>`)
//line templates/gitlist.qtpl:25
		qw422016.E().S(r.Description)
//line templates/gitlist.qtpl:25
		qw422016.N().S(`</p>
        <p>
          <a href="/`)
//line templates/gitlist.qtpl:27
		qw422016.E().S(r.Name)
//line templates/gitlist.qtpl:27
		qw422016.N().S(`/log/`)
//line templates/gitlist.qtpl:27
		qw422016.E().S(r.Ref)
//line templates/gitlist.qtpl:27
		qw422016.N().S(`/">log</a>
          <a href="/`)
//line templates/gitlist.qtpl:28
		qw422016.E().S(r.Name)
//line templates/gitlist.qtpl:28
		qw422016.N().S(`/tree/`)
//line templates/gitlist.qtpl:28
		qw422016.E().S(r.Ref)
//line templates/gitlist.qtpl:28
		qw422016.N().S(`/">tree</a>
          <a href="/`)
//line templates/gitlist.qtpl:29
		qw422016.E().S(r.Name)
//line templates/gitlist.qtpl:29
		qw422016.N().S(`/refs/">refs</a>
        </p>
      </div>
      `)
//line templates/gitlist.qtpl:32
	}
//line templates/gitlist.qtpl:32
	qw422016.N().S(`
    </div>
  </div>
  <div id="about" class="col-md-4 order-first order-md-last">
    `)
//line templates/gitlist.qtpl:36
	qw422016.N().Z(p.About)
//line templates/gitlist.qtpl:36
	qw422016.N().S(`
    <div class="alert alert-warning text-center" role="alert">
        This project is under development, things may be broken or incomplete.
    </div>
  </div>
</div>
`)
//line templates/gitlist.qtpl:42
}

//line templates/gitlist.qtpl:42
func (p *GitListPage) WriteContent(qq422016 qtio422016.Writer, ctx context.Context) {
//line templates/gitlist.qtpl:42
	qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/gitlist.qtpl:42
	p.StreamContent(qw422016, ctx)
//line templates/gitlist.qtpl:42
	qt422016.ReleaseWriter(qw422016)
//line templates/gitlist.qtpl:42
}

//line templates/gitlist.qtpl:42
func (p *GitListPage) Content(ctx context.Context) string {
//line templates/gitlist.qtpl:42
	qb422016 := qt422016.AcquireByteBuffer()
//line templates/gitlist.qtpl:42
	p.WriteContent(qb422016, ctx)
//line templates/gitlist.qtpl:42
	qs422016 := string(qb422016.B)
//line templates/gitlist.qtpl:42
	qt422016.ReleaseByteBuffer(qb422016)
//line templates/gitlist.qtpl:42
	return qs422016
//line templates/gitlist.qtpl:42
}

//line templates/gitlist.qtpl:44
func (p *GitListPage) StreamScript(qw422016 *qt422016.Writer, ctx context.Context) {
//line templates/gitlist.qtpl:44
	qw422016.N().S(`
`)
//line templates/gitlist.qtpl:45
}

//line templates/gitlist.qtpl:45
func (p *GitListPage) WriteScript(qq422016 qtio422016.Writer, ctx context.Context) {
//line templates/gitlist.qtpl:45
	qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/gitlist.qtpl:45
	p.StreamScript(qw422016, ctx)
//line templates/gitlist.qtpl:45
	qt422016.ReleaseWriter(qw422016)
//line templates/gitlist.qtpl:45
}

//line templates/gitlist.qtpl:45
func (p *GitListPage) Script(ctx context.Context) string {
//line templates/gitlist.qtpl:45
	qb422016 := qt422016.AcquireByteBuffer()
//line templates/gitlist.qtpl:45
	p.WriteScript(qb422016, ctx)
//line templates/gitlist.qtpl:45
	qs422016 := string(qb422016.B)
//line templates/gitlist.qtpl:45
	qt422016.ReleaseByteBuffer(qb422016)
//line templates/gitlist.qtpl:45
	return qs422016
//line templates/gitlist.qtpl:45
}