// 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:3 import "github.com/bouncepaw/mycorrhiza/hyphae" //line views/hypha.qtpl:4 import "github.com/bouncepaw/mycorrhiza/l18n" //line views/hypha.qtpl:5 import "github.com/bouncepaw/mycorrhiza/util" //line views/hypha.qtpl:7 import ( qtio422016 "io" qt422016 "github.com/valyala/quicktemplate" ) //line views/hypha.qtpl:7 var ( _ = qtio422016.Copy _ = qt422016.AcquireByteBuffer ) //line views/hypha.qtpl:7 func streambeautifulLink(qw422016 *qt422016.Writer, hyphaName string) { //line views/hypha.qtpl:7 qw422016.N().S(``) //line views/hypha.qtpl:7 qw422016.E().S(util.BeautifulName(hyphaName)) //line views/hypha.qtpl:7 qw422016.N().S(``) //line views/hypha.qtpl:7 } //line views/hypha.qtpl:7 func writebeautifulLink(qq422016 qtio422016.Writer, hyphaName string) { //line views/hypha.qtpl:7 qw422016 := qt422016.AcquireWriter(qq422016) //line views/hypha.qtpl:7 streambeautifulLink(qw422016, hyphaName) //line views/hypha.qtpl:7 qt422016.ReleaseWriter(qw422016) //line views/hypha.qtpl:7 } //line views/hypha.qtpl:7 func beautifulLink(hyphaName string) string { //line views/hypha.qtpl:7 qb422016 := qt422016.AcquireByteBuffer() //line views/hypha.qtpl:7 writebeautifulLink(qb422016, hyphaName) //line views/hypha.qtpl:7 qs422016 := string(qb422016.B) //line views/hypha.qtpl:7 qt422016.ReleaseByteBuffer(qb422016) //line views/hypha.qtpl:7 return qs422016 //line views/hypha.qtpl:7 } //line views/hypha.qtpl:9 func StreamMediaRaw(qw422016 *qt422016.Writer, h *hyphae.MediaHypha) { //line views/hypha.qtpl:9 StreamMedia(qw422016, h, l18n.New("en", "en")) //line views/hypha.qtpl:9 } //line views/hypha.qtpl:9 func WriteMediaRaw(qq422016 qtio422016.Writer, h *hyphae.MediaHypha) { //line views/hypha.qtpl:9 qw422016 := qt422016.AcquireWriter(qq422016) //line views/hypha.qtpl:9 StreamMediaRaw(qw422016, h) //line views/hypha.qtpl:9 qt422016.ReleaseWriter(qw422016) //line views/hypha.qtpl:9 } //line views/hypha.qtpl:9 func MediaRaw(h *hyphae.MediaHypha) string { //line views/hypha.qtpl:9 qb422016 := qt422016.AcquireByteBuffer() //line views/hypha.qtpl:9 WriteMediaRaw(qb422016, h) //line views/hypha.qtpl:9 qs422016 := string(qb422016.B) //line views/hypha.qtpl:9 qt422016.ReleaseByteBuffer(qb422016) //line views/hypha.qtpl:9 return qs422016 //line views/hypha.qtpl:9 } //line views/hypha.qtpl:11 func StreamMedia(qw422016 *qt422016.Writer, h *hyphae.MediaHypha, lc *l18n.Localizer) { //line views/hypha.qtpl:11 qw422016.N().S(` `) //line views/hypha.qtpl:12 switch filepath.Ext(h.MediaFilePath()) { //line views/hypha.qtpl:14 case ".jpg", ".gif", ".png", ".webp", ".svg", ".ico": //line views/hypha.qtpl:14 qw422016.N().S(`
`) //line views/hypha.qtpl:19 case ".ogg", ".webm", ".mp4": //line views/hypha.qtpl:19 qw422016.N().S(`