cerrado @ d0e0c1eb99303e1000140d4b98c610077278dc42

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