1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-10-30 19:56:16 +00:00
mycorrhiza/templates/http_stuff.qtpl.go

204 lines
5.6 KiB
Go
Raw Normal View History

2020-08-31 17:52:26 +00:00
// Code generated by qtc from "http_stuff.qtpl". DO NOT EDIT.
// See https://github.com/valyala/quicktemplate for details.
//line templates/http_stuff.qtpl:1
package templates
//line templates/http_stuff.qtpl:1
import (
qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate"
)
//line templates/http_stuff.qtpl:1
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
//line templates/http_stuff.qtpl:1
2020-12-17 12:59:59 +00:00
func StreamBaseHTML(qw422016 *qt422016.Writer, title, body string, headElements ...string) {
2020-08-31 17:52:26 +00:00
//line templates/http_stuff.qtpl:1
qw422016.N().S(`
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="/static/common.css">
<title>`)
//line templates/http_stuff.qtpl:7
qw422016.E().S(title)
//line templates/http_stuff.qtpl:7
qw422016.N().S(`</title>
2020-12-17 12:59:59 +00:00
`)
//line templates/http_stuff.qtpl:8
for _, el := range headElements {
//line templates/http_stuff.qtpl:8
qw422016.N().S(el)
//line templates/http_stuff.qtpl:8
}
//line templates/http_stuff.qtpl:8
qw422016.N().S(`
2020-08-31 17:52:26 +00:00
</head>
<body>
`)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:11
2020-08-31 17:52:26 +00:00
qw422016.N().S(body)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:11
2020-08-31 17:52:26 +00:00
qw422016.N().S(`
</body>
</html>
`)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:14
2020-08-31 17:52:26 +00:00
}
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:14
func WriteBaseHTML(qq422016 qtio422016.Writer, title, body string, headElements ...string) {
//line templates/http_stuff.qtpl:14
2020-08-31 17:52:26 +00:00
qw422016 := qt422016.AcquireWriter(qq422016)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:14
StreamBaseHTML(qw422016, title, body, headElements...)
//line templates/http_stuff.qtpl:14
2020-08-31 17:52:26 +00:00
qt422016.ReleaseWriter(qw422016)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:14
2020-08-31 17:52:26 +00:00
}
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:14
func BaseHTML(title, body string, headElements ...string) string {
//line templates/http_stuff.qtpl:14
2020-08-31 17:52:26 +00:00
qb422016 := qt422016.AcquireByteBuffer()
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:14
WriteBaseHTML(qb422016, title, body, headElements...)
//line templates/http_stuff.qtpl:14
2020-08-31 17:52:26 +00:00
qs422016 := string(qb422016.B)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:14
2020-08-31 17:52:26 +00:00
qt422016.ReleaseByteBuffer(qb422016)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:14
2020-08-31 17:52:26 +00:00
return qs422016
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:14
2020-08-31 17:52:26 +00:00
}
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:16
2020-08-31 18:16:22 +00:00
func StreamHyphaListHTML(qw422016 *qt422016.Writer, tbody string, pageCount int) {
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:16
2020-08-31 17:52:26 +00:00
qw422016.N().S(`
<main>
2020-08-31 18:16:22 +00:00
<h1>List of hyphae</h1>
<p>This wiki has `)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:19
2020-08-31 18:16:22 +00:00
qw422016.N().D(pageCount)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:19
2020-08-31 18:16:22 +00:00
qw422016.N().S(` hyphae.</p>
2020-08-31 17:52:26 +00:00
<table>
<thead>
<tr>
2020-08-31 18:16:22 +00:00
<th>Full name</th>
<th>Binary part type</th>
2020-08-31 17:52:26 +00:00
</tr>
</thead>
<tbody>
`)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:28
2020-08-31 17:52:26 +00:00
qw422016.N().S(tbody)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:28
2020-08-31 17:52:26 +00:00
qw422016.N().S(`
</tbody>
</table>
</main>
`)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:32
2020-08-31 17:52:26 +00:00
}
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:32
2020-08-31 18:16:22 +00:00
func WriteHyphaListHTML(qq422016 qtio422016.Writer, tbody string, pageCount int) {
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:32
2020-08-31 17:52:26 +00:00
qw422016 := qt422016.AcquireWriter(qq422016)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:32
2020-08-31 18:16:22 +00:00
StreamHyphaListHTML(qw422016, tbody, pageCount)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:32
2020-08-31 17:52:26 +00:00
qt422016.ReleaseWriter(qw422016)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:32
2020-08-31 17:52:26 +00:00
}
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:32
2020-08-31 18:16:22 +00:00
func HyphaListHTML(tbody string, pageCount int) string {
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:32
2020-08-31 17:52:26 +00:00
qb422016 := qt422016.AcquireByteBuffer()
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:32
2020-08-31 18:16:22 +00:00
WriteHyphaListHTML(qb422016, tbody, pageCount)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:32
2020-08-31 18:16:22 +00:00
qs422016 := string(qb422016.B)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:32
2020-08-31 18:16:22 +00:00
qt422016.ReleaseByteBuffer(qb422016)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:32
2020-08-31 18:16:22 +00:00
return qs422016
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:32
2020-08-31 18:16:22 +00:00
}
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:34
2020-08-31 18:16:22 +00:00
func StreamHyphaListRowHTML(qw422016 *qt422016.Writer, hyphaName, binaryMime string, binaryPresent bool) {
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:34
2020-08-31 18:16:22 +00:00
qw422016.N().S(`
<tr>
<td><a href="/page/`)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:36
2020-08-31 18:16:22 +00:00
qw422016.E().S(hyphaName)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:36
2020-08-31 18:16:22 +00:00
qw422016.N().S(`">`)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:36
2020-08-31 18:16:22 +00:00
qw422016.E().S(hyphaName)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:36
2020-08-31 18:16:22 +00:00
qw422016.N().S(`</a></td>
`)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:37
2020-08-31 18:16:22 +00:00
if binaryPresent {
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:37
2020-08-31 18:16:22 +00:00
qw422016.N().S(`
<td>`)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:38
2020-08-31 18:16:22 +00:00
qw422016.E().S(binaryMime)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:38
2020-08-31 18:16:22 +00:00
qw422016.N().S(`</td>
`)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:39
2020-08-31 18:16:22 +00:00
} else {
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:39
2020-08-31 18:16:22 +00:00
qw422016.N().S(`
<td></td>
`)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:41
2020-08-31 18:16:22 +00:00
}
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:41
2020-08-31 18:16:22 +00:00
qw422016.N().S(`
</tr>
`)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:43
2020-08-31 18:16:22 +00:00
}
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:43
2020-08-31 18:16:22 +00:00
func WriteHyphaListRowHTML(qq422016 qtio422016.Writer, hyphaName, binaryMime string, binaryPresent bool) {
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:43
2020-08-31 18:16:22 +00:00
qw422016 := qt422016.AcquireWriter(qq422016)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:43
2020-08-31 18:16:22 +00:00
StreamHyphaListRowHTML(qw422016, hyphaName, binaryMime, binaryPresent)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:43
2020-08-31 18:16:22 +00:00
qt422016.ReleaseWriter(qw422016)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:43
2020-08-31 18:16:22 +00:00
}
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:43
2020-08-31 18:16:22 +00:00
func HyphaListRowHTML(hyphaName, binaryMime string, binaryPresent bool) string {
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:43
2020-08-31 18:16:22 +00:00
qb422016 := qt422016.AcquireByteBuffer()
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:43
2020-08-31 18:16:22 +00:00
WriteHyphaListRowHTML(qb422016, hyphaName, binaryMime, binaryPresent)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:43
2020-08-31 17:52:26 +00:00
qs422016 := string(qb422016.B)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:43
2020-08-31 17:52:26 +00:00
qt422016.ReleaseByteBuffer(qb422016)
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:43
2020-08-31 17:52:26 +00:00
return qs422016
2020-12-17 12:59:59 +00:00
//line templates/http_stuff.qtpl:43
2020-08-31 17:52:26 +00:00
}