240 lines
6.9 KiB
Go
240 lines
6.9 KiB
Go
// Code generated by qtc from "home.qtpl". DO NOT EDIT.
|
|
// See https://github.com/valyala/quicktemplate for details.
|
|
|
|
//line web/template/home.qtpl:1
|
|
package template
|
|
|
|
//line web/template/home.qtpl:3
|
|
import (
|
|
"source.toby3d.me/toby3d/auth/internal/domain"
|
|
"source.toby3d.me/toby3d/auth/internal/domain/response"
|
|
"source.toby3d.me/toby3d/auth/internal/domain/scope"
|
|
"source.toby3d.me/toby3d/auth/web/template/layout"
|
|
)
|
|
|
|
//line web/template/home.qtpl:10
|
|
import (
|
|
qtio422016 "io"
|
|
|
|
qt422016 "github.com/valyala/quicktemplate"
|
|
)
|
|
|
|
//line web/template/home.qtpl:10
|
|
var (
|
|
_ = qtio422016.Copy
|
|
_ = qt422016.AcquireByteBuffer
|
|
)
|
|
|
|
//line web/template/home.qtpl:10
|
|
type Home struct {
|
|
layout.BaseOf
|
|
Client *domain.Client
|
|
State string
|
|
}
|
|
|
|
//line web/template/home.qtpl:17
|
|
func (p *Home) StreamHead(qw422016 *qt422016.Writer) {
|
|
//line web/template/home.qtpl:18
|
|
p.BaseOf.StreamHead(qw422016)
|
|
//line web/template/home.qtpl:19
|
|
for i := range p.Client.RedirectURI {
|
|
//line web/template/home.qtpl:19
|
|
qw422016.N().S(`<link rel="redirect_uri" href="`)
|
|
//line web/template/home.qtpl:20
|
|
qw422016.E().S(p.Client.RedirectURI[i].String())
|
|
//line web/template/home.qtpl:20
|
|
qw422016.N().S(`">`)
|
|
//line web/template/home.qtpl:21
|
|
}
|
|
//line web/template/home.qtpl:22
|
|
}
|
|
|
|
//line web/template/home.qtpl:22
|
|
func (p *Home) WriteHead(qq422016 qtio422016.Writer) {
|
|
//line web/template/home.qtpl:22
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
|
//line web/template/home.qtpl:22
|
|
p.StreamHead(qw422016)
|
|
//line web/template/home.qtpl:22
|
|
qt422016.ReleaseWriter(qw422016)
|
|
//line web/template/home.qtpl:22
|
|
}
|
|
|
|
//line web/template/home.qtpl:22
|
|
func (p *Home) Head() string {
|
|
//line web/template/home.qtpl:22
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
|
//line web/template/home.qtpl:22
|
|
p.WriteHead(qb422016)
|
|
//line web/template/home.qtpl:22
|
|
qs422016 := string(qb422016.B)
|
|
//line web/template/home.qtpl:22
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
|
//line web/template/home.qtpl:22
|
|
return qs422016
|
|
//line web/template/home.qtpl:22
|
|
}
|
|
|
|
//line web/template/home.qtpl:24
|
|
func (p *Home) StreamBody(qw422016 *qt422016.Writer) {
|
|
//line web/template/home.qtpl:24
|
|
qw422016.N().S(`<header class="h-app h-x-app">`)
|
|
//line web/template/home.qtpl:26
|
|
if p.Client.Logo != nil {
|
|
//line web/template/home.qtpl:26
|
|
qw422016.N().S(`<img class="u-logo"`)
|
|
//line web/template/home.qtpl:27
|
|
qw422016.N().S(` `)
|
|
//line web/template/home.qtpl:27
|
|
qw422016.N().S(`src="`)
|
|
//line web/template/home.qtpl:28
|
|
qw422016.E().S(p.Client.Logo.String())
|
|
//line web/template/home.qtpl:28
|
|
qw422016.N().S(`"`)
|
|
//line web/template/home.qtpl:28
|
|
qw422016.N().S(` `)
|
|
//line web/template/home.qtpl:28
|
|
qw422016.N().S(`alt="`)
|
|
//line web/template/home.qtpl:29
|
|
qw422016.E().S(p.Client.Name)
|
|
//line web/template/home.qtpl:29
|
|
qw422016.N().S(`"`)
|
|
//line web/template/home.qtpl:29
|
|
qw422016.N().S(` `)
|
|
//line web/template/home.qtpl:29
|
|
qw422016.N().S(`crossorigin="anonymous"`)
|
|
//line web/template/home.qtpl:30
|
|
qw422016.N().S(` `)
|
|
//line web/template/home.qtpl:30
|
|
qw422016.N().S(`decoding="async"`)
|
|
//line web/template/home.qtpl:31
|
|
qw422016.N().S(` `)
|
|
//line web/template/home.qtpl:31
|
|
qw422016.N().S(`height="140"`)
|
|
//line web/template/home.qtpl:32
|
|
qw422016.N().S(` `)
|
|
//line web/template/home.qtpl:32
|
|
qw422016.N().S(`importance="high"`)
|
|
//line web/template/home.qtpl:33
|
|
qw422016.N().S(` `)
|
|
//line web/template/home.qtpl:33
|
|
qw422016.N().S(`referrerpolicy="no-referrer-when-downgrade"`)
|
|
//line web/template/home.qtpl:34
|
|
qw422016.N().S(` `)
|
|
//line web/template/home.qtpl:34
|
|
qw422016.N().S(`width="140">`)
|
|
//line web/template/home.qtpl:36
|
|
}
|
|
//line web/template/home.qtpl:36
|
|
qw422016.N().S(`<h1><a class="p-name u-url" href="`)
|
|
//line web/template/home.qtpl:38
|
|
qw422016.E().S(p.Client.URL.String())
|
|
//line web/template/home.qtpl:38
|
|
qw422016.N().S(`">`)
|
|
//line web/template/home.qtpl:38
|
|
qw422016.E().S(p.Client.Name)
|
|
//line web/template/home.qtpl:38
|
|
qw422016.N().S(`</a></h1></header><main><form class=""`)
|
|
//line web/template/home.qtpl:42
|
|
qw422016.N().S(` `)
|
|
//line web/template/home.qtpl:42
|
|
qw422016.N().S(`method="get"`)
|
|
//line web/template/home.qtpl:43
|
|
qw422016.N().S(` `)
|
|
//line web/template/home.qtpl:43
|
|
qw422016.N().S(`action="/authorize"`)
|
|
//line web/template/home.qtpl:44
|
|
qw422016.N().S(` `)
|
|
//line web/template/home.qtpl:44
|
|
qw422016.N().S(`enctype="application/x-www-form-urlencoded"`)
|
|
//line web/template/home.qtpl:45
|
|
qw422016.N().S(` `)
|
|
//line web/template/home.qtpl:45
|
|
qw422016.N().S(`accept-charset="utf-8"`)
|
|
//line web/template/home.qtpl:46
|
|
qw422016.N().S(` `)
|
|
//line web/template/home.qtpl:46
|
|
qw422016.N().S(`target="_self">`)
|
|
//line web/template/home.qtpl:49
|
|
for _, field := range [][2]string{
|
|
{"client_id", p.Client.ID.String()},
|
|
{"redirect_uri", p.Client.RedirectURI[0].String()},
|
|
{"response_type", response.Code.String()},
|
|
{"scope", domain.Scopes{scope.Email, scope.Profile}.String()},
|
|
{"state", p.State},
|
|
} {
|
|
//line web/template/home.qtpl:55
|
|
qw422016.N().S(`<input type="hidden"`)
|
|
//line web/template/home.qtpl:56
|
|
qw422016.N().S(` `)
|
|
//line web/template/home.qtpl:56
|
|
qw422016.N().S(`name="`)
|
|
//line web/template/home.qtpl:57
|
|
qw422016.E().S(field[0])
|
|
//line web/template/home.qtpl:57
|
|
qw422016.N().S(`"`)
|
|
//line web/template/home.qtpl:57
|
|
qw422016.N().S(` `)
|
|
//line web/template/home.qtpl:57
|
|
qw422016.N().S(`value="`)
|
|
//line web/template/home.qtpl:58
|
|
qw422016.E().S(field[1])
|
|
//line web/template/home.qtpl:58
|
|
qw422016.N().S(`">`)
|
|
//line web/template/home.qtpl:59
|
|
}
|
|
//line web/template/home.qtpl:59
|
|
qw422016.N().S(`<input type="url"`)
|
|
//line web/template/home.qtpl:61
|
|
qw422016.N().S(` `)
|
|
//line web/template/home.qtpl:61
|
|
qw422016.N().S(`name="me"`)
|
|
//line web/template/home.qtpl:62
|
|
qw422016.N().S(` `)
|
|
//line web/template/home.qtpl:62
|
|
qw422016.N().S(`placeholder="https://example.com/"`)
|
|
//line web/template/home.qtpl:63
|
|
qw422016.N().S(` `)
|
|
//line web/template/home.qtpl:63
|
|
qw422016.N().S(`inputmode="url"`)
|
|
//line web/template/home.qtpl:64
|
|
qw422016.N().S(` `)
|
|
//line web/template/home.qtpl:64
|
|
qw422016.N().S(`autocomplete="url"`)
|
|
//line web/template/home.qtpl:65
|
|
qw422016.N().S(` `)
|
|
//line web/template/home.qtpl:65
|
|
qw422016.N().S(`required><button type="submit">`)
|
|
//line web/template/home.qtpl:68
|
|
p.StreamT(qw422016, "Sign In")
|
|
//line web/template/home.qtpl:68
|
|
qw422016.N().S(`</button></form></main>`)
|
|
//line web/template/home.qtpl:71
|
|
}
|
|
|
|
//line web/template/home.qtpl:71
|
|
func (p *Home) WriteBody(qq422016 qtio422016.Writer) {
|
|
//line web/template/home.qtpl:71
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
|
//line web/template/home.qtpl:71
|
|
p.StreamBody(qw422016)
|
|
//line web/template/home.qtpl:71
|
|
qt422016.ReleaseWriter(qw422016)
|
|
//line web/template/home.qtpl:71
|
|
}
|
|
|
|
//line web/template/home.qtpl:71
|
|
func (p *Home) Body() string {
|
|
//line web/template/home.qtpl:71
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
|
//line web/template/home.qtpl:71
|
|
p.WriteBody(qb422016)
|
|
//line web/template/home.qtpl:71
|
|
qs422016 := string(qb422016.B)
|
|
//line web/template/home.qtpl:71
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
|
//line web/template/home.qtpl:71
|
|
return qs422016
|
|
//line web/template/home.qtpl:71
|
|
}
|