2021-01-24 12:52:40 +00:00
|
|
|
// Code generated by qtc from "stuff.qtpl". DO NOT EDIT.
|
2020-08-31 17:52:26 +00:00
|
|
|
// See https://github.com/valyala/quicktemplate for details.
|
|
|
|
|
2021-02-22 18:19:28 +00:00
|
|
|
//line views/stuff.qtpl:1
|
|
|
|
package views
|
2020-08-31 17:52:26 +00:00
|
|
|
|
2021-02-22 18:19:28 +00:00
|
|
|
//line views/stuff.qtpl:1
|
2021-12-30 20:16:09 +00:00
|
|
|
import "fmt"
|
2021-01-23 13:45:17 +00:00
|
|
|
|
2022-04-02 07:10:32 +00:00
|
|
|
//line views/stuff.qtpl:3
|
2021-10-01 05:14:23 +00:00
|
|
|
import "github.com/bouncepaw/mycorrhiza/cfg"
|
2021-01-23 13:45:17 +00:00
|
|
|
|
2022-04-02 07:10:32 +00:00
|
|
|
//line views/stuff.qtpl:4
|
2021-10-01 05:14:23 +00:00
|
|
|
import "github.com/bouncepaw/mycorrhiza/util"
|
|
|
|
|
2022-04-02 07:10:32 +00:00
|
|
|
//line views/stuff.qtpl:5
|
2021-09-06 17:46:34 +00:00
|
|
|
import "github.com/bouncepaw/mycorrhiza/l18n"
|
|
|
|
|
2022-04-02 07:10:32 +00:00
|
|
|
//line views/stuff.qtpl:7
|
2020-08-31 17:52:26 +00:00
|
|
|
import (
|
|
|
|
qtio422016 "io"
|
|
|
|
|
|
|
|
qt422016 "github.com/valyala/quicktemplate"
|
|
|
|
)
|
|
|
|
|
2022-04-02 07:10:32 +00:00
|
|
|
//line views/stuff.qtpl:7
|
2020-08-31 17:52:26 +00:00
|
|
|
var (
|
|
|
|
_ = qtio422016.Copy
|
|
|
|
_ = qt422016.AcquireByteBuffer
|
|
|
|
)
|
|
|
|
|
2022-04-02 07:10:32 +00:00
|
|
|
//line views/stuff.qtpl:7
|
2022-03-20 21:24:40 +00:00
|
|
|
func StreamBacklinks(qw422016 *qt422016.Writer, hyphaName string, generator func(string) <-chan string, lc *l18n.Localizer) {
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:7
|
2021-07-12 13:25:57 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<div class="layout">
|
2021-08-31 17:27:52 +00:00
|
|
|
<main class="main-width backlinks">
|
2021-09-06 17:46:34 +00:00
|
|
|
<h1>`)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:10
|
2021-12-30 20:16:09 +00:00
|
|
|
qw422016.N().S(lc.Get(
|
|
|
|
"ui.backlinks_heading",
|
|
|
|
&l18n.Replacements{
|
|
|
|
"hypha_link": fmt.Sprintf(
|
|
|
|
`<a href="/hypha/%s">%s</a>`,
|
|
|
|
hyphaName,
|
|
|
|
util.BeautifulName(hyphaName),
|
|
|
|
),
|
|
|
|
},
|
|
|
|
))
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:19
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.N().S(`</h1>
|
|
|
|
<p>`)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:20
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.E().S(lc.Get("ui.backlinks_desc"))
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:20
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.N().S(`</p>
|
2021-08-31 17:27:52 +00:00
|
|
|
<ul class="backlinks__list">
|
|
|
|
`)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:22
|
2021-12-30 19:59:28 +00:00
|
|
|
for hyphaName := range generator(hyphaName) {
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:22
|
2021-08-31 17:27:52 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<li class="backlinks__entry">
|
|
|
|
<a class="backlinks__link wikilink" href="/hypha/`)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:24
|
2021-08-31 17:27:52 +00:00
|
|
|
qw422016.E().S(hyphaName)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:24
|
2021-08-31 17:27:52 +00:00
|
|
|
qw422016.N().S(`">`)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:24
|
2021-08-31 17:27:52 +00:00
|
|
|
qw422016.E().S(util.BeautifulName(hyphaName))
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:24
|
2021-08-31 17:27:52 +00:00
|
|
|
qw422016.N().S(`</a>
|
|
|
|
</li>
|
|
|
|
`)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:26
|
2021-08-31 17:27:52 +00:00
|
|
|
}
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:26
|
2021-08-31 17:27:52 +00:00
|
|
|
qw422016.N().S(`
|
2021-12-30 19:59:28 +00:00
|
|
|
</ul>
|
2021-08-31 17:27:52 +00:00
|
|
|
</main>
|
|
|
|
</div>
|
|
|
|
`)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:30
|
2021-08-31 17:27:52 +00:00
|
|
|
}
|
|
|
|
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:30
|
2022-03-20 21:24:40 +00:00
|
|
|
func WriteBacklinks(qq422016 qtio422016.Writer, hyphaName string, generator func(string) <-chan string, lc *l18n.Localizer) {
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:30
|
2021-08-31 17:27:52 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:30
|
2022-03-20 21:24:40 +00:00
|
|
|
StreamBacklinks(qw422016, hyphaName, generator, lc)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:30
|
2021-08-31 17:27:52 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:30
|
2021-08-31 17:27:52 +00:00
|
|
|
}
|
|
|
|
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:30
|
2022-03-20 21:24:40 +00:00
|
|
|
func Backlinks(hyphaName string, generator func(string) <-chan string, lc *l18n.Localizer) string {
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:30
|
2021-08-31 17:27:52 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:30
|
2022-03-20 21:24:40 +00:00
|
|
|
WriteBacklinks(qb422016, hyphaName, generator, lc)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:30
|
2021-08-31 17:27:52 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:30
|
2021-08-31 17:27:52 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:30
|
2021-08-31 17:27:52 +00:00
|
|
|
return qs422016
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:30
|
2021-08-31 17:27:52 +00:00
|
|
|
}
|
|
|
|
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:32
|
2022-03-20 21:24:40 +00:00
|
|
|
func StreamHelp(qw422016 *qt422016.Writer, content, lang string, lc *l18n.Localizer) {
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:32
|
2021-08-31 17:27:52 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<div class="layout">
|
2021-07-12 09:58:20 +00:00
|
|
|
<main class="main-width help">
|
|
|
|
<article>
|
|
|
|
`)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:36
|
2021-07-12 09:58:20 +00:00
|
|
|
qw422016.N().S(content)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:36
|
2021-07-12 09:58:20 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
</article>
|
|
|
|
</main>
|
|
|
|
`)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:39
|
2022-03-20 21:24:40 +00:00
|
|
|
qw422016.N().S(helpTopics(lang, lc))
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:39
|
2021-07-12 09:58:20 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
</div>
|
|
|
|
`)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:41
|
2021-07-12 09:58:20 +00:00
|
|
|
}
|
|
|
|
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:41
|
2022-03-20 21:24:40 +00:00
|
|
|
func WriteHelp(qq422016 qtio422016.Writer, content, lang string, lc *l18n.Localizer) {
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:41
|
2021-07-12 09:58:20 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:41
|
2022-03-20 21:24:40 +00:00
|
|
|
StreamHelp(qw422016, content, lang, lc)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:41
|
2021-07-12 09:58:20 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:41
|
2021-07-12 09:58:20 +00:00
|
|
|
}
|
|
|
|
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:41
|
2022-03-20 21:24:40 +00:00
|
|
|
func Help(content, lang string, lc *l18n.Localizer) string {
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:41
|
2021-07-12 09:58:20 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:41
|
2022-03-20 21:24:40 +00:00
|
|
|
WriteHelp(qb422016, content, lang, lc)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:41
|
2021-07-12 09:58:20 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:41
|
2021-07-12 09:58:20 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:41
|
2021-07-12 09:58:20 +00:00
|
|
|
return qs422016
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:41
|
2021-07-12 09:58:20 +00:00
|
|
|
}
|
|
|
|
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:43
|
2022-03-20 21:24:40 +00:00
|
|
|
func StreamHelpEmptyError(qw422016 *qt422016.Writer, lc *l18n.Localizer) {
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:43
|
2021-07-12 09:58:20 +00:00
|
|
|
qw422016.N().S(`
|
2021-09-06 17:46:34 +00:00
|
|
|
<h1>`)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:44
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.E().S(lc.Get("help.empty_error_title"))
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:44
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.N().S(`</h1>
|
|
|
|
<p>`)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:45
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.E().S(lc.Get("help.empty_error_line_1"))
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:45
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.N().S(`</p>
|
|
|
|
<p>`)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:46
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.E().S(lc.Get("help.empty_error_line_2a"))
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:46
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.N().S(` <a class="wikilink wikilink_external wikilink_https" href="https://github.com/bouncepaw/mycorrhiza">`)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:46
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.E().S(lc.Get("help.empty_error_link"))
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:46
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.N().S(`</a> `)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:46
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.E().S(lc.Get("help.empty_error_line_2b"))
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:46
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.N().S(`</p>
|
|
|
|
`)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:47
|
2021-07-12 09:58:20 +00:00
|
|
|
}
|
|
|
|
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:47
|
2022-03-20 21:24:40 +00:00
|
|
|
func WriteHelpEmptyError(qq422016 qtio422016.Writer, lc *l18n.Localizer) {
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:47
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:47
|
2022-03-20 21:24:40 +00:00
|
|
|
StreamHelpEmptyError(qw422016, lc)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:47
|
2021-09-06 17:46:34 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:47
|
2021-09-06 17:46:34 +00:00
|
|
|
}
|
|
|
|
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:47
|
2022-03-20 21:24:40 +00:00
|
|
|
func HelpEmptyError(lc *l18n.Localizer) string {
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:47
|
2021-07-12 09:58:20 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:47
|
2022-03-20 21:24:40 +00:00
|
|
|
WriteHelpEmptyError(qb422016, lc)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:47
|
2021-01-23 13:45:17 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:47
|
2021-01-23 13:45:17 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:47
|
2021-01-23 13:45:17 +00:00
|
|
|
return qs422016
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:47
|
2021-01-23 13:45:17 +00:00
|
|
|
}
|
|
|
|
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:49
|
2022-03-22 13:40:40 +00:00
|
|
|
func streamcommonScripts(qw422016 *qt422016.Writer) {
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:49
|
2021-05-22 18:05:14 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
`)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:50
|
2021-07-01 09:45:29 +00:00
|
|
|
for _, scriptPath := range cfg.CommonScripts {
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:50
|
2021-05-22 18:05:14 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<script src="`)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:51
|
2021-05-22 18:05:14 +00:00
|
|
|
qw422016.E().S(scriptPath)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:51
|
2021-05-22 18:05:14 +00:00
|
|
|
qw422016.N().S(`"></script>
|
|
|
|
`)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:52
|
2021-05-22 18:05:14 +00:00
|
|
|
}
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:52
|
2021-05-22 18:05:14 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
`)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:53
|
2021-05-22 18:05:14 +00:00
|
|
|
}
|
|
|
|
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:53
|
2022-03-22 13:40:40 +00:00
|
|
|
func writecommonScripts(qq422016 qtio422016.Writer) {
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:53
|
2021-05-22 18:05:14 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:53
|
2022-03-22 13:40:40 +00:00
|
|
|
streamcommonScripts(qw422016)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:53
|
2021-05-22 18:05:14 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:53
|
2021-05-22 18:05:14 +00:00
|
|
|
}
|
|
|
|
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:53
|
2022-03-22 13:40:40 +00:00
|
|
|
func commonScripts() string {
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:53
|
2021-05-22 18:05:14 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:53
|
2022-03-22 13:40:40 +00:00
|
|
|
writecommonScripts(qb422016)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:53
|
2021-02-22 18:19:28 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:53
|
2021-02-22 18:19:28 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:53
|
2021-02-22 18:19:28 +00:00
|
|
|
return qs422016
|
2022-04-02 08:00:10 +00:00
|
|
|
//line views/stuff.qtpl:53
|
2020-08-31 17:52:26 +00:00
|
|
|
}
|