2021-12-29 21:08:09 +00:00
|
|
|
// Code generated by qtc from "home.qtpl". DO NOT EDIT.
|
|
|
|
// See https://github.com/valyala/quicktemplate for details.
|
|
|
|
|
|
|
|
//line web/home.qtpl:1
|
|
|
|
package web
|
|
|
|
|
|
|
|
//line web/home.qtpl:1
|
2022-03-13 10:58:34 +00:00
|
|
|
import "source.toby3d.me/toby3d/auth/internal/domain"
|
2021-12-29 21:08:09 +00:00
|
|
|
|
|
|
|
//line web/home.qtpl:3
|
|
|
|
import (
|
|
|
|
qtio422016 "io"
|
|
|
|
|
|
|
|
qt422016 "github.com/valyala/quicktemplate"
|
|
|
|
)
|
|
|
|
|
|
|
|
//line web/home.qtpl:3
|
|
|
|
var (
|
|
|
|
_ = qtio422016.Copy
|
|
|
|
_ = qt422016.AcquireByteBuffer
|
|
|
|
)
|
|
|
|
|
2022-01-04 17:31:33 +00:00
|
|
|
//line web/home.qtpl:3
|
2021-12-29 21:08:09 +00:00
|
|
|
type HomePage struct {
|
|
|
|
BaseOf
|
2022-01-20 19:50:15 +00:00
|
|
|
Client *domain.Client
|
|
|
|
State string
|
2021-12-29 21:08:09 +00:00
|
|
|
}
|
|
|
|
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:10
|
2021-12-29 21:08:09 +00:00
|
|
|
func (p *HomePage) StreamHead(qw422016 *qt422016.Writer) {
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:10
|
2021-12-29 21:08:09 +00:00
|
|
|
qw422016.N().S(` `)
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:11
|
2021-12-29 21:08:09 +00:00
|
|
|
p.BaseOf.StreamHead(qw422016)
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:11
|
2021-12-29 21:08:09 +00:00
|
|
|
qw422016.N().S(` `)
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:12
|
|
|
|
for i := range p.Client.RedirectURI {
|
|
|
|
//line web/home.qtpl:12
|
2021-12-29 21:08:09 +00:00
|
|
|
qw422016.N().S(` <link rel="redirect_uri" href="`)
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:13
|
|
|
|
qw422016.E().S(p.Client.RedirectURI[i].String())
|
|
|
|
//line web/home.qtpl:13
|
2021-12-29 21:08:09 +00:00
|
|
|
qw422016.N().S(`"> `)
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:14
|
2021-12-29 21:08:09 +00:00
|
|
|
}
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:14
|
2021-12-29 21:08:09 +00:00
|
|
|
qw422016.N().S(` `)
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:15
|
2021-12-29 21:08:09 +00:00
|
|
|
}
|
|
|
|
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:15
|
2021-12-29 21:08:09 +00:00
|
|
|
func (p *HomePage) WriteHead(qq422016 qtio422016.Writer) {
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:15
|
2021-12-29 21:08:09 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:15
|
2021-12-29 21:08:09 +00:00
|
|
|
p.StreamHead(qw422016)
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:15
|
2021-12-29 21:08:09 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:15
|
2021-12-29 21:08:09 +00:00
|
|
|
}
|
|
|
|
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:15
|
2021-12-29 21:08:09 +00:00
|
|
|
func (p *HomePage) Head() string {
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:15
|
2021-12-29 21:08:09 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:15
|
2021-12-29 21:08:09 +00:00
|
|
|
p.WriteHead(qb422016)
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:15
|
2021-12-29 21:08:09 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:15
|
2021-12-29 21:08:09 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:15
|
2021-12-29 21:08:09 +00:00
|
|
|
return qs422016
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:15
|
2021-12-29 21:08:09 +00:00
|
|
|
}
|
|
|
|
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:17
|
2021-12-29 21:08:09 +00:00
|
|
|
func (p *HomePage) StreamBody(qw422016 *qt422016.Writer) {
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:17
|
|
|
|
qw422016.N().S(` <header class="h-app h-x-app"> <img class="u-logo" src="`)
|
|
|
|
//line web/home.qtpl:21
|
|
|
|
qw422016.E().S(p.Client.GetLogo().String())
|
|
|
|
//line web/home.qtpl:21
|
2021-12-29 21:08:09 +00:00
|
|
|
qw422016.N().S(`" alt="`)
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:22
|
|
|
|
qw422016.E().S(p.Client.GetName())
|
|
|
|
//line web/home.qtpl:22
|
2021-12-29 21:08:09 +00:00
|
|
|
qw422016.N().S(`" crossorigin="anonymous" decoding="async" height="140" importance="high" referrerpolicy="no-referrer-when-downgrade" width="140"> <h1> <a class="p-name u-url" href="`)
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:33
|
|
|
|
qw422016.E().S(p.Client.GetURL().String())
|
|
|
|
//line web/home.qtpl:33
|
|
|
|
qw422016.N().S(`"> `)
|
2022-01-04 17:31:33 +00:00
|
|
|
//line web/home.qtpl:35
|
2022-01-20 19:50:15 +00:00
|
|
|
qw422016.E().S(p.Client.GetName())
|
2022-01-04 17:31:33 +00:00
|
|
|
//line web/home.qtpl:35
|
2022-01-20 19:50:15 +00:00
|
|
|
qw422016.N().S(` </a> </h1> </header> <main> <form method="get" action="/authorize" enctype="application/x-www-form-urlencoded" accept-charset="utf-8" target="_self"> `)
|
2022-01-04 17:31:33 +00:00
|
|
|
//line web/home.qtpl:48
|
2021-12-29 21:08:09 +00:00
|
|
|
for name, value := range map[string]string{
|
|
|
|
"client_id": p.Client.ID.String(),
|
|
|
|
"redirect_uri": p.Client.RedirectURI[0].String(),
|
2022-01-20 19:50:15 +00:00
|
|
|
"response_type": domain.ResponseTypeCode.String(),
|
2021-12-29 21:08:09 +00:00
|
|
|
"state": p.State,
|
2022-01-20 19:50:15 +00:00
|
|
|
"scope": domain.Scopes{domain.ScopeProfile, domain.ScopeEmail}.String(),
|
2021-12-29 21:08:09 +00:00
|
|
|
} {
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:54
|
2021-12-29 21:08:09 +00:00
|
|
|
qw422016.N().S(` <input type="hidden" name="`)
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:57
|
2021-12-29 21:08:09 +00:00
|
|
|
qw422016.E().S(name)
|
2022-01-04 17:31:33 +00:00
|
|
|
//line web/home.qtpl:57
|
2022-01-20 19:50:15 +00:00
|
|
|
qw422016.N().S(`" value="`)
|
|
|
|
//line web/home.qtpl:58
|
2021-12-29 21:08:09 +00:00
|
|
|
qw422016.E().S(value)
|
2022-01-04 17:31:33 +00:00
|
|
|
//line web/home.qtpl:58
|
2022-01-20 19:50:15 +00:00
|
|
|
qw422016.N().S(`"> `)
|
|
|
|
//line web/home.qtpl:59
|
2021-12-29 21:08:09 +00:00
|
|
|
}
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:59
|
|
|
|
qw422016.N().S(` <input type="url" name="me" placeholder="https://example.com/" inputmode="url" autocomplete="url" required> <button type="submit">`)
|
|
|
|
//line web/home.qtpl:69
|
2021-12-29 21:08:09 +00:00
|
|
|
p.StreamT(qw422016, "Sign In")
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:69
|
|
|
|
qw422016.N().S(`</button> </form> </main> `)
|
|
|
|
//line web/home.qtpl:72
|
2021-12-29 21:08:09 +00:00
|
|
|
}
|
|
|
|
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:72
|
2021-12-29 21:08:09 +00:00
|
|
|
func (p *HomePage) WriteBody(qq422016 qtio422016.Writer) {
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:72
|
2021-12-29 21:08:09 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:72
|
2021-12-29 21:08:09 +00:00
|
|
|
p.StreamBody(qw422016)
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:72
|
2021-12-29 21:08:09 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:72
|
2021-12-29 21:08:09 +00:00
|
|
|
}
|
|
|
|
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:72
|
2021-12-29 21:08:09 +00:00
|
|
|
func (p *HomePage) Body() string {
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:72
|
2021-12-29 21:08:09 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:72
|
2021-12-29 21:08:09 +00:00
|
|
|
p.WriteBody(qb422016)
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:72
|
2021-12-29 21:08:09 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:72
|
2021-12-29 21:08:09 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:72
|
2021-12-29 21:08:09 +00:00
|
|
|
return qs422016
|
2022-01-20 19:50:15 +00:00
|
|
|
//line web/home.qtpl:72
|
2021-12-29 21:08:09 +00:00
|
|
|
}
|