aboutsummaryrefslogtreecommitdiff
path: root/templates/base.qtpl.go
blob: f78744dd11eaa501772cc9945807fc405f570cf2 (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
// Code generated by qtc from "base.qtpl". DO NOT EDIT.
// See https://github.com/valyala/quicktemplate for details.

// This is a base page template. All the other template pages implement this interface.
//

//line base.qtpl:3
package templates

//line base.qtpl:3
import "strconv"

//line base.qtpl:5
import (
	qtio422016 "io"

	qt422016 "github.com/valyala/quicktemplate"
)

//line base.qtpl:5
var (
	_ = qtio422016.Copy
	_ = qt422016.AcquireByteBuffer
)

//line base.qtpl:6
type Page interface {
//line base.qtpl:6
	Title() string
//line base.qtpl:6
	StreamTitle(qw422016 *qt422016.Writer)
//line base.qtpl:6
	WriteTitle(qq422016 qtio422016.Writer)
//line base.qtpl:6
	Content() string
//line base.qtpl:6
	StreamContent(qw422016 *qt422016.Writer)
//line base.qtpl:6
	WriteContent(qq422016 qtio422016.Writer)
//line base.qtpl:6
	Script() string
//line base.qtpl:6
	StreamScript(qw422016 *qt422016.Writer)
//line base.qtpl:6
	WriteScript(qq422016 qtio422016.Writer)
//line base.qtpl:6
}

//line base.qtpl:14
func FromUInttoString(u *uint) string {
	if u != nil {
		return strconv.FormatUint(uint64(*u), 10)
	}
	return ""
}

// Page prints a page implementing Page interface.

//line base.qtpl:24
func StreamPageTemplate(qw422016 *qt422016.Writer, p Page) {
//line base.qtpl:24
	qw422016.N().S(`
<html lang="en">
    <head>
        <meta charset="utf-8">
        <link rel="icon" href="data:,">
        <title>cerrado | `)
//line base.qtpl:29
	p.StreamTitle(qw422016)
//line base.qtpl:29
	qw422016.N().S(`</title> 
        <link rel="stylesheet" href="/static/main.css">
        <meta name="viewport" content="width=device-width, initial-scale=1" />
    </head>
    <body>
        <nav class="navbar navbar-expand bg-body-tertiary">
          <div class="container-fluid">
            <div class="collapse navbar-collapse">
              <div class="navbar-nav">
                <a class="nav-link" href="/git">git</a>
                <a class="nav-link" href="/list">list</a>
              </div>
            </div>
          </div>
        </nav>
        <div class="container">
            `)
//line base.qtpl:45
	p.StreamContent(qw422016)
//line base.qtpl:45
	qw422016.N().S(`
        </div>
    </body>
    `)
//line base.qtpl:48
	p.StreamScript(qw422016)
//line base.qtpl:48
	qw422016.N().S(`
</html>
`)
//line base.qtpl:50
}

//line base.qtpl:50
func WritePageTemplate(qq422016 qtio422016.Writer, p Page) {
//line base.qtpl:50
	qw422016 := qt422016.AcquireWriter(qq422016)
//line base.qtpl:50
	StreamPageTemplate(qw422016, p)
//line base.qtpl:50
	qt422016.ReleaseWriter(qw422016)
//line base.qtpl:50
}

//line base.qtpl:50
func PageTemplate(p Page) string {
//line base.qtpl:50
	qb422016 := qt422016.AcquireByteBuffer()
//line base.qtpl:50
	WritePageTemplate(qb422016, p)
//line base.qtpl:50
	qs422016 := string(qb422016.B)
//line base.qtpl:50
	qt422016.ReleaseByteBuffer(qb422016)
//line base.qtpl:50
	return qs422016
//line base.qtpl:50
}

//line base.qtpl:52
type BasePage struct{}

//line base.qtpl:53
func (p *BasePage) StreamTitle(qw422016 *qt422016.Writer) {
//line base.qtpl:53
	qw422016.N().S(`Empty`)
//line base.qtpl:53
}

//line base.qtpl:53
func (p *BasePage) WriteTitle(qq422016 qtio422016.Writer) {
//line base.qtpl:53
	qw422016 := qt422016.AcquireWriter(qq422016)
//line base.qtpl:53
	p.StreamTitle(qw422016)
//line base.qtpl:53
	qt422016.ReleaseWriter(qw422016)
//line base.qtpl:53
}

//line base.qtpl:53
func (p *BasePage) Title() string {
//line base.qtpl:53
	qb422016 := qt422016.AcquireByteBuffer()
//line base.qtpl:53
	p.WriteTitle(qb422016)
//line base.qtpl:53
	qs422016 := string(qb422016.B)
//line base.qtpl:53
	qt422016.ReleaseByteBuffer(qb422016)
//line base.qtpl:53
	return qs422016
//line base.qtpl:53
}

//line base.qtpl:54
func (p *BasePage) StreamBody(qw422016 *qt422016.Writer) {
//line base.qtpl:54
	qw422016.N().S(`HelloWorld`)
//line base.qtpl:54
}

//line base.qtpl:54
func (p *BasePage) WriteBody(qq422016 qtio422016.Writer) {
//line base.qtpl:54
	qw422016 := qt422016.AcquireWriter(qq422016)
//line base.qtpl:54
	p.StreamBody(qw422016)
//line base.qtpl:54
	qt422016.ReleaseWriter(qw422016)
//line base.qtpl:54
}

//line base.qtpl:54
func (p *BasePage) Body() string {
//line base.qtpl:54
	qb422016 := qt422016.AcquireByteBuffer()
//line base.qtpl:54
	p.WriteBody(qb422016)
//line base.qtpl:54
	qs422016 := string(qb422016.B)
//line base.qtpl:54
	qt422016.ReleaseByteBuffer(qb422016)
//line base.qtpl:54
	return qs422016
//line base.qtpl:54
}

//line base.qtpl:55
func (p *BasePage) StreamScript(qw422016 *qt422016.Writer) {
//line base.qtpl:55
}

//line base.qtpl:55
func (p *BasePage) WriteScript(qq422016 qtio422016.Writer) {
//line base.qtpl:55
	qw422016 := qt422016.AcquireWriter(qq422016)
//line base.qtpl:55
	p.StreamScript(qw422016)
//line base.qtpl:55
	qt422016.ReleaseWriter(qw422016)
//line base.qtpl:55
}

//line base.qtpl:55
func (p *BasePage) Script() string {
//line base.qtpl:55
	qb422016 := qt422016.AcquireByteBuffer()
//line base.qtpl:55
	p.WriteScript(qb422016)
//line base.qtpl:55
	qs422016 := string(qb422016.B)
//line base.qtpl:55
	qt422016.ReleaseByteBuffer(qb422016)
//line base.qtpl:55
	return qs422016
//line base.qtpl:55
}