diff options
Diffstat (limited to 'template/layout.qtpl.go')
| -rw-r--r-- | template/layout.qtpl.go | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/template/layout.qtpl.go b/template/layout.qtpl.go new file mode 100644 index 0000000..dc5e5d8 --- /dev/null +++ b/template/layout.qtpl.go @@ -0,0 +1,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;color: #444;padding: 0 10px;}h1, h2, h3 { line-length: 1.2; }td { text-align: left; }</style>`) +//line template/layout.qtpl:23 + } else { +//line template/layout.qtpl:24 + qw422016.N().S(css) +//line template/layout.qtpl:25 + } +//line template/layout.qtpl:27 + if len(scripts) != 0 { +//line template/layout.qtpl:28 + qw422016.N().S(scripts) +//line template/layout.qtpl:29 + } +//line template/layout.qtpl:31 + if len(title) == 0 { +//line template/layout.qtpl:31 + qw422016.N().S(`<title>Burning Rubber Paste</title>`) +//line template/layout.qtpl:33 + } else { +//line template/layout.qtpl:34 + qw422016.N().S(title) +//line template/layout.qtpl:35 + } +//line template/layout.qtpl:35 + qw422016.N().S(`</head><body><div id='main'>`) +//line template/layout.qtpl:39 + if len(contents) != 0 { +//line template/layout.qtpl:40 + qw422016.N().S(contents) +//line template/layout.qtpl:41 + } +//line template/layout.qtpl:41 + qw422016.N().S(`</div>`) +//line template/layout.qtpl:43 + if len(bodyscripts) != 0 { +//line template/layout.qtpl:44 + qw422016.N().S(bodyscripts) +//line template/layout.qtpl:45 + } +//line template/layout.qtpl:45 + qw422016.N().S(`</body></html>`) +//line template/layout.qtpl:48 + qw422016.N().S(` +`) +//line template/layout.qtpl:49 +} + +//line template/layout.qtpl:49 +func writelayout(qq422016 qtio422016.Writer, css, scripts, title, contents, bodyscripts string) { +//line template/layout.qtpl:49 + qw422016 := qt422016.AcquireWriter(qq422016) +//line template/layout.qtpl:49 + streamlayout(qw422016, css, scripts, title, contents, bodyscripts) +//line template/layout.qtpl:49 + qt422016.ReleaseWriter(qw422016) +//line template/layout.qtpl:49 +} + +//line template/layout.qtpl:49 +func layout(css, scripts, title, contents, bodyscripts string) string { +//line template/layout.qtpl:49 + qb422016 := qt422016.AcquireByteBuffer() +//line template/layout.qtpl:49 + writelayout(qb422016, css, scripts, title, contents, bodyscripts) +//line template/layout.qtpl:49 + qs422016 := string(qb422016.B) +//line template/layout.qtpl:49 + qt422016.ReleaseByteBuffer(qb422016) +//line template/layout.qtpl:49 + return qs422016 +//line template/layout.qtpl:49 +} |
