233 lines
5.5 KiB
Go
233 lines
5.5 KiB
Go
// Code generated by qtc from "editor.qtpl". DO NOT EDIT.
|
|
// See https://github.com/valyala/quicktemplate for details.
|
|
|
|
//line web/template/editor.qtpl:1
|
|
package template
|
|
|
|
//line web/template/editor.qtpl:1
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
//line web/template/editor.qtpl:5
|
|
import (
|
|
qtio422016 "io"
|
|
|
|
qt422016 "github.com/valyala/quicktemplate"
|
|
)
|
|
|
|
//line web/template/editor.qtpl:5
|
|
var (
|
|
_ = qtio422016.Copy
|
|
_ = qt422016.AcquireByteBuffer
|
|
)
|
|
|
|
//line web/template/editor.qtpl:6
|
|
type PageEditor struct {
|
|
*BaseOf
|
|
now time.Time
|
|
}
|
|
|
|
func NewPageEditor(base *BaseOf) *PageEditor {
|
|
return &PageEditor{
|
|
BaseOf: base,
|
|
now: time.Now().UTC(),
|
|
}
|
|
}
|
|
|
|
//line web/template/editor.qtpl:19
|
|
func (pe *PageEditor) streamtitle(qw422016 *qt422016.Writer) {
|
|
//line web/template/editor.qtpl:19
|
|
qw422016.N().S(`
|
|
Editor — Micropub
|
|
`)
|
|
//line web/template/editor.qtpl:21
|
|
}
|
|
|
|
//line web/template/editor.qtpl:21
|
|
func (pe *PageEditor) writetitle(qq422016 qtio422016.Writer) {
|
|
//line web/template/editor.qtpl:21
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
|
//line web/template/editor.qtpl:21
|
|
pe.streamtitle(qw422016)
|
|
//line web/template/editor.qtpl:21
|
|
qt422016.ReleaseWriter(qw422016)
|
|
//line web/template/editor.qtpl:21
|
|
}
|
|
|
|
//line web/template/editor.qtpl:21
|
|
func (pe *PageEditor) title() string {
|
|
//line web/template/editor.qtpl:21
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
|
//line web/template/editor.qtpl:21
|
|
pe.writetitle(qb422016)
|
|
//line web/template/editor.qtpl:21
|
|
qs422016 := string(qb422016.B)
|
|
//line web/template/editor.qtpl:21
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
|
//line web/template/editor.qtpl:21
|
|
return qs422016
|
|
//line web/template/editor.qtpl:21
|
|
}
|
|
|
|
//line web/template/editor.qtpl:23
|
|
func (pe *PageEditor) streamhead(qw422016 *qt422016.Writer) {
|
|
//line web/template/editor.qtpl:23
|
|
}
|
|
|
|
//line web/template/editor.qtpl:23
|
|
func (pe *PageEditor) writehead(qq422016 qtio422016.Writer) {
|
|
//line web/template/editor.qtpl:23
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
|
//line web/template/editor.qtpl:23
|
|
pe.streamhead(qw422016)
|
|
//line web/template/editor.qtpl:23
|
|
qt422016.ReleaseWriter(qw422016)
|
|
//line web/template/editor.qtpl:23
|
|
}
|
|
|
|
//line web/template/editor.qtpl:23
|
|
func (pe *PageEditor) head() string {
|
|
//line web/template/editor.qtpl:23
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
|
//line web/template/editor.qtpl:23
|
|
pe.writehead(qb422016)
|
|
//line web/template/editor.qtpl:23
|
|
qs422016 := string(qb422016.B)
|
|
//line web/template/editor.qtpl:23
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
|
//line web/template/editor.qtpl:23
|
|
return qs422016
|
|
//line web/template/editor.qtpl:23
|
|
}
|
|
|
|
//line web/template/editor.qtpl:25
|
|
func (pe *PageEditor) streambody(qw422016 *qt422016.Writer) {
|
|
//line web/template/editor.qtpl:25
|
|
qw422016.N().S(`
|
|
<form method="post"
|
|
action="/api"
|
|
target="_self"
|
|
accept-charset="utf-8"
|
|
enctype="application/x-www-form-urlencoded"
|
|
autocomplete="off">
|
|
|
|
<input type="hidden"
|
|
name="h"
|
|
value="entry" />
|
|
|
|
<div>
|
|
<label>
|
|
`)
|
|
//line web/template/editor.qtpl:39
|
|
pe.streamt(qw422016, `Name`)
|
|
//line web/template/editor.qtpl:39
|
|
qw422016.N().S(`
|
|
<input type="text"
|
|
name="name"
|
|
placeholder="Hello, World!" />
|
|
</label>
|
|
</div>
|
|
|
|
<div>
|
|
<label>
|
|
`)
|
|
//line web/template/editor.qtpl:48
|
|
pe.streamt(qw422016, `Content`)
|
|
//line web/template/editor.qtpl:48
|
|
qw422016.N().S(`
|
|
<textarea name="content"
|
|
cols="30"
|
|
rows="10"
|
|
placeholder="Lorem ipsum dolor sit amet...">
|
|
</textarea>
|
|
</label>
|
|
</div>
|
|
|
|
<div>
|
|
<label>
|
|
`)
|
|
//line web/template/editor.qtpl:59
|
|
pe.streamt(qw422016, `Published exactly at`)
|
|
//line web/template/editor.qtpl:59
|
|
qw422016.N().S(`
|
|
<input type="datetime-local"
|
|
name="published"
|
|
min="1970-01-01T00:00:00"
|
|
value="`)
|
|
//line web/template/editor.qtpl:63
|
|
qw422016.E().S(pe.now.Format(`2006-01-02T15:04:05`))
|
|
//line web/template/editor.qtpl:63
|
|
qw422016.N().S(`"
|
|
step="1" />
|
|
</label>
|
|
</div>
|
|
|
|
<div>
|
|
<label>
|
|
`)
|
|
//line web/template/editor.qtpl:70
|
|
pe.streamt(qw422016, `Published after`)
|
|
//line web/template/editor.qtpl:70
|
|
qw422016.N().S(`
|
|
<input type="text"
|
|
name="published"
|
|
value=""
|
|
pattern="[+-]?\d+(ns|us|µs|ms|s|m|h)" />
|
|
</label>
|
|
</div>
|
|
|
|
<div>
|
|
<label>
|
|
`)
|
|
//line web/template/editor.qtpl:80
|
|
pe.streamt(qw422016, `Tags`)
|
|
//line web/template/editor.qtpl:80
|
|
qw422016.N().S(`
|
|
<input type="text"
|
|
name="category"
|
|
pattern="[a-zA-Z0-9-, ]"
|
|
placeholder="note, 100DaysOfIndieWeb...">
|
|
</label>
|
|
</div>
|
|
|
|
<div>
|
|
<button type="submit">
|
|
`)
|
|
//line web/template/editor.qtpl:90
|
|
pe.streamt(qw422016, `Send`)
|
|
//line web/template/editor.qtpl:90
|
|
qw422016.N().S(`
|
|
</button>
|
|
</div>
|
|
</form>
|
|
`)
|
|
//line web/template/editor.qtpl:94
|
|
}
|
|
|
|
//line web/template/editor.qtpl:94
|
|
func (pe *PageEditor) writebody(qq422016 qtio422016.Writer) {
|
|
//line web/template/editor.qtpl:94
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
|
//line web/template/editor.qtpl:94
|
|
pe.streambody(qw422016)
|
|
//line web/template/editor.qtpl:94
|
|
qt422016.ReleaseWriter(qw422016)
|
|
//line web/template/editor.qtpl:94
|
|
}
|
|
|
|
//line web/template/editor.qtpl:94
|
|
func (pe *PageEditor) body() string {
|
|
//line web/template/editor.qtpl:94
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
|
//line web/template/editor.qtpl:94
|
|
pe.writebody(qb422016)
|
|
//line web/template/editor.qtpl:94
|
|
qs422016 := string(qb422016.B)
|
|
//line web/template/editor.qtpl:94
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
|
//line web/template/editor.qtpl:94
|
|
return qs422016
|
|
//line web/template/editor.qtpl:94
|
|
}
|