1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
// Code generated by qtc from "layout.qtpl". DO NOT EDIT.
// See https://github.com/valyala/quicktemplate for details.
// The main layout function.
//line template/layout.qtpl:2
package template
//line template/layout.qtpl:2
import (
qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate"
)
//line template/layout.qtpl:2
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
//line template/layout.qtpl:2
func streamlayout(qw422016 *qt422016.Writer, css, scripts, title, contents, bodyscripts string) {
//line template/layout.qtpl:2
qw422016.N().S(`
<!DOCTYPE html>
`)
//line template/layout.qtpl:4
qw422016.N().S(`<html lang='en'><head><meta charset='utf-8' /><meta name='viewport' content='width=device-width, initial-scale=1' />`)
//line template/layout.qtpl:10
if len(css) == 0 {
//line template/layout.qtpl:10
qw422016.N().S(`<style>body {margin: 40px auto;max-width: 650px;line-height: 1.6;font-size: 18px;background: #fff;color: #444;padding: 0 10px;}h1, h2, h3 { line-length: 1.2; }td { text-align: left; }</style>`)
//line template/layout.qtpl:24
} else {
//line template/layout.qtpl:25
qw422016.N().S(css)
//line template/layout.qtpl:26
}
//line template/layout.qtpl:28
if len(scripts) != 0 {
//line template/layout.qtpl:29
qw422016.N().S(scripts)
//line template/layout.qtpl:30
}
//line template/layout.qtpl:32
if len(title) == 0 {
//line template/layout.qtpl:32
qw422016.N().S(`<title>Burning Rubber Paste</title>`)
//line template/layout.qtpl:34
} else {
//line template/layout.qtpl:35
qw422016.N().S(title)
//line template/layout.qtpl:36
}
//line template/layout.qtpl:36
qw422016.N().S(`</head><body><div id='main'>`)
//line template/layout.qtpl:40
if len(contents) != 0 {
//line template/layout.qtpl:41
qw422016.N().S(contents)
//line template/layout.qtpl:42
}
//line template/layout.qtpl:42
qw422016.N().S(`</div>`)
//line template/layout.qtpl:44
if len(bodyscripts) != 0 {
//line template/layout.qtpl:45
qw422016.N().S(bodyscripts)
//line template/layout.qtpl:46
}
//line template/layout.qtpl:46
qw422016.N().S(`</body></html>`)
//line template/layout.qtpl:49
qw422016.N().S(`
`)
//line template/layout.qtpl:50
}
//line template/layout.qtpl:50
func writelayout(qq422016 qtio422016.Writer, css, scripts, title, contents, bodyscripts string) {
//line template/layout.qtpl:50
qw422016 := qt422016.AcquireWriter(qq422016)
//line template/layout.qtpl:50
streamlayout(qw422016, css, scripts, title, contents, bodyscripts)
//line template/layout.qtpl:50
qt422016.ReleaseWriter(qw422016)
//line template/layout.qtpl:50
}
//line template/layout.qtpl:50
func layout(css, scripts, title, contents, bodyscripts string) string {
//line template/layout.qtpl:50
qb422016 := qt422016.AcquireByteBuffer()
//line template/layout.qtpl:50
writelayout(qb422016, css, scripts, title, contents, bodyscripts)
//line template/layout.qtpl:50
qs422016 := string(qb422016.B)
//line template/layout.qtpl:50
qt422016.ReleaseByteBuffer(qb422016)
//line template/layout.qtpl:50
return qs422016
//line template/layout.qtpl:50
}
|