// This file is automatically generated by qtc from "index.qtpl".
// See https://github.com/valyala/quicktemplate for details.

//line index.qtpl:1
package templates

//line index.qtpl:1
import "todo/models"

//line index.qtpl:3
import (
	qtio422016 "io"

	qt422016 "github.com/valyala/quicktemplate"
)

//line index.qtpl:3
var (
	_ = qtio422016.Copy
	_ = qt422016.AcquireByteBuffer
)

//line index.qtpl:4
type IndexPage struct {
	Todos []models.Todo
}

//line index.qtpl:9
func (p *IndexPage) StreamTitle(qw422016 *qt422016.Writer) {
	//line index.qtpl:9
	qw422016.N().S(`
Todo
`)
//line index.qtpl:11
}

//line index.qtpl:11
func (p *IndexPage) WriteTitle(qq422016 qtio422016.Writer) {
	//line index.qtpl:11
	qw422016 := qt422016.AcquireWriter(qq422016)
	//line index.qtpl:11
	p.StreamTitle(qw422016)
	//line index.qtpl:11
	qt422016.ReleaseWriter(qw422016)
//line index.qtpl:11
}

//line index.qtpl:11
func (p *IndexPage) Title() string {
	//line index.qtpl:11
	qb422016 := qt422016.AcquireByteBuffer()
	//line index.qtpl:11
	p.WriteTitle(qb422016)
	//line index.qtpl:11
	qs422016 := string(qb422016.B)
	//line index.qtpl:11
	qt422016.ReleaseByteBuffer(qb422016)
	//line index.qtpl:11
	return qs422016
//line index.qtpl:11
}

//line index.qtpl:13
func (p *IndexPage) StreamStylesheets(qw422016 *qt422016.Writer) {
	//line index.qtpl:13
	qw422016.N().S(`
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css">
<link rel="stylesheet" type="text/css" href="/static/custom.css">
`)
//line index.qtpl:16
}

//line index.qtpl:16
func (p *IndexPage) WriteStylesheets(qq422016 qtio422016.Writer) {
	//line index.qtpl:16
	qw422016 := qt422016.AcquireWriter(qq422016)
	//line index.qtpl:16
	p.StreamStylesheets(qw422016)
	//line index.qtpl:16
	qt422016.ReleaseWriter(qw422016)
//line index.qtpl:16
}

//line index.qtpl:16
func (p *IndexPage) Stylesheets() string {
	//line index.qtpl:16
	qb422016 := qt422016.AcquireByteBuffer()
	//line index.qtpl:16
	p.WriteStylesheets(qb422016)
	//line index.qtpl:16
	qs422016 := string(qb422016.B)
	//line index.qtpl:16
	qt422016.ReleaseByteBuffer(qb422016)
	//line index.qtpl:16
	return qs422016
//line index.qtpl:16
}

//line index.qtpl:18
func (p *IndexPage) StreamScripts(qw422016 *qt422016.Writer) {
	//line index.qtpl:18
	qw422016.N().S(`
`)
//line index.qtpl:19
}

//line index.qtpl:19
func (p *IndexPage) WriteScripts(qq422016 qtio422016.Writer) {
	//line index.qtpl:19
	qw422016 := qt422016.AcquireWriter(qq422016)
	//line index.qtpl:19
	p.StreamScripts(qw422016)
	//line index.qtpl:19
	qt422016.ReleaseWriter(qw422016)
//line index.qtpl:19
}

//line index.qtpl:19
func (p *IndexPage) Scripts() string {
	//line index.qtpl:19
	qb422016 := qt422016.AcquireByteBuffer()
	//line index.qtpl:19
	p.WriteScripts(qb422016)
	//line index.qtpl:19
	qs422016 := string(qb422016.B)
	//line index.qtpl:19
	qt422016.ReleaseByteBuffer(qb422016)
	//line index.qtpl:19
	return qs422016
//line index.qtpl:19
}

//line index.qtpl:21
func (p *IndexPage) StreamBody(qw422016 *qt422016.Writer) {
	//line index.qtpl:21
	qw422016.N().S(`
<div class="container">
    <a href="/" class="title"><h1>TODO in Golang</h1></a>
    <form action="/create" method="post">
        <div class="row">
            <div class="nine columns">
                <input type="text" class="u-full-width" name="todo" id="todo">
            </div>
            <div class="three columns">
                <input type="submit" class="button-primary u-full-width" value="add">
            </div>
        </div>
    </form>

    `)
	//line index.qtpl:35
	for _, todo := range p.Todos {
		//line index.qtpl:35
		qw422016.N().S(`
    <div class="row">
            <div class="one column">
                <form action="/toggle/`)
		//line index.qtpl:38
		qw422016.N().D(todo.Id)
		//line index.qtpl:38
		qw422016.N().S(`" method="post">
                    `)
		//line index.qtpl:39
		StreamGetDoneButton(qw422016, todo.Done)
		//line index.qtpl:39
		qw422016.N().S(`
                </form>
            </div>
            <div class="seven columns">
                <p>`)
		//line index.qtpl:43
		qw422016.E().S(todo.Todo)
		//line index.qtpl:43
		qw422016.N().S(`</p>
            </div>
            <div class="two columns">
                <form action="/edit/`)
		//line index.qtpl:46
		qw422016.N().D(todo.Id)
		//line index.qtpl:46
		qw422016.N().S(`">
                    <input type="submit" class="button-primary u-full-width" value="Edit">
                </form>
            </div>
            <div class="two columns">
                <form action="/delete/`)
		//line index.qtpl:51
		qw422016.N().D(todo.Id)
		//line index.qtpl:51
		qw422016.N().S(`" method="post">
                    <input type="submit" class="button-primary button-red u-full-width" value="Delete">
                </form>
            </div>
    </div>
    `)
		//line index.qtpl:56
	}
	//line index.qtpl:56
	qw422016.N().S(`

</div>
`)
//line index.qtpl:59
}

//line index.qtpl:59
func (p *IndexPage) WriteBody(qq422016 qtio422016.Writer) {
	//line index.qtpl:59
	qw422016 := qt422016.AcquireWriter(qq422016)
	//line index.qtpl:59
	p.StreamBody(qw422016)
	//line index.qtpl:59
	qt422016.ReleaseWriter(qw422016)
//line index.qtpl:59
}

//line index.qtpl:59
func (p *IndexPage) Body() string {
	//line index.qtpl:59
	qb422016 := qt422016.AcquireByteBuffer()
	//line index.qtpl:59
	p.WriteBody(qb422016)
	//line index.qtpl:59
	qs422016 := string(qb422016.B)
	//line index.qtpl:59
	qt422016.ReleaseByteBuffer(qb422016)
	//line index.qtpl:59
	return qs422016
//line index.qtpl:59
}
