cerrado @ 3be25766027178489a0c5f1f82e65f9be518c79c

  1// Code generated by qtc from "base.qtpl". DO NOT EDIT.
  2// See https://github.com/valyala/quicktemplate for details.
  3
  4// This is a base page template. All the other template pages implement this interface.
  5//
  6
  7//line base.qtpl:3
  8package templates
  9
 10//line base.qtpl:3
 11import "strconv"
 12
 13//line base.qtpl:5
 14import (
 15	qtio422016 "io"
 16
 17	qt422016 "github.com/valyala/quicktemplate"
 18)
 19
 20//line base.qtpl:5
 21var (
 22	_ = qtio422016.Copy
 23	_ = qt422016.AcquireByteBuffer
 24)
 25
 26//line base.qtpl:6
 27type Page interface {
 28//line base.qtpl:6
 29	Title() string
 30//line base.qtpl:6
 31	StreamTitle(qw422016 *qt422016.Writer)
 32//line base.qtpl:6
 33	WriteTitle(qq422016 qtio422016.Writer)
 34//line base.qtpl:6
 35	Content() string
 36//line base.qtpl:6
 37	StreamContent(qw422016 *qt422016.Writer)
 38//line base.qtpl:6
 39	WriteContent(qq422016 qtio422016.Writer)
 40//line base.qtpl:6
 41	Script() string
 42//line base.qtpl:6
 43	StreamScript(qw422016 *qt422016.Writer)
 44//line base.qtpl:6
 45	WriteScript(qq422016 qtio422016.Writer)
 46//line base.qtpl:6
 47}
 48
 49//line base.qtpl:14
 50func FromUInttoString(u *uint) string {
 51	if u != nil {
 52		return strconv.FormatUint(uint64(*u), 10)
 53	}
 54	return ""
 55}
 56
 57// Page prints a page implementing Page interface.
 58
 59//line base.qtpl:24
 60func StreamPageTemplate(qw422016 *qt422016.Writer, p Page) {
 61//line base.qtpl:24
 62	qw422016.N().S(`
 63<html lang="en">
 64    <head>
 65        <meta charset="utf-8">
 66        <title>img | `)
 67//line base.qtpl:28
 68	p.StreamTitle(qw422016)
 69//line base.qtpl:28
 70	qw422016.N().S(`</title> 
 71        <link rel="stylesheet" href="/static/main.css">
 72        <meta name="viewport" content="width=device-width, initial-scale=1" />
 73    </head>
 74    <body>
 75        <div>
 76            `)
 77//line base.qtpl:34
 78	p.StreamContent(qw422016)
 79//line base.qtpl:34
 80	qw422016.N().S(`
 81        </div>
 82    </body>
 83    `)
 84//line base.qtpl:37
 85	p.StreamScript(qw422016)
 86//line base.qtpl:37
 87	qw422016.N().S(`
 88</html>
 89`)
 90//line base.qtpl:39
 91}
 92
 93//line base.qtpl:39
 94func WritePageTemplate(qq422016 qtio422016.Writer, p Page) {
 95//line base.qtpl:39
 96	qw422016 := qt422016.AcquireWriter(qq422016)
 97//line base.qtpl:39
 98	StreamPageTemplate(qw422016, p)
 99//line base.qtpl:39
100	qt422016.ReleaseWriter(qw422016)
101//line base.qtpl:39
102}
103
104//line base.qtpl:39
105func PageTemplate(p Page) string {
106//line base.qtpl:39
107	qb422016 := qt422016.AcquireByteBuffer()
108//line base.qtpl:39
109	WritePageTemplate(qb422016, p)
110//line base.qtpl:39
111	qs422016 := string(qb422016.B)
112//line base.qtpl:39
113	qt422016.ReleaseByteBuffer(qb422016)
114//line base.qtpl:39
115	return qs422016
116//line base.qtpl:39
117}
118
119//line base.qtpl:41
120type BasePage struct{}
121
122//line base.qtpl:42
123func (p *BasePage) StreamTitle(qw422016 *qt422016.Writer) {
124//line base.qtpl:42
125	qw422016.N().S(`Empty`)
126//line base.qtpl:42
127}
128
129//line base.qtpl:42
130func (p *BasePage) WriteTitle(qq422016 qtio422016.Writer) {
131//line base.qtpl:42
132	qw422016 := qt422016.AcquireWriter(qq422016)
133//line base.qtpl:42
134	p.StreamTitle(qw422016)
135//line base.qtpl:42
136	qt422016.ReleaseWriter(qw422016)
137//line base.qtpl:42
138}
139
140//line base.qtpl:42
141func (p *BasePage) Title() string {
142//line base.qtpl:42
143	qb422016 := qt422016.AcquireByteBuffer()
144//line base.qtpl:42
145	p.WriteTitle(qb422016)
146//line base.qtpl:42
147	qs422016 := string(qb422016.B)
148//line base.qtpl:42
149	qt422016.ReleaseByteBuffer(qb422016)
150//line base.qtpl:42
151	return qs422016
152//line base.qtpl:42
153}
154
155//line base.qtpl:43
156func (p *BasePage) StreamBody(qw422016 *qt422016.Writer) {
157//line base.qtpl:43
158	qw422016.N().S(`HelloWorld`)
159//line base.qtpl:43
160}
161
162//line base.qtpl:43
163func (p *BasePage) WriteBody(qq422016 qtio422016.Writer) {
164//line base.qtpl:43
165	qw422016 := qt422016.AcquireWriter(qq422016)
166//line base.qtpl:43
167	p.StreamBody(qw422016)
168//line base.qtpl:43
169	qt422016.ReleaseWriter(qw422016)
170//line base.qtpl:43
171}
172
173//line base.qtpl:43
174func (p *BasePage) Body() string {
175//line base.qtpl:43
176	qb422016 := qt422016.AcquireByteBuffer()
177//line base.qtpl:43
178	p.WriteBody(qb422016)
179//line base.qtpl:43
180	qs422016 := string(qb422016.B)
181//line base.qtpl:43
182	qt422016.ReleaseByteBuffer(qb422016)
183//line base.qtpl:43
184	return qs422016
185//line base.qtpl:43
186}
187
188//line base.qtpl:44
189func (p *BasePage) StreamScript(qw422016 *qt422016.Writer) {
190//line base.qtpl:44
191}
192
193//line base.qtpl:44
194func (p *BasePage) WriteScript(qq422016 qtio422016.Writer) {
195//line base.qtpl:44
196	qw422016 := qt422016.AcquireWriter(qq422016)
197//line base.qtpl:44
198	p.StreamScript(qw422016)
199//line base.qtpl:44
200	qt422016.ReleaseWriter(qw422016)
201//line base.qtpl:44
202}
203
204//line base.qtpl:44
205func (p *BasePage) Script() string {
206//line base.qtpl:44
207	qb422016 := qt422016.AcquireByteBuffer()
208//line base.qtpl:44
209	p.WriteScript(qb422016)
210//line base.qtpl:44
211	qs422016 := string(qb422016.B)
212//line base.qtpl:44
213	qt422016.ReleaseByteBuffer(qb422016)
214//line base.qtpl:44
215	return qs422016
216//line base.qtpl:44
217}