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 <link rel="icon" href="data:,">
67 <title>cerrado | `)
68//line base.qtpl:29
69 p.StreamTitle(qw422016)
70//line base.qtpl:29
71 qw422016.N().S(`</title>
72 <link rel="stylesheet" href="/static/main.css">
73 <meta name="viewport" content="width=device-width, initial-scale=1" />
74 </head>
75 <body>
76 <nav class="container navbar navbar-expand-sm">
77 <ul class="navbar-nav">
78 <li class="nav-link" href="/git">git</li>
79 <li class="nav-link" href="/list">list</li>
80 <li class="nav-link" href="/about">about</li>
81 </ul>
82 </nav>
83 <div class="container">
84 `)
85//line base.qtpl:42
86 p.StreamContent(qw422016)
87//line base.qtpl:42
88 qw422016.N().S(`
89 </div>
90 </body>
91 `)
92//line base.qtpl:45
93 p.StreamScript(qw422016)
94//line base.qtpl:45
95 qw422016.N().S(`
96</html>
97`)
98//line base.qtpl:47
99}
100
101//line base.qtpl:47
102func WritePageTemplate(qq422016 qtio422016.Writer, p Page) {
103//line base.qtpl:47
104 qw422016 := qt422016.AcquireWriter(qq422016)
105//line base.qtpl:47
106 StreamPageTemplate(qw422016, p)
107//line base.qtpl:47
108 qt422016.ReleaseWriter(qw422016)
109//line base.qtpl:47
110}
111
112//line base.qtpl:47
113func PageTemplate(p Page) string {
114//line base.qtpl:47
115 qb422016 := qt422016.AcquireByteBuffer()
116//line base.qtpl:47
117 WritePageTemplate(qb422016, p)
118//line base.qtpl:47
119 qs422016 := string(qb422016.B)
120//line base.qtpl:47
121 qt422016.ReleaseByteBuffer(qb422016)
122//line base.qtpl:47
123 return qs422016
124//line base.qtpl:47
125}
126
127//line base.qtpl:49
128type BasePage struct{}
129
130//line base.qtpl:50
131func (p *BasePage) StreamTitle(qw422016 *qt422016.Writer) {
132//line base.qtpl:50
133 qw422016.N().S(`Empty`)
134//line base.qtpl:50
135}
136
137//line base.qtpl:50
138func (p *BasePage) WriteTitle(qq422016 qtio422016.Writer) {
139//line base.qtpl:50
140 qw422016 := qt422016.AcquireWriter(qq422016)
141//line base.qtpl:50
142 p.StreamTitle(qw422016)
143//line base.qtpl:50
144 qt422016.ReleaseWriter(qw422016)
145//line base.qtpl:50
146}
147
148//line base.qtpl:50
149func (p *BasePage) Title() string {
150//line base.qtpl:50
151 qb422016 := qt422016.AcquireByteBuffer()
152//line base.qtpl:50
153 p.WriteTitle(qb422016)
154//line base.qtpl:50
155 qs422016 := string(qb422016.B)
156//line base.qtpl:50
157 qt422016.ReleaseByteBuffer(qb422016)
158//line base.qtpl:50
159 return qs422016
160//line base.qtpl:50
161}
162
163//line base.qtpl:51
164func (p *BasePage) StreamBody(qw422016 *qt422016.Writer) {
165//line base.qtpl:51
166 qw422016.N().S(`HelloWorld`)
167//line base.qtpl:51
168}
169
170//line base.qtpl:51
171func (p *BasePage) WriteBody(qq422016 qtio422016.Writer) {
172//line base.qtpl:51
173 qw422016 := qt422016.AcquireWriter(qq422016)
174//line base.qtpl:51
175 p.StreamBody(qw422016)
176//line base.qtpl:51
177 qt422016.ReleaseWriter(qw422016)
178//line base.qtpl:51
179}
180
181//line base.qtpl:51
182func (p *BasePage) Body() string {
183//line base.qtpl:51
184 qb422016 := qt422016.AcquireByteBuffer()
185//line base.qtpl:51
186 p.WriteBody(qb422016)
187//line base.qtpl:51
188 qs422016 := string(qb422016.B)
189//line base.qtpl:51
190 qt422016.ReleaseByteBuffer(qb422016)
191//line base.qtpl:51
192 return qs422016
193//line base.qtpl:51
194}
195
196//line base.qtpl:52
197func (p *BasePage) StreamScript(qw422016 *qt422016.Writer) {
198//line base.qtpl:52
199}
200
201//line base.qtpl:52
202func (p *BasePage) WriteScript(qq422016 qtio422016.Writer) {
203//line base.qtpl:52
204 qw422016 := qt422016.AcquireWriter(qq422016)
205//line base.qtpl:52
206 p.StreamScript(qw422016)
207//line base.qtpl:52
208 qt422016.ReleaseWriter(qw422016)
209//line base.qtpl:52
210}
211
212//line base.qtpl:52
213func (p *BasePage) Script() string {
214//line base.qtpl:52
215 qb422016 := qt422016.AcquireByteBuffer()
216//line base.qtpl:52
217 p.WriteScript(qb422016)
218//line base.qtpl:52
219 qs422016 := string(qb422016.B)
220//line base.qtpl:52
221 qt422016.ReleaseByteBuffer(qb422016)
222//line base.qtpl:52
223 return qs422016
224//line base.qtpl:52
225}