// Code generated by qtc from "mainpage.qtpl". DO NOT EDIT.
// See https://github.com/valyala/quicktemplate for details.

// Main page template. Implements BasePage methods.
//

//line examples/basicserver/templates/mainpage.qtpl:3
package templates

//line examples/basicserver/templates/mainpage.qtpl:3
import "github.com/valyala/fasthttp"

//line examples/basicserver/templates/mainpage.qtpl:5
import (
	qtio422016 "io"

	qt422016 "github.com/valyala/quicktemplate"
)

//line examples/basicserver/templates/mainpage.qtpl:5
var (
	_ = qtio422016.Copy
	_ = qt422016.AcquireByteBuffer
)

//line examples/basicserver/templates/mainpage.qtpl:6
type MainPage struct {
	CTX *fasthttp.RequestCtx
}

//line examples/basicserver/templates/mainpage.qtpl:12
func (p *MainPage) StreamTitle(qw422016 *qt422016.Writer) {
//line examples/basicserver/templates/mainpage.qtpl:12
	qw422016.N().S(`
	This is the main page
`)
//line examples/basicserver/templates/mainpage.qtpl:14
}

//line examples/basicserver/templates/mainpage.qtpl:14
func (p *MainPage) WriteTitle(qq422016 qtio422016.Writer) {
//line examples/basicserver/templates/mainpage.qtpl:14
	qw422016 := qt422016.AcquireWriter(qq422016)
//line examples/basicserver/templates/mainpage.qtpl:14
	p.StreamTitle(qw422016)
//line examples/basicserver/templates/mainpage.qtpl:14
	qt422016.ReleaseWriter(qw422016)
//line examples/basicserver/templates/mainpage.qtpl:14
}

//line examples/basicserver/templates/mainpage.qtpl:14
func (p *MainPage) Title() string {
//line examples/basicserver/templates/mainpage.qtpl:14
	qb422016 := qt422016.AcquireByteBuffer()
//line examples/basicserver/templates/mainpage.qtpl:14
	p.WriteTitle(qb422016)
//line examples/basicserver/templates/mainpage.qtpl:14
	qs422016 := string(qb422016.B)
//line examples/basicserver/templates/mainpage.qtpl:14
	qt422016.ReleaseByteBuffer(qb422016)
//line examples/basicserver/templates/mainpage.qtpl:14
	return qs422016
//line examples/basicserver/templates/mainpage.qtpl:14
}

//line examples/basicserver/templates/mainpage.qtpl:17
func (p *MainPage) StreamBody(qw422016 *qt422016.Writer) {
//line examples/basicserver/templates/mainpage.qtpl:17
	qw422016.N().S(`
	<h1>Main page</h1>
	<div>
		Click links below:
		<ul>
			<li><a href="/table?rowsCount=42">Table page</a></li>
			<li><a href="/unknown-page">Error page</a></li>
		</ul>
	</div>
	<div>
		Some info about you:<br/>
		IP: <b>`)
//line examples/basicserver/templates/mainpage.qtpl:28
	qw422016.E().S(p.CTX.RemoteIP().String())
//line examples/basicserver/templates/mainpage.qtpl:28
	qw422016.N().S(`</b><br/>
		User-Agent: <b>`)
//line examples/basicserver/templates/mainpage.qtpl:29
	qw422016.E().Z(p.CTX.UserAgent())
//line examples/basicserver/templates/mainpage.qtpl:29
	qw422016.N().S(`</b><br/>
	</div>
`)
//line examples/basicserver/templates/mainpage.qtpl:31
}

//line examples/basicserver/templates/mainpage.qtpl:31
func (p *MainPage) WriteBody(qq422016 qtio422016.Writer) {
//line examples/basicserver/templates/mainpage.qtpl:31
	qw422016 := qt422016.AcquireWriter(qq422016)
//line examples/basicserver/templates/mainpage.qtpl:31
	p.StreamBody(qw422016)
//line examples/basicserver/templates/mainpage.qtpl:31
	qt422016.ReleaseWriter(qw422016)
//line examples/basicserver/templates/mainpage.qtpl:31
}

//line examples/basicserver/templates/mainpage.qtpl:31
func (p *MainPage) Body() string {
//line examples/basicserver/templates/mainpage.qtpl:31
	qb422016 := qt422016.AcquireByteBuffer()
//line examples/basicserver/templates/mainpage.qtpl:31
	p.WriteBody(qb422016)
//line examples/basicserver/templates/mainpage.qtpl:31
	qs422016 := string(qb422016.B)
//line examples/basicserver/templates/mainpage.qtpl:31
	qt422016.ReleaseByteBuffer(qb422016)
//line examples/basicserver/templates/mainpage.qtpl:31
	return qs422016
//line examples/basicserver/templates/mainpage.qtpl:31
}
