// Code generated by qtc from "base.qtpl". DO NOT EDIT. // See https://github.com/valyala/quicktemplate for details. // This is a base page template. All the other template pages implement this interface. // //line templates/base.qtpl:3 package templates //line templates/base.qtpl:3 import "context" //line templates/base.qtpl:4 import "strconv" //line templates/base.qtpl:5 import "time" //line templates/base.qtpl:7 import ( qtio422016 "io" qt422016 "github.com/valyala/quicktemplate" ) //line templates/base.qtpl:7 var ( _ = qtio422016.Copy _ = qt422016.AcquireByteBuffer ) //line templates/base.qtpl:8 var Slug = "" //line templates/base.qtpl:12 type Page interface { //line templates/base.qtpl:12 Title(ctx context.Context) string //line templates/base.qtpl:12 StreamTitle(qw422016 *qt422016.Writer, ctx context.Context) //line templates/base.qtpl:12 WriteTitle(qq422016 qtio422016.Writer, ctx context.Context) //line templates/base.qtpl:12 Content(ctx context.Context) string //line templates/base.qtpl:12 StreamContent(qw422016 *qt422016.Writer, ctx context.Context) //line templates/base.qtpl:12 WriteContent(qq422016 qtio422016.Writer, ctx context.Context) //line templates/base.qtpl:12 Script(ctx context.Context) string //line templates/base.qtpl:12 StreamScript(qw422016 *qt422016.Writer, ctx context.Context) //line templates/base.qtpl:12 WriteScript(qq422016 qtio422016.Writer, ctx context.Context) //line templates/base.qtpl:12 Navbar(ctx context.Context) string //line templates/base.qtpl:12 StreamNavbar(qw422016 *qt422016.Writer, ctx context.Context) //line templates/base.qtpl:12 WriteNavbar(qq422016 qtio422016.Writer, ctx context.Context) //line templates/base.qtpl:12 } //line templates/base.qtpl:21 func FromUInttoString(u *uint) string { if u != nil { return strconv.FormatUint(uint64(*u), 10) } return "" } //line templates/base.qtpl:31 func TimeFormat(t time.Time) string { return t.Format("02.01.2006") } //line templates/base.qtpl:36 func Ignore[T any](v T, _ error) T { return v } //line templates/base.qtpl:41 func IsLoggedIn(ctx context.Context) bool { t, ok := ctx.Value("logged").(bool) return ok && t } // Page prints a page implementing Page interface. //line templates/base.qtpl:48 func StreamPageTemplate(qw422016 *qt422016.Writer, p Page, ctx context.Context) { //line templates/base.qtpl:48 qw422016.N().S(` `) //line templates/base.qtpl:54 p.StreamTitle(qw422016, ctx) //line templates/base.qtpl:54 qw422016.N().S(` `) //line templates/base.qtpl:60 p.StreamNavbar(qw422016, ctx) //line templates/base.qtpl:60 qw422016.N().S(`
`) //line templates/base.qtpl:62 p.StreamContent(qw422016, ctx) //line templates/base.qtpl:62 qw422016.N().S(`
`) //line templates/base.qtpl:65 p.StreamScript(qw422016, ctx) //line templates/base.qtpl:65 qw422016.N().S(` `) //line templates/base.qtpl:67 } //line templates/base.qtpl:67 func WritePageTemplate(qq422016 qtio422016.Writer, p Page, ctx context.Context) { //line templates/base.qtpl:67 qw422016 := qt422016.AcquireWriter(qq422016) //line templates/base.qtpl:67 StreamPageTemplate(qw422016, p, ctx) //line templates/base.qtpl:67 qt422016.ReleaseWriter(qw422016) //line templates/base.qtpl:67 } //line templates/base.qtpl:67 func PageTemplate(p Page, ctx context.Context) string { //line templates/base.qtpl:67 qb422016 := qt422016.AcquireByteBuffer() //line templates/base.qtpl:67 WritePageTemplate(qb422016, p, ctx) //line templates/base.qtpl:67 qs422016 := string(qb422016.B) //line templates/base.qtpl:67 qt422016.ReleaseByteBuffer(qb422016) //line templates/base.qtpl:67 return qs422016 //line templates/base.qtpl:67 }