cerrado @ 2e4b2fb52a539188b27212005d626f0849e78196

  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 templates/base.qtpl:3
  8package templates
  9
 10//line templates/base.qtpl:3
 11import "strconv"
 12
 13//line templates/base.qtpl:4
 14import "time"
 15
 16//line templates/base.qtpl:6
 17import (
 18	qtio422016 "io"
 19
 20	qt422016 "github.com/valyala/quicktemplate"
 21)
 22
 23//line templates/base.qtpl:6
 24var (
 25	_ = qtio422016.Copy
 26	_ = qt422016.AcquireByteBuffer
 27)
 28
 29//line templates/base.qtpl:7
 30var Slug = ""
 31
 32//line templates/base.qtpl:11
 33type Page interface {
 34//line templates/base.qtpl:11
 35	Title() string
 36//line templates/base.qtpl:11
 37	StreamTitle(qw422016 *qt422016.Writer)
 38//line templates/base.qtpl:11
 39	WriteTitle(qq422016 qtio422016.Writer)
 40//line templates/base.qtpl:11
 41	Content() string
 42//line templates/base.qtpl:11
 43	StreamContent(qw422016 *qt422016.Writer)
 44//line templates/base.qtpl:11
 45	WriteContent(qq422016 qtio422016.Writer)
 46//line templates/base.qtpl:11
 47	Script() string
 48//line templates/base.qtpl:11
 49	StreamScript(qw422016 *qt422016.Writer)
 50//line templates/base.qtpl:11
 51	WriteScript(qq422016 qtio422016.Writer)
 52//line templates/base.qtpl:11
 53	Navbar() string
 54//line templates/base.qtpl:11
 55	StreamNavbar(qw422016 *qt422016.Writer)
 56//line templates/base.qtpl:11
 57	WriteNavbar(qq422016 qtio422016.Writer)
 58//line templates/base.qtpl:11
 59}
 60
 61//line templates/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 templates/base.qtpl:28
 70func TimeFormat(t time.Time) string {
 71	return t.Format("02.01.2006")
 72}
 73
 74//line templates/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 templates/base.qtpl:39
 82func StreamPageTemplate(qw422016 *qt422016.Writer, p Page) {
 83//line templates/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 templates/base.qtpl:45
 92	p.StreamTitle(qw422016)
 93//line templates/base.qtpl:45
 94	qw422016.N().S(`</title> 
 95    <link rel="stylesheet" href="/static/main`)
 96//line templates/base.qtpl:46
 97	qw422016.E().S(Slug)
 98//line templates/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 templates/base.qtpl:51
106	p.StreamNavbar(qw422016)
107//line templates/base.qtpl:51
108	qw422016.N().S(`
109    <div class="container">
110      `)
111//line templates/base.qtpl:53
112	p.StreamContent(qw422016)
113//line templates/base.qtpl:53
114	qw422016.N().S(`
115    </div>
116  </body>
117  `)
118//line templates/base.qtpl:56
119	p.StreamScript(qw422016)
120//line templates/base.qtpl:56
121	qw422016.N().S(`
122</html>
123`)
124//line templates/base.qtpl:58
125}
126
127//line templates/base.qtpl:58
128func WritePageTemplate(qq422016 qtio422016.Writer, p Page) {
129//line templates/base.qtpl:58
130	qw422016 := qt422016.AcquireWriter(qq422016)
131//line templates/base.qtpl:58
132	StreamPageTemplate(qw422016, p)
133//line templates/base.qtpl:58
134	qt422016.ReleaseWriter(qw422016)
135//line templates/base.qtpl:58
136}
137
138//line templates/base.qtpl:58
139func PageTemplate(p Page) string {
140//line templates/base.qtpl:58
141	qb422016 := qt422016.AcquireByteBuffer()
142//line templates/base.qtpl:58
143	WritePageTemplate(qb422016, p)
144//line templates/base.qtpl:58
145	qs422016 := string(qb422016.B)
146//line templates/base.qtpl:58
147	qt422016.ReleaseByteBuffer(qb422016)
148//line templates/base.qtpl:58
149	return qs422016
150//line templates/base.qtpl:58
151}