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
|
// Code generated by qtc from "gititemblob.qtpl". DO NOT EDIT.
// See https://github.com/valyala/quicktemplate for details.
//line templates/gititemblob.qtpl:1
package templates
//line templates/gititemblob.qtpl:1
import "git.gabrielgio.me/cerrado/pkg/u"
//line templates/gititemblob.qtpl:3
import (
qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate"
)
//line templates/gititemblob.qtpl:3
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
//line templates/gititemblob.qtpl:4
type GitItemBlobPage struct {
Path []string
Content []byte
}
//line templates/gititemblob.qtpl:10
func (g *GitItemBlobPage) StreamNav(qw422016 *qt422016.Writer, name, ref string) {
//line templates/gititemblob.qtpl:10
StreamGitItemNav(qw422016, name, ref, Tree)
//line templates/gititemblob.qtpl:10
}
//line templates/gititemblob.qtpl:10
func (g *GitItemBlobPage) WriteNav(qq422016 qtio422016.Writer, name, ref string) {
//line templates/gititemblob.qtpl:10
qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/gititemblob.qtpl:10
g.StreamNav(qw422016, name, ref)
//line templates/gititemblob.qtpl:10
qt422016.ReleaseWriter(qw422016)
//line templates/gititemblob.qtpl:10
}
//line templates/gititemblob.qtpl:10
func (g *GitItemBlobPage) Nav(name, ref string) string {
//line templates/gititemblob.qtpl:10
qb422016 := qt422016.AcquireByteBuffer()
//line templates/gititemblob.qtpl:10
g.WriteNav(qb422016, name, ref)
//line templates/gititemblob.qtpl:10
qs422016 := string(qb422016.B)
//line templates/gititemblob.qtpl:10
qt422016.ReleaseByteBuffer(qb422016)
//line templates/gititemblob.qtpl:10
return qs422016
//line templates/gititemblob.qtpl:10
}
//line templates/gititemblob.qtpl:12
func (g *GitItemBlobPage) StreamGitContent(qw422016 *qt422016.Writer, name, ref string) {
//line templates/gititemblob.qtpl:12
qw422016.N().S(`
<div class="pathing">
`)
//line templates/gititemblob.qtpl:15
if len(g.Path) != 0 {
//line templates/gititemblob.qtpl:15
qw422016.N().S(`<a href="`)
//line templates/gititemblob.qtpl:16
qw422016.E().S(url(name, Folder, ref, Root, []string{}))
//line templates/gititemblob.qtpl:16
qw422016.N().S(`">root/</a>`)
//line templates/gititemblob.qtpl:17
for i, e := range g.Path[:len(g.Path)-1] {
//line templates/gititemblob.qtpl:17
qw422016.N().S(`<a href="`)
//line templates/gititemblob.qtpl:18
qw422016.E().S(url(name, Folder, ref, Root, g.Path[:1+i]))
//line templates/gititemblob.qtpl:18
qw422016.N().S(`">`)
//line templates/gititemblob.qtpl:18
qw422016.E().S(e)
//line templates/gititemblob.qtpl:18
qw422016.N().S(`/</a>`)
//line templates/gititemblob.qtpl:19
}
//line templates/gititemblob.qtpl:19
qw422016.N().S(`<a>`)
//line templates/gititemblob.qtpl:20
qw422016.E().S(u.LastOrZero(g.Path))
//line templates/gititemblob.qtpl:20
qw422016.N().S(`</a>`)
//line templates/gititemblob.qtpl:21
} else {
//line templates/gititemblob.qtpl:21
qw422016.N().S(`<a>root/</a>`)
//line templates/gititemblob.qtpl:23
}
//line templates/gititemblob.qtpl:24
qw422016.N().S(`
</div>
<div class="code-view">
`)
//line templates/gititemblob.qtpl:27
qw422016.N().Z(g.Content)
//line templates/gititemblob.qtpl:27
qw422016.N().S(`
</div>
`)
//line templates/gititemblob.qtpl:29
}
//line templates/gititemblob.qtpl:29
func (g *GitItemBlobPage) WriteGitContent(qq422016 qtio422016.Writer, name, ref string) {
//line templates/gititemblob.qtpl:29
qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/gititemblob.qtpl:29
g.StreamGitContent(qw422016, name, ref)
//line templates/gititemblob.qtpl:29
qt422016.ReleaseWriter(qw422016)
//line templates/gititemblob.qtpl:29
}
//line templates/gititemblob.qtpl:29
func (g *GitItemBlobPage) GitContent(name, ref string) string {
//line templates/gititemblob.qtpl:29
qb422016 := qt422016.AcquireByteBuffer()
//line templates/gititemblob.qtpl:29
g.WriteGitContent(qb422016, name, ref)
//line templates/gititemblob.qtpl:29
qs422016 := string(qb422016.B)
//line templates/gititemblob.qtpl:29
qt422016.ReleaseByteBuffer(qb422016)
//line templates/gititemblob.qtpl:29
return qs422016
//line templates/gititemblob.qtpl:29
}
|