// 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 streamnonExistentHyphaNotice(qw422016 *qt422016.Writer, h *hyphae.Hypha, u *user.User) {
//line views/hypha.qtpl:9
qw422016.N().S(`
This hypha does not exist
`)
//line views/hypha.qtpl:12
if cfg.UseAuth && u.Group == "anon" {
//line views/hypha.qtpl:12
qw422016.N().S(`
You are not authorized to create new hyphae. Here is what you can do:
`)
//line views/hypha.qtpl:18
} else {
//line views/hypha.qtpl:18
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:41
}
//line views/hypha.qtpl:41
qw422016.N().S(`
`)
//line views/hypha.qtpl:43
}
//line views/hypha.qtpl:43
func writenonExistentHyphaNotice(qq422016 qtio422016.Writer, h *hyphae.Hypha, u *user.User) {
//line views/hypha.qtpl:43
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/hypha.qtpl:43
streamnonExistentHyphaNotice(qw422016, h, u)
//line views/hypha.qtpl:43
qt422016.ReleaseWriter(qw422016)
//line views/hypha.qtpl:43
}
//line views/hypha.qtpl:43
func nonExistentHyphaNotice(h *hyphae.Hypha, u *user.User) string {
//line views/hypha.qtpl:43
qb422016 := qt422016.AcquireByteBuffer()
//line views/hypha.qtpl:43
writenonExistentHyphaNotice(qb422016, h, u)
//line views/hypha.qtpl:43
qs422016 := string(qb422016.B)
//line views/hypha.qtpl:43
qt422016.ReleaseByteBuffer(qb422016)
//line views/hypha.qtpl:43
return qs422016
//line views/hypha.qtpl:43
}
//line views/hypha.qtpl:45
func StreamNaviTitleHTML(qw422016 *qt422016.Writer, h *hyphae.Hypha) {
//line views/hypha.qtpl:45
qw422016.N().S(`
`)
//line views/hypha.qtpl:47
var (
prevAcc = "/hypha/"
parts = strings.Split(h.Name, "/")
)
//line views/hypha.qtpl:51
qw422016.N().S(`
`)
//line views/hypha.qtpl:71
}
//line views/hypha.qtpl:71
func WriteNaviTitleHTML(qq422016 qtio422016.Writer, h *hyphae.Hypha) {
//line views/hypha.qtpl:71
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/hypha.qtpl:71
StreamNaviTitleHTML(qw422016, h)
//line views/hypha.qtpl:71
qt422016.ReleaseWriter(qw422016)
//line views/hypha.qtpl:71
}
//line views/hypha.qtpl:71
func NaviTitleHTML(h *hyphae.Hypha) string {
//line views/hypha.qtpl:71
qb422016 := qt422016.AcquireByteBuffer()
//line views/hypha.qtpl:71
WriteNaviTitleHTML(qb422016, h)
//line views/hypha.qtpl:71
qs422016 := string(qb422016.B)
//line views/hypha.qtpl:71
qt422016.ReleaseByteBuffer(qb422016)
//line views/hypha.qtpl:71
return qs422016
//line views/hypha.qtpl:71
}
//line views/hypha.qtpl:73
func StreamAttachmentHTML(qw422016 *qt422016.Writer, h *hyphae.Hypha) {
//line views/hypha.qtpl:73
qw422016.N().S(`
`)
//line views/hypha.qtpl:74
switch filepath.Ext(h.BinaryPath) {
//line views/hypha.qtpl:76
case ".jpg", ".gif", ".png", ".webp", ".svg", ".ico":
//line views/hypha.qtpl:76
qw422016.N().S(`
`)
//line views/hypha.qtpl:81
case ".ogg", ".webm", ".mp4":
//line views/hypha.qtpl:81
qw422016.N().S(`
`)
//line views/hypha.qtpl:89
case ".mp3":
//line views/hypha.qtpl:89
qw422016.N().S(`
`)
//line views/hypha.qtpl:97
default:
//line views/hypha.qtpl:97
qw422016.N().S(`
`)
//line views/hypha.qtpl:101
}
//line views/hypha.qtpl:101
qw422016.N().S(`
`)
//line views/hypha.qtpl:102
}
//line views/hypha.qtpl:102
func WriteAttachmentHTML(qq422016 qtio422016.Writer, h *hyphae.Hypha) {
//line views/hypha.qtpl:102
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/hypha.qtpl:102
StreamAttachmentHTML(qw422016, h)
//line views/hypha.qtpl:102
qt422016.ReleaseWriter(qw422016)
//line views/hypha.qtpl:102
}
//line views/hypha.qtpl:102
func AttachmentHTML(h *hyphae.Hypha) string {
//line views/hypha.qtpl:102
qb422016 := qt422016.AcquireByteBuffer()
//line views/hypha.qtpl:102
WriteAttachmentHTML(qb422016, h)
//line views/hypha.qtpl:102
qs422016 := string(qb422016.B)
//line views/hypha.qtpl:102
qt422016.ReleaseByteBuffer(qb422016)
//line views/hypha.qtpl:102
return qs422016
//line views/hypha.qtpl:102
}