cerrado @ 1e45ae2ea3497958b2ea6a20137955cfc3bbc964

  1// Code generated by qtc from "login.qtpl". DO NOT EDIT.
  2// See https://github.com/valyala/quicktemplate for details.
  3
  4//line templates/login.qtpl:1
  5package templates
  6
  7//line templates/login.qtpl:1
  8import "context"
  9
 10//line templates/login.qtpl:3
 11import (
 12	qtio422016 "io"
 13
 14	qt422016 "github.com/valyala/quicktemplate"
 15)
 16
 17//line templates/login.qtpl:3
 18var (
 19	_ = qtio422016.Copy
 20	_ = qt422016.AcquireByteBuffer
 21)
 22
 23//line templates/login.qtpl:4
 24type LoginPage struct {
 25	ErrorMessage string
 26}
 27
 28//line templates/login.qtpl:9
 29func (p *LoginPage) StreamTitle(qw422016 *qt422016.Writer, ctx context.Context) {
 30//line templates/login.qtpl:9
 31	qw422016.N().S(`Hello`)
 32//line templates/login.qtpl:9
 33}
 34
 35//line templates/login.qtpl:9
 36func (p *LoginPage) WriteTitle(qq422016 qtio422016.Writer, ctx context.Context) {
 37//line templates/login.qtpl:9
 38	qw422016 := qt422016.AcquireWriter(qq422016)
 39//line templates/login.qtpl:9
 40	p.StreamTitle(qw422016, ctx)
 41//line templates/login.qtpl:9
 42	qt422016.ReleaseWriter(qw422016)
 43//line templates/login.qtpl:9
 44}
 45
 46//line templates/login.qtpl:9
 47func (p *LoginPage) Title(ctx context.Context) string {
 48//line templates/login.qtpl:9
 49	qb422016 := qt422016.AcquireByteBuffer()
 50//line templates/login.qtpl:9
 51	p.WriteTitle(qb422016, ctx)
 52//line templates/login.qtpl:9
 53	qs422016 := string(qb422016.B)
 54//line templates/login.qtpl:9
 55	qt422016.ReleaseByteBuffer(qb422016)
 56//line templates/login.qtpl:9
 57	return qs422016
 58//line templates/login.qtpl:9
 59}
 60
 61//line templates/login.qtpl:11
 62func (p *LoginPage) StreamNavbar(qw422016 *qt422016.Writer, ctx context.Context) {
 63//line templates/login.qtpl:11
 64	StreamNavbar(qw422016, ctx, Login)
 65//line templates/login.qtpl:11
 66}
 67
 68//line templates/login.qtpl:11
 69func (p *LoginPage) WriteNavbar(qq422016 qtio422016.Writer, ctx context.Context) {
 70//line templates/login.qtpl:11
 71	qw422016 := qt422016.AcquireWriter(qq422016)
 72//line templates/login.qtpl:11
 73	p.StreamNavbar(qw422016, ctx)
 74//line templates/login.qtpl:11
 75	qt422016.ReleaseWriter(qw422016)
 76//line templates/login.qtpl:11
 77}
 78
 79//line templates/login.qtpl:11
 80func (p *LoginPage) Navbar(ctx context.Context) string {
 81//line templates/login.qtpl:11
 82	qb422016 := qt422016.AcquireByteBuffer()
 83//line templates/login.qtpl:11
 84	p.WriteNavbar(qb422016, ctx)
 85//line templates/login.qtpl:11
 86	qs422016 := string(qb422016.B)
 87//line templates/login.qtpl:11
 88	qt422016.ReleaseByteBuffer(qb422016)
 89//line templates/login.qtpl:11
 90	return qs422016
 91//line templates/login.qtpl:11
 92}
 93
 94//line templates/login.qtpl:13
 95func (p *LoginPage) StreamContent(qw422016 *qt422016.Writer, ctx context.Context) {
 96//line templates/login.qtpl:13
 97	qw422016.N().S(`
 98<div class="row">
 99  <div class="col-md-6 offset-md-3">
100    <form action="/login/" method="POST">
101      <div class="form-group m-3">
102        <label for="username" class="form-label">Username</label>
103        <input type="text" class="form-control" name="username" id="username">
104      </div>
105      <div class="form-group m-3">
106        <label for="password" class="form-label">Password</label>
107        <input type="password" class="form-control" name="password" id="password">
108      </div>
109      <div class="form-group m-3">
110        <button type="submit" class="btn btn-primary">Login</button>
111      </div>
112    </form>
113  </div>
114  `)
115//line templates/login.qtpl:30
116	if p.ErrorMessage != "" {
117//line templates/login.qtpl:30
118		qw422016.N().S(`
119  <div class="col-md-6 offset-md-3">
120    <div class="alert alert-warning text-center" >
121        `)
122//line templates/login.qtpl:33
123		qw422016.E().S(p.ErrorMessage)
124//line templates/login.qtpl:33
125		qw422016.N().S(`
126    </div>
127  </div>
128  `)
129//line templates/login.qtpl:36
130	}
131//line templates/login.qtpl:36
132	qw422016.N().S(`
133</div>
134`)
135//line templates/login.qtpl:38
136}
137
138//line templates/login.qtpl:38
139func (p *LoginPage) WriteContent(qq422016 qtio422016.Writer, ctx context.Context) {
140//line templates/login.qtpl:38
141	qw422016 := qt422016.AcquireWriter(qq422016)
142//line templates/login.qtpl:38
143	p.StreamContent(qw422016, ctx)
144//line templates/login.qtpl:38
145	qt422016.ReleaseWriter(qw422016)
146//line templates/login.qtpl:38
147}
148
149//line templates/login.qtpl:38
150func (p *LoginPage) Content(ctx context.Context) string {
151//line templates/login.qtpl:38
152	qb422016 := qt422016.AcquireByteBuffer()
153//line templates/login.qtpl:38
154	p.WriteContent(qb422016, ctx)
155//line templates/login.qtpl:38
156	qs422016 := string(qb422016.B)
157//line templates/login.qtpl:38
158	qt422016.ReleaseByteBuffer(qb422016)
159//line templates/login.qtpl:38
160	return qs422016
161//line templates/login.qtpl:38
162}
163
164//line templates/login.qtpl:40
165func (p *LoginPage) StreamScript(qw422016 *qt422016.Writer, ctx context.Context) {
166//line templates/login.qtpl:40
167	qw422016.N().S(`
168`)
169//line templates/login.qtpl:41
170}
171
172//line templates/login.qtpl:41
173func (p *LoginPage) WriteScript(qq422016 qtio422016.Writer, ctx context.Context) {
174//line templates/login.qtpl:41
175	qw422016 := qt422016.AcquireWriter(qq422016)
176//line templates/login.qtpl:41
177	p.StreamScript(qw422016, ctx)
178//line templates/login.qtpl:41
179	qt422016.ReleaseWriter(qw422016)
180//line templates/login.qtpl:41
181}
182
183//line templates/login.qtpl:41
184func (p *LoginPage) Script(ctx context.Context) string {
185//line templates/login.qtpl:41
186	qb422016 := qt422016.AcquireByteBuffer()
187//line templates/login.qtpl:41
188	p.WriteScript(qb422016, ctx)
189//line templates/login.qtpl:41
190	qs422016 := string(qb422016.B)
191//line templates/login.qtpl:41
192	qt422016.ReleaseByteBuffer(qb422016)
193//line templates/login.qtpl:41
194	return qs422016
195//line templates/login.qtpl:41
196}