auth/web/baseof.qtpl.go

342 lines
8.8 KiB
Go

// Code generated by qtc from "baseof.qtpl". DO NOT EDIT.
// See https://github.com/valyala/quicktemplate for details.
//line web/baseof.qtpl:1
package web
//line web/baseof.qtpl:1
import (
"runtime/debug"
"golang.org/x/text/language"
"golang.org/x/text/message"
"source.toby3d.me/toby3d/auth/internal/domain"
)
//line web/baseof.qtpl:10
import (
qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate"
)
//line web/baseof.qtpl:10
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
//line web/baseof.qtpl:10
type Page interface {
//line web/baseof.qtpl:10
body() string
//line web/baseof.qtpl:10
streambody(qw422016 *qt422016.Writer)
//line web/baseof.qtpl:10
writebody(qq422016 qtio422016.Writer)
//line web/baseof.qtpl:10
head() string
//line web/baseof.qtpl:10
streamhead(qw422016 *qt422016.Writer)
//line web/baseof.qtpl:10
writehead(qq422016 qtio422016.Writer)
//line web/baseof.qtpl:10
lang() string
//line web/baseof.qtpl:10
streamlang(qw422016 *qt422016.Writer)
//line web/baseof.qtpl:10
writelang(qq422016 qtio422016.Writer)
//line web/baseof.qtpl:10
t(format message.Reference, args ...any) string
//line web/baseof.qtpl:10
streamt(qw422016 *qt422016.Writer, format message.Reference, args ...any)
//line web/baseof.qtpl:10
writet(qq422016 qtio422016.Writer, format message.Reference, args ...any)
//line web/baseof.qtpl:10
title() string
//line web/baseof.qtpl:10
streamtitle(qw422016 *qt422016.Writer)
//line web/baseof.qtpl:10
writetitle(qq422016 qtio422016.Writer)
//line web/baseof.qtpl:10
}
//line web/baseof.qtpl:18
type BaseOf struct {
Config *domain.Config
Language language.Tag
Printer *message.Printer
}
//line web/baseof.qtpl:25
func (p *BaseOf) streamlang(qw422016 *qt422016.Writer) {
//line web/baseof.qtpl:26
if p.Language != language.Und {
//line web/baseof.qtpl:27
qw422016.E().S(p.Language.String())
//line web/baseof.qtpl:28
} else {
//line web/baseof.qtpl:28
qw422016.N().S(`en`)
//line web/baseof.qtpl:30
}
//line web/baseof.qtpl:31
}
//line web/baseof.qtpl:31
func (p *BaseOf) writelang(qq422016 qtio422016.Writer) {
//line web/baseof.qtpl:31
qw422016 := qt422016.AcquireWriter(qq422016)
//line web/baseof.qtpl:31
p.streamlang(qw422016)
//line web/baseof.qtpl:31
qt422016.ReleaseWriter(qw422016)
//line web/baseof.qtpl:31
}
//line web/baseof.qtpl:31
func (p *BaseOf) lang() string {
//line web/baseof.qtpl:31
qb422016 := qt422016.AcquireByteBuffer()
//line web/baseof.qtpl:31
p.writelang(qb422016)
//line web/baseof.qtpl:31
qs422016 := string(qb422016.B)
//line web/baseof.qtpl:31
qt422016.ReleaseByteBuffer(qb422016)
//line web/baseof.qtpl:31
return qs422016
//line web/baseof.qtpl:31
}
//line web/baseof.qtpl:35
func (p *BaseOf) streamtitle(qw422016 *qt422016.Writer) {
//line web/baseof.qtpl:35
qw422016.N().S(` `)
//line web/baseof.qtpl:36
qw422016.E().S(p.Config.Name)
//line web/baseof.qtpl:36
qw422016.N().S(` `)
//line web/baseof.qtpl:37
}
//line web/baseof.qtpl:37
func (p *BaseOf) writetitle(qq422016 qtio422016.Writer) {
//line web/baseof.qtpl:37
qw422016 := qt422016.AcquireWriter(qq422016)
//line web/baseof.qtpl:37
p.streamtitle(qw422016)
//line web/baseof.qtpl:37
qt422016.ReleaseWriter(qw422016)
//line web/baseof.qtpl:37
}
//line web/baseof.qtpl:37
func (p *BaseOf) title() string {
//line web/baseof.qtpl:37
qb422016 := qt422016.AcquireByteBuffer()
//line web/baseof.qtpl:37
p.writetitle(qb422016)
//line web/baseof.qtpl:37
qs422016 := string(qb422016.B)
//line web/baseof.qtpl:37
qt422016.ReleaseByteBuffer(qb422016)
//line web/baseof.qtpl:37
return qs422016
//line web/baseof.qtpl:37
}
//line web/baseof.qtpl:39
func (p *BaseOf) streamhead(qw422016 *qt422016.Writer) {
//line web/baseof.qtpl:39
qw422016.N().S(` `)
//line web/baseof.qtpl:40
qw422016.N().S(` <link rel="icon" href="/favicon.ico" sizes="any"> <link rel="icon" href="/icon.svg" type="image/svg+xml"> <link rel="apple-touch-icon" href="/apple-touch-icon.png"> <link rel="manifest" href="/manifest.webmanifest"> `)
//line web/baseof.qtpl:54
}
//line web/baseof.qtpl:54
func (p *BaseOf) writehead(qq422016 qtio422016.Writer) {
//line web/baseof.qtpl:54
qw422016 := qt422016.AcquireWriter(qq422016)
//line web/baseof.qtpl:54
p.streamhead(qw422016)
//line web/baseof.qtpl:54
qt422016.ReleaseWriter(qw422016)
//line web/baseof.qtpl:54
}
//line web/baseof.qtpl:54
func (p *BaseOf) head() string {
//line web/baseof.qtpl:54
qb422016 := qt422016.AcquireByteBuffer()
//line web/baseof.qtpl:54
p.writehead(qb422016)
//line web/baseof.qtpl:54
qs422016 := string(qb422016.B)
//line web/baseof.qtpl:54
qt422016.ReleaseByteBuffer(qb422016)
//line web/baseof.qtpl:54
return qs422016
//line web/baseof.qtpl:54
}
//line web/baseof.qtpl:56
func (p *BaseOf) streambody(qw422016 *qt422016.Writer) {
//line web/baseof.qtpl:56
}
//line web/baseof.qtpl:56
func (p *BaseOf) writebody(qq422016 qtio422016.Writer) {
//line web/baseof.qtpl:56
qw422016 := qt422016.AcquireWriter(qq422016)
//line web/baseof.qtpl:56
p.streambody(qw422016)
//line web/baseof.qtpl:56
qt422016.ReleaseWriter(qw422016)
//line web/baseof.qtpl:56
}
//line web/baseof.qtpl:56
func (p *BaseOf) body() string {
//line web/baseof.qtpl:56
qb422016 := qt422016.AcquireByteBuffer()
//line web/baseof.qtpl:56
p.writebody(qb422016)
//line web/baseof.qtpl:56
qs422016 := string(qb422016.B)
//line web/baseof.qtpl:56
qt422016.ReleaseByteBuffer(qb422016)
//line web/baseof.qtpl:56
return qs422016
//line web/baseof.qtpl:56
}
//line web/baseof.qtpl:58
func StreamTemplate(qw422016 *qt422016.Writer, p Page) {
//line web/baseof.qtpl:58
qw422016.N().S(` <!DOCTYPE html> <html class="page" lang="`)
//line web/baseof.qtpl:61
p.streamlang(qw422016)
//line web/baseof.qtpl:61
qw422016.N().S(`"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> `)
//line web/baseof.qtpl:68
p.streamhead(qw422016)
//line web/baseof.qtpl:68
qw422016.N().S(` <title>`)
//line web/baseof.qtpl:70
p.streamtitle(qw422016)
//line web/baseof.qtpl:70
qw422016.N().S(`</title> </head> <body class="page__body body"> `)
//line web/baseof.qtpl:74
p.streambody(qw422016)
//line web/baseof.qtpl:74
qw422016.N().S(` `)
//line web/baseof.qtpl:77
var path, vcsRevision string
if bi, ok := debug.ReadBuildInfo(); ok {
path = bi.Path
for i := range bi.Settings {
if bi.Settings[i].Key != "vcs.revision" {
continue
}
vcsRevision = bi.Settings[i].Value
}
}
//line web/baseof.qtpl:90
qw422016.N().S(` `)
//line web/baseof.qtpl:92
if vcsRevision != "" {
//line web/baseof.qtpl:92
qw422016.N().S(` <footer> <small> `)
//line web/baseof.qtpl:95
p.streamt(qw422016, "version")
//line web/baseof.qtpl:95
qw422016.N().S(` <a href="https://`)
//line web/baseof.qtpl:96
qw422016.E().S(path)
//line web/baseof.qtpl:96
qw422016.N().S(`/commit/`)
//line web/baseof.qtpl:96
qw422016.E().S(vcsRevision)
//line web/baseof.qtpl:96
qw422016.N().S(`" target="_blank"> `)
//line web/baseof.qtpl:98
qw422016.E().S(vcsRevision[:7])
//line web/baseof.qtpl:98
qw422016.N().S(`</a> </small> </footer> `)
//line web/baseof.qtpl:102
}
//line web/baseof.qtpl:102
qw422016.N().S(` </body> </html> `)
//line web/baseof.qtpl:105
}
//line web/baseof.qtpl:105
func WriteTemplate(qq422016 qtio422016.Writer, p Page) {
//line web/baseof.qtpl:105
qw422016 := qt422016.AcquireWriter(qq422016)
//line web/baseof.qtpl:105
StreamTemplate(qw422016, p)
//line web/baseof.qtpl:105
qt422016.ReleaseWriter(qw422016)
//line web/baseof.qtpl:105
}
//line web/baseof.qtpl:105
func Template(p Page) string {
//line web/baseof.qtpl:105
qb422016 := qt422016.AcquireByteBuffer()
//line web/baseof.qtpl:105
WriteTemplate(qb422016, p)
//line web/baseof.qtpl:105
qs422016 := string(qb422016.B)
//line web/baseof.qtpl:105
qt422016.ReleaseByteBuffer(qb422016)
//line web/baseof.qtpl:105
return qs422016
//line web/baseof.qtpl:105
}
//line web/baseof.qtpl:107
func (p BaseOf) streamt(qw422016 *qt422016.Writer, format message.Reference, args ...any) {
//line web/baseof.qtpl:107
qw422016.N().S(` `)
//line web/baseof.qtpl:108
qw422016.N().S(p.Printer.Sprintf(format, args...))
//line web/baseof.qtpl:108
qw422016.N().S(` `)
//line web/baseof.qtpl:109
}
//line web/baseof.qtpl:109
func (p BaseOf) writet(qq422016 qtio422016.Writer, format message.Reference, args ...any) {
//line web/baseof.qtpl:109
qw422016 := qt422016.AcquireWriter(qq422016)
//line web/baseof.qtpl:109
p.streamt(qw422016, format, args...)
//line web/baseof.qtpl:109
qt422016.ReleaseWriter(qw422016)
//line web/baseof.qtpl:109
}
//line web/baseof.qtpl:109
func (p BaseOf) t(format message.Reference, args ...any) string {
//line web/baseof.qtpl:109
qb422016 := qt422016.AcquireByteBuffer()
//line web/baseof.qtpl:109
p.writet(qb422016, format, args...)
//line web/baseof.qtpl:109
qs422016 := string(qb422016.B)
//line web/baseof.qtpl:109
qt422016.ReleaseByteBuffer(qb422016)
//line web/baseof.qtpl:109
return qs422016
//line web/baseof.qtpl:109
}