// 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"
//line views/hypha.qtpl:4
import "github.com/bouncepaw/mycorrhiza/cfg"
//line views/hypha.qtpl:5
import "github.com/bouncepaw/mycorrhiza/hyphae"
//line views/hypha.qtpl:6
import "github.com/bouncepaw/mycorrhiza/user"
//line views/hypha.qtpl:7
import "github.com/bouncepaw/mycorrhiza/util"
//line views/hypha.qtpl:9
import (
qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate"
)
//line views/hypha.qtpl:9
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
//line views/hypha.qtpl:9
func streambeautifulLink(qw422016 *qt422016.Writer, hyphaName string) {
//line views/hypha.qtpl:9
qw422016.N().S(`
`)
//line views/hypha.qtpl:10
qw422016.E().S(util.BeautifulName(hyphaName))
//line views/hypha.qtpl:10
qw422016.N().S(``)
//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
func streamnonExistentHyphaNotice(qw422016 *qt422016.Writer, h *hyphae.Hypha, u *user.User) {
//line views/hypha.qtpl:12
qw422016.N().S(`
This hypha does not exist
`)
//line views/hypha.qtpl:15
if cfg.UseAuth && u.Group == "anon" {
//line views/hypha.qtpl:15
qw422016.N().S(`
You are not authorized to create new hyphae. Here is what you can do:
`)
//line views/hypha.qtpl:21
} else {
//line views/hypha.qtpl:21
qw422016.N().S(`
📝 Write a text
Write a note, a diary, an article, a story or anything textual using Mycomarkup. Full history of edits to the document will be saved.
Make sure to follow this wiki's writing conventions if there are any.
Create
🖼 Upload a media
Upload a picture, a video or an audio. Most common formats can be accessed from the browser, others can be only downloaded afterwards. You can write a description for the media later.
`)
//line views/hypha.qtpl:44
}
//line views/hypha.qtpl:44
qw422016.N().S(`
`)
//line views/hypha.qtpl:46
}
//line views/hypha.qtpl:46
func writenonExistentHyphaNotice(qq422016 qtio422016.Writer, h *hyphae.Hypha, u *user.User) {
//line views/hypha.qtpl:46
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/hypha.qtpl:46
streamnonExistentHyphaNotice(qw422016, h, u)
//line views/hypha.qtpl:46
qt422016.ReleaseWriter(qw422016)
//line views/hypha.qtpl:46
}
//line views/hypha.qtpl:46
func nonExistentHyphaNotice(h *hyphae.Hypha, u *user.User) string {
//line views/hypha.qtpl:46
qb422016 := qt422016.AcquireByteBuffer()
//line views/hypha.qtpl:46
writenonExistentHyphaNotice(qb422016, h, u)
//line views/hypha.qtpl:46
qs422016 := string(qb422016.B)
//line views/hypha.qtpl:46
qt422016.ReleaseByteBuffer(qb422016)
//line views/hypha.qtpl:46
return qs422016
//line views/hypha.qtpl:46
}
//line views/hypha.qtpl:48
func StreamNaviTitleHTML(qw422016 *qt422016.Writer, h *hyphae.Hypha) {
//line views/hypha.qtpl:48
qw422016.N().S(`
`)
//line views/hypha.qtpl:50
var (
prevAcc = "/hypha/"
parts = strings.Split(h.Name, "/")
)
//line views/hypha.qtpl:54
qw422016.N().S(`
`)
//line views/hypha.qtpl:74
}
//line views/hypha.qtpl:74
func WriteNaviTitleHTML(qq422016 qtio422016.Writer, h *hyphae.Hypha) {
//line views/hypha.qtpl:74
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/hypha.qtpl:74
StreamNaviTitleHTML(qw422016, h)
//line views/hypha.qtpl:74
qt422016.ReleaseWriter(qw422016)
//line views/hypha.qtpl:74
}
//line views/hypha.qtpl:74
func NaviTitleHTML(h *hyphae.Hypha) string {
//line views/hypha.qtpl:74
qb422016 := qt422016.AcquireByteBuffer()
//line views/hypha.qtpl:74
WriteNaviTitleHTML(qb422016, h)
//line views/hypha.qtpl:74
qs422016 := string(qb422016.B)
//line views/hypha.qtpl:74
qt422016.ReleaseByteBuffer(qb422016)
//line views/hypha.qtpl:74
return qs422016
//line views/hypha.qtpl:74
}
//line views/hypha.qtpl:76
func StreamAttachmentHTML(qw422016 *qt422016.Writer, h *hyphae.Hypha) {
//line views/hypha.qtpl:76
qw422016.N().S(`
`)
//line views/hypha.qtpl:77
switch filepath.Ext(h.BinaryPath) {
//line views/hypha.qtpl:79
case ".jpg", ".gif", ".png", ".webp", ".svg", ".ico":
//line views/hypha.qtpl:79
qw422016.N().S(`
`)
//line views/hypha.qtpl:84
case ".ogg", ".webm", ".mp4":
//line views/hypha.qtpl:84
qw422016.N().S(`
`)
//line views/hypha.qtpl:92
case ".mp3":
//line views/hypha.qtpl:92
qw422016.N().S(`
`)
//line views/hypha.qtpl:100
default:
//line views/hypha.qtpl:100
qw422016.N().S(`
`)
//line views/hypha.qtpl:104
}
//line views/hypha.qtpl:104
qw422016.N().S(`
`)
//line views/hypha.qtpl:105
}
//line views/hypha.qtpl:105
func WriteAttachmentHTML(qq422016 qtio422016.Writer, h *hyphae.Hypha) {
//line views/hypha.qtpl:105
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/hypha.qtpl:105
StreamAttachmentHTML(qw422016, h)
//line views/hypha.qtpl:105
qt422016.ReleaseWriter(qw422016)
//line views/hypha.qtpl:105
}
//line views/hypha.qtpl:105
func AttachmentHTML(h *hyphae.Hypha) string {
//line views/hypha.qtpl:105
qb422016 := qt422016.AcquireByteBuffer()
//line views/hypha.qtpl:105
WriteAttachmentHTML(qb422016, h)
//line views/hypha.qtpl:105
qs422016 := string(qb422016.B)
//line views/hypha.qtpl:105
qt422016.ReleaseByteBuffer(qb422016)
//line views/hypha.qtpl:105
return qs422016
//line views/hypha.qtpl:105
}