1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-10-31 04:06:16 +00:00
mycorrhiza/templates/recent_changes.qtpl.go

162 lines
4.4 KiB
Go
Raw Normal View History

2020-09-26 18:19:17 +00:00
// Code generated by qtc from "recent_changes.qtpl". DO NOT EDIT.
// See https://github.com/valyala/quicktemplate for details.
//line templates/recent_changes.qtpl:1
package templates
//line templates/recent_changes.qtpl:1
import (
qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate"
)
//line templates/recent_changes.qtpl:1
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
//line templates/recent_changes.qtpl:1
func StreamRecentChangesHTML(qw422016 *qt422016.Writer, changes []string, n int) {
//line templates/recent_changes.qtpl:1
qw422016.N().S(`
2021-01-26 05:41:57 +00:00
<div class="layout">
<main class="main-width recent-changes">
2020-09-26 18:19:17 +00:00
<h1>Recent Changes</h1>
2020-11-04 11:00:17 +00:00
<p><a href="/"> Back</a></p>
2020-09-26 18:19:17 +00:00
<nav class="recent-changes__count">
See
`)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:9
2020-09-26 18:19:17 +00:00
for _, m := range []int{20, 0, 50, 0, 100} {
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:9
2020-09-26 18:19:17 +00:00
qw422016.N().S(`
`)
2020-11-04 11:00:17 +00:00
//line templates/recent_changes.qtpl:10
2021-01-26 05:41:57 +00:00
switch m {
//line templates/recent_changes.qtpl:11
2020-09-26 18:19:17 +00:00
case 0:
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:11
2020-09-26 18:19:17 +00:00
qw422016.N().S(`
<span aria-hidden="true">|</span>
`)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:13
2020-09-26 18:19:17 +00:00
case n:
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:13
2020-09-26 18:19:17 +00:00
qw422016.N().S(`
<b>`)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:14
2020-09-26 18:19:17 +00:00
qw422016.N().D(n)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:14
2020-09-26 18:19:17 +00:00
qw422016.N().S(`</b>
`)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:15
2020-09-26 18:19:17 +00:00
default:
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:15
2020-09-26 18:19:17 +00:00
qw422016.N().S(`
<a href="/recent-changes/`)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:16
2020-09-26 18:19:17 +00:00
qw422016.N().D(m)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:16
2020-09-26 18:19:17 +00:00
qw422016.N().S(`">`)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:16
2020-09-26 18:19:17 +00:00
qw422016.N().D(m)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:16
2020-09-26 18:19:17 +00:00
qw422016.N().S(`</a>
`)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:17
2020-09-26 18:19:17 +00:00
}
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:17
2020-09-26 18:19:17 +00:00
qw422016.N().S(`
`)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:18
2020-09-26 18:19:17 +00:00
}
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:18
2020-09-26 18:19:17 +00:00
qw422016.N().S(`
recent changes
</nav>
<p><img class="icon" width="20" height="20" src="https://upload.wikimedia.org/wikipedia/commons/4/46/Generic_Feed-icon.svg">Subscribe via <a href="/recent-changes-rss">RSS</a>, <a href="/recent-changes-atom">Atom</a> or <a href="/recent-changes-json">JSON feed</a>.</p>
2020-09-26 18:19:17 +00:00
`)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:29
2020-09-26 18:19:17 +00:00
qw422016.N().S(`
<section class="recent-changes__list" role="feed">
`)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:32
2020-09-26 18:19:17 +00:00
if len(changes) == 0 {
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:32
2020-09-26 18:19:17 +00:00
qw422016.N().S(`
<p>Could not find any recent changes.</p>
`)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:34
2020-09-26 18:19:17 +00:00
} else {
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:34
2020-09-26 18:19:17 +00:00
qw422016.N().S(`
`)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:35
2020-09-26 18:19:17 +00:00
for i, entry := range changes {
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:35
2020-09-26 18:19:17 +00:00
qw422016.N().S(`
2020-11-04 11:00:17 +00:00
<ul class="recent-changes__entry rc-entry" role="article"
2020-09-26 18:19:17 +00:00
aria-setsize="`)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:37
2020-09-26 18:19:17 +00:00
qw422016.N().D(n)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:37
2020-09-26 18:19:17 +00:00
qw422016.N().S(`" aria-posinset="`)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:37
2020-09-26 18:19:17 +00:00
qw422016.N().D(i)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:37
2020-09-26 18:19:17 +00:00
qw422016.N().S(`">
`)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:38
2020-09-26 18:19:17 +00:00
qw422016.N().S(entry)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:38
2020-09-26 18:19:17 +00:00
qw422016.N().S(`
</ul>
`)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:40
2020-09-26 18:19:17 +00:00
}
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:40
2020-09-26 18:19:17 +00:00
qw422016.N().S(`
`)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:41
2020-09-26 18:19:17 +00:00
}
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:41
2020-09-26 18:19:17 +00:00
qw422016.N().S(`
</section>
</main>
2021-01-26 05:41:57 +00:00
</div>
2020-09-26 18:19:17 +00:00
`)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:45
2020-09-26 18:19:17 +00:00
}
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:45
2020-09-26 18:19:17 +00:00
func WriteRecentChangesHTML(qq422016 qtio422016.Writer, changes []string, n int) {
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:45
2020-09-26 18:19:17 +00:00
qw422016 := qt422016.AcquireWriter(qq422016)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:45
2020-09-26 18:19:17 +00:00
StreamRecentChangesHTML(qw422016, changes, n)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:45
2020-09-26 18:19:17 +00:00
qt422016.ReleaseWriter(qw422016)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:45
2020-09-26 18:19:17 +00:00
}
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:45
2020-09-26 18:19:17 +00:00
func RecentChangesHTML(changes []string, n int) string {
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:45
2020-09-26 18:19:17 +00:00
qb422016 := qt422016.AcquireByteBuffer()
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:45
2020-09-26 18:19:17 +00:00
WriteRecentChangesHTML(qb422016, changes, n)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:45
2020-09-26 18:19:17 +00:00
qs422016 := string(qb422016.B)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:45
2020-09-26 18:19:17 +00:00
qt422016.ReleaseByteBuffer(qb422016)
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:45
2020-09-26 18:19:17 +00:00
return qs422016
2021-01-26 05:41:57 +00:00
//line templates/recent_changes.qtpl:45
2020-09-26 18:19:17 +00:00
}