2021-02-20 15:48:51 +00:00
|
|
|
// Code generated by qtc from "hypha.qtpl". DO NOT EDIT.
|
|
|
|
// See https://github.com/valyala/quicktemplate for details.
|
|
|
|
|
|
|
|
//line views/hypha.qtpl:1
|
|
|
|
package views
|
|
|
|
|
|
|
|
//line views/hypha.qtpl:1
|
|
|
|
import "path/filepath"
|
|
|
|
|
|
|
|
//line views/hypha.qtpl:2
|
|
|
|
import "strings"
|
|
|
|
|
2021-05-14 09:05:07 +00:00
|
|
|
//line views/hypha.qtpl:4
|
2021-05-09 09:36:39 +00:00
|
|
|
import "github.com/bouncepaw/mycorrhiza/cfg"
|
2021-02-20 15:48:51 +00:00
|
|
|
|
2021-05-14 09:05:07 +00:00
|
|
|
//line views/hypha.qtpl:5
|
2021-05-09 09:36:39 +00:00
|
|
|
import "github.com/bouncepaw/mycorrhiza/hyphae"
|
|
|
|
|
2021-05-14 09:05:07 +00:00
|
|
|
//line views/hypha.qtpl:6
|
2021-09-06 17:46:34 +00:00
|
|
|
import "github.com/bouncepaw/mycorrhiza/l18n"
|
2021-02-20 15:48:51 +00:00
|
|
|
|
2021-05-09 09:36:39 +00:00
|
|
|
//line views/hypha.qtpl:7
|
2021-09-06 17:46:34 +00:00
|
|
|
import "github.com/bouncepaw/mycorrhiza/user"
|
|
|
|
|
|
|
|
//line views/hypha.qtpl:8
|
2021-05-14 09:05:07 +00:00
|
|
|
import "github.com/bouncepaw/mycorrhiza/util"
|
|
|
|
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:10
|
2021-02-20 15:48:51 +00:00
|
|
|
import (
|
|
|
|
qtio422016 "io"
|
|
|
|
|
|
|
|
qt422016 "github.com/valyala/quicktemplate"
|
|
|
|
)
|
|
|
|
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:10
|
2021-02-20 15:48:51 +00:00
|
|
|
var (
|
|
|
|
_ = qtio422016.Copy
|
|
|
|
_ = qt422016.AcquireByteBuffer
|
|
|
|
)
|
|
|
|
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:10
|
2021-08-08 19:38:41 +00:00
|
|
|
func streambeautifulLink(qw422016 *qt422016.Writer, hyphaName string) {
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
qw422016.N().S(`<a href="/hypha/`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
qw422016.N().S(hyphaName)
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
qw422016.N().S(`">`)
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
qw422016.E().S(util.BeautifulName(hyphaName))
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
qw422016.N().S(`</a>`)
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
}
|
|
|
|
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
func writebeautifulLink(qq422016 qtio422016.Writer, hyphaName string) {
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
streambeautifulLink(qw422016, hyphaName)
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
qt422016.ReleaseWriter(qw422016)
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
}
|
|
|
|
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
func beautifulLink(hyphaName string) string {
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
writebeautifulLink(qb422016, hyphaName)
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
qs422016 := string(qb422016.B)
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
return qs422016
|
|
|
|
//line views/hypha.qtpl:10
|
|
|
|
}
|
|
|
|
|
|
|
|
//line views/hypha.qtpl:12
|
2021-09-06 17:46:34 +00:00
|
|
|
func streammycoLink(qw422016 *qt422016.Writer, lc *l18n.Localizer) {
|
|
|
|
//line views/hypha.qtpl:12
|
2022-02-03 18:47:23 +00:00
|
|
|
qw422016.N().S(`<a href="/help/en/mycomarkup" class="shy-link">`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:12
|
|
|
|
qw422016.E().S(lc.Get("ui.notexist_write_myco"))
|
|
|
|
//line views/hypha.qtpl:12
|
|
|
|
qw422016.N().S(`</a>`)
|
|
|
|
//line views/hypha.qtpl:12
|
|
|
|
}
|
|
|
|
|
|
|
|
//line views/hypha.qtpl:12
|
|
|
|
func writemycoLink(qq422016 qtio422016.Writer, lc *l18n.Localizer) {
|
|
|
|
//line views/hypha.qtpl:12
|
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
|
|
|
//line views/hypha.qtpl:12
|
|
|
|
streammycoLink(qw422016, lc)
|
|
|
|
//line views/hypha.qtpl:12
|
|
|
|
qt422016.ReleaseWriter(qw422016)
|
|
|
|
//line views/hypha.qtpl:12
|
|
|
|
}
|
|
|
|
|
|
|
|
//line views/hypha.qtpl:12
|
|
|
|
func mycoLink(lc *l18n.Localizer) string {
|
|
|
|
//line views/hypha.qtpl:12
|
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
|
|
|
//line views/hypha.qtpl:12
|
|
|
|
writemycoLink(qb422016, lc)
|
|
|
|
//line views/hypha.qtpl:12
|
|
|
|
qs422016 := string(qb422016.B)
|
|
|
|
//line views/hypha.qtpl:12
|
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
|
|
|
//line views/hypha.qtpl:12
|
|
|
|
return qs422016
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:12
|
2021-09-06 17:46:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//line views/hypha.qtpl:14
|
2022-02-19 08:26:38 +00:00
|
|
|
func streamnonExistentHyphaNotice(qw422016 *qt422016.Writer, h hyphae.Hypha, u *user.User, lc *l18n.Localizer) {
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:14
|
2021-08-08 19:38:41 +00:00
|
|
|
qw422016.N().S(`
|
2021-05-14 09:05:07 +00:00
|
|
|
<section class="non-existent-hypha">
|
2021-09-06 17:46:34 +00:00
|
|
|
<h2 class="non-existent-hypha__title">`)
|
|
|
|
//line views/hypha.qtpl:16
|
|
|
|
qw422016.E().S(lc.Get("ui.notexist_heading"))
|
|
|
|
//line views/hypha.qtpl:16
|
|
|
|
qw422016.N().S(`</h2>
|
2021-05-14 09:05:07 +00:00
|
|
|
`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:17
|
2021-07-02 08:20:03 +00:00
|
|
|
if cfg.UseAuth && u.Group == "anon" {
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:17
|
2021-05-14 09:05:07 +00:00
|
|
|
qw422016.N().S(`
|
2021-09-06 17:46:34 +00:00
|
|
|
<p>`)
|
|
|
|
//line views/hypha.qtpl:18
|
|
|
|
qw422016.E().S(lc.Get("ui.notexist_norights"))
|
|
|
|
//line views/hypha.qtpl:18
|
|
|
|
qw422016.N().S(`</p>
|
2021-05-14 09:05:07 +00:00
|
|
|
<ul>
|
2021-09-06 17:46:34 +00:00
|
|
|
<li><a href="/login">`)
|
|
|
|
//line views/hypha.qtpl:20
|
|
|
|
qw422016.E().S(lc.Get("ui.notexist_login"))
|
|
|
|
//line views/hypha.qtpl:20
|
|
|
|
qw422016.N().S(`</a></li>
|
2021-05-14 09:05:07 +00:00
|
|
|
`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:21
|
2021-07-02 08:20:03 +00:00
|
|
|
if cfg.AllowRegistration {
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:21
|
|
|
|
qw422016.N().S(`<li><a href="/register">`)
|
|
|
|
//line views/hypha.qtpl:21
|
|
|
|
qw422016.E().S(lc.Get("ui.notexist_register"))
|
|
|
|
//line views/hypha.qtpl:21
|
|
|
|
qw422016.N().S(`</a></li>`)
|
|
|
|
//line views/hypha.qtpl:21
|
2021-05-14 09:05:07 +00:00
|
|
|
}
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:21
|
2021-05-14 09:05:07 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
</ul>
|
|
|
|
`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:23
|
2021-05-14 09:05:07 +00:00
|
|
|
} else {
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:23
|
2021-05-14 09:05:07 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
|
|
|
|
<div class="non-existent-hypha__ways">
|
|
|
|
<section class="non-existent-hypha__way">
|
2021-09-06 17:46:34 +00:00
|
|
|
<h3 class="non-existent-hypha__subtitle">📝 `)
|
|
|
|
//line views/hypha.qtpl:27
|
|
|
|
qw422016.E().S(lc.Get("ui.notexist_write"))
|
|
|
|
//line views/hypha.qtpl:27
|
|
|
|
qw422016.N().S(`</h3>
|
|
|
|
<p>`)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:28
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.N().S(lc.Get("ui.notexist_write_tip1", &l18n.Replacements{"myco": mycoLink(lc)}))
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:28
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.N().S(`</p>
|
|
|
|
<p>`)
|
|
|
|
//line views/hypha.qtpl:29
|
|
|
|
qw422016.E().S(lc.Get("ui.notexist_write_tip2"))
|
|
|
|
//line views/hypha.qtpl:29
|
|
|
|
qw422016.N().S(`</p>
|
|
|
|
<a class="btn btn_accent stick-to-bottom" href="/edit/`)
|
|
|
|
//line views/hypha.qtpl:30
|
2022-02-03 22:29:01 +00:00
|
|
|
qw422016.E().S(h.CanonicalName())
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:30
|
|
|
|
qw422016.N().S(`">`)
|
|
|
|
//line views/hypha.qtpl:30
|
|
|
|
qw422016.E().S(lc.Get("ui.notexist_write_button"))
|
|
|
|
//line views/hypha.qtpl:30
|
|
|
|
qw422016.N().S(`</a>
|
2021-05-14 09:05:07 +00:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="non-existent-hypha__way">
|
2021-09-06 17:46:34 +00:00
|
|
|
<h3 class="non-existent-hypha__subtitle">🖼 `)
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:34
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.E().S(lc.Get("ui.notexist_media"))
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:34
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.N().S(`</h3>
|
|
|
|
<p>`)
|
|
|
|
//line views/hypha.qtpl:35
|
|
|
|
qw422016.E().S(lc.Get("ui.notexist_media_tip1"))
|
|
|
|
//line views/hypha.qtpl:35
|
|
|
|
qw422016.N().S(`</p>
|
|
|
|
<form action="/upload-binary/`)
|
|
|
|
//line views/hypha.qtpl:36
|
2022-02-03 22:29:01 +00:00
|
|
|
qw422016.E().S(h.CanonicalName())
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:36
|
2021-05-14 09:05:07 +00:00
|
|
|
qw422016.N().S(`"
|
|
|
|
method="post" enctype="multipart/form-data"
|
|
|
|
class="upload-binary">
|
|
|
|
<label for="upload-binary__input"></label>
|
|
|
|
<input type="file" id="upload-binary__input" name="binary">
|
|
|
|
|
2021-09-06 17:46:34 +00:00
|
|
|
<button type="submit" class="btn stick-to-bottom" value="Upload">`)
|
|
|
|
//line views/hypha.qtpl:42
|
2022-02-26 07:33:09 +00:00
|
|
|
qw422016.E().S(lc.Get("ui.media_upload"))
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:42
|
|
|
|
qw422016.N().S(`</button>
|
2021-05-14 09:05:07 +00:00
|
|
|
</form>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:46
|
2021-05-14 09:05:07 +00:00
|
|
|
}
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:46
|
2021-05-14 09:05:07 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
</section>
|
|
|
|
`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:48
|
2021-05-14 09:05:07 +00:00
|
|
|
}
|
|
|
|
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:48
|
2022-02-19 08:26:38 +00:00
|
|
|
func writenonExistentHyphaNotice(qq422016 qtio422016.Writer, h hyphae.Hypha, u *user.User, lc *l18n.Localizer) {
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:48
|
2021-05-14 09:05:07 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:48
|
|
|
|
streamnonExistentHyphaNotice(qw422016, h, u, lc)
|
|
|
|
//line views/hypha.qtpl:48
|
2021-05-14 09:05:07 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:48
|
2021-05-14 09:05:07 +00:00
|
|
|
}
|
|
|
|
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:48
|
2022-02-19 08:26:38 +00:00
|
|
|
func nonExistentHyphaNotice(h hyphae.Hypha, u *user.User, lc *l18n.Localizer) string {
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:48
|
2021-05-14 09:05:07 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:48
|
|
|
|
writenonExistentHyphaNotice(qb422016, h, u, lc)
|
|
|
|
//line views/hypha.qtpl:48
|
2021-05-14 09:05:07 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:48
|
2021-05-14 09:05:07 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:48
|
2021-05-14 09:05:07 +00:00
|
|
|
return qs422016
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:48
|
2021-05-14 09:05:07 +00:00
|
|
|
}
|
|
|
|
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:50
|
2022-03-20 21:24:40 +00:00
|
|
|
func StreamNaviTitle(qw422016 *qt422016.Writer, h hyphae.Hypha) {
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:50
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:52
|
2021-02-20 15:48:51 +00:00
|
|
|
var (
|
|
|
|
prevAcc = "/hypha/"
|
2022-02-03 22:29:01 +00:00
|
|
|
parts = strings.Split(h.CanonicalName(), "/")
|
2021-02-20 15:48:51 +00:00
|
|
|
)
|
|
|
|
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:56
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<h1 class="navi-title">
|
|
|
|
`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:58
|
2021-05-09 09:36:39 +00:00
|
|
|
qw422016.N().S(`<a href="/hypha/`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:59
|
2021-05-09 09:36:39 +00:00
|
|
|
qw422016.E().S(cfg.HomeHypha)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:59
|
2021-05-09 09:36:39 +00:00
|
|
|
qw422016.N().S(`">`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:60
|
2021-05-09 09:36:39 +00:00
|
|
|
qw422016.N().S(cfg.NaviTitleIcon)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:60
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`<span aria-hidden="true" class="navi-title__colon">:</span></a>`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:64
|
2021-05-09 09:36:39 +00:00
|
|
|
for i, part := range parts {
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:65
|
2021-02-20 15:48:51 +00:00
|
|
|
if i > 0 {
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:65
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.N().S(`<span aria-hidden="true" class="navi-title__separator">/</span>`)
|
|
|
|
//line views/hypha.qtpl:67
|
2021-02-20 15:48:51 +00:00
|
|
|
}
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:67
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.N().S(`<a href="`)
|
|
|
|
//line views/hypha.qtpl:69
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.E().S(prevAcc + part)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:69
|
2021-04-04 17:22:14 +00:00
|
|
|
qw422016.N().S(`" rel="`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:69
|
2021-02-20 15:48:51 +00:00
|
|
|
if i == len(parts)-1 {
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:69
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`bookmark`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:69
|
2021-02-20 15:48:51 +00:00
|
|
|
} else {
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:69
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`up`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:69
|
2021-02-20 15:48:51 +00:00
|
|
|
}
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:69
|
2021-05-09 09:36:39 +00:00
|
|
|
qw422016.N().S(`">`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:70
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(util.BeautifulName(part))
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/hypha.qtpl:70
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.N().S(`</a>`)
|
|
|
|
//line views/hypha.qtpl:72
|
2021-02-20 15:48:51 +00:00
|
|
|
prevAcc += part + "/"
|
|
|
|
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:73
|
2021-05-09 09:36:39 +00:00
|
|
|
}
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:74
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
</h1>
|
|
|
|
`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:76
|
2021-02-20 15:48:51 +00:00
|
|
|
}
|
|
|
|
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:76
|
2022-03-20 21:24:40 +00:00
|
|
|
func WriteNaviTitle(qq422016 qtio422016.Writer, h hyphae.Hypha) {
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:76
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:76
|
2022-03-20 21:24:40 +00:00
|
|
|
StreamNaviTitle(qw422016, h)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:76
|
2021-02-20 15:48:51 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:76
|
2021-02-20 15:48:51 +00:00
|
|
|
}
|
|
|
|
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:76
|
2022-03-20 21:24:40 +00:00
|
|
|
func NaviTitle(h hyphae.Hypha) string {
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:76
|
2021-02-20 15:48:51 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:76
|
2022-03-20 21:24:40 +00:00
|
|
|
WriteNaviTitle(qb422016, h)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:76
|
2021-02-20 15:48:51 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:76
|
2021-02-20 15:48:51 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:76
|
2021-02-20 15:48:51 +00:00
|
|
|
return qs422016
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:76
|
2021-02-20 15:48:51 +00:00
|
|
|
}
|
|
|
|
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:78
|
2022-03-20 21:24:40 +00:00
|
|
|
func StreamMediaRaw(qw422016 *qt422016.Writer, h *hyphae.MediaHypha) {
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:78
|
2022-03-20 21:24:40 +00:00
|
|
|
StreamMedia(qw422016, h, l18n.New("en", "en"))
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:78
|
|
|
|
}
|
|
|
|
|
|
|
|
//line views/hypha.qtpl:78
|
2022-03-20 21:24:40 +00:00
|
|
|
func WriteMediaRaw(qq422016 qtio422016.Writer, h *hyphae.MediaHypha) {
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:78
|
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
|
|
|
//line views/hypha.qtpl:78
|
2022-03-20 21:24:40 +00:00
|
|
|
StreamMediaRaw(qw422016, h)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:78
|
|
|
|
qt422016.ReleaseWriter(qw422016)
|
|
|
|
//line views/hypha.qtpl:78
|
|
|
|
}
|
|
|
|
|
|
|
|
//line views/hypha.qtpl:78
|
2022-03-20 21:24:40 +00:00
|
|
|
func MediaRaw(h *hyphae.MediaHypha) string {
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:78
|
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
|
|
|
//line views/hypha.qtpl:78
|
2022-03-20 21:24:40 +00:00
|
|
|
WriteMediaRaw(qb422016, h)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:78
|
|
|
|
qs422016 := string(qb422016.B)
|
|
|
|
//line views/hypha.qtpl:78
|
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
|
|
|
//line views/hypha.qtpl:78
|
|
|
|
return qs422016
|
|
|
|
//line views/hypha.qtpl:78
|
|
|
|
}
|
|
|
|
|
|
|
|
//line views/hypha.qtpl:80
|
2022-03-20 21:24:40 +00:00
|
|
|
func StreamMedia(qw422016 *qt422016.Writer, h *hyphae.MediaHypha, lc *l18n.Localizer) {
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:80
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:81
|
2022-02-19 08:26:38 +00:00
|
|
|
switch filepath.Ext(h.MediaFilePath()) {
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:83
|
2021-02-20 15:48:51 +00:00
|
|
|
case ".jpg", ".gif", ".png", ".webp", ".svg", ".ico":
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:83
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<div class="binary-container binary-container_with-img">
|
|
|
|
<a href="/binary/`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:85
|
2022-02-03 22:29:01 +00:00
|
|
|
qw422016.N().S(h.CanonicalName())
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:85
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`"><img src="/binary/`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:85
|
2022-02-03 22:29:01 +00:00
|
|
|
qw422016.N().S(h.CanonicalName())
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:85
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`"/></a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:88
|
2021-02-20 15:48:51 +00:00
|
|
|
case ".ogg", ".webm", ".mp4":
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:88
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<div class="binary-container binary-container_with-video">
|
|
|
|
<video controls>
|
|
|
|
<source src="/binary/`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:91
|
2022-02-03 22:29:01 +00:00
|
|
|
qw422016.N().S(h.CanonicalName())
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:91
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`"/>
|
2021-09-06 17:46:34 +00:00
|
|
|
<p>`)
|
|
|
|
//line views/hypha.qtpl:92
|
|
|
|
qw422016.E().S(lc.Get("ui.media_novideo"))
|
|
|
|
//line views/hypha.qtpl:92
|
|
|
|
qw422016.N().S(` <a href="/binary/`)
|
|
|
|
//line views/hypha.qtpl:92
|
2022-02-03 22:29:01 +00:00
|
|
|
qw422016.N().S(h.CanonicalName())
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:92
|
|
|
|
qw422016.N().S(`">`)
|
|
|
|
//line views/hypha.qtpl:92
|
|
|
|
qw422016.E().S(lc.Get("ui.media_novideo_link"))
|
|
|
|
//line views/hypha.qtpl:92
|
|
|
|
qw422016.N().S(`</a></p>
|
2021-02-20 15:48:51 +00:00
|
|
|
</video>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:96
|
2021-02-20 15:48:51 +00:00
|
|
|
case ".mp3":
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:96
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<div class="binary-container binary-container_with-audio">
|
|
|
|
<audio controls>
|
|
|
|
<source src="/binary/`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:99
|
2022-02-03 22:29:01 +00:00
|
|
|
qw422016.N().S(h.CanonicalName())
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:99
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`"/>
|
2021-09-06 17:46:34 +00:00
|
|
|
<p>`)
|
|
|
|
//line views/hypha.qtpl:100
|
|
|
|
qw422016.E().S(lc.Get("ui.media_noaudio"))
|
|
|
|
//line views/hypha.qtpl:100
|
|
|
|
qw422016.N().S(` <a href="/binary/`)
|
|
|
|
//line views/hypha.qtpl:100
|
2022-02-03 22:29:01 +00:00
|
|
|
qw422016.N().S(h.CanonicalName())
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:100
|
|
|
|
qw422016.N().S(`">`)
|
|
|
|
//line views/hypha.qtpl:100
|
|
|
|
qw422016.E().S(lc.Get("ui.media_noaudio_link"))
|
|
|
|
//line views/hypha.qtpl:100
|
|
|
|
qw422016.N().S(`</a></p>
|
2021-02-20 15:48:51 +00:00
|
|
|
</audio>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:104
|
2021-02-20 15:48:51 +00:00
|
|
|
default:
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:104
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<div class="binary-container binary-container_with-nothing">
|
|
|
|
<p><a href="/binary/`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:106
|
2022-02-03 22:29:01 +00:00
|
|
|
qw422016.N().S(h.CanonicalName())
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:106
|
|
|
|
qw422016.N().S(`">`)
|
|
|
|
//line views/hypha.qtpl:106
|
|
|
|
qw422016.E().S(lc.Get("ui.media_download"))
|
|
|
|
//line views/hypha.qtpl:106
|
|
|
|
qw422016.N().S(`</a></p>
|
2021-02-20 15:48:51 +00:00
|
|
|
</div>
|
|
|
|
`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:108
|
2021-02-20 15:48:51 +00:00
|
|
|
}
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:108
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
`)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:109
|
2021-02-20 15:48:51 +00:00
|
|
|
}
|
|
|
|
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:109
|
2022-03-20 21:24:40 +00:00
|
|
|
func WriteMedia(qq422016 qtio422016.Writer, h *hyphae.MediaHypha, lc *l18n.Localizer) {
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:109
|
2021-02-20 15:48:51 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:109
|
2022-03-20 21:24:40 +00:00
|
|
|
StreamMedia(qw422016, h, lc)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:109
|
2021-02-20 15:48:51 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:109
|
2021-02-20 15:48:51 +00:00
|
|
|
}
|
|
|
|
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:109
|
2022-03-20 21:24:40 +00:00
|
|
|
func Media(h *hyphae.MediaHypha, lc *l18n.Localizer) string {
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:109
|
2021-02-20 15:48:51 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:109
|
2022-03-20 21:24:40 +00:00
|
|
|
WriteMedia(qb422016, h, lc)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:109
|
2021-02-20 15:48:51 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:109
|
2021-02-20 15:48:51 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:109
|
2021-02-20 15:48:51 +00:00
|
|
|
return qs422016
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/hypha.qtpl:109
|
2021-02-20 15:48:51 +00:00
|
|
|
}
|