cerrado @ 98b4a72f1776d0343c0649920f031723e5ca0e47

  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("02.01.2006")
 72}
 73
 74//line base.qtpl:33
 75func Ignore[T any](v T, _ error) T {
 76	return v
 77}
 78
 79// Page prints a page implementing Page interface.
 80
 81//line base.qtpl:39
 82func StreamPageTemplate(qw422016 *qt422016.Writer, p Page) {
 83//line base.qtpl:39
 84	qw422016.N().S(`
 85<!DOCTYPE html>
 86<html lang="en">
 87    <head>
 88        <meta charset="utf-8">
 89        <link rel="icon" href="data:,">
 90        <title>`)
 91//line base.qtpl:45
 92	p.StreamTitle(qw422016)
 93//line base.qtpl:45
 94	qw422016.N().S(`</title> 
 95        <link rel="stylesheet" href="/static/main`)
 96//line base.qtpl:46
 97	qw422016.E().S(Slug)
 98//line base.qtpl:46
 99	qw422016.N().S(`.css">
100        <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
101        <meta name="viewport" content="width=device-width, initial-scale=1" />
102    </head>
103    <body>
104        `)
105//line base.qtpl:51
106	p.StreamNavbar(qw422016)
107//line base.qtpl:51
108	qw422016.N().S(`
109        <div class="container">
110            `)
111//line base.qtpl:53
112	p.StreamContent(qw422016)
113//line base.qtpl:53
114	qw422016.N().S(`
115        </div>
116    </body>
117    `)
118//line base.qtpl:56
119	p.StreamScript(qw422016)
120//line base.qtpl:56
121	qw422016.N().S(`
122</html>
123`)
124//line base.qtpl:58
125}
126
127//line base.qtpl:58
128func WritePageTemplate(qq422016 qtio422016.Writer, p Page) {
129//line base.qtpl:58
130	qw422016 := qt422016.AcquireWriter(qq422016)
131//line base.qtpl:58
132	StreamPageTemplate(qw422016, p)
133//line base.qtpl:58
134	qt422016.ReleaseWriter(qw422016)
135//line base.qtpl:58
136}
137
138//line base.qtpl:58
139func PageTemplate(p Page) string {
140//line base.qtpl:58
141	qb422016 := qt422016.AcquireByteBuffer()
142//line base.qtpl:58
143	WritePageTemplate(qb422016, p)
144//line base.qtpl:58
145	qs422016 := string(qb422016.B)
146//line base.qtpl:58
147	qt422016.ReleaseByteBuffer(qb422016)
148//line base.qtpl:58
149	return qs422016
150//line base.qtpl:58
151}
152
153//line base.qtpl:60
154type BasePage struct{}
155
156//line base.qtpl:61
157func (p *BasePage) StreamTitle(qw422016 *qt422016.Writer) {
158//line base.qtpl:61
159	qw422016.N().S(`Empty`)
160//line base.qtpl:61
161}
162
163//line base.qtpl:61
164func (p *BasePage) WriteTitle(qq422016 qtio422016.Writer) {
165//line base.qtpl:61
166	qw422016 := qt422016.AcquireWriter(qq422016)
167//line base.qtpl:61
168	p.StreamTitle(qw422016)
169//line base.qtpl:61
170	qt422016.ReleaseWriter(qw422016)
171//line base.qtpl:61
172}
173
174//line base.qtpl:61
175func (p *BasePage) Title() string {
176//line base.qtpl:61
177	qb422016 := qt422016.AcquireByteBuffer()
178//line base.qtpl:61
179	p.WriteTitle(qb422016)
180//line base.qtpl:61
181	qs422016 := string(qb422016.B)
182//line base.qtpl:61
183	qt422016.ReleaseByteBuffer(qb422016)
184//line base.qtpl:61
185	return qs422016
186//line base.qtpl:61
187}
188
189//line base.qtpl:62
190func (p *BasePage) StreamBody(qw422016 *qt422016.Writer) {
191//line base.qtpl:62
192	qw422016.N().S(`HelloWorld`)
193//line base.qtpl:62
194}
195
196//line base.qtpl:62
197func (p *BasePage) WriteBody(qq422016 qtio422016.Writer) {
198//line base.qtpl:62
199	qw422016 := qt422016.AcquireWriter(qq422016)
200//line base.qtpl:62
201	p.StreamBody(qw422016)
202//line base.qtpl:62
203	qt422016.ReleaseWriter(qw422016)
204//line base.qtpl:62
205}
206
207//line base.qtpl:62
208func (p *BasePage) Body() string {
209//line base.qtpl:62
210	qb422016 := qt422016.AcquireByteBuffer()
211//line base.qtpl:62
212	p.WriteBody(qb422016)
213//line base.qtpl:62
214	qs422016 := string(qb422016.B)
215//line base.qtpl:62
216	qt422016.ReleaseByteBuffer(qb422016)
217//line base.qtpl:62
218	return qs422016
219//line base.qtpl:62
220}
221
222//line base.qtpl:63
223func (p *BasePage) StreamScript(qw422016 *qt422016.Writer) {
224//line base.qtpl:63
225}
226
227//line base.qtpl:63
228func (p *BasePage) WriteScript(qq422016 qtio422016.Writer) {
229//line base.qtpl:63
230	qw422016 := qt422016.AcquireWriter(qq422016)
231//line base.qtpl:63
232	p.StreamScript(qw422016)
233//line base.qtpl:63
234	qt422016.ReleaseWriter(qw422016)
235//line base.qtpl:63
236}
237
238//line base.qtpl:63
239func (p *BasePage) Script() string {
240//line base.qtpl:63
241	qb422016 := qt422016.AcquireByteBuffer()
242//line base.qtpl:63
243	p.WriteScript(qb422016)
244//line base.qtpl:63
245	qs422016 := string(qb422016.B)
246//line base.qtpl:63
247	qt422016.ReleaseByteBuffer(qb422016)
248//line base.qtpl:63
249	return qs422016
250//line base.qtpl:63
251}