summaryrefslogtreecommitdiffhomepage
path: root/template
diff options
context:
space:
mode:
Diffstat (limited to 'template')
-rw-r--r--template/code.qtpl.go81
-rw-r--r--template/layout.qtpl.go70
2 files changed, 96 insertions, 55 deletions
diff --git a/template/code.qtpl.go b/template/code.qtpl.go
index 2fa1401..3f4e19b 100644
--- a/template/code.qtpl.go
+++ b/template/code.qtpl.go
@@ -25,7 +25,7 @@ func StreamCode(qw422016 *qt422016.Writer, lang, data string) {
qw422016.N().S(`
`)
//line template/code.qtpl:3
- streamlayout(qw422016, " ", code_scripts(lang), "", code_contents(lang, data), code_bodyscripts(lang))
+ streamlayout(qw422016, code_css(), code_scripts(lang), "", code_contents(lang, data), code_bodyscripts(lang))
//line template/code.qtpl:3
qw422016.N().S(`
`)
@@ -161,47 +161,88 @@ func code_bodyscripts(lang string) string {
//line template/code.qtpl:23
}
-// The code contents.
+// The code css.
//line template/code.qtpl:26
-func streamcode_contents(qw422016 *qt422016.Writer, lang, data string) {
+func streamcode_css(qw422016 *qt422016.Writer) {
//line template/code.qtpl:26
qw422016.N().S(`
+ <style>
+ pre[class*="language-"] code[class*="language-"] {
+ white-space: pre-wrap;
+ }
+ </style>
+`)
+//line template/code.qtpl:32
+}
+
+//line template/code.qtpl:32
+func writecode_css(qq422016 qtio422016.Writer) {
+//line template/code.qtpl:32
+ qw422016 := qt422016.AcquireWriter(qq422016)
+//line template/code.qtpl:32
+ streamcode_css(qw422016)
+//line template/code.qtpl:32
+ qt422016.ReleaseWriter(qw422016)
+//line template/code.qtpl:32
+}
+
+//line template/code.qtpl:32
+func code_css() string {
+//line template/code.qtpl:32
+ qb422016 := qt422016.AcquireByteBuffer()
+//line template/code.qtpl:32
+ writecode_css(qb422016)
+//line template/code.qtpl:32
+ qs422016 := string(qb422016.B)
+//line template/code.qtpl:32
+ qt422016.ReleaseByteBuffer(qb422016)
+//line template/code.qtpl:32
+ return qs422016
+//line template/code.qtpl:32
+}
+
+// The code contents.
+
+//line template/code.qtpl:35
+func streamcode_contents(qw422016 *qt422016.Writer, lang, data string) {
+//line template/code.qtpl:35
+ qw422016.N().S(`
<pre><code class='language-`)
-//line template/code.qtpl:27
+//line template/code.qtpl:36
qw422016.E().S(lang)
-//line template/code.qtpl:27
+//line template/code.qtpl:36
qw422016.N().S(`'>`)
-//line template/code.qtpl:27
+//line template/code.qtpl:36
qw422016.E().S(data)
-//line template/code.qtpl:27
+//line template/code.qtpl:36
qw422016.N().S(`</code></pre>
`)
-//line template/code.qtpl:28
+//line template/code.qtpl:37
}
-//line template/code.qtpl:28
+//line template/code.qtpl:37
func writecode_contents(qq422016 qtio422016.Writer, lang, data string) {
-//line template/code.qtpl:28
+//line template/code.qtpl:37
qw422016 := qt422016.AcquireWriter(qq422016)
-//line template/code.qtpl:28
+//line template/code.qtpl:37
streamcode_contents(qw422016, lang, data)
-//line template/code.qtpl:28
+//line template/code.qtpl:37
qt422016.ReleaseWriter(qw422016)
-//line template/code.qtpl:28
+//line template/code.qtpl:37
}
-//line template/code.qtpl:28
+//line template/code.qtpl:37
func code_contents(lang, data string) string {
-//line template/code.qtpl:28
+//line template/code.qtpl:37
qb422016 := qt422016.AcquireByteBuffer()
-//line template/code.qtpl:28
+//line template/code.qtpl:37
writecode_contents(qb422016, lang, data)
-//line template/code.qtpl:28
+//line template/code.qtpl:37
qs422016 := string(qb422016.B)
-//line template/code.qtpl:28
+//line template/code.qtpl:37
qt422016.ReleaseByteBuffer(qb422016)
-//line template/code.qtpl:28
+//line template/code.qtpl:37
return qs422016
-//line template/code.qtpl:28
+//line template/code.qtpl:37
}
diff --git a/template/layout.qtpl.go b/template/layout.qtpl.go
index dc5e5d8..8f039ae 100644
--- a/template/layout.qtpl.go
+++ b/template/layout.qtpl.go
@@ -30,75 +30,75 @@ func streamlayout(qw422016 *qt422016.Writer, css, scripts, title, contents, body
//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 {
+ 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
- qw422016.N().S(css)
+ } else {
//line template/layout.qtpl:25
+ qw422016.N().S(css)
+//line template/layout.qtpl:26
}
-//line template/layout.qtpl:27
- if len(scripts) != 0 {
//line template/layout.qtpl:28
- qw422016.N().S(scripts)
+ if len(scripts) != 0 {
//line template/layout.qtpl:29
+ qw422016.N().S(scripts)
+//line template/layout.qtpl:30
}
-//line template/layout.qtpl:31
+//line template/layout.qtpl:32
if len(title) == 0 {
-//line template/layout.qtpl:31
+//line template/layout.qtpl:32
qw422016.N().S(`<title>Burning Rubber Paste</title>`)
-//line template/layout.qtpl:33
- } else {
//line template/layout.qtpl:34
- qw422016.N().S(title)
+ } else {
//line template/layout.qtpl:35
+ qw422016.N().S(title)
+//line template/layout.qtpl:36
}
-//line template/layout.qtpl:35
+//line template/layout.qtpl:36
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)
+ if len(contents) != 0 {
//line template/layout.qtpl:41
+ qw422016.N().S(contents)
+//line template/layout.qtpl:42
}
-//line template/layout.qtpl:41
+//line template/layout.qtpl:42
qw422016.N().S(`</div>`)
-//line template/layout.qtpl:43
- if len(bodyscripts) != 0 {
//line template/layout.qtpl:44
- qw422016.N().S(bodyscripts)
+ if len(bodyscripts) != 0 {
//line template/layout.qtpl:45
+ qw422016.N().S(bodyscripts)
+//line template/layout.qtpl:46
}
-//line template/layout.qtpl:45
+//line template/layout.qtpl:46
qw422016.N().S(`</body></html>`)
-//line template/layout.qtpl:48
+//line template/layout.qtpl:49
qw422016.N().S(`
`)
-//line template/layout.qtpl:49
+//line template/layout.qtpl:50
}
-//line template/layout.qtpl:49
+//line template/layout.qtpl:50
func writelayout(qq422016 qtio422016.Writer, css, scripts, title, contents, bodyscripts string) {
-//line template/layout.qtpl:49
+//line template/layout.qtpl:50
qw422016 := qt422016.AcquireWriter(qq422016)
-//line template/layout.qtpl:49
+//line template/layout.qtpl:50
streamlayout(qw422016, css, scripts, title, contents, bodyscripts)
-//line template/layout.qtpl:49
+//line template/layout.qtpl:50
qt422016.ReleaseWriter(qw422016)
-//line template/layout.qtpl:49
+//line template/layout.qtpl:50
}
-//line template/layout.qtpl:49
+//line template/layout.qtpl:50
func layout(css, scripts, title, contents, bodyscripts string) string {
-//line template/layout.qtpl:49
+//line template/layout.qtpl:50
qb422016 := qt422016.AcquireByteBuffer()
-//line template/layout.qtpl:49
+//line template/layout.qtpl:50
writelayout(qb422016, css, scripts, title, contents, bodyscripts)
-//line template/layout.qtpl:49
+//line template/layout.qtpl:50
qs422016 := string(qb422016.B)
-//line template/layout.qtpl:49
+//line template/layout.qtpl:50
qt422016.ReleaseByteBuffer(qb422016)
-//line template/layout.qtpl:49
+//line template/layout.qtpl:50
return qs422016
-//line template/layout.qtpl:49
+//line template/layout.qtpl:50
}