// 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:3 import "github.com/bouncepaw/mycorrhiza/hyphae" //line views/hypha.qtpl:4 import "github.com/bouncepaw/mycorrhiza/util" //line views/hypha.qtpl:6 import ( qtio422016 "io" qt422016 "github.com/valyala/quicktemplate" ) //line views/hypha.qtpl:6 var ( _ = qtio422016.Copy _ = qt422016.AcquireByteBuffer ) //line views/hypha.qtpl:6 func StreamNaviTitleHTML(qw422016 *qt422016.Writer, h *hyphae.Hypha) { //line views/hypha.qtpl:6 qw422016.N().S(` `) //line views/hypha.qtpl:8 var ( prevAcc = "/hypha/" parts = strings.Split(h.Name, "/") ) //line views/hypha.qtpl:12 qw422016.N().S(`

`) //line views/hypha.qtpl:14 qw422016.N().S(``) //line views/hypha.qtpl:16 qw422016.N().S(util.SiteNavIcon) //line views/hypha.qtpl:16 qw422016.N().S(``) //line views/hypha.qtpl:20 for i, part := range parts { //line views/hypha.qtpl:21 if i > 0 { //line views/hypha.qtpl:21 qw422016.N().S(``) //line views/hypha.qtpl:23 } //line views/hypha.qtpl:23 qw422016.N().S(``) //line views/hypha.qtpl:27 qw422016.N().S(util.BeautifulName(part)) //line views/hypha.qtpl:27 qw422016.N().S(``) //line views/hypha.qtpl:29 prevAcc += part + "/" //line views/hypha.qtpl:30 } //line views/hypha.qtpl:31 qw422016.N().S(`

`) //line views/hypha.qtpl:33 } //line views/hypha.qtpl:33 func WriteNaviTitleHTML(qq422016 qtio422016.Writer, h *hyphae.Hypha) { //line views/hypha.qtpl:33 qw422016 := qt422016.AcquireWriter(qq422016) //line views/hypha.qtpl:33 StreamNaviTitleHTML(qw422016, h) //line views/hypha.qtpl:33 qt422016.ReleaseWriter(qw422016) //line views/hypha.qtpl:33 } //line views/hypha.qtpl:33 func NaviTitleHTML(h *hyphae.Hypha) string { //line views/hypha.qtpl:33 qb422016 := qt422016.AcquireByteBuffer() //line views/hypha.qtpl:33 WriteNaviTitleHTML(qb422016, h) //line views/hypha.qtpl:33 qs422016 := string(qb422016.B) //line views/hypha.qtpl:33 qt422016.ReleaseByteBuffer(qb422016) //line views/hypha.qtpl:33 return qs422016 //line views/hypha.qtpl:33 } //line views/hypha.qtpl:35 func StreamBackLinksHTML(qw422016 *qt422016.Writer, h *hyphae.Hypha) { //line views/hypha.qtpl:35 qw422016.N().S(` `) //line views/hypha.qtpl:50 } //line views/hypha.qtpl:50 func WriteBackLinksHTML(qq422016 qtio422016.Writer, h *hyphae.Hypha) { //line views/hypha.qtpl:50 qw422016 := qt422016.AcquireWriter(qq422016) //line views/hypha.qtpl:50 StreamBackLinksHTML(qw422016, h) //line views/hypha.qtpl:50 qt422016.ReleaseWriter(qw422016) //line views/hypha.qtpl:50 } //line views/hypha.qtpl:50 func BackLinksHTML(h *hyphae.Hypha) string { //line views/hypha.qtpl:50 qb422016 := qt422016.AcquireByteBuffer() //line views/hypha.qtpl:50 WriteBackLinksHTML(qb422016, h) //line views/hypha.qtpl:50 qs422016 := string(qb422016.B) //line views/hypha.qtpl:50 qt422016.ReleaseByteBuffer(qb422016) //line views/hypha.qtpl:50 return qs422016 //line views/hypha.qtpl:50 } //line views/hypha.qtpl:52 func StreamAttachmentHTML(qw422016 *qt422016.Writer, h *hyphae.Hypha) { //line views/hypha.qtpl:52 qw422016.N().S(` `) //line views/hypha.qtpl:53 switch filepath.Ext(h.BinaryPath) { //line views/hypha.qtpl:55 case ".jpg", ".gif", ".png", ".webp", ".svg", ".ico": //line views/hypha.qtpl:55 qw422016.N().S(`
`) //line views/hypha.qtpl:60 case ".ogg", ".webm", ".mp4": //line views/hypha.qtpl:60 qw422016.N().S(`
`) //line views/hypha.qtpl:68 case ".mp3": //line views/hypha.qtpl:68 qw422016.N().S(`
`) //line views/hypha.qtpl:76 default: //line views/hypha.qtpl:76 qw422016.N().S(`

Download media

`) //line views/hypha.qtpl:80 } //line views/hypha.qtpl:80 qw422016.N().S(` `) //line views/hypha.qtpl:81 } //line views/hypha.qtpl:81 func WriteAttachmentHTML(qq422016 qtio422016.Writer, h *hyphae.Hypha) { //line views/hypha.qtpl:81 qw422016 := qt422016.AcquireWriter(qq422016) //line views/hypha.qtpl:81 StreamAttachmentHTML(qw422016, h) //line views/hypha.qtpl:81 qt422016.ReleaseWriter(qw422016) //line views/hypha.qtpl:81 } //line views/hypha.qtpl:81 func AttachmentHTML(h *hyphae.Hypha) string { //line views/hypha.qtpl:81 qb422016 := qt422016.AcquireByteBuffer() //line views/hypha.qtpl:81 WriteAttachmentHTML(qb422016, h) //line views/hypha.qtpl:81 qs422016 := string(qb422016.B) //line views/hypha.qtpl:81 qt422016.ReleaseByteBuffer(qb422016) //line views/hypha.qtpl:81 return qs422016 //line views/hypha.qtpl:81 }