1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2025-01-08 10:51:09 +00:00

Get rid of div.layout, center header on two-columnar layout

This commit is contained in:
Timur Ismagilov 2022-04-21 19:05:17 +03:00
parent fe360f582d
commit bbee985cd4
19 changed files with 1104 additions and 1184 deletions

View File

@ -1,8 +1,7 @@
{{define "backlinks to text"}}Backlinks to {{.}}{{end}} {{define "backlinks to text"}}Backlinks to {{.}}{{end}}
{{define "title"}}{{template "backlinks to text" .HyphaName}}{{end}} {{define "title"}}{{template "backlinks to text" .HyphaName}}{{end}}
{{define "body"}} {{define "body"}}
<div class="layout"> <main class="main-width backlinks">
<main class="main-width backlinks">
<h1>{{block "backlinks to link" .HyphaName}}Backlinks to <a href="/hypha/{{.}}">{{beautifulName .}}</a>{{end}}</h1> <h1>{{block "backlinks to link" .HyphaName}}Backlinks to <a href="/hypha/{{.}}">{{beautifulName .}}</a>{{end}}</h1>
<p>{{block "description" .}}Hyphae which have a link to this hypha, embed it as an image or transclude it are listed below.{{end}}</p> <p>{{block "description" .}}Hyphae which have a link to this hypha, embed it as an image or transclude it are listed below.{{end}}</p>
<ol class="backlinks__list"> <ol class="backlinks__list">
@ -12,6 +11,5 @@
</li> </li>
{{end}} {{end}}
</ol> </ol>
</main> </main>
</div>
{{end}} {{end}}

View File

@ -1,7 +1,6 @@
{{define "title"}}Help{{end}} {{define "title"}}Help{{end}}
{{define "body"}} {{define "body"}}
<div class="layout"> <main class="main-width help">
<main class="main-width help">
<article> <article>
{{if .ContentsHTML}} {{if .ContentsHTML}}
{{.ContentsHTML}} {{.ContentsHTML}}
@ -10,8 +9,8 @@
<p>{{block "entry not found invitation" .}}If you want to write this entry by yourself, consider <a class="wikilink wikilink_external wikilink_https" href="https://github.com/bouncepaw/mycorrhiza">contributing</a> it directly.{{end}}</p> <p>{{block "entry not found invitation" .}}If you want to write this entry by yourself, consider <a class="wikilink wikilink_external wikilink_https" href="https://github.com/bouncepaw/mycorrhiza">contributing</a> it directly.{{end}}</p>
{{end}} {{end}}
</article> </article>
</main> </main>
<aside class="help-topics layout-card"> <aside class="help-topics layout-card">
<h2 class="layout-card__title">{{block "topics" .}}Help topics{{end}}</h2> <h2 class="layout-card__title">{{block "topics" .}}Help topics{{end}}</h2>
<ul class="help-topics__list"> <ul class="help-topics__list">
<li><a href="/help/en">{{block "main" .}}Main{{end}}</a></li> <li><a href="/help/en">{{block "main" .}}Main{{end}}</a></li>
@ -44,7 +43,6 @@
</ul> </ul>
</li> </li>
</ul> </ul>
</aside> </aside>
</div>
{{end}} {{end}}

View File

@ -1,8 +1,7 @@
{{define "list of hyphae"}}List of hyphae{{end}} {{define "list of hyphae"}}List of hyphae{{end}}
{{define "title"}}{{template "list of hyphae"}}{{end}} {{define "title"}}{{template "list of hyphae"}}{{end}}
{{define "body"}} {{define "body"}}
<div class="layout"> <main class="main-width">
<main class="main-width">
<h1>{{template "list of hyphae"}}</h1> <h1>{{template "list of hyphae"}}</h1>
<ol class="hypha-list"> <ol class="hypha-list">
{{range .Entries}} {{range .Entries}}
@ -16,6 +15,5 @@
</li> </li>
{{end}} {{end}}
</ol> </ol>
</main> </main>
</div>
{{end}} {{end}}

View File

@ -1,7 +1,7 @@
{{define "search:"}}Search: {{.}}{{end}} {{define "search:"}}Search: {{.}}{{end}}
{{define "title"}}{{template "search:" .Query}}{{end}} {{define "title"}}{{template "search:" .Query}}{{end}}
{{define "body"}} {{define "body"}}
<div class="layout"><main class="main-width title-search"> <main class="main-width title-search">
<h1>{{block "search results for" .Query}}Search results for {{.}}{{end}}</h1> <h1>{{block "search results for" .Query}}Search results for {{.}}{{end}}</h1>
<p>{{block "search desc" .}}Every hypha name has been compared with the query. Hyphae that have matched the query are listed below.{{end}}</p> <p>{{block "search desc" .}}Every hypha name has been compared with the query. Hyphae that have matched the query are listed below.{{end}}</p>
<ul class="title-search__results"> <ul class="title-search__results">
@ -11,6 +11,5 @@
</li> </li>
{{end}} {{end}}
</ul> </ul>
</main> </main>
</div>
{{end}} {{end}}

View File

@ -20,14 +20,14 @@
/* General element positions, from small to big */ /* General element positions, from small to big */
/* Phones and whatnot */ /* Phones and whatnot */
.layout { display: grid; row-gap: 1rem; } body { display: grid; row-gap: .5rem; }
header { width: 100%; margin-bottom: 1rem; } header { width: 100%; }
.layout-card li { list-style-type: none; } .layout-card li { list-style-type: none; }
@media screen and (max-width: 800px) { @media screen and (max-width: 800px) {
.amnt-grid { grid-template-columns: 1fr; } .amnt-grid { grid-template-columns: 1fr; }
.layout { grid-template-columns: auto; grid-template-rows: auto auto auto; } body { grid-template-columns: auto; grid-template-rows: auto auto auto; }
.main-width { width: 100%; } .main-width { width: 100%; }
main { padding: .5rem 1rem 1rem 1rem; } main { padding: .5rem 1rem 1rem 1rem; }
} }
@ -55,13 +55,14 @@ header { width: 100%; margin-bottom: 1rem; }
/* Wide enough to fit two columns ok */ /* Wide enough to fit two columns ok */
@media screen and (min-width: 1100px) { @media screen and (min-width: 1100px) {
.layout { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; margin: 0 1rem; row-gap: 1rem; } body { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; margin: 0 1rem; row-gap: .5rem; }
.main-width { margin: 0; } header { grid-column: 1 / span 2; grid-row: 1 / span 1; margin: 0; }
main { grid-column: 1 / span 1; grid-row: 1 / span 2; } main { grid-column: 1 / span 1; grid-row: 2 / span 2; }
.markup-toolbar, .help-topics, .categories-card { grid-column: 2 / span 1; grid-row: 1 / span 1; } main.main-width { margin-left: .5rem; }
.sibling-hyphae { grid-column: 2 / span 1; grid-row: 2 / span 1; } .markup-toolbar, .help-topics, .categories-card { grid-column: 2 / span 1; grid-row: 2 / span 1; }
.action-toolbar { grid-column: 2 / span 1; grid-row: 2 / span 1; } .sibling-hyphae { grid-column: 2 / span 1; grid-row: 3 / span 1; }
.layout-card { width: 100%; } .action-toolbar { grid-column: 2 / span 1; grid-row: 3 / span 1; }
.layout-card { width: 100%; margin-left: -.5rem; }
.edit-toolbar__buttons {display: grid; } .edit-toolbar__buttons {display: grid; }
} }
@ -69,14 +70,15 @@ header { width: 100%; margin-bottom: 1rem; }
.edit-toolbar__buttons { grid-template-columns: 1fr 1fr; grid-column-gap: .125rem; } .edit-toolbar__buttons { grid-template-columns: 1fr 1fr; grid-column-gap: .125rem; }
} }
@media screen and (min-width: 1250px) { @media screen and (min-width: 1200px) {
.layout { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); } body { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
header { grid-column: 1 / span 3; grid-row: 1 / span 1; margin: 0; }
.layout-card {max-width: 18rem;} .layout-card {max-width: 18rem;}
.main-width { margin: 0 auto; } .main-width { margin: 0 auto; }
main { grid-column: 2 / span 1; grid-row: 1 / span 3; } main { grid-column: 2 / span 1; grid-row: 2 / span 3; }
.sibling-hyphae, .markup-toolbar, .help-topics { grid-column: 3 / span 1; margin-left: 0; grid-row: 1 / span 2; } .sibling-hyphae, .markup-toolbar, .help-topics { grid-column: 3 / span 1; margin-left: -.5rem; grid-row: 2 / span 2; }
.markup-toolbar { grid-column: 3 / span 1; grid-row: 1 / span 2; } .markup-toolbar { grid-column: 3 / span 1; grid-row: 2 / span 2; margin-left: -.5rem; }
.action-toolbar, .categories-card { grid-column: 1 / span 1; grid-row: 1 / span 1; } .action-toolbar, .categories-card { grid-column: 1 / span 1; grid-row: 2 / span 1; margin-left: .5rem; }
.edit-toolbar__buttons { grid-template-columns: 1fr; } .edit-toolbar__buttons { grid-template-columns: 1fr; }
} }

View File

@ -30,7 +30,7 @@ func (e l10nEntry) get(lang string) string {
return e._en return e._en
} }
const aboutTemplateString = `<div class="layout"> const aboutTemplateString = `
<main class="main-width"> <main class="main-width">
<section class="about-page"> <section class="about-page">
<h1>{{ printf (get .L.Title) .Cfg.WikiName }}</h1> <h1>{{ printf (get .L.Title) .Cfg.WikiName }}</h1>
@ -59,8 +59,7 @@ const aboutTemplateString = `<div class="layout">
{{ end }} {{ end }}
</dl> </dl>
</section> </section>
</main> </main>`
</div>`
var aboutData = struct { var aboutData = struct {
L map[string]l10nEntry L map[string]l10nEntry

View File

@ -1,7 +1,6 @@
{{define "panel title"}}Administrative functions{{end}} {{define "panel title"}}Administrative functions{{end}}
{{define "panel"}} {{define "panel"}}
<div class="layout"> <main class="main-width">
<main class="main-width">
<h1>{{template "panel title"}}</h1> <h1>{{template "panel title"}}</h1>
<section> <section>
<h2>{{block "panel safe section title" .}}Safe section{{end}}</h2> <h2>{{block "panel safe section title" .}}Safe section{{end}}</h2>
@ -29,6 +28,5 @@
</li> </li>
</ul> </ul>
</section> </section>
</main> </main>
</div>
{{end}} {{end}}

View File

@ -5,7 +5,6 @@
{% import "github.com/bouncepaw/mycorrhiza/util" %} {% import "github.com/bouncepaw/mycorrhiza/util" %}
{% func AdminUsersPanel(userList []*user.User, lc *l18n.Localizer) %} {% func AdminUsersPanel(userList []*user.User, lc *l18n.Localizer) %}
<div class="layout">
<main class="main-width"> <main class="main-width">
<h1>{%s lc.Get("admin.users_title") %}</h1> <h1>{%s lc.Get("admin.users_title") %}</h1>
@ -47,11 +46,9 @@
</tbody> </tbody>
</table> </table>
</main> </main>
</div>
{% endfunc %} {% endfunc %}
{% func AdminUserNew(f util.FormData, lc *l18n.Localizer) %} {% func AdminUserNew(f util.FormData, lc *l18n.Localizer) %}
<div class="layout">
<main class="main-width form-wrap"> <main class="main-width form-wrap">
<h1>{%s lc.Get("admin.newuser_title") %}</h1> <h1>{%s lc.Get("admin.newuser_title") %}</h1>
@ -92,11 +89,9 @@
</div> </div>
</form> </form>
</main> </main>
</div>
{% endfunc %} {% endfunc %}
{% func AdminUserEdit(u *user.User, f util.FormData, lc *l18n.Localizer) %} {% func AdminUserEdit(u *user.User, f util.FormData, lc *l18n.Localizer) %}
<div class="layout">
<main class="main-width form-wrap"> <main class="main-width form-wrap">
<h1> <h1>
<a href="/admin/users/">&larr;</a> <a href="/admin/users/">&larr;</a>
@ -132,11 +127,9 @@
<p>{%s lc.Get("admin.user_delete_tip") %}</p> <p>{%s lc.Get("admin.user_delete_tip") %}</p>
<a class="btn btn_destructive" href="/admin/users/{%u u.Name %}/delete">{%s lc.Get("admin.user_delete") %}</a> <a class="btn btn_destructive" href="/admin/users/{%u u.Name %}/delete">{%s lc.Get("admin.user_delete") %}</a>
</main> </main>
</div>
{% endfunc %} {% endfunc %}
{% func AdminUserDelete(u *user.User, f util.FormData, lc *l18n.Localizer) %} {% func AdminUserDelete(u *user.User, f util.FormData, lc *l18n.Localizer) %}
<div class="layout">
<main class="main-width form-wrap"> <main class="main-width form-wrap">
<h1>{%s lc.Get("admin.user_delete_heading") %}</h1> <h1>{%s lc.Get("admin.user_delete_heading") %}</h1>
@ -154,5 +147,4 @@
<a class="btn btn_weak" href="/admin/users/{%u u.Name %}/edit">{%s lc.Get("ui.cancel") %}</a> <a class="btn btn_weak" href="/admin/users/{%u u.Name %}/edit">{%s lc.Get("ui.cancel") %}</a>
</form> </form>
</main> </main>
</div>
{% endfunc %} {% endfunc %}

View File

@ -36,24 +36,23 @@ var (
func StreamAdminUsersPanel(qw422016 *qt422016.Writer, userList []*user.User, lc *l18n.Localizer) { func StreamAdminUsersPanel(qw422016 *qt422016.Writer, userList []*user.User, lc *l18n.Localizer) {
//line views/admin.qtpl:7 //line views/admin.qtpl:7
qw422016.N().S(` qw422016.N().S(`
<div class="layout">
<main class="main-width"> <main class="main-width">
<h1>`) <h1>`)
//line views/admin.qtpl:10 //line views/admin.qtpl:9
qw422016.E().S(lc.Get("admin.users_title")) qw422016.E().S(lc.Get("admin.users_title"))
//line views/admin.qtpl:10 //line views/admin.qtpl:9
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
<form action="/admin/reindex-users" method="post"> <form action="/admin/reindex-users" method="post">
<a class="btn" href="/admin/new-user">`) <a class="btn" href="/admin/new-user">`)
//line views/admin.qtpl:13 //line views/admin.qtpl:12
qw422016.E().S(lc.Get("admin.users_create")) qw422016.E().S(lc.Get("admin.users_create"))
//line views/admin.qtpl:13 //line views/admin.qtpl:12
qw422016.N().S(`</a> qw422016.N().S(`</a>
<button class="btn" type="submit">`) <button class="btn" type="submit">`)
//line views/admin.qtpl:14 //line views/admin.qtpl:13
qw422016.E().S(lc.Get("admin.users_reindex")) qw422016.E().S(lc.Get("admin.users_reindex"))
//line views/admin.qtpl:14 //line views/admin.qtpl:13
qw422016.N().S(`</button> qw422016.N().S(`</button>
</form> </form>
@ -63,245 +62,243 @@ func StreamAdminUsersPanel(qw422016 *qt422016.Writer, userList []*user.User, lc
<thead> <thead>
<tr> <tr>
<th>`) <th>`)
//line views/admin.qtpl:22 //line views/admin.qtpl:21
qw422016.E().S(lc.Get("admin.users_name")) qw422016.E().S(lc.Get("admin.users_name"))
//line views/admin.qtpl:21
qw422016.N().S(`</th>
<th>`)
//line views/admin.qtpl:22
qw422016.E().S(lc.Get("admin.users_group"))
//line views/admin.qtpl:22 //line views/admin.qtpl:22
qw422016.N().S(`</th> qw422016.N().S(`</th>
<th>`) <th>`)
//line views/admin.qtpl:23 //line views/admin.qtpl:23
qw422016.E().S(lc.Get("admin.users_group"))
//line views/admin.qtpl:23
qw422016.N().S(`</th>
<th>`)
//line views/admin.qtpl:24
qw422016.E().S(lc.Get("admin.users_registered")) qw422016.E().S(lc.Get("admin.users_registered"))
//line views/admin.qtpl:24 //line views/admin.qtpl:23
qw422016.N().S(`</th> qw422016.N().S(`</th>
<th aria-label="`) <th aria-label="`)
//line views/admin.qtpl:25 //line views/admin.qtpl:24
qw422016.E().S(lc.Get("admin.users_actions")) qw422016.E().S(lc.Get("admin.users_actions"))
//line views/admin.qtpl:25 //line views/admin.qtpl:24
qw422016.N().S(`"></th> qw422016.N().S(`"></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
`) `)
//line views/admin.qtpl:29 //line views/admin.qtpl:28
for _, u := range userList { for _, u := range userList {
//line views/admin.qtpl:29 //line views/admin.qtpl:28
qw422016.N().S(` qw422016.N().S(`
<tr> <tr>
<td class="table-cell--fill"> <td class="table-cell--fill">
<a href="/hypha/`) <a href="/hypha/`)
//line views/admin.qtpl:32 //line views/admin.qtpl:31
qw422016.N().U(cfg.UserHypha) qw422016.N().U(cfg.UserHypha)
//line views/admin.qtpl:32 //line views/admin.qtpl:31
qw422016.N().S(`/`) qw422016.N().S(`/`)
//line views/admin.qtpl:32 //line views/admin.qtpl:31
qw422016.N().U(u.Name) qw422016.N().U(u.Name)
//line views/admin.qtpl:32 //line views/admin.qtpl:31
qw422016.N().S(`">`) qw422016.N().S(`">`)
//line views/admin.qtpl:32 //line views/admin.qtpl:31
qw422016.E().S(u.Name) qw422016.E().S(u.Name)
//line views/admin.qtpl:32 //line views/admin.qtpl:31
qw422016.N().S(`</a> qw422016.N().S(`</a>
</td> </td>
<td>`) <td>`)
//line views/admin.qtpl:34 //line views/admin.qtpl:33
qw422016.E().S(u.Group) qw422016.E().S(u.Group)
//line views/admin.qtpl:34 //line views/admin.qtpl:33
qw422016.N().S(`</td> qw422016.N().S(`</td>
<td> <td>
`) `)
//line views/admin.qtpl:36 //line views/admin.qtpl:35
if u.RegisteredAt.IsZero() { if u.RegisteredAt.IsZero() {
//line views/admin.qtpl:35
qw422016.N().S(`
`)
//line views/admin.qtpl:36
qw422016.E().S(lc.Get("admin.users_notime"))
//line views/admin.qtpl:36 //line views/admin.qtpl:36
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/admin.qtpl:37 //line views/admin.qtpl:37
qw422016.E().S(lc.Get("admin.users_notime")) } else {
//line views/admin.qtpl:37 //line views/admin.qtpl:37
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/admin.qtpl:38 //line views/admin.qtpl:38
} else { qw422016.E().S(u.RegisteredAt.UTC().Format("2006-01-02 15:04"))
//line views/admin.qtpl:38 //line views/admin.qtpl:38
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/admin.qtpl:39 //line views/admin.qtpl:39
qw422016.E().S(u.RegisteredAt.UTC().Format("2006-01-02 15:04"))
//line views/admin.qtpl:39
qw422016.N().S(`
`)
//line views/admin.qtpl:40
} }
//line views/admin.qtpl:40 //line views/admin.qtpl:39
qw422016.N().S(` qw422016.N().S(`
</td> </td>
<td> <td>
<a href="/admin/users/`) <a href="/admin/users/`)
//line views/admin.qtpl:43 //line views/admin.qtpl:42
qw422016.N().U(u.Name) qw422016.N().U(u.Name)
//line views/admin.qtpl:43 //line views/admin.qtpl:42
qw422016.N().S(`/edit">`) qw422016.N().S(`/edit">`)
//line views/admin.qtpl:43 //line views/admin.qtpl:42
qw422016.E().S(lc.Get("admin.users_edit")) qw422016.E().S(lc.Get("admin.users_edit"))
//line views/admin.qtpl:43 //line views/admin.qtpl:42
qw422016.N().S(`</a> qw422016.N().S(`</a>
</td> </td>
</tr> </tr>
`) `)
//line views/admin.qtpl:46 //line views/admin.qtpl:45
} }
//line views/admin.qtpl:46 //line views/admin.qtpl:45
qw422016.N().S(` qw422016.N().S(`
</tbody> </tbody>
</table> </table>
</main> </main>
</div>
`) `)
//line views/admin.qtpl:51 //line views/admin.qtpl:49
} }
//line views/admin.qtpl:51 //line views/admin.qtpl:49
func WriteAdminUsersPanel(qq422016 qtio422016.Writer, userList []*user.User, lc *l18n.Localizer) { func WriteAdminUsersPanel(qq422016 qtio422016.Writer, userList []*user.User, lc *l18n.Localizer) {
//line views/admin.qtpl:51 //line views/admin.qtpl:49
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/admin.qtpl:51 //line views/admin.qtpl:49
StreamAdminUsersPanel(qw422016, userList, lc) StreamAdminUsersPanel(qw422016, userList, lc)
//line views/admin.qtpl:51 //line views/admin.qtpl:49
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/admin.qtpl:51 //line views/admin.qtpl:49
} }
//line views/admin.qtpl:51 //line views/admin.qtpl:49
func AdminUsersPanel(userList []*user.User, lc *l18n.Localizer) string { func AdminUsersPanel(userList []*user.User, lc *l18n.Localizer) string {
//line views/admin.qtpl:51 //line views/admin.qtpl:49
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/admin.qtpl:51 //line views/admin.qtpl:49
WriteAdminUsersPanel(qb422016, userList, lc) WriteAdminUsersPanel(qb422016, userList, lc)
//line views/admin.qtpl:51 //line views/admin.qtpl:49
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/admin.qtpl:51 //line views/admin.qtpl:49
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/admin.qtpl:51 //line views/admin.qtpl:49
return qs422016 return qs422016
//line views/admin.qtpl:51 //line views/admin.qtpl:49
} }
//line views/admin.qtpl:53 //line views/admin.qtpl:51
func StreamAdminUserNew(qw422016 *qt422016.Writer, f util.FormData, lc *l18n.Localizer) { func StreamAdminUserNew(qw422016 *qt422016.Writer, f util.FormData, lc *l18n.Localizer) {
//line views/admin.qtpl:53 //line views/admin.qtpl:51
qw422016.N().S(` qw422016.N().S(`
<div class="layout">
<main class="main-width form-wrap"> <main class="main-width form-wrap">
<h1>`) <h1>`)
//line views/admin.qtpl:56 //line views/admin.qtpl:53
qw422016.E().S(lc.Get("admin.newuser_title")) qw422016.E().S(lc.Get("admin.newuser_title"))
//line views/admin.qtpl:56 //line views/admin.qtpl:53
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
`) `)
//line views/admin.qtpl:58 //line views/admin.qtpl:55
if f.HasError() { if f.HasError() {
//line views/admin.qtpl:58 //line views/admin.qtpl:55
qw422016.N().S(` qw422016.N().S(`
<div class="notice notice--error"> <div class="notice notice--error">
<strong>`) <strong>`)
//line views/admin.qtpl:60 //line views/admin.qtpl:57
qw422016.E().S(lc.Get("ui.error")) qw422016.E().S(lc.Get("ui.error"))
//line views/admin.qtpl:60 //line views/admin.qtpl:57
qw422016.N().S(`:</strong> qw422016.N().S(`:</strong>
`) `)
//line views/admin.qtpl:61 //line views/admin.qtpl:58
qw422016.E().S(f.Error()) qw422016.E().S(f.Error())
//line views/admin.qtpl:61 //line views/admin.qtpl:58
qw422016.N().S(` qw422016.N().S(`
</div> </div>
`) `)
//line views/admin.qtpl:63 //line views/admin.qtpl:60
} }
//line views/admin.qtpl:63 //line views/admin.qtpl:60
qw422016.N().S(` qw422016.N().S(`
<form class="form--double" action="" method="post"> <form class="form--double" action="" method="post">
<div class="form-field"> <div class="form-field">
<label for="name">`) <label for="name">`)
//line views/admin.qtpl:67 //line views/admin.qtpl:64
qw422016.E().S(lc.Get("admin.users_name")) qw422016.E().S(lc.Get("admin.users_name"))
//line views/admin.qtpl:67 //line views/admin.qtpl:64
qw422016.N().S(`:</label> qw422016.N().S(`:</label>
<input type="text" name="name" id="name" value="`) <input type="text" name="name" id="name" value="`)
//line views/admin.qtpl:68 //line views/admin.qtpl:65
qw422016.E().S(f.Get("name")) qw422016.E().S(f.Get("name"))
//line views/admin.qtpl:68 //line views/admin.qtpl:65
qw422016.N().S(`" autofocus> qw422016.N().S(`" autofocus>
</div> </div>
<div class="form-field"> <div class="form-field">
<label for="password">`) <label for="password">`)
//line views/admin.qtpl:72 //line views/admin.qtpl:69
qw422016.E().S(lc.Get("admin.users_password")) qw422016.E().S(lc.Get("admin.users_password"))
//line views/admin.qtpl:72 //line views/admin.qtpl:69
qw422016.N().S(`:</label> qw422016.N().S(`:</label>
<input type="password" name="password" id="password" value="`) <input type="password" name="password" id="password" value="`)
//line views/admin.qtpl:73 //line views/admin.qtpl:70
qw422016.E().S(f.Get("password")) qw422016.E().S(f.Get("password"))
//line views/admin.qtpl:73 //line views/admin.qtpl:70
qw422016.N().S(`"> qw422016.N().S(`">
</div> </div>
<div class="form-field"> <div class="form-field">
<label for="group">`) <label for="group">`)
//line views/admin.qtpl:77 //line views/admin.qtpl:74
qw422016.E().S(lc.Get("admin.users_group")) qw422016.E().S(lc.Get("admin.users_group"))
//line views/admin.qtpl:77 //line views/admin.qtpl:74
qw422016.N().S(`:</label> qw422016.N().S(`:</label>
<select id="group" name="group"> <select id="group" name="group">
<option`) <option`)
//line views/admin.qtpl:79 //line views/admin.qtpl:76
if f.Get("group") == "anon" { if f.Get("group") == "anon" {
//line views/admin.qtpl:79 //line views/admin.qtpl:76
qw422016.N().S(` selected`) qw422016.N().S(` selected`)
//line views/admin.qtpl:79 //line views/admin.qtpl:76
} }
//line views/admin.qtpl:79 //line views/admin.qtpl:76
qw422016.N().S(`>anon</option> qw422016.N().S(`>anon</option>
<option`) <option`)
//line views/admin.qtpl:80 //line views/admin.qtpl:77
if f.Get("group") == "editor" { if f.Get("group") == "editor" {
//line views/admin.qtpl:80 //line views/admin.qtpl:77
qw422016.N().S(` selected`) qw422016.N().S(` selected`)
//line views/admin.qtpl:80 //line views/admin.qtpl:77
} }
//line views/admin.qtpl:80 //line views/admin.qtpl:77
qw422016.N().S(`>editor</option> qw422016.N().S(`>editor</option>
<option`) <option`)
//line views/admin.qtpl:81 //line views/admin.qtpl:78
if f.Get("group") == "trusted" { if f.Get("group") == "trusted" {
//line views/admin.qtpl:81 //line views/admin.qtpl:78
qw422016.N().S(` selected`) qw422016.N().S(` selected`)
//line views/admin.qtpl:81 //line views/admin.qtpl:78
} }
//line views/admin.qtpl:81 //line views/admin.qtpl:78
qw422016.N().S(`>trusted</option> qw422016.N().S(`>trusted</option>
<option`) <option`)
//line views/admin.qtpl:82 //line views/admin.qtpl:79
if f.Get("group") == "moderator" { if f.Get("group") == "moderator" {
//line views/admin.qtpl:82 //line views/admin.qtpl:79
qw422016.N().S(` selected`) qw422016.N().S(` selected`)
//line views/admin.qtpl:82 //line views/admin.qtpl:79
} }
//line views/admin.qtpl:82 //line views/admin.qtpl:79
qw422016.N().S(`>moderator</option> qw422016.N().S(`>moderator</option>
<option`) <option`)
//line views/admin.qtpl:83 //line views/admin.qtpl:80
if f.Get("group") == "admin" { if f.Get("group") == "admin" {
//line views/admin.qtpl:83 //line views/admin.qtpl:80
qw422016.N().S(` selected`) qw422016.N().S(` selected`)
//line views/admin.qtpl:83 //line views/admin.qtpl:80
} }
//line views/admin.qtpl:83 //line views/admin.qtpl:80
qw422016.N().S(`>admin</option> qw422016.N().S(`>admin</option>
</select> </select>
</div> </div>
@ -309,294 +306,289 @@ func StreamAdminUserNew(qw422016 *qt422016.Writer, f util.FormData, lc *l18n.Loc
<div class="form-field"> <div class="form-field">
<div class="form-field__input"> <div class="form-field__input">
<button class="btn" type="submit">`) <button class="btn" type="submit">`)
//line views/admin.qtpl:89 //line views/admin.qtpl:86
qw422016.E().S(lc.Get("admin.newuser_create")) qw422016.E().S(lc.Get("admin.newuser_create"))
//line views/admin.qtpl:89 //line views/admin.qtpl:86
qw422016.N().S(`</button> qw422016.N().S(`</button>
<a class="btn btn_weak" href="/admin/users/">`) <a class="btn btn_weak" href="/admin/users/">`)
//line views/admin.qtpl:90 //line views/admin.qtpl:87
qw422016.E().S(lc.Get("ui.cancel")) qw422016.E().S(lc.Get("ui.cancel"))
//line views/admin.qtpl:90 //line views/admin.qtpl:87
qw422016.N().S(`</a> qw422016.N().S(`</a>
</div> </div>
</div> </div>
</form> </form>
</main> </main>
</div>
`) `)
//line views/admin.qtpl:96 //line views/admin.qtpl:92
} }
//line views/admin.qtpl:96 //line views/admin.qtpl:92
func WriteAdminUserNew(qq422016 qtio422016.Writer, f util.FormData, lc *l18n.Localizer) { func WriteAdminUserNew(qq422016 qtio422016.Writer, f util.FormData, lc *l18n.Localizer) {
//line views/admin.qtpl:96 //line views/admin.qtpl:92
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/admin.qtpl:96 //line views/admin.qtpl:92
StreamAdminUserNew(qw422016, f, lc) StreamAdminUserNew(qw422016, f, lc)
//line views/admin.qtpl:96 //line views/admin.qtpl:92
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/admin.qtpl:96 //line views/admin.qtpl:92
} }
//line views/admin.qtpl:96 //line views/admin.qtpl:92
func AdminUserNew(f util.FormData, lc *l18n.Localizer) string { func AdminUserNew(f util.FormData, lc *l18n.Localizer) string {
//line views/admin.qtpl:96 //line views/admin.qtpl:92
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/admin.qtpl:96 //line views/admin.qtpl:92
WriteAdminUserNew(qb422016, f, lc) WriteAdminUserNew(qb422016, f, lc)
//line views/admin.qtpl:96 //line views/admin.qtpl:92
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/admin.qtpl:96 //line views/admin.qtpl:92
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/admin.qtpl:96 //line views/admin.qtpl:92
return qs422016 return qs422016
//line views/admin.qtpl:96 //line views/admin.qtpl:92
} }
//line views/admin.qtpl:98 //line views/admin.qtpl:94
func StreamAdminUserEdit(qw422016 *qt422016.Writer, u *user.User, f util.FormData, lc *l18n.Localizer) { func StreamAdminUserEdit(qw422016 *qt422016.Writer, u *user.User, f util.FormData, lc *l18n.Localizer) {
//line views/admin.qtpl:98 //line views/admin.qtpl:94
qw422016.N().S(` qw422016.N().S(`
<div class="layout">
<main class="main-width form-wrap"> <main class="main-width form-wrap">
<h1> <h1>
<a href="/admin/users/">&larr;</a> <a href="/admin/users/">&larr;</a>
`) `)
//line views/admin.qtpl:103 //line views/admin.qtpl:98
qw422016.E().S(u.Name) qw422016.E().S(u.Name)
//line views/admin.qtpl:103 //line views/admin.qtpl:98
qw422016.N().S(` qw422016.N().S(`
</h1> </h1>
<h2>`) <h2>`)
//line views/admin.qtpl:106 //line views/admin.qtpl:101
qw422016.E().S(lc.Get("admin.user_group_heading")) qw422016.E().S(lc.Get("admin.user_group_heading"))
//line views/admin.qtpl:106 //line views/admin.qtpl:101
qw422016.N().S(`</h2> qw422016.N().S(`</h2>
`) `)
//line views/admin.qtpl:108 //line views/admin.qtpl:103
if f.HasError() { if f.HasError() {
//line views/admin.qtpl:108 //line views/admin.qtpl:103
qw422016.N().S(` qw422016.N().S(`
<div class="notice notice--error"> <div class="notice notice--error">
<strong>`) <strong>`)
//line views/admin.qtpl:110 //line views/admin.qtpl:105
qw422016.E().S(lc.Get("ui.error")) qw422016.E().S(lc.Get("ui.error"))
//line views/admin.qtpl:110 //line views/admin.qtpl:105
qw422016.N().S(`:</strong> qw422016.N().S(`:</strong>
`) `)
//line views/admin.qtpl:111 //line views/admin.qtpl:106
qw422016.E().S(f.Error()) qw422016.E().S(f.Error())
//line views/admin.qtpl:111 //line views/admin.qtpl:106
qw422016.N().S(` qw422016.N().S(`
</div> </div>
`) `)
//line views/admin.qtpl:113 //line views/admin.qtpl:108
} }
//line views/admin.qtpl:113 //line views/admin.qtpl:108
qw422016.N().S(` qw422016.N().S(`
<form action="" method="post"> <form action="" method="post">
<div class="form-field"> <div class="form-field">
<select id="group" name="group" aria-label="`) <select id="group" name="group" aria-label="`)
//line views/admin.qtpl:117 //line views/admin.qtpl:112
qw422016.E().S(lc.Get("admin.users_group")) qw422016.E().S(lc.Get("admin.users_group"))
//line views/admin.qtpl:117 //line views/admin.qtpl:112
qw422016.N().S(`"> qw422016.N().S(`">
<option`) <option`)
//line views/admin.qtpl:118 //line views/admin.qtpl:113
if f.Get("group") == "anon" { if f.Get("group") == "anon" {
//line views/admin.qtpl:118 //line views/admin.qtpl:113
qw422016.N().S(` selected`) qw422016.N().S(` selected`)
//line views/admin.qtpl:118 //line views/admin.qtpl:113
} }
//line views/admin.qtpl:118 //line views/admin.qtpl:113
qw422016.N().S(`>anon</option> qw422016.N().S(`>anon</option>
<option`) <option`)
//line views/admin.qtpl:119 //line views/admin.qtpl:114
if f.Get("group") == "editor" { if f.Get("group") == "editor" {
//line views/admin.qtpl:119 //line views/admin.qtpl:114
qw422016.N().S(` selected`) qw422016.N().S(` selected`)
//line views/admin.qtpl:119 //line views/admin.qtpl:114
} }
//line views/admin.qtpl:119 //line views/admin.qtpl:114
qw422016.N().S(`>editor</option> qw422016.N().S(`>editor</option>
<option`) <option`)
//line views/admin.qtpl:120 //line views/admin.qtpl:115
if f.Get("group") == "trusted" { if f.Get("group") == "trusted" {
//line views/admin.qtpl:120 //line views/admin.qtpl:115
qw422016.N().S(` selected`) qw422016.N().S(` selected`)
//line views/admin.qtpl:120 //line views/admin.qtpl:115
} }
//line views/admin.qtpl:120 //line views/admin.qtpl:115
qw422016.N().S(`>trusted</option> qw422016.N().S(`>trusted</option>
<option`) <option`)
//line views/admin.qtpl:121 //line views/admin.qtpl:116
if f.Get("group") == "moderator" { if f.Get("group") == "moderator" {
//line views/admin.qtpl:121 //line views/admin.qtpl:116
qw422016.N().S(` selected`) qw422016.N().S(` selected`)
//line views/admin.qtpl:121 //line views/admin.qtpl:116
} }
//line views/admin.qtpl:121 //line views/admin.qtpl:116
qw422016.N().S(`>moderator</option> qw422016.N().S(`>moderator</option>
<option`) <option`)
//line views/admin.qtpl:122 //line views/admin.qtpl:117
if f.Get("group") == "admin" { if f.Get("group") == "admin" {
//line views/admin.qtpl:122 //line views/admin.qtpl:117
qw422016.N().S(` selected`) qw422016.N().S(` selected`)
//line views/admin.qtpl:122 //line views/admin.qtpl:117
} }
//line views/admin.qtpl:122 //line views/admin.qtpl:117
qw422016.N().S(`>admin</option> qw422016.N().S(`>admin</option>
</select> </select>
</div> </div>
<div class="form-field"> <div class="form-field">
<button class="btn" type="submit">`) <button class="btn" type="submit">`)
//line views/admin.qtpl:127 //line views/admin.qtpl:122
qw422016.E().S(lc.Get("admin.user_update")) qw422016.E().S(lc.Get("admin.user_update"))
//line views/admin.qtpl:127 //line views/admin.qtpl:122
qw422016.N().S(`</button> qw422016.N().S(`</button>
</div> </div>
</form> </form>
<h2>`) <h2>`)
//line views/admin.qtpl:131 //line views/admin.qtpl:126
qw422016.E().S(lc.Get("admin.user_delete_heading")) qw422016.E().S(lc.Get("admin.user_delete_heading"))
//line views/admin.qtpl:131 //line views/admin.qtpl:126
qw422016.N().S(`</h2> qw422016.N().S(`</h2>
<p>`) <p>`)
//line views/admin.qtpl:132 //line views/admin.qtpl:127
qw422016.E().S(lc.Get("admin.user_delete_tip")) qw422016.E().S(lc.Get("admin.user_delete_tip"))
//line views/admin.qtpl:132 //line views/admin.qtpl:127
qw422016.N().S(`</p> qw422016.N().S(`</p>
<a class="btn btn_destructive" href="/admin/users/`) <a class="btn btn_destructive" href="/admin/users/`)
//line views/admin.qtpl:133 //line views/admin.qtpl:128
qw422016.N().U(u.Name) qw422016.N().U(u.Name)
//line views/admin.qtpl:133 //line views/admin.qtpl:128
qw422016.N().S(`/delete">`) qw422016.N().S(`/delete">`)
//line views/admin.qtpl:133 //line views/admin.qtpl:128
qw422016.E().S(lc.Get("admin.user_delete")) qw422016.E().S(lc.Get("admin.user_delete"))
//line views/admin.qtpl:133 //line views/admin.qtpl:128
qw422016.N().S(`</a> qw422016.N().S(`</a>
</main> </main>
</div>
`) `)
//line views/admin.qtpl:136 //line views/admin.qtpl:130
} }
//line views/admin.qtpl:136 //line views/admin.qtpl:130
func WriteAdminUserEdit(qq422016 qtio422016.Writer, u *user.User, f util.FormData, lc *l18n.Localizer) { func WriteAdminUserEdit(qq422016 qtio422016.Writer, u *user.User, f util.FormData, lc *l18n.Localizer) {
//line views/admin.qtpl:136 //line views/admin.qtpl:130
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/admin.qtpl:136 //line views/admin.qtpl:130
StreamAdminUserEdit(qw422016, u, f, lc) StreamAdminUserEdit(qw422016, u, f, lc)
//line views/admin.qtpl:136 //line views/admin.qtpl:130
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/admin.qtpl:136 //line views/admin.qtpl:130
} }
//line views/admin.qtpl:136 //line views/admin.qtpl:130
func AdminUserEdit(u *user.User, f util.FormData, lc *l18n.Localizer) string { func AdminUserEdit(u *user.User, f util.FormData, lc *l18n.Localizer) string {
//line views/admin.qtpl:136 //line views/admin.qtpl:130
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/admin.qtpl:136 //line views/admin.qtpl:130
WriteAdminUserEdit(qb422016, u, f, lc) WriteAdminUserEdit(qb422016, u, f, lc)
//line views/admin.qtpl:136 //line views/admin.qtpl:130
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/admin.qtpl:136 //line views/admin.qtpl:130
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/admin.qtpl:136 //line views/admin.qtpl:130
return qs422016 return qs422016
//line views/admin.qtpl:136 //line views/admin.qtpl:130
} }
//line views/admin.qtpl:138 //line views/admin.qtpl:132
func StreamAdminUserDelete(qw422016 *qt422016.Writer, u *user.User, f util.FormData, lc *l18n.Localizer) { func StreamAdminUserDelete(qw422016 *qt422016.Writer, u *user.User, f util.FormData, lc *l18n.Localizer) {
//line views/admin.qtpl:138 //line views/admin.qtpl:132
qw422016.N().S(` qw422016.N().S(`
<div class="layout">
<main class="main-width form-wrap"> <main class="main-width form-wrap">
<h1>`) <h1>`)
//line views/admin.qtpl:141 //line views/admin.qtpl:134
qw422016.E().S(lc.Get("admin.user_delete_heading")) qw422016.E().S(lc.Get("admin.user_delete_heading"))
//line views/admin.qtpl:141 //line views/admin.qtpl:134
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
`) `)
//line views/admin.qtpl:143 //line views/admin.qtpl:136
if f.HasError() { if f.HasError() {
//line views/admin.qtpl:143 //line views/admin.qtpl:136
qw422016.N().S(` qw422016.N().S(`
<div class="notice notice--error"> <div class="notice notice--error">
<strong>`) <strong>`)
//line views/admin.qtpl:145 //line views/admin.qtpl:138
qw422016.E().S(lc.Get("ui.error")) qw422016.E().S(lc.Get("ui.error"))
//line views/admin.qtpl:145 //line views/admin.qtpl:138
qw422016.N().S(`:</strong> qw422016.N().S(`:</strong>
`) `)
//line views/admin.qtpl:146 //line views/admin.qtpl:139
qw422016.E().S(f.Error()) qw422016.E().S(f.Error())
//line views/admin.qtpl:146 //line views/admin.qtpl:139
qw422016.N().S(` qw422016.N().S(`
</div> </div>
`) `)
//line views/admin.qtpl:148 //line views/admin.qtpl:141
} }
//line views/admin.qtpl:148 //line views/admin.qtpl:141
qw422016.N().S(` qw422016.N().S(`
<p>`) <p>`)
//line views/admin.qtpl:150 //line views/admin.qtpl:143
qw422016.N().S(lc.Get("admin.user_delete_warn", &l18n.Replacements{"name": fmt.Sprintf("<strong>%s</strong>", u.Name)})) qw422016.N().S(lc.Get("admin.user_delete_warn", &l18n.Replacements{"name": fmt.Sprintf("<strong>%s</strong>", u.Name)}))
//line views/admin.qtpl:150 //line views/admin.qtpl:143
qw422016.N().S(`</p> qw422016.N().S(`</p>
<form action="" method="post"> <form action="" method="post">
<button class="btn btn_destructive" type="submit">`) <button class="btn btn_destructive" type="submit">`)
//line views/admin.qtpl:153 //line views/admin.qtpl:146
qw422016.E().S(lc.Get("admin.user_delete")) qw422016.E().S(lc.Get("admin.user_delete"))
//line views/admin.qtpl:153 //line views/admin.qtpl:146
qw422016.N().S(`</button> qw422016.N().S(`</button>
<a class="btn btn_weak" href="/admin/users/`) <a class="btn btn_weak" href="/admin/users/`)
//line views/admin.qtpl:154 //line views/admin.qtpl:147
qw422016.N().U(u.Name) qw422016.N().U(u.Name)
//line views/admin.qtpl:154 //line views/admin.qtpl:147
qw422016.N().S(`/edit">`) qw422016.N().S(`/edit">`)
//line views/admin.qtpl:154 //line views/admin.qtpl:147
qw422016.E().S(lc.Get("ui.cancel")) qw422016.E().S(lc.Get("ui.cancel"))
//line views/admin.qtpl:154 //line views/admin.qtpl:147
qw422016.N().S(`</a> qw422016.N().S(`</a>
</form> </form>
</main> </main>
</div>
`) `)
//line views/admin.qtpl:158 //line views/admin.qtpl:150
} }
//line views/admin.qtpl:158 //line views/admin.qtpl:150
func WriteAdminUserDelete(qq422016 qtio422016.Writer, u *user.User, f util.FormData, lc *l18n.Localizer) { func WriteAdminUserDelete(qq422016 qtio422016.Writer, u *user.User, f util.FormData, lc *l18n.Localizer) {
//line views/admin.qtpl:158 //line views/admin.qtpl:150
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/admin.qtpl:158 //line views/admin.qtpl:150
StreamAdminUserDelete(qw422016, u, f, lc) StreamAdminUserDelete(qw422016, u, f, lc)
//line views/admin.qtpl:158 //line views/admin.qtpl:150
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/admin.qtpl:158 //line views/admin.qtpl:150
} }
//line views/admin.qtpl:158 //line views/admin.qtpl:150
func AdminUserDelete(u *user.User, f util.FormData, lc *l18n.Localizer) string { func AdminUserDelete(u *user.User, f util.FormData, lc *l18n.Localizer) string {
//line views/admin.qtpl:158 //line views/admin.qtpl:150
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/admin.qtpl:158 //line views/admin.qtpl:150
WriteAdminUserDelete(qb422016, u, f, lc) WriteAdminUserDelete(qb422016, u, f, lc)
//line views/admin.qtpl:158 //line views/admin.qtpl:150
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/admin.qtpl:158 //line views/admin.qtpl:150
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/admin.qtpl:158 //line views/admin.qtpl:150
return qs422016 return qs422016
//line views/admin.qtpl:158 //line views/admin.qtpl:150
} }

View File

@ -8,7 +8,6 @@
{% code {% code
lc := l18n.FromRequest(rq) lc := l18n.FromRequest(rq)
%} %}
<div class="layout">
<main class="main-width"> <main class="main-width">
<section> <section>
{% if cfg.AllowRegistration %} {% if cfg.AllowRegistration %}
@ -39,11 +38,9 @@
{% endif %} {% endif %}
</section> </section>
</main> </main>
</div>
{% endfunc %} {% endfunc %}
{% func Login(lc *l18n.Localizer) %} {% func Login(lc *l18n.Localizer) %}
<div class="layout">
<main class="main-width"> <main class="main-width">
<section> <section>
{% if cfg.UseAuth %} {% if cfg.UseAuth %}
@ -69,7 +66,6 @@
{% endif %} {% endif %}
</section> </section>
</main> </main>
</div>
{% endfunc %} {% endfunc %}
Telegram auth widget was requested by Yogurt. As you can see, we don't offer user administrators control over it. Of course we don't. Telegram auth widget was requested by Yogurt. As you can see, we don't offer user administrators control over it. Of course we don't.
@ -81,7 +77,6 @@ Telegram auth widget was requested by Yogurt. As you can see, we don't offer use
{% endfunc %} {% endfunc %}
{% func LoginError(err string, lc *l18n.Localizer) %} {% func LoginError(err string, lc *l18n.Localizer) %}
<div class="layout">
<main class="main-width"> <main class="main-width">
<section> <section>
{% switch err %} {% switch err %}
@ -95,11 +90,9 @@ Telegram auth widget was requested by Yogurt. As you can see, we don't offer use
<p><a href="/login">← {%s lc.Get("auth.try_again") %}</a></p> <p><a href="/login">← {%s lc.Get("auth.try_again") %}</a></p>
</section> </section>
</main> </main>
</div>
{% endfunc %} {% endfunc %}
{% func Logout(can bool, lc *l18n.Localizer) %} {% func Logout(can bool, lc *l18n.Localizer) %}
<div class="layout">
<main class="main-width"> <main class="main-width">
<section> <section>
{% if can %} {% if can %}
@ -115,7 +108,6 @@ Telegram auth widget was requested by Yogurt. As you can see, we don't offer use
{% endif %} {% endif %}
</section> </section>
</main> </main>
</div>
{% endfunc %} {% endfunc %}
{% func Lock(lc *l18n.Localizer) %} {% func Lock(lc *l18n.Localizer) %}
@ -161,7 +153,6 @@ var userListL10n = map[string]l10nEntry{
%} %}
{% func UserList(lc *l18n.Localizer) %} {% func UserList(lc *l18n.Localizer) %}
<div class="layout">
<main class="main-width user-list"> <main class="main-width user-list">
{% code {% code
var get = func(key string) string { var get = func(key string) string {
@ -208,5 +199,4 @@ sort.Strings(editors)
{% endfor %}</ol> {% endfor %}</ol>
</section> </section>
</main> </main>
</div>
{% endfunc %} {% endfunc %}

View File

@ -42,489 +42,481 @@ func StreamRegister(qw422016 *qt422016.Writer, rq *http.Request) {
//line views/auth.qtpl:10 //line views/auth.qtpl:10
qw422016.N().S(` qw422016.N().S(`
<div class="layout">
<main class="main-width"> <main class="main-width">
<section> <section>
`) `)
//line views/auth.qtpl:14 //line views/auth.qtpl:13
if cfg.AllowRegistration { if cfg.AllowRegistration {
//line views/auth.qtpl:14 //line views/auth.qtpl:13
qw422016.N().S(` qw422016.N().S(`
<form class="modal" method="post" action="/register?`) <form class="modal" method="post" action="/register?`)
//line views/auth.qtpl:15 //line views/auth.qtpl:14
qw422016.E().S(rq.URL.RawQuery) qw422016.E().S(rq.URL.RawQuery)
//line views/auth.qtpl:15 //line views/auth.qtpl:14
qw422016.N().S(`" id="register-form" enctype="multipart/form-data" autocomplete="off"> qw422016.N().S(`" id="register-form" enctype="multipart/form-data" autocomplete="off">
<fieldset class="modal__fieldset"> <fieldset class="modal__fieldset">
<legend class="modal__title">`) <legend class="modal__title">`)
//line views/auth.qtpl:17 //line views/auth.qtpl:16
qw422016.E().S(lc.Get("auth.register_header", &l18n.Replacements{"name": cfg.WikiName})) qw422016.E().S(lc.Get("auth.register_header", &l18n.Replacements{"name": cfg.WikiName}))
//line views/auth.qtpl:17 //line views/auth.qtpl:16
qw422016.N().S(`</legend> qw422016.N().S(`</legend>
<label for="register-form__username">`) <label for="register-form__username">`)
//line views/auth.qtpl:19 //line views/auth.qtpl:18
qw422016.E().S(lc.Get("auth.username")) qw422016.E().S(lc.Get("auth.username"))
//line views/auth.qtpl:19 //line views/auth.qtpl:18
qw422016.N().S(`</label> qw422016.N().S(`</label>
<br> <br>
<input type="text" required autofocus id="login-form__username" name="username"> <input type="text" required autofocus id="login-form__username" name="username">
<br> <br>
<label for="login-form__password">`) <label for="login-form__password">`)
//line views/auth.qtpl:23 //line views/auth.qtpl:22
qw422016.E().S(lc.Get("auth.password")) qw422016.E().S(lc.Get("auth.password"))
//line views/auth.qtpl:23 //line views/auth.qtpl:22
qw422016.N().S(`</label> qw422016.N().S(`</label>
<br> <br>
<input type="password" required name="password"> <input type="password" required name="password">
<p>`) <p>`)
//line views/auth.qtpl:26 //line views/auth.qtpl:25
qw422016.E().S(lc.Get("auth.password_tip")) qw422016.E().S(lc.Get("auth.password_tip"))
//line views/auth.qtpl:26 //line views/auth.qtpl:25
qw422016.N().S(`</p> qw422016.N().S(`</p>
<p>`) <p>`)
//line views/auth.qtpl:27 //line views/auth.qtpl:26
qw422016.E().S(lc.Get("auth.cookie_tip")) qw422016.E().S(lc.Get("auth.cookie_tip"))
//line views/auth.qtpl:27 //line views/auth.qtpl:26
qw422016.N().S(`</p> qw422016.N().S(`</p>
<button class="btn" type="submit" value="Register">`) <button class="btn" type="submit" value="Register">`)
//line views/auth.qtpl:28 //line views/auth.qtpl:27
qw422016.E().S(lc.Get("auth.register_button")) qw422016.E().S(lc.Get("auth.register_button"))
//line views/auth.qtpl:28 //line views/auth.qtpl:27
qw422016.N().S(`</button> qw422016.N().S(`</button>
<a class="btn btn_weak" href="/`) <a class="btn btn_weak" href="/`)
//line views/auth.qtpl:29 //line views/auth.qtpl:28
qw422016.E().S(rq.URL.RawQuery) qw422016.E().S(rq.URL.RawQuery)
//line views/auth.qtpl:29 //line views/auth.qtpl:28
qw422016.N().S(`">`) qw422016.N().S(`">`)
//line views/auth.qtpl:29 //line views/auth.qtpl:28
qw422016.E().S(lc.Get("ui.cancel")) qw422016.E().S(lc.Get("ui.cancel"))
//line views/auth.qtpl:29 //line views/auth.qtpl:28
qw422016.N().S(`</a> qw422016.N().S(`</a>
</fieldset> </fieldset>
</form> </form>
`) `)
//line views/auth.qtpl:32 //line views/auth.qtpl:31
streamtelegramWidget(qw422016, lc) streamtelegramWidget(qw422016, lc)
//line views/auth.qtpl:31
qw422016.N().S(`
`)
//line views/auth.qtpl:32
} else if cfg.UseAuth {
//line views/auth.qtpl:32 //line views/auth.qtpl:32
qw422016.N().S(` qw422016.N().S(`
`)
//line views/auth.qtpl:33
} else if cfg.UseAuth {
//line views/auth.qtpl:33
qw422016.N().S(`
<p>`) <p>`)
//line views/auth.qtpl:34 //line views/auth.qtpl:33
qw422016.E().S(lc.Get("auth.noregister")) qw422016.E().S(lc.Get("auth.noregister"))
//line views/auth.qtpl:34 //line views/auth.qtpl:33
qw422016.N().S(`</p> qw422016.N().S(`</p>
<p><a href="/`) <p><a href="/`)
//line views/auth.qtpl:35 //line views/auth.qtpl:34
qw422016.E().S(rq.URL.RawQuery) qw422016.E().S(rq.URL.RawQuery)
//line views/auth.qtpl:35 //line views/auth.qtpl:34
qw422016.N().S(`">← `) qw422016.N().S(`">← `)
//line views/auth.qtpl:35 //line views/auth.qtpl:34
qw422016.E().S(lc.Get("auth.go_back")) qw422016.E().S(lc.Get("auth.go_back"))
//line views/auth.qtpl:35 //line views/auth.qtpl:34
qw422016.N().S(`</a></p> qw422016.N().S(`</a></p>
`) `)
//line views/auth.qtpl:36 //line views/auth.qtpl:35
} else { } else {
//line views/auth.qtpl:36 //line views/auth.qtpl:35
qw422016.N().S(` qw422016.N().S(`
<p>`) <p>`)
//line views/auth.qtpl:37 //line views/auth.qtpl:36
qw422016.E().S(lc.Get("auth.noauth")) qw422016.E().S(lc.Get("auth.noauth"))
//line views/auth.qtpl:37 //line views/auth.qtpl:36
qw422016.N().S(`</p> qw422016.N().S(`</p>
<p><a href="/`) <p><a href="/`)
//line views/auth.qtpl:38 //line views/auth.qtpl:37
qw422016.E().S(rq.URL.RawQuery) qw422016.E().S(rq.URL.RawQuery)
//line views/auth.qtpl:38 //line views/auth.qtpl:37
qw422016.N().S(`">← `) qw422016.N().S(`">← `)
//line views/auth.qtpl:38 //line views/auth.qtpl:37
qw422016.E().S(lc.Get("auth.go_back")) qw422016.E().S(lc.Get("auth.go_back"))
//line views/auth.qtpl:38 //line views/auth.qtpl:37
qw422016.N().S(`</a></p> qw422016.N().S(`</a></p>
`) `)
//line views/auth.qtpl:39 //line views/auth.qtpl:38
} }
//line views/auth.qtpl:39 //line views/auth.qtpl:38
qw422016.N().S(` qw422016.N().S(`
</section> </section>
</main> </main>
</div>
`) `)
//line views/auth.qtpl:43 //line views/auth.qtpl:41
} }
//line views/auth.qtpl:43 //line views/auth.qtpl:41
func WriteRegister(qq422016 qtio422016.Writer, rq *http.Request) { func WriteRegister(qq422016 qtio422016.Writer, rq *http.Request) {
//line views/auth.qtpl:43 //line views/auth.qtpl:41
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/auth.qtpl:43 //line views/auth.qtpl:41
StreamRegister(qw422016, rq) StreamRegister(qw422016, rq)
//line views/auth.qtpl:43 //line views/auth.qtpl:41
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/auth.qtpl:43 //line views/auth.qtpl:41
} }
//line views/auth.qtpl:43 //line views/auth.qtpl:41
func Register(rq *http.Request) string { func Register(rq *http.Request) string {
//line views/auth.qtpl:43 //line views/auth.qtpl:41
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/auth.qtpl:43 //line views/auth.qtpl:41
WriteRegister(qb422016, rq) WriteRegister(qb422016, rq)
//line views/auth.qtpl:43 //line views/auth.qtpl:41
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/auth.qtpl:43 //line views/auth.qtpl:41
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/auth.qtpl:43 //line views/auth.qtpl:41
return qs422016 return qs422016
//line views/auth.qtpl:43 //line views/auth.qtpl:41
} }
//line views/auth.qtpl:45 //line views/auth.qtpl:43
func StreamLogin(qw422016 *qt422016.Writer, lc *l18n.Localizer) { func StreamLogin(qw422016 *qt422016.Writer, lc *l18n.Localizer) {
//line views/auth.qtpl:45 //line views/auth.qtpl:43
qw422016.N().S(` qw422016.N().S(`
<div class="layout">
<main class="main-width"> <main class="main-width">
<section> <section>
`) `)
//line views/auth.qtpl:49 //line views/auth.qtpl:46
if cfg.UseAuth { if cfg.UseAuth {
//line views/auth.qtpl:49 //line views/auth.qtpl:46
qw422016.N().S(` qw422016.N().S(`
<form class="modal" method="post" action="/login" id="login-form" enctype="multipart/form-data" autocomplete="on"> <form class="modal" method="post" action="/login" id="login-form" enctype="multipart/form-data" autocomplete="on">
<fieldset class="modal__fieldset"> <fieldset class="modal__fieldset">
<legend class="modal__title">`) <legend class="modal__title">`)
//line views/auth.qtpl:52 //line views/auth.qtpl:49
qw422016.E().S(lc.Get("auth.login_header", &l18n.Replacements{"name": cfg.WikiName})) qw422016.E().S(lc.Get("auth.login_header", &l18n.Replacements{"name": cfg.WikiName}))
//line views/auth.qtpl:52 //line views/auth.qtpl:49
qw422016.N().S(`</legend> qw422016.N().S(`</legend>
<label for="login-form__username">`) <label for="login-form__username">`)
//line views/auth.qtpl:53 //line views/auth.qtpl:50
qw422016.E().S(lc.Get("auth.username")) qw422016.E().S(lc.Get("auth.username"))
//line views/auth.qtpl:53 //line views/auth.qtpl:50
qw422016.N().S(`</label> qw422016.N().S(`</label>
<br> <br>
<input type="text" required autofocus id="login-form__username" name="username" autocomplete="username"> <input type="text" required autofocus id="login-form__username" name="username" autocomplete="username">
<br> <br>
<label for="login-form__password">`) <label for="login-form__password">`)
//line views/auth.qtpl:57 //line views/auth.qtpl:54
qw422016.E().S(lc.Get("auth.password")) qw422016.E().S(lc.Get("auth.password"))
//line views/auth.qtpl:57 //line views/auth.qtpl:54
qw422016.N().S(`</label> qw422016.N().S(`</label>
<br> <br>
<input type="password" required name="password" autocomplete="current-password"> <input type="password" required name="password" autocomplete="current-password">
<p>`) <p>`)
//line views/auth.qtpl:60 //line views/auth.qtpl:57
qw422016.E().S(lc.Get("auth.cookie_tip")) qw422016.E().S(lc.Get("auth.cookie_tip"))
//line views/auth.qtpl:60 //line views/auth.qtpl:57
qw422016.N().S(`</p> qw422016.N().S(`</p>
<button class="btn" type="submit" value="Log in">`) <button class="btn" type="submit" value="Log in">`)
//line views/auth.qtpl:61 //line views/auth.qtpl:58
qw422016.E().S(lc.Get("auth.login_button")) qw422016.E().S(lc.Get("auth.login_button"))
//line views/auth.qtpl:61 //line views/auth.qtpl:58
qw422016.N().S(`</button> qw422016.N().S(`</button>
<a class="btn btn_weak" href="/">`) <a class="btn btn_weak" href="/">`)
//line views/auth.qtpl:62 //line views/auth.qtpl:59
qw422016.E().S(lc.Get("ui.cancel")) qw422016.E().S(lc.Get("ui.cancel"))
//line views/auth.qtpl:62 //line views/auth.qtpl:59
qw422016.N().S(`</a> qw422016.N().S(`</a>
</fieldset> </fieldset>
</form> </form>
`) `)
//line views/auth.qtpl:65 //line views/auth.qtpl:62
streamtelegramWidget(qw422016, lc) streamtelegramWidget(qw422016, lc)
//line views/auth.qtpl:65 //line views/auth.qtpl:62
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/auth.qtpl:66 //line views/auth.qtpl:63
} else { } else {
//line views/auth.qtpl:66 //line views/auth.qtpl:63
qw422016.N().S(` qw422016.N().S(`
<p>`) <p>`)
//line views/auth.qtpl:67 //line views/auth.qtpl:64
qw422016.E().S(lc.Get("auth.noauth")) qw422016.E().S(lc.Get("auth.noauth"))
//line views/auth.qtpl:67 //line views/auth.qtpl:64
qw422016.N().S(`</p> qw422016.N().S(`</p>
<p><a class="btn btn_weak" href="/"> `) <p><a class="btn btn_weak" href="/"> `)
//line views/auth.qtpl:68 //line views/auth.qtpl:65
qw422016.E().S(lc.Get("auth.go_home")) qw422016.E().S(lc.Get("auth.go_home"))
//line views/auth.qtpl:68 //line views/auth.qtpl:65
qw422016.N().S(`</a></p> qw422016.N().S(`</a></p>
`) `)
//line views/auth.qtpl:69 //line views/auth.qtpl:66
} }
//line views/auth.qtpl:69 //line views/auth.qtpl:66
qw422016.N().S(` qw422016.N().S(`
</section> </section>
</main> </main>
</div>
`) `)
//line views/auth.qtpl:73 //line views/auth.qtpl:69
} }
//line views/auth.qtpl:73 //line views/auth.qtpl:69
func WriteLogin(qq422016 qtio422016.Writer, lc *l18n.Localizer) { func WriteLogin(qq422016 qtio422016.Writer, lc *l18n.Localizer) {
//line views/auth.qtpl:73 //line views/auth.qtpl:69
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/auth.qtpl:73 //line views/auth.qtpl:69
StreamLogin(qw422016, lc) StreamLogin(qw422016, lc)
//line views/auth.qtpl:73 //line views/auth.qtpl:69
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/auth.qtpl:73 //line views/auth.qtpl:69
} }
//line views/auth.qtpl:73 //line views/auth.qtpl:69
func Login(lc *l18n.Localizer) string { func Login(lc *l18n.Localizer) string {
//line views/auth.qtpl:73 //line views/auth.qtpl:69
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/auth.qtpl:73 //line views/auth.qtpl:69
WriteLogin(qb422016, lc) WriteLogin(qb422016, lc)
//line views/auth.qtpl:73 //line views/auth.qtpl:69
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/auth.qtpl:73 //line views/auth.qtpl:69
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/auth.qtpl:73 //line views/auth.qtpl:69
return qs422016 return qs422016
//line views/auth.qtpl:73 //line views/auth.qtpl:69
} }
// Telegram auth widget was requested by Yogurt. As you can see, we don't offer user administrators control over it. Of course we don't. // Telegram auth widget was requested by Yogurt. As you can see, we don't offer user administrators control over it. Of course we don't.
//line views/auth.qtpl:76 //line views/auth.qtpl:72
func streamtelegramWidget(qw422016 *qt422016.Writer, lc *l18n.Localizer) { func streamtelegramWidget(qw422016 *qt422016.Writer, lc *l18n.Localizer) {
//line views/auth.qtpl:76 //line views/auth.qtpl:72
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/auth.qtpl:77 //line views/auth.qtpl:73
if cfg.TelegramEnabled { if cfg.TelegramEnabled {
//line views/auth.qtpl:77 //line views/auth.qtpl:73
qw422016.N().S(` qw422016.N().S(`
<p class="telegram-notice">`) <p class="telegram-notice">`)
//line views/auth.qtpl:78 //line views/auth.qtpl:74
qw422016.E().S(lc.Get("auth.telegram_tip")) qw422016.E().S(lc.Get("auth.telegram_tip"))
//line views/auth.qtpl:78 //line views/auth.qtpl:74
qw422016.N().S(`</p> qw422016.N().S(`</p>
<script async src="https://telegram.org/js/telegram-widget.js?15" data-telegram-login="`) <script async src="https://telegram.org/js/telegram-widget.js?15" data-telegram-login="`)
//line views/auth.qtpl:79 //line views/auth.qtpl:75
qw422016.E().S(cfg.TelegramBotName) qw422016.E().S(cfg.TelegramBotName)
//line views/auth.qtpl:79 //line views/auth.qtpl:75
qw422016.N().S(`" data-size="medium" data-userpic="false" data-auth-url="`) qw422016.N().S(`" data-size="medium" data-userpic="false" data-auth-url="`)
//line views/auth.qtpl:79 //line views/auth.qtpl:75
qw422016.E().S(cfg.URL) qw422016.E().S(cfg.URL)
//line views/auth.qtpl:79 //line views/auth.qtpl:75
qw422016.N().S(`/telegram-login"></script> qw422016.N().S(`/telegram-login"></script>
`) `)
//line views/auth.qtpl:80 //line views/auth.qtpl:76
} }
//line views/auth.qtpl:80 //line views/auth.qtpl:76
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/auth.qtpl:81 //line views/auth.qtpl:77
} }
//line views/auth.qtpl:81 //line views/auth.qtpl:77
func writetelegramWidget(qq422016 qtio422016.Writer, lc *l18n.Localizer) { func writetelegramWidget(qq422016 qtio422016.Writer, lc *l18n.Localizer) {
//line views/auth.qtpl:81 //line views/auth.qtpl:77
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/auth.qtpl:81 //line views/auth.qtpl:77
streamtelegramWidget(qw422016, lc) streamtelegramWidget(qw422016, lc)
//line views/auth.qtpl:81 //line views/auth.qtpl:77
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/auth.qtpl:81 //line views/auth.qtpl:77
} }
//line views/auth.qtpl:81 //line views/auth.qtpl:77
func telegramWidget(lc *l18n.Localizer) string { func telegramWidget(lc *l18n.Localizer) string {
//line views/auth.qtpl:81 //line views/auth.qtpl:77
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/auth.qtpl:81 //line views/auth.qtpl:77
writetelegramWidget(qb422016, lc) writetelegramWidget(qb422016, lc)
//line views/auth.qtpl:81 //line views/auth.qtpl:77
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/auth.qtpl:81 //line views/auth.qtpl:77
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/auth.qtpl:81 //line views/auth.qtpl:77
return qs422016 return qs422016
//line views/auth.qtpl:81 //line views/auth.qtpl:77
} }
//line views/auth.qtpl:83 //line views/auth.qtpl:79
func StreamLoginError(qw422016 *qt422016.Writer, err string, lc *l18n.Localizer) { func StreamLoginError(qw422016 *qt422016.Writer, err string, lc *l18n.Localizer) {
//line views/auth.qtpl:83 //line views/auth.qtpl:79
qw422016.N().S(` qw422016.N().S(`
<div class="layout">
<main class="main-width"> <main class="main-width">
<section> <section>
`) `)
//line views/auth.qtpl:87 //line views/auth.qtpl:82
switch err { switch err {
//line views/auth.qtpl:88 //line views/auth.qtpl:83
case "unknown username": case "unknown username":
//line views/auth.qtpl:88 //line views/auth.qtpl:83
qw422016.N().S(` qw422016.N().S(`
<p class="error">`) <p class="error">`)
//line views/auth.qtpl:89 //line views/auth.qtpl:84
qw422016.E().S(lc.Get("auth.error_username")) qw422016.E().S(lc.Get("auth.error_username"))
//line views/auth.qtpl:89 //line views/auth.qtpl:84
qw422016.N().S(`</p> qw422016.N().S(`</p>
`) `)
//line views/auth.qtpl:90 //line views/auth.qtpl:85
case "wrong password": case "wrong password":
//line views/auth.qtpl:90 //line views/auth.qtpl:85
qw422016.N().S(` qw422016.N().S(`
<p class="error">`) <p class="error">`)
//line views/auth.qtpl:91 //line views/auth.qtpl:86
qw422016.E().S(lc.Get("auth.error_password")) qw422016.E().S(lc.Get("auth.error_password"))
//line views/auth.qtpl:91 //line views/auth.qtpl:86
qw422016.N().S(`</p> qw422016.N().S(`</p>
`) `)
//line views/auth.qtpl:92 //line views/auth.qtpl:87
default: default:
//line views/auth.qtpl:92 //line views/auth.qtpl:87
qw422016.N().S(` qw422016.N().S(`
<p class="error">`) <p class="error">`)
//line views/auth.qtpl:93 //line views/auth.qtpl:88
qw422016.E().S(err) qw422016.E().S(err)
//line views/auth.qtpl:93 //line views/auth.qtpl:88
qw422016.N().S(`</p> qw422016.N().S(`</p>
`) `)
//line views/auth.qtpl:94 //line views/auth.qtpl:89
} }
//line views/auth.qtpl:94 //line views/auth.qtpl:89
qw422016.N().S(` qw422016.N().S(`
<p><a href="/login"> `) <p><a href="/login"> `)
//line views/auth.qtpl:95 //line views/auth.qtpl:90
qw422016.E().S(lc.Get("auth.try_again")) qw422016.E().S(lc.Get("auth.try_again"))
//line views/auth.qtpl:95 //line views/auth.qtpl:90
qw422016.N().S(`</a></p> qw422016.N().S(`</a></p>
</section> </section>
</main> </main>
</div>
`) `)
//line views/auth.qtpl:99 //line views/auth.qtpl:93
} }
//line views/auth.qtpl:99 //line views/auth.qtpl:93
func WriteLoginError(qq422016 qtio422016.Writer, err string, lc *l18n.Localizer) { func WriteLoginError(qq422016 qtio422016.Writer, err string, lc *l18n.Localizer) {
//line views/auth.qtpl:99 //line views/auth.qtpl:93
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/auth.qtpl:99 //line views/auth.qtpl:93
StreamLoginError(qw422016, err, lc) StreamLoginError(qw422016, err, lc)
//line views/auth.qtpl:99 //line views/auth.qtpl:93
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/auth.qtpl:99 //line views/auth.qtpl:93
} }
//line views/auth.qtpl:99 //line views/auth.qtpl:93
func LoginError(err string, lc *l18n.Localizer) string { func LoginError(err string, lc *l18n.Localizer) string {
//line views/auth.qtpl:99 //line views/auth.qtpl:93
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/auth.qtpl:99 //line views/auth.qtpl:93
WriteLoginError(qb422016, err, lc) WriteLoginError(qb422016, err, lc)
//line views/auth.qtpl:99 //line views/auth.qtpl:93
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/auth.qtpl:99 //line views/auth.qtpl:93
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/auth.qtpl:99 //line views/auth.qtpl:93
return qs422016 return qs422016
//line views/auth.qtpl:99 //line views/auth.qtpl:93
} }
//line views/auth.qtpl:101 //line views/auth.qtpl:95
func StreamLogout(qw422016 *qt422016.Writer, can bool, lc *l18n.Localizer) { func StreamLogout(qw422016 *qt422016.Writer, can bool, lc *l18n.Localizer) {
//line views/auth.qtpl:101 //line views/auth.qtpl:95
qw422016.N().S(` qw422016.N().S(`
<div class="layout">
<main class="main-width"> <main class="main-width">
<section> <section>
`) `)
//line views/auth.qtpl:105 //line views/auth.qtpl:98
if can { if can {
//line views/auth.qtpl:105 //line views/auth.qtpl:98
qw422016.N().S(` qw422016.N().S(`
<h1>`) <h1>`)
//line views/auth.qtpl:106 //line views/auth.qtpl:99
qw422016.E().S(lc.Get("auth.logout_header")) qw422016.E().S(lc.Get("auth.logout_header"))
//line views/auth.qtpl:106 //line views/auth.qtpl:99
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
<form method="POST" action="/logout"> <form method="POST" action="/logout">
<input class="btn btn_accent" type="submit" value="`) <input class="btn btn_accent" type="submit" value="`)
//line views/auth.qtpl:108 //line views/auth.qtpl:101
qw422016.E().S(lc.Get("auth.logout_button")) qw422016.E().S(lc.Get("auth.logout_button"))
//line views/auth.qtpl:108 //line views/auth.qtpl:101
qw422016.N().S(`"/> qw422016.N().S(`"/>
<a class="btn btn_weak" href="/">`) <a class="btn btn_weak" href="/">`)
//line views/auth.qtpl:109 //line views/auth.qtpl:102
qw422016.E().S(lc.Get("auth.go_home")) qw422016.E().S(lc.Get("auth.go_home"))
//line views/auth.qtpl:109 //line views/auth.qtpl:102
qw422016.N().S(`</a> qw422016.N().S(`</a>
</form> </form>
`) `)
//line views/auth.qtpl:111 //line views/auth.qtpl:104
} else { } else {
//line views/auth.qtpl:111 //line views/auth.qtpl:104
qw422016.N().S(` qw422016.N().S(`
<p>`) <p>`)
//line views/auth.qtpl:112 //line views/auth.qtpl:105
qw422016.E().S(lc.Get("auth.logout_anon")) qw422016.E().S(lc.Get("auth.logout_anon"))
//line views/auth.qtpl:112 //line views/auth.qtpl:105
qw422016.N().S(`</p> qw422016.N().S(`</p>
<p><a href="/login">`) <p><a href="/login">`)
//line views/auth.qtpl:113 //line views/auth.qtpl:106
qw422016.E().S(lc.Get("auth.login_title")) qw422016.E().S(lc.Get("auth.login_title"))
//line views/auth.qtpl:113 //line views/auth.qtpl:106
qw422016.N().S(`</a></p> qw422016.N().S(`</a></p>
<p><a href="/"> `) <p><a href="/"> `)
//line views/auth.qtpl:114 //line views/auth.qtpl:107
qw422016.E().S(lc.Get("auth.go_home")) qw422016.E().S(lc.Get("auth.go_home"))
//line views/auth.qtpl:114 //line views/auth.qtpl:107
qw422016.N().S(`</a></p> qw422016.N().S(`</a></p>
`) `)
//line views/auth.qtpl:115 //line views/auth.qtpl:108
} }
//line views/auth.qtpl:115 //line views/auth.qtpl:108
qw422016.N().S(` qw422016.N().S(`
</section> </section>
</main> </main>
</div>
`) `)
//line views/auth.qtpl:119 //line views/auth.qtpl:111
} }
//line views/auth.qtpl:119 //line views/auth.qtpl:111
func WriteLogout(qq422016 qtio422016.Writer, can bool, lc *l18n.Localizer) { func WriteLogout(qq422016 qtio422016.Writer, can bool, lc *l18n.Localizer) {
//line views/auth.qtpl:119 //line views/auth.qtpl:111
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/auth.qtpl:119 //line views/auth.qtpl:111
StreamLogout(qw422016, can, lc) StreamLogout(qw422016, can, lc)
//line views/auth.qtpl:119 //line views/auth.qtpl:111
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/auth.qtpl:119 //line views/auth.qtpl:111
} }
//line views/auth.qtpl:119 //line views/auth.qtpl:111
func Logout(can bool, lc *l18n.Localizer) string { func Logout(can bool, lc *l18n.Localizer) string {
//line views/auth.qtpl:119 //line views/auth.qtpl:111
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/auth.qtpl:119 //line views/auth.qtpl:111
WriteLogout(qb422016, can, lc) WriteLogout(qb422016, can, lc)
//line views/auth.qtpl:119 //line views/auth.qtpl:111
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/auth.qtpl:119 //line views/auth.qtpl:111
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/auth.qtpl:119 //line views/auth.qtpl:111
return qs422016 return qs422016
//line views/auth.qtpl:119 //line views/auth.qtpl:111
} }
//line views/auth.qtpl:121 //line views/auth.qtpl:113
func StreamLock(qw422016 *qt422016.Writer, lc *l18n.Localizer) { func StreamLock(qw422016 *qt422016.Writer, lc *l18n.Localizer) {
//line views/auth.qtpl:121 //line views/auth.qtpl:113
qw422016.N().S(` qw422016.N().S(`
<!doctype html> <!doctype html>
<html> <html>
@ -532,9 +524,9 @@ func StreamLock(qw422016 *qt422016.Writer, lc *l18n.Localizer) {
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>🔒 `) <title>🔒 `)
//line views/auth.qtpl:127 //line views/auth.qtpl:119
qw422016.E().S(lc.Get("auth.lock_title")) qw422016.E().S(lc.Get("auth.lock_title"))
//line views/auth.qtpl:127 //line views/auth.qtpl:119
qw422016.N().S(`</title> qw422016.N().S(`</title>
<link rel="shortcut icon" href="/static/favicon.ico"> <link rel="shortcut icon" href="/static/favicon.ico">
<link rel="stylesheet" href="/static/style.css"> <link rel="stylesheet" href="/static/style.css">
@ -544,73 +536,73 @@ func StreamLock(qw422016 *qt422016.Writer, lc *l18n.Localizer) {
<section class="locked-notice__message"> <section class="locked-notice__message">
<p class="locked-notice__lock">🔒</p> <p class="locked-notice__lock">🔒</p>
<h1 class="locked-notice__title">`) <h1 class="locked-notice__title">`)
//line views/auth.qtpl:135 //line views/auth.qtpl:127
qw422016.E().S(lc.Get("auth.lock_title")) qw422016.E().S(lc.Get("auth.lock_title"))
//line views/auth.qtpl:135 //line views/auth.qtpl:127
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
<form class="locked-notice__login-form" method="post" action="/login" id="login-form" enctype="multipart/form-data" autocomplete="on"> <form class="locked-notice__login-form" method="post" action="/login" id="login-form" enctype="multipart/form-data" autocomplete="on">
<label for="login-form__username">`) <label for="login-form__username">`)
//line views/auth.qtpl:137 //line views/auth.qtpl:129
qw422016.E().S(lc.Get("auth.username")) qw422016.E().S(lc.Get("auth.username"))
//line views/auth.qtpl:137 //line views/auth.qtpl:129
qw422016.N().S(`</label> qw422016.N().S(`</label>
<br> <br>
<input type="text" required autofocus id="login-form__username" name="username" autocomplete="username"> <input type="text" required autofocus id="login-form__username" name="username" autocomplete="username">
<br> <br>
<label for="login-form__password">`) <label for="login-form__password">`)
//line views/auth.qtpl:141 //line views/auth.qtpl:133
qw422016.E().S(lc.Get("auth.password")) qw422016.E().S(lc.Get("auth.password"))
//line views/auth.qtpl:141 //line views/auth.qtpl:133
qw422016.N().S(`</label> qw422016.N().S(`</label>
<br> <br>
<input type="password" required name="password" autocomplete="current-password"> <input type="password" required name="password" autocomplete="current-password">
<br> <br>
<button class="btn" type="submit" value="Log in">`) <button class="btn" type="submit" value="Log in">`)
//line views/auth.qtpl:145 //line views/auth.qtpl:137
qw422016.E().S(lc.Get("auth.login_button")) qw422016.E().S(lc.Get("auth.login_button"))
//line views/auth.qtpl:145 //line views/auth.qtpl:137
qw422016.N().S(`</button> qw422016.N().S(`</button>
</form> </form>
`) `)
//line views/auth.qtpl:147 //line views/auth.qtpl:139
streamtelegramWidget(qw422016, lc) streamtelegramWidget(qw422016, lc)
//line views/auth.qtpl:147 //line views/auth.qtpl:139
qw422016.N().S(` qw422016.N().S(`
</section> </section>
</main> </main>
</body> </body>
</html> </html>
`) `)
//line views/auth.qtpl:152 //line views/auth.qtpl:144
} }
//line views/auth.qtpl:152 //line views/auth.qtpl:144
func WriteLock(qq422016 qtio422016.Writer, lc *l18n.Localizer) { func WriteLock(qq422016 qtio422016.Writer, lc *l18n.Localizer) {
//line views/auth.qtpl:152 //line views/auth.qtpl:144
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/auth.qtpl:152 //line views/auth.qtpl:144
StreamLock(qw422016, lc) StreamLock(qw422016, lc)
//line views/auth.qtpl:152 //line views/auth.qtpl:144
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/auth.qtpl:152 //line views/auth.qtpl:144
} }
//line views/auth.qtpl:152 //line views/auth.qtpl:144
func Lock(lc *l18n.Localizer) string { func Lock(lc *l18n.Localizer) string {
//line views/auth.qtpl:152 //line views/auth.qtpl:144
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/auth.qtpl:152 //line views/auth.qtpl:144
WriteLock(qb422016, lc) WriteLock(qb422016, lc)
//line views/auth.qtpl:152 //line views/auth.qtpl:144
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/auth.qtpl:152 //line views/auth.qtpl:144
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/auth.qtpl:152 //line views/auth.qtpl:144
return qs422016 return qs422016
//line views/auth.qtpl:152 //line views/auth.qtpl:144
} }
//line views/auth.qtpl:155 //line views/auth.qtpl:147
var userListL10n = map[string]l10nEntry{ var userListL10n = map[string]l10nEntry{
"heading": en("List of users").ru("Список пользователей"), "heading": en("List of users").ru("Список пользователей"),
"administrators": en("Administrators").ru("Администраторы"), "administrators": en("Administrators").ru("Администраторы"),
@ -618,14 +610,13 @@ var userListL10n = map[string]l10nEntry{
"editors": en("Editors").ru("Редакторы"), "editors": en("Editors").ru("Редакторы"),
} }
//line views/auth.qtpl:163 //line views/auth.qtpl:155
func StreamUserList(qw422016 *qt422016.Writer, lc *l18n.Localizer) { func StreamUserList(qw422016 *qt422016.Writer, lc *l18n.Localizer) {
//line views/auth.qtpl:163 //line views/auth.qtpl:155
qw422016.N().S(` qw422016.N().S(`
<div class="layout">
<main class="main-width user-list"> <main class="main-width user-list">
`) `)
//line views/auth.qtpl:167 //line views/auth.qtpl:158
var get = func(key string) string { var get = func(key string) string {
return userListL10n[key].get(lc.Locale) return userListL10n[key].get(lc.Locale)
} }
@ -650,131 +641,130 @@ func StreamUserList(qw422016 *qt422016.Writer, lc *l18n.Localizer) {
sort.Strings(moderators) sort.Strings(moderators)
sort.Strings(editors) sort.Strings(editors)
//line views/auth.qtpl:190 //line views/auth.qtpl:181
qw422016.N().S(` qw422016.N().S(`
<h1>`) <h1>`)
//line views/auth.qtpl:191 //line views/auth.qtpl:182
qw422016.E().S(get("heading")) qw422016.E().S(get("heading"))
//line views/auth.qtpl:191 //line views/auth.qtpl:182
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
<section> <section>
<h2>`) <h2>`)
//line views/auth.qtpl:193 //line views/auth.qtpl:184
qw422016.E().S(get("administrators")) qw422016.E().S(get("administrators"))
//line views/auth.qtpl:193 //line views/auth.qtpl:184
qw422016.N().S(`</h2> qw422016.N().S(`</h2>
<ol>`) <ol>`)
//line views/auth.qtpl:194 //line views/auth.qtpl:185
for _, name := range admins { for _, name := range admins {
//line views/auth.qtpl:194 //line views/auth.qtpl:185
qw422016.N().S(` qw422016.N().S(`
<li><a href="/hypha/`) <li><a href="/hypha/`)
//line views/auth.qtpl:195 //line views/auth.qtpl:186
qw422016.E().S(cfg.UserHypha) qw422016.E().S(cfg.UserHypha)
//line views/auth.qtpl:195 //line views/auth.qtpl:186
qw422016.N().S(`/`) qw422016.N().S(`/`)
//line views/auth.qtpl:195 //line views/auth.qtpl:186
qw422016.E().S(name) qw422016.E().S(name)
//line views/auth.qtpl:195 //line views/auth.qtpl:186
qw422016.N().S(`">`) qw422016.N().S(`">`)
//line views/auth.qtpl:195 //line views/auth.qtpl:186
qw422016.E().S(name) qw422016.E().S(name)
//line views/auth.qtpl:195 //line views/auth.qtpl:186
qw422016.N().S(`</a></li> qw422016.N().S(`</a></li>
`) `)
//line views/auth.qtpl:196 //line views/auth.qtpl:187
} }
//line views/auth.qtpl:196 //line views/auth.qtpl:187
qw422016.N().S(`</ol> qw422016.N().S(`</ol>
</section> </section>
<section> <section>
<h2>`) <h2>`)
//line views/auth.qtpl:199 //line views/auth.qtpl:190
qw422016.E().S(get("moderators")) qw422016.E().S(get("moderators"))
//line views/auth.qtpl:199 //line views/auth.qtpl:190
qw422016.N().S(`</h2> qw422016.N().S(`</h2>
<ol>`) <ol>`)
//line views/auth.qtpl:200 //line views/auth.qtpl:191
for _, name := range moderators { for _, name := range moderators {
//line views/auth.qtpl:200 //line views/auth.qtpl:191
qw422016.N().S(` qw422016.N().S(`
<li><a href="/hypha/`) <li><a href="/hypha/`)
//line views/auth.qtpl:201 //line views/auth.qtpl:192
qw422016.E().S(cfg.UserHypha) qw422016.E().S(cfg.UserHypha)
//line views/auth.qtpl:201 //line views/auth.qtpl:192
qw422016.N().S(`/`) qw422016.N().S(`/`)
//line views/auth.qtpl:201 //line views/auth.qtpl:192
qw422016.E().S(name) qw422016.E().S(name)
//line views/auth.qtpl:201 //line views/auth.qtpl:192
qw422016.N().S(`">`) qw422016.N().S(`">`)
//line views/auth.qtpl:201 //line views/auth.qtpl:192
qw422016.E().S(name) qw422016.E().S(name)
//line views/auth.qtpl:201 //line views/auth.qtpl:192
qw422016.N().S(`</a></li> qw422016.N().S(`</a></li>
`) `)
//line views/auth.qtpl:202 //line views/auth.qtpl:193
} }
//line views/auth.qtpl:202 //line views/auth.qtpl:193
qw422016.N().S(`</ol> qw422016.N().S(`</ol>
</section> </section>
<section> <section>
<h2>`) <h2>`)
//line views/auth.qtpl:205 //line views/auth.qtpl:196
qw422016.E().S(get("editors")) qw422016.E().S(get("editors"))
//line views/auth.qtpl:205 //line views/auth.qtpl:196
qw422016.N().S(`</h2> qw422016.N().S(`</h2>
<ol>`) <ol>`)
//line views/auth.qtpl:206 //line views/auth.qtpl:197
for _, name := range editors { for _, name := range editors {
//line views/auth.qtpl:206 //line views/auth.qtpl:197
qw422016.N().S(` qw422016.N().S(`
<li><a href="/hypha/`) <li><a href="/hypha/`)
//line views/auth.qtpl:207 //line views/auth.qtpl:198
qw422016.E().S(cfg.UserHypha) qw422016.E().S(cfg.UserHypha)
//line views/auth.qtpl:207 //line views/auth.qtpl:198
qw422016.N().S(`/`) qw422016.N().S(`/`)
//line views/auth.qtpl:207 //line views/auth.qtpl:198
qw422016.E().S(name) qw422016.E().S(name)
//line views/auth.qtpl:207 //line views/auth.qtpl:198
qw422016.N().S(`">`) qw422016.N().S(`">`)
//line views/auth.qtpl:207 //line views/auth.qtpl:198
qw422016.E().S(name) qw422016.E().S(name)
//line views/auth.qtpl:207 //line views/auth.qtpl:198
qw422016.N().S(`</a></li> qw422016.N().S(`</a></li>
`) `)
//line views/auth.qtpl:208 //line views/auth.qtpl:199
} }
//line views/auth.qtpl:208 //line views/auth.qtpl:199
qw422016.N().S(`</ol> qw422016.N().S(`</ol>
</section> </section>
</main> </main>
</div>
`) `)
//line views/auth.qtpl:212 //line views/auth.qtpl:202
} }
//line views/auth.qtpl:212 //line views/auth.qtpl:202
func WriteUserList(qq422016 qtio422016.Writer, lc *l18n.Localizer) { func WriteUserList(qq422016 qtio422016.Writer, lc *l18n.Localizer) {
//line views/auth.qtpl:212 //line views/auth.qtpl:202
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/auth.qtpl:212 //line views/auth.qtpl:202
StreamUserList(qw422016, lc) StreamUserList(qw422016, lc)
//line views/auth.qtpl:212 //line views/auth.qtpl:202
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/auth.qtpl:212 //line views/auth.qtpl:202
} }
//line views/auth.qtpl:212 //line views/auth.qtpl:202
func UserList(lc *l18n.Localizer) string { func UserList(lc *l18n.Localizer) string {
//line views/auth.qtpl:212 //line views/auth.qtpl:202
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/auth.qtpl:212 //line views/auth.qtpl:202
WriteUserList(qb422016, lc) WriteUserList(qb422016, lc)
//line views/auth.qtpl:212 //line views/auth.qtpl:202
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/auth.qtpl:212 //line views/auth.qtpl:202
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/auth.qtpl:212 //line views/auth.qtpl:202
return qs422016 return qs422016
//line views/auth.qtpl:212 //line views/auth.qtpl:202
} }

View File

@ -17,18 +17,15 @@ if err != nil {
text = err.Error() text = err.Error()
} }
%} %}
<div class="layout">
<main class="main-width"> <main class="main-width">
<article> <article>
<h1>{%s= lc.Get("ui.diff_title", &l18n.Replacements{"name": beautifulLink(h.CanonicalName()), "rev": hash}) %}</h1> <h1>{%s= lc.Get("ui.diff_title", &l18n.Replacements{"name": beautifulLink(h.CanonicalName()), "rev": hash}) %}</h1>
<pre class="codeblock"><code>{%s text %}</code></pre> <pre class="codeblock"><code>{%s text %}</code></pre>
</article> </article>
</main> </main>
</div>
{% endfunc %} {% endfunc %}
{% func RecentChanges(n int, lc *l18n.Localizer) %} {% func RecentChanges(n int, lc *l18n.Localizer) %}
<div class="layout">
<main class="main-width recent-changes"> <main class="main-width recent-changes">
<h1>{%s lc.Get("ui.recent_heading") %}</h1> <h1>{%s lc.Get("ui.recent_heading") %}</h1>
@ -84,7 +81,6 @@ if err != nil {
{% endif %} {% endif %}
</section> </section>
</main> </main>
</div>
{% endfunc %} {% endfunc %}
{% func recentChanges(rev history.Revision) %} {% func recentChanges(rev history.Revision) %}
@ -111,12 +107,10 @@ if err != nil {
{% endfunc %} {% endfunc %}
{% func History(rq *http.Request, hyphaName, list string, lc *l18n.Localizer) %} {% func History(rq *http.Request, hyphaName, list string, lc *l18n.Localizer) %}
<div class="layout">
<main class="main-width"> <main class="main-width">
<article class="history"> <article class="history">
<h1>{%s= fmt.Sprintf(lc.Get("ui.history_title"), beautifulLink(hyphaName)) %}</h1> <h1>{%s= fmt.Sprintf(lc.Get("ui.history_title"), beautifulLink(hyphaName)) %}</h1>
{%s= list %} {%s= list %}
</article> </article>
</main> </main>
</div>
{% endfunc %} {% endfunc %}

View File

@ -55,393 +55,387 @@ func StreamPrimitiveDiff(qw422016 *qt422016.Writer, rq *http.Request, h hyphae.E
//line views/history.qtpl:19 //line views/history.qtpl:19
qw422016.N().S(` qw422016.N().S(`
<div class="layout">
<main class="main-width"> <main class="main-width">
<article> <article>
<h1>`) <h1>`)
//line views/history.qtpl:23 //line views/history.qtpl:22
qw422016.N().S(lc.Get("ui.diff_title", &l18n.Replacements{"name": beautifulLink(h.CanonicalName()), "rev": hash})) qw422016.N().S(lc.Get("ui.diff_title", &l18n.Replacements{"name": beautifulLink(h.CanonicalName()), "rev": hash}))
//line views/history.qtpl:23 //line views/history.qtpl:22
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
<pre class="codeblock"><code>`) <pre class="codeblock"><code>`)
//line views/history.qtpl:24 //line views/history.qtpl:23
qw422016.E().S(text) qw422016.E().S(text)
//line views/history.qtpl:24 //line views/history.qtpl:23
qw422016.N().S(`</code></pre> qw422016.N().S(`</code></pre>
</article> </article>
</main> </main>
</div>
`) `)
//line views/history.qtpl:28 //line views/history.qtpl:26
} }
//line views/history.qtpl:28 //line views/history.qtpl:26
func WritePrimitiveDiff(qq422016 qtio422016.Writer, rq *http.Request, h hyphae.ExistingHypha, u *user.User, hash string) { func WritePrimitiveDiff(qq422016 qtio422016.Writer, rq *http.Request, h hyphae.ExistingHypha, u *user.User, hash string) {
//line views/history.qtpl:28 //line views/history.qtpl:26
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/history.qtpl:28 //line views/history.qtpl:26
StreamPrimitiveDiff(qw422016, rq, h, u, hash) StreamPrimitiveDiff(qw422016, rq, h, u, hash)
//line views/history.qtpl:28 //line views/history.qtpl:26
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/history.qtpl:28 //line views/history.qtpl:26
} }
//line views/history.qtpl:28 //line views/history.qtpl:26
func PrimitiveDiff(rq *http.Request, h hyphae.ExistingHypha, u *user.User, hash string) string { func PrimitiveDiff(rq *http.Request, h hyphae.ExistingHypha, u *user.User, hash string) string {
//line views/history.qtpl:28 //line views/history.qtpl:26
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/history.qtpl:28 //line views/history.qtpl:26
WritePrimitiveDiff(qb422016, rq, h, u, hash) WritePrimitiveDiff(qb422016, rq, h, u, hash)
//line views/history.qtpl:28 //line views/history.qtpl:26
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/history.qtpl:28 //line views/history.qtpl:26
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/history.qtpl:28 //line views/history.qtpl:26
return qs422016 return qs422016
//line views/history.qtpl:28 //line views/history.qtpl:26
} }
//line views/history.qtpl:30 //line views/history.qtpl:28
func StreamRecentChanges(qw422016 *qt422016.Writer, n int, lc *l18n.Localizer) { func StreamRecentChanges(qw422016 *qt422016.Writer, n int, lc *l18n.Localizer) {
//line views/history.qtpl:30 //line views/history.qtpl:28
qw422016.N().S(` qw422016.N().S(`
<div class="layout">
<main class="main-width recent-changes"> <main class="main-width recent-changes">
<h1>`) <h1>`)
//line views/history.qtpl:33 //line views/history.qtpl:30
qw422016.E().S(lc.Get("ui.recent_heading")) qw422016.E().S(lc.Get("ui.recent_heading"))
//line views/history.qtpl:33 //line views/history.qtpl:30
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
<nav class="recent-changes__count"> <nav class="recent-changes__count">
`) `)
//line views/history.qtpl:36 //line views/history.qtpl:33
qw422016.E().S(lc.Get("ui.recent_count_pre")) qw422016.E().S(lc.Get("ui.recent_count_pre"))
//line views/history.qtpl:36 //line views/history.qtpl:33
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/history.qtpl:37 //line views/history.qtpl:34
for i, m := range []int{20, 50, 100} { for i, m := range []int{20, 50, 100} {
//line views/history.qtpl:37 //line views/history.qtpl:34
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/history.qtpl:38 //line views/history.qtpl:35
if i > 0 { if i > 0 {
//line views/history.qtpl:38 //line views/history.qtpl:35
qw422016.N().S(` qw422016.N().S(`
<span aria-hidden="true">|</span> <span aria-hidden="true">|</span>
`) `)
//line views/history.qtpl:40 //line views/history.qtpl:37
} }
//line views/history.qtpl:40 //line views/history.qtpl:37
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/history.qtpl:41 //line views/history.qtpl:38
if m == n { if m == n {
//line views/history.qtpl:41 //line views/history.qtpl:38
qw422016.N().S(` qw422016.N().S(`
<b>`) <b>`)
//line views/history.qtpl:42 //line views/history.qtpl:39
qw422016.N().D(m) qw422016.N().D(m)
//line views/history.qtpl:42 //line views/history.qtpl:39
qw422016.N().S(`</b> qw422016.N().S(`</b>
`) `)
//line views/history.qtpl:43 //line views/history.qtpl:40
} else { } else {
//line views/history.qtpl:43 //line views/history.qtpl:40
qw422016.N().S(` qw422016.N().S(`
<a href="/recent-changes/`) <a href="/recent-changes/`)
//line views/history.qtpl:44 //line views/history.qtpl:41
qw422016.N().D(m) qw422016.N().D(m)
//line views/history.qtpl:44 //line views/history.qtpl:41
qw422016.N().S(`">`) qw422016.N().S(`">`)
//line views/history.qtpl:44 //line views/history.qtpl:41
qw422016.N().D(m) qw422016.N().D(m)
//line views/history.qtpl:44 //line views/history.qtpl:41
qw422016.N().S(`</a> qw422016.N().S(`</a>
`) `)
//line views/history.qtpl:45 //line views/history.qtpl:42
} }
//line views/history.qtpl:45 //line views/history.qtpl:42
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/history.qtpl:46 //line views/history.qtpl:43
} }
//line views/history.qtpl:46 //line views/history.qtpl:43
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/history.qtpl:47 //line views/history.qtpl:44
qw422016.E().S(lc.Get("ui.recent_count_post")) qw422016.E().S(lc.Get("ui.recent_count_post"))
//line views/history.qtpl:47 //line views/history.qtpl:44
qw422016.N().S(` qw422016.N().S(`
</nav> </nav>
<p><img class="icon" width="20" height="20" src="/static/icon/feed.svg">`) <p><img class="icon" width="20" height="20" src="/static/icon/feed.svg">`)
//line views/history.qtpl:50 //line views/history.qtpl:47
qw422016.N().S(lc.Get("ui.recent_subscribe", &l18n.Replacements{"rss": "<a href=\"/recent-changes-rss\">RSS</a>", "atom": "<a href=\"/recent-changes-atom\">Atom</a>", "json": fmt.Sprintf("<a href=\"/recent-changes-json\">%s</a>", lc.Get("ui.recent_subscribe_json"))})) qw422016.N().S(lc.Get("ui.recent_subscribe", &l18n.Replacements{"rss": "<a href=\"/recent-changes-rss\">RSS</a>", "atom": "<a href=\"/recent-changes-atom\">Atom</a>", "json": fmt.Sprintf("<a href=\"/recent-changes-json\">%s</a>", lc.Get("ui.recent_subscribe_json"))}))
//line views/history.qtpl:50 //line views/history.qtpl:47
qw422016.N().S(`</p> qw422016.N().S(`</p>
`) `)
//line views/history.qtpl:57 //line views/history.qtpl:54
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/history.qtpl:60 //line views/history.qtpl:57
changes := history.RecentChanges(n) changes := history.RecentChanges(n)
var year, day int var year, day int
var month time.Month var month time.Month
//line views/history.qtpl:63 //line views/history.qtpl:60
qw422016.N().S(` qw422016.N().S(`
<section class="recent-changes__list" role="feed"> <section class="recent-changes__list" role="feed">
`) `)
//line views/history.qtpl:65 //line views/history.qtpl:62
if len(changes) == 0 { if len(changes) == 0 {
//line views/history.qtpl:65 //line views/history.qtpl:62
qw422016.N().S(` qw422016.N().S(`
<p>`) <p>`)
//line views/history.qtpl:66 //line views/history.qtpl:63
qw422016.E().S(lc.Get("ui.recent_empty")) qw422016.E().S(lc.Get("ui.recent_empty"))
//line views/history.qtpl:66 //line views/history.qtpl:63
qw422016.N().S(`</p> qw422016.N().S(`</p>
`) `)
//line views/history.qtpl:67 //line views/history.qtpl:64
} else { } else {
//line views/history.qtpl:67 //line views/history.qtpl:64
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/history.qtpl:68 //line views/history.qtpl:65
for i, entry := range changes { for i, entry := range changes {
//line views/history.qtpl:68 //line views/history.qtpl:65
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/history.qtpl:70 //line views/history.qtpl:67
y, m, d := entry.Time.UTC().Date() y, m, d := entry.Time.UTC().Date()
//line views/history.qtpl:70 //line views/history.qtpl:67
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/history.qtpl:71 //line views/history.qtpl:68
if d != day || m != month || y != year { if d != day || m != month || y != year {
//line views/history.qtpl:71 //line views/history.qtpl:68
qw422016.N().S(` qw422016.N().S(`
<h2 class="recent-changes__heading"> <h2 class="recent-changes__heading">
`) `)
//line views/history.qtpl:73 //line views/history.qtpl:70
qw422016.E().S(fmt.Sprintf("%04d-%02d-%02d", y, m, d)) qw422016.E().S(fmt.Sprintf("%04d-%02d-%02d", y, m, d))
//line views/history.qtpl:73 //line views/history.qtpl:70
qw422016.N().S(` qw422016.N().S(`
</h2> </h2>
`) `)
//line views/history.qtpl:75 //line views/history.qtpl:72
year, month, day = y, m, d year, month, day = y, m, d
//line views/history.qtpl:75 //line views/history.qtpl:72
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/history.qtpl:76 //line views/history.qtpl:73
} }
//line views/history.qtpl:76 //line views/history.qtpl:73
qw422016.N().S(` qw422016.N().S(`
<div class="recent-changes__entry" role="article" <div class="recent-changes__entry" role="article"
aria-setsize="`) aria-setsize="`)
//line views/history.qtpl:79 //line views/history.qtpl:76
qw422016.N().D(n) qw422016.N().D(n)
//line views/history.qtpl:79 //line views/history.qtpl:76
qw422016.N().S(`" aria-posinset="`) qw422016.N().S(`" aria-posinset="`)
//line views/history.qtpl:79 //line views/history.qtpl:76
qw422016.N().D(i) qw422016.N().D(i)
//line views/history.qtpl:79 //line views/history.qtpl:76
qw422016.N().S(`"> qw422016.N().S(`">
`) `)
//line views/history.qtpl:80 //line views/history.qtpl:77
qw422016.N().S(recentChanges(entry)) qw422016.N().S(recentChanges(entry))
//line views/history.qtpl:80 //line views/history.qtpl:77
qw422016.N().S(` qw422016.N().S(`
</div> </div>
`) `)
//line views/history.qtpl:83 //line views/history.qtpl:80
} }
//line views/history.qtpl:83 //line views/history.qtpl:80
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/history.qtpl:84 //line views/history.qtpl:81
} }
//line views/history.qtpl:84 //line views/history.qtpl:81
qw422016.N().S(` qw422016.N().S(`
</section> </section>
</main> </main>
</div>
`) `)
//line views/history.qtpl:88 //line views/history.qtpl:84
} }
//line views/history.qtpl:88 //line views/history.qtpl:84
func WriteRecentChanges(qq422016 qtio422016.Writer, n int, lc *l18n.Localizer) { func WriteRecentChanges(qq422016 qtio422016.Writer, n int, lc *l18n.Localizer) {
//line views/history.qtpl:88 //line views/history.qtpl:84
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/history.qtpl:88 //line views/history.qtpl:84
StreamRecentChanges(qw422016, n, lc) StreamRecentChanges(qw422016, n, lc)
//line views/history.qtpl:88 //line views/history.qtpl:84
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/history.qtpl:88 //line views/history.qtpl:84
} }
//line views/history.qtpl:88 //line views/history.qtpl:84
func RecentChanges(n int, lc *l18n.Localizer) string { func RecentChanges(n int, lc *l18n.Localizer) string {
//line views/history.qtpl:88 //line views/history.qtpl:84
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/history.qtpl:88 //line views/history.qtpl:84
WriteRecentChanges(qb422016, n, lc) WriteRecentChanges(qb422016, n, lc)
//line views/history.qtpl:88 //line views/history.qtpl:84
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/history.qtpl:88 //line views/history.qtpl:84
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/history.qtpl:88 //line views/history.qtpl:84
return qs422016 return qs422016
//line views/history.qtpl:88 //line views/history.qtpl:84
} }
//line views/history.qtpl:90 //line views/history.qtpl:86
func streamrecentChanges(qw422016 *qt422016.Writer, rev history.Revision) { func streamrecentChanges(qw422016 *qt422016.Writer, rev history.Revision) {
//line views/history.qtpl:90 //line views/history.qtpl:86
qw422016.N().S(` qw422016.N().S(`
<div> <div>
<time class="recent-changes__entry__time"> <time class="recent-changes__entry__time">
`) `)
//line views/history.qtpl:93 //line views/history.qtpl:89
qw422016.E().S(rev.Time.UTC().Format("15:04 UTC")) qw422016.E().S(rev.Time.UTC().Format("15:04 UTC"))
//line views/history.qtpl:93 //line views/history.qtpl:89
qw422016.N().S(` qw422016.N().S(`
</time> </time>
<span class="recent-changes__entry__message">`) <span class="recent-changes__entry__message">`)
//line views/history.qtpl:95 //line views/history.qtpl:91
qw422016.E().S(rev.Hash) qw422016.E().S(rev.Hash)
//line views/history.qtpl:95 //line views/history.qtpl:91
qw422016.N().S(`</span> qw422016.N().S(`</span>
`) `)
//line views/history.qtpl:97 //line views/history.qtpl:93
if rev.Username != "anon" { if rev.Username != "anon" {
//line views/history.qtpl:97 //line views/history.qtpl:93
qw422016.N().S(` qw422016.N().S(`
<span class="recent-changes__entry__author"> <span class="recent-changes__entry__author">
&mdash; <a href="/hypha/`) &mdash; <a href="/hypha/`)
//line views/history.qtpl:99 //line views/history.qtpl:95
qw422016.E().S(cfg.UserHypha) qw422016.E().S(cfg.UserHypha)
//line views/history.qtpl:99 //line views/history.qtpl:95
qw422016.N().S(`/`) qw422016.N().S(`/`)
//line views/history.qtpl:99 //line views/history.qtpl:95
qw422016.E().S(rev.Username) qw422016.E().S(rev.Username)
//line views/history.qtpl:99 //line views/history.qtpl:95
qw422016.N().S(`" rel="author">`) qw422016.N().S(`" rel="author">`)
//line views/history.qtpl:99 //line views/history.qtpl:95
qw422016.E().S(rev.Username) qw422016.E().S(rev.Username)
//line views/history.qtpl:99 //line views/history.qtpl:95
qw422016.N().S(`</a> qw422016.N().S(`</a>
</span> </span>
`) `)
//line views/history.qtpl:101 //line views/history.qtpl:97
} }
//line views/history.qtpl:101 //line views/history.qtpl:97
qw422016.N().S(` qw422016.N().S(`
</div> </div>
<div> <div>
<span class="recent-changes__entry__links"> <span class="recent-changes__entry__links">
`) `)
//line views/history.qtpl:105 //line views/history.qtpl:101
qw422016.N().S(rev.HyphaeLinksHTML()) qw422016.N().S(rev.HyphaeLinksHTML())
//line views/history.qtpl:105 //line views/history.qtpl:101
qw422016.N().S(` qw422016.N().S(`
</span> </span>
<span class="recent-changes__entry__message"> <span class="recent-changes__entry__message">
`) `)
//line views/history.qtpl:108 //line views/history.qtpl:104
qw422016.E().S(rev.Message) qw422016.E().S(rev.Message)
//line views/history.qtpl:108 //line views/history.qtpl:104
qw422016.N().S(` qw422016.N().S(`
</span> </span>
</div> </div>
`) `)
//line views/history.qtpl:111 //line views/history.qtpl:107
} }
//line views/history.qtpl:111 //line views/history.qtpl:107
func writerecentChanges(qq422016 qtio422016.Writer, rev history.Revision) { func writerecentChanges(qq422016 qtio422016.Writer, rev history.Revision) {
//line views/history.qtpl:111 //line views/history.qtpl:107
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/history.qtpl:111 //line views/history.qtpl:107
streamrecentChanges(qw422016, rev) streamrecentChanges(qw422016, rev)
//line views/history.qtpl:111 //line views/history.qtpl:107
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/history.qtpl:111 //line views/history.qtpl:107
} }
//line views/history.qtpl:111 //line views/history.qtpl:107
func recentChanges(rev history.Revision) string { func recentChanges(rev history.Revision) string {
//line views/history.qtpl:111 //line views/history.qtpl:107
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/history.qtpl:111 //line views/history.qtpl:107
writerecentChanges(qb422016, rev) writerecentChanges(qb422016, rev)
//line views/history.qtpl:111 //line views/history.qtpl:107
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/history.qtpl:111 //line views/history.qtpl:107
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/history.qtpl:111 //line views/history.qtpl:107
return qs422016 return qs422016
//line views/history.qtpl:111 //line views/history.qtpl:107
} }
//line views/history.qtpl:113 //line views/history.qtpl:109
func StreamHistory(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, list string, lc *l18n.Localizer) { func StreamHistory(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, list string, lc *l18n.Localizer) {
//line views/history.qtpl:113 //line views/history.qtpl:109
qw422016.N().S(` qw422016.N().S(`
<div class="layout">
<main class="main-width"> <main class="main-width">
<article class="history"> <article class="history">
<h1>`) <h1>`)
//line views/history.qtpl:117 //line views/history.qtpl:112
qw422016.N().S(fmt.Sprintf(lc.Get("ui.history_title"), beautifulLink(hyphaName))) qw422016.N().S(fmt.Sprintf(lc.Get("ui.history_title"), beautifulLink(hyphaName)))
//line views/history.qtpl:117 //line views/history.qtpl:112
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
`) `)
//line views/history.qtpl:118 //line views/history.qtpl:113
qw422016.N().S(list) qw422016.N().S(list)
//line views/history.qtpl:118 //line views/history.qtpl:113
qw422016.N().S(` qw422016.N().S(`
</article> </article>
</main> </main>
</div>
`) `)
//line views/history.qtpl:122 //line views/history.qtpl:116
} }
//line views/history.qtpl:122 //line views/history.qtpl:116
func WriteHistory(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, list string, lc *l18n.Localizer) { func WriteHistory(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, list string, lc *l18n.Localizer) {
//line views/history.qtpl:122 //line views/history.qtpl:116
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/history.qtpl:122 //line views/history.qtpl:116
StreamHistory(qw422016, rq, hyphaName, list, lc) StreamHistory(qw422016, rq, hyphaName, list, lc)
//line views/history.qtpl:122 //line views/history.qtpl:116
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/history.qtpl:122 //line views/history.qtpl:116
} }
//line views/history.qtpl:122 //line views/history.qtpl:116
func History(rq *http.Request, hyphaName, list string, lc *l18n.Localizer) string { func History(rq *http.Request, hyphaName, list string, lc *l18n.Localizer) string {
//line views/history.qtpl:122 //line views/history.qtpl:116
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/history.qtpl:122 //line views/history.qtpl:116
WriteHistory(qb422016, rq, hyphaName, list, lc) WriteHistory(qb422016, rq, hyphaName, list, lc)
//line views/history.qtpl:122 //line views/history.qtpl:116
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/history.qtpl:122 //line views/history.qtpl:116
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/history.qtpl:122 //line views/history.qtpl:116
return qs422016 return qs422016
//line views/history.qtpl:122 //line views/history.qtpl:116
} }

View File

@ -55,7 +55,6 @@ bloody hell !!
{% endfunc %} {% endfunc %}
{% func modalBegin(path, hyphaName, formAttrs, legend string) %} {% func modalBegin(path, hyphaName, formAttrs, legend string) %}
<div class="layout">
<main class="main-width"> <main class="main-width">
<form class="modal" action="/{%s path %}/{%s hyphaName %}"{%s= formAttrs %}> <form class="modal" action="/{%s path %}/{%s hyphaName %}"{%s= formAttrs %}>
<fieldset class="modal__fieldset"> <fieldset class="modal__fieldset">
@ -68,5 +67,4 @@ bloody hell !!
</fieldset> </fieldset>
</form> </form>
</main> </main>
</div>
{% endfunc %} {% endfunc %}

View File

@ -272,113 +272,111 @@ func modalReallyWant(hyphaName, verb string, lc *l18n.Localizer) string {
func streammodalBegin(qw422016 *qt422016.Writer, path, hyphaName, formAttrs, legend string) { func streammodalBegin(qw422016 *qt422016.Writer, path, hyphaName, formAttrs, legend string) {
//line views/modal.qtpl:57 //line views/modal.qtpl:57
qw422016.N().S(` qw422016.N().S(`
<div class="layout">
<main class="main-width"> <main class="main-width">
<form class="modal" action="/`) <form class="modal" action="/`)
//line views/modal.qtpl:60 //line views/modal.qtpl:59
qw422016.E().S(path) qw422016.E().S(path)
//line views/modal.qtpl:60 //line views/modal.qtpl:59
qw422016.N().S(`/`) qw422016.N().S(`/`)
//line views/modal.qtpl:60 //line views/modal.qtpl:59
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line views/modal.qtpl:60 //line views/modal.qtpl:59
qw422016.N().S(`"`) qw422016.N().S(`"`)
//line views/modal.qtpl:60 //line views/modal.qtpl:59
qw422016.N().S(formAttrs) qw422016.N().S(formAttrs)
//line views/modal.qtpl:60 //line views/modal.qtpl:59
qw422016.N().S(`> qw422016.N().S(`>
<fieldset class="modal__fieldset"> <fieldset class="modal__fieldset">
<legend class="modal__title">`) <legend class="modal__title">`)
//line views/modal.qtpl:62 //line views/modal.qtpl:61
qw422016.N().S(legend) qw422016.N().S(legend)
//line views/modal.qtpl:62 //line views/modal.qtpl:61
qw422016.N().S(`</legend> qw422016.N().S(`</legend>
`) `)
//line views/modal.qtpl:63 //line views/modal.qtpl:62
} }
//line views/modal.qtpl:63 //line views/modal.qtpl:62
func writemodalBegin(qq422016 qtio422016.Writer, path, hyphaName, formAttrs, legend string) { func writemodalBegin(qq422016 qtio422016.Writer, path, hyphaName, formAttrs, legend string) {
//line views/modal.qtpl:63 //line views/modal.qtpl:62
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/modal.qtpl:63 //line views/modal.qtpl:62
streammodalBegin(qw422016, path, hyphaName, formAttrs, legend) streammodalBegin(qw422016, path, hyphaName, formAttrs, legend)
//line views/modal.qtpl:63 //line views/modal.qtpl:62
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/modal.qtpl:63 //line views/modal.qtpl:62
} }
//line views/modal.qtpl:63 //line views/modal.qtpl:62
func modalBegin(path, hyphaName, formAttrs, legend string) string { func modalBegin(path, hyphaName, formAttrs, legend string) string {
//line views/modal.qtpl:63 //line views/modal.qtpl:62
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/modal.qtpl:63 //line views/modal.qtpl:62
writemodalBegin(qb422016, path, hyphaName, formAttrs, legend) writemodalBegin(qb422016, path, hyphaName, formAttrs, legend)
//line views/modal.qtpl:63 //line views/modal.qtpl:62
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/modal.qtpl:63 //line views/modal.qtpl:62
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/modal.qtpl:63 //line views/modal.qtpl:62
return qs422016 return qs422016
//line views/modal.qtpl:63 //line views/modal.qtpl:62
} }
//line views/modal.qtpl:65 //line views/modal.qtpl:64
func streammodalEnd(qw422016 *qt422016.Writer, hyphaName string, shouldFocusOnConfirm bool, lc *l18n.Localizer) { func streammodalEnd(qw422016 *qt422016.Writer, hyphaName string, shouldFocusOnConfirm bool, lc *l18n.Localizer) {
//line views/modal.qtpl:65 //line views/modal.qtpl:64
qw422016.N().S(` qw422016.N().S(`
<button type="submit" value="Confirm" class="btn" `) <button type="submit" value="Confirm" class="btn" `)
//line views/modal.qtpl:66 //line views/modal.qtpl:65
if shouldFocusOnConfirm { if shouldFocusOnConfirm {
//line views/modal.qtpl:66 //line views/modal.qtpl:65
qw422016.N().S(`autofocus`) qw422016.N().S(`autofocus`)
//line views/modal.qtpl:66 //line views/modal.qtpl:65
} }
//line views/modal.qtpl:66 //line views/modal.qtpl:65
qw422016.N().S(`>`) qw422016.N().S(`>`)
//line views/modal.qtpl:66 //line views/modal.qtpl:65
qw422016.E().S(lc.Get("ui.confirm")) qw422016.E().S(lc.Get("ui.confirm"))
//line views/modal.qtpl:66 //line views/modal.qtpl:65
qw422016.N().S(`</button> qw422016.N().S(`</button>
<a href="/hypha/`) <a href="/hypha/`)
//line views/modal.qtpl:67 //line views/modal.qtpl:66
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line views/modal.qtpl:67 //line views/modal.qtpl:66
qw422016.N().S(`" class="btn btn_weak">`) qw422016.N().S(`" class="btn btn_weak">`)
//line views/modal.qtpl:67 //line views/modal.qtpl:66
qw422016.E().S(lc.Get("ui.cancel")) qw422016.E().S(lc.Get("ui.cancel"))
//line views/modal.qtpl:67 //line views/modal.qtpl:66
qw422016.N().S(`</a> qw422016.N().S(`</a>
</fieldset> </fieldset>
</form> </form>
</main> </main>
</div>
`) `)
//line views/modal.qtpl:72 //line views/modal.qtpl:70
} }
//line views/modal.qtpl:72 //line views/modal.qtpl:70
func writemodalEnd(qq422016 qtio422016.Writer, hyphaName string, shouldFocusOnConfirm bool, lc *l18n.Localizer) { func writemodalEnd(qq422016 qtio422016.Writer, hyphaName string, shouldFocusOnConfirm bool, lc *l18n.Localizer) {
//line views/modal.qtpl:72 //line views/modal.qtpl:70
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/modal.qtpl:72 //line views/modal.qtpl:70
streammodalEnd(qw422016, hyphaName, shouldFocusOnConfirm, lc) streammodalEnd(qw422016, hyphaName, shouldFocusOnConfirm, lc)
//line views/modal.qtpl:72 //line views/modal.qtpl:70
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/modal.qtpl:72 //line views/modal.qtpl:70
} }
//line views/modal.qtpl:72 //line views/modal.qtpl:70
func modalEnd(hyphaName string, shouldFocusOnConfirm bool, lc *l18n.Localizer) string { func modalEnd(hyphaName string, shouldFocusOnConfirm bool, lc *l18n.Localizer) string {
//line views/modal.qtpl:72 //line views/modal.qtpl:70
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/modal.qtpl:72 //line views/modal.qtpl:70
writemodalEnd(qb422016, hyphaName, shouldFocusOnConfirm, lc) writemodalEnd(qb422016, hyphaName, shouldFocusOnConfirm, lc)
//line views/modal.qtpl:72 //line views/modal.qtpl:70
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/modal.qtpl:72 //line views/modal.qtpl:70
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/modal.qtpl:72 //line views/modal.qtpl:70
return qs422016 return qs422016
//line views/modal.qtpl:72 //line views/modal.qtpl:70
} }

View File

@ -69,7 +69,6 @@
{% code {% code
lc := l18n.FromRequest(rq) lc := l18n.FromRequest(rq)
%} %}
<div class="layout">
<main class="main-width edit edit_no-preview"> <main class="main-width edit edit_no-preview">
<h1 class="edit__title">{%s= fmt.Sprintf(lc.Get("edit.title"), beautifulLink(hyphaName)) %}</h1> <h1 class="edit__title">{%s= fmt.Sprintf(lc.Get("edit.title"), beautifulLink(hyphaName)) %}</h1>
{%s= warning %} {%s= warning %}
@ -86,7 +85,6 @@
</form> </form>
</main> </main>
{%s= Toolbar(user.FromRequest(rq), lc) %} {%s= Toolbar(user.FromRequest(rq), lc) %}
</div>
{%= editScripts() %} {%= editScripts() %}
{% endfunc %} {% endfunc %}
@ -94,7 +92,6 @@
{% code {% code
lc := l18n.FromRequest(rq) lc := l18n.FromRequest(rq)
%} %}
<div class="layout">
<main class="main-width edit edit_with-preview"> <main class="main-width edit edit_with-preview">
<h1 class="edit__title">{%s= fmt.Sprintf(lc.Get("edit.title"), beautifulLink(hyphaName)) %}</h1> <h1 class="edit__title">{%s= fmt.Sprintf(lc.Get("edit.title"), beautifulLink(hyphaName)) %}</h1>
{%s= warning %} {%s= warning %}
@ -113,7 +110,6 @@
<article class="edit__preview">{%s= renderedPage %}</article> <article class="edit__preview">{%s= renderedPage %}</article>
</main> </main>
{%s= Toolbar(user.FromRequest(rq), lc) %} {%s= Toolbar(user.FromRequest(rq), lc) %}
</div>
{%= editScripts() %} {%= editScripts() %}
{% endfunc %} {% endfunc %}

View File

@ -189,262 +189,258 @@ func StreamEditor(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAr
//line views/mutators.qtpl:71 //line views/mutators.qtpl:71
qw422016.N().S(` qw422016.N().S(`
<div class="layout">
<main class="main-width edit edit_no-preview"> <main class="main-width edit edit_no-preview">
<h1 class="edit__title">`) <h1 class="edit__title">`)
//line views/mutators.qtpl:74 //line views/mutators.qtpl:73
qw422016.N().S(fmt.Sprintf(lc.Get("edit.title"), beautifulLink(hyphaName))) qw422016.N().S(fmt.Sprintf(lc.Get("edit.title"), beautifulLink(hyphaName)))
//line views/mutators.qtpl:74 //line views/mutators.qtpl:73
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
`) `)
//line views/mutators.qtpl:75 //line views/mutators.qtpl:74
qw422016.N().S(warning) qw422016.N().S(warning)
//line views/mutators.qtpl:75 //line views/mutators.qtpl:74
qw422016.N().S(` qw422016.N().S(`
<form method="post" class="edit-form" <form method="post" class="edit-form"
action="/upload-text/`) action="/upload-text/`)
//line views/mutators.qtpl:77 //line views/mutators.qtpl:76
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line views/mutators.qtpl:77 //line views/mutators.qtpl:76
qw422016.N().S(`"> qw422016.N().S(`">
<textarea name="text" class="edit-form__textarea" autofocus>`) <textarea name="text" class="edit-form__textarea" autofocus>`)
//line views/mutators.qtpl:78 //line views/mutators.qtpl:77
qw422016.E().S(textAreaFill) qw422016.E().S(textAreaFill)
//line views/mutators.qtpl:78 //line views/mutators.qtpl:77
qw422016.N().S(`</textarea> qw422016.N().S(`</textarea>
<br><br> <br><br>
<label for="text">`) <label for="text">`)
//line views/mutators.qtpl:80 //line views/mutators.qtpl:79
qw422016.E().S(lc.Get("edit.tag")) qw422016.E().S(lc.Get("edit.tag"))
//line views/mutators.qtpl:80 //line views/mutators.qtpl:79
qw422016.N().S(`</label><br> qw422016.N().S(`</label><br>
<input id="text" type="text" name="message" class="edit-form__message"> <input id="text" type="text" name="message" class="edit-form__message">
<br><br> <br><br>
<button type="submit" name="action" class="btn btn_accent edit-form__save" value="Save">`) <button type="submit" name="action" class="btn btn_accent edit-form__save" value="Save">`)
//line views/mutators.qtpl:83 //line views/mutators.qtpl:82
qw422016.E().S(lc.Get("edit.save")) qw422016.E().S(lc.Get("edit.save"))
//line views/mutators.qtpl:83 //line views/mutators.qtpl:82
qw422016.N().S(`</button> qw422016.N().S(`</button>
<button type="submit" name="action" class="btn edit-form__preview" value="Preview">`) <button type="submit" name="action" class="btn edit-form__preview" value="Preview">`)
//line views/mutators.qtpl:84 //line views/mutators.qtpl:83
qw422016.E().S(lc.Get("edit.preview")) qw422016.E().S(lc.Get("edit.preview"))
//line views/mutators.qtpl:84 //line views/mutators.qtpl:83
qw422016.N().S(`</button> qw422016.N().S(`</button>
<a href="/hypha/`) <a href="/hypha/`)
//line views/mutators.qtpl:85 //line views/mutators.qtpl:84
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line views/mutators.qtpl:85 //line views/mutators.qtpl:84
qw422016.N().S(`" class="btn btn_weak">`) qw422016.N().S(`" class="btn btn_weak">`)
//line views/mutators.qtpl:85 //line views/mutators.qtpl:84
qw422016.E().S(lc.Get("ui.cancel")) qw422016.E().S(lc.Get("ui.cancel"))
//line views/mutators.qtpl:85 //line views/mutators.qtpl:84
qw422016.N().S(`</a> qw422016.N().S(`</a>
</form> </form>
</main> </main>
`) `)
//line views/mutators.qtpl:88 //line views/mutators.qtpl:87
qw422016.N().S(Toolbar(user.FromRequest(rq), lc)) qw422016.N().S(Toolbar(user.FromRequest(rq), lc))
//line views/mutators.qtpl:87
qw422016.N().S(`
`)
//line views/mutators.qtpl:88
streameditScripts(qw422016)
//line views/mutators.qtpl:88 //line views/mutators.qtpl:88
qw422016.N().S(` qw422016.N().S(`
</div>
`) `)
//line views/mutators.qtpl:90 //line views/mutators.qtpl:89
streameditScripts(qw422016)
//line views/mutators.qtpl:90
qw422016.N().S(`
`)
//line views/mutators.qtpl:91
} }
//line views/mutators.qtpl:91 //line views/mutators.qtpl:89
func WriteEditor(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) { func WriteEditor(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) {
//line views/mutators.qtpl:91 //line views/mutators.qtpl:89
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/mutators.qtpl:91 //line views/mutators.qtpl:89
StreamEditor(qw422016, rq, hyphaName, textAreaFill, warning) StreamEditor(qw422016, rq, hyphaName, textAreaFill, warning)
//line views/mutators.qtpl:91 //line views/mutators.qtpl:89
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/mutators.qtpl:91 //line views/mutators.qtpl:89
} }
//line views/mutators.qtpl:91 //line views/mutators.qtpl:89
func Editor(rq *http.Request, hyphaName, textAreaFill, warning string) string { func Editor(rq *http.Request, hyphaName, textAreaFill, warning string) string {
//line views/mutators.qtpl:91 //line views/mutators.qtpl:89
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/mutators.qtpl:91 //line views/mutators.qtpl:89
WriteEditor(qb422016, rq, hyphaName, textAreaFill, warning) WriteEditor(qb422016, rq, hyphaName, textAreaFill, warning)
//line views/mutators.qtpl:91 //line views/mutators.qtpl:89
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/mutators.qtpl:91 //line views/mutators.qtpl:89
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/mutators.qtpl:91 //line views/mutators.qtpl:89
return qs422016 return qs422016
//line views/mutators.qtpl:91 //line views/mutators.qtpl:89
} }
//line views/mutators.qtpl:93 //line views/mutators.qtpl:91
func StreamPreview(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) { func StreamPreview(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) {
//line views/mutators.qtpl:93 //line views/mutators.qtpl:91
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/mutators.qtpl:95 //line views/mutators.qtpl:93
lc := l18n.FromRequest(rq) lc := l18n.FromRequest(rq)
//line views/mutators.qtpl:96 //line views/mutators.qtpl:94
qw422016.N().S(` qw422016.N().S(`
<div class="layout">
<main class="main-width edit edit_with-preview"> <main class="main-width edit edit_with-preview">
<h1 class="edit__title">`) <h1 class="edit__title">`)
//line views/mutators.qtpl:99 //line views/mutators.qtpl:96
qw422016.N().S(fmt.Sprintf(lc.Get("edit.title"), beautifulLink(hyphaName))) qw422016.N().S(fmt.Sprintf(lc.Get("edit.title"), beautifulLink(hyphaName)))
//line views/mutators.qtpl:99 //line views/mutators.qtpl:96
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
`) `)
//line views/mutators.qtpl:100 //line views/mutators.qtpl:97
qw422016.N().S(warning) qw422016.N().S(warning)
//line views/mutators.qtpl:100 //line views/mutators.qtpl:97
qw422016.N().S(` qw422016.N().S(`
<form method="post" class="edit-form" <form method="post" class="edit-form"
action="/upload-text/`) action="/upload-text/`)
//line views/mutators.qtpl:102 //line views/mutators.qtpl:99
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line views/mutators.qtpl:102 //line views/mutators.qtpl:99
qw422016.N().S(`"> qw422016.N().S(`">
<textarea name="text" class="edit-form__textarea" autofocus>`) <textarea name="text" class="edit-form__textarea" autofocus>`)
//line views/mutators.qtpl:103 //line views/mutators.qtpl:100
qw422016.E().S(textAreaFill) qw422016.E().S(textAreaFill)
//line views/mutators.qtpl:103 //line views/mutators.qtpl:100
qw422016.N().S(`</textarea> qw422016.N().S(`</textarea>
<br><br> <br><br>
<label for="text">`) <label for="text">`)
//line views/mutators.qtpl:105 //line views/mutators.qtpl:102
qw422016.E().S(lc.Get("edit.tag")) qw422016.E().S(lc.Get("edit.tag"))
//line views/mutators.qtpl:105 //line views/mutators.qtpl:102
qw422016.N().S(`</label><br> qw422016.N().S(`</label><br>
<input id="text" type="text" name="message" class="edit-form__message" value="`) <input id="text" type="text" name="message" class="edit-form__message" value="`)
//line views/mutators.qtpl:106 //line views/mutators.qtpl:103
qw422016.E().S(message) qw422016.E().S(message)
//line views/mutators.qtpl:106 //line views/mutators.qtpl:103
qw422016.N().S(`"> qw422016.N().S(`">
<br><br> <br><br>
<button type="submit" name="action" class="btn btn_accent edit-form__save" value="Save">`) <button type="submit" name="action" class="btn btn_accent edit-form__save" value="Save">`)
//line views/mutators.qtpl:108 //line views/mutators.qtpl:105
qw422016.E().S(lc.Get("edit.save")) qw422016.E().S(lc.Get("edit.save"))
//line views/mutators.qtpl:108 //line views/mutators.qtpl:105
qw422016.N().S(`</button> qw422016.N().S(`</button>
<button type="submit" name="action" class="btn edit-form__preview" value="Preview">`) <button type="submit" name="action" class="btn edit-form__preview" value="Preview">`)
//line views/mutators.qtpl:109 //line views/mutators.qtpl:106
qw422016.E().S(lc.Get("edit.preview")) qw422016.E().S(lc.Get("edit.preview"))
//line views/mutators.qtpl:109 //line views/mutators.qtpl:106
qw422016.N().S(`</button> qw422016.N().S(`</button>
<a href="/hypha/`) <a href="/hypha/`)
//line views/mutators.qtpl:110 //line views/mutators.qtpl:107
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line views/mutators.qtpl:110 //line views/mutators.qtpl:107
qw422016.N().S(`" class="btn btn_weak">`) qw422016.N().S(`" class="btn btn_weak">`)
//line views/mutators.qtpl:110 //line views/mutators.qtpl:107
qw422016.E().S(lc.Get("ui.cancel")) qw422016.E().S(lc.Get("ui.cancel"))
//line views/mutators.qtpl:110 //line views/mutators.qtpl:107
qw422016.N().S(`</a> qw422016.N().S(`</a>
</form> </form>
<p class="warning">`) <p class="warning">`)
//line views/mutators.qtpl:112 //line views/mutators.qtpl:109
qw422016.E().S(lc.Get("edit.preview_tip")) qw422016.E().S(lc.Get("edit.preview_tip"))
//line views/mutators.qtpl:112 //line views/mutators.qtpl:109
qw422016.N().S(`</p> qw422016.N().S(`</p>
<article class="edit__preview">`) <article class="edit__preview">`)
//line views/mutators.qtpl:113 //line views/mutators.qtpl:110
qw422016.N().S(renderedPage) qw422016.N().S(renderedPage)
//line views/mutators.qtpl:113 //line views/mutators.qtpl:110
qw422016.N().S(`</article> qw422016.N().S(`</article>
</main> </main>
`) `)
//line views/mutators.qtpl:115 //line views/mutators.qtpl:112
qw422016.N().S(Toolbar(user.FromRequest(rq), lc)) qw422016.N().S(Toolbar(user.FromRequest(rq), lc))
//line views/mutators.qtpl:115 //line views/mutators.qtpl:112
qw422016.N().S(` qw422016.N().S(`
</div>
`) `)
//line views/mutators.qtpl:117 //line views/mutators.qtpl:113
streameditScripts(qw422016) streameditScripts(qw422016)
//line views/mutators.qtpl:117 //line views/mutators.qtpl:113
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/mutators.qtpl:118 //line views/mutators.qtpl:114
} }
//line views/mutators.qtpl:118 //line views/mutators.qtpl:114
func WritePreview(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) { func WritePreview(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) {
//line views/mutators.qtpl:118 //line views/mutators.qtpl:114
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/mutators.qtpl:118 //line views/mutators.qtpl:114
StreamPreview(qw422016, rq, hyphaName, textAreaFill, message, warning, renderedPage) StreamPreview(qw422016, rq, hyphaName, textAreaFill, message, warning, renderedPage)
//line views/mutators.qtpl:118 //line views/mutators.qtpl:114
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/mutators.qtpl:118 //line views/mutators.qtpl:114
} }
//line views/mutators.qtpl:118 //line views/mutators.qtpl:114
func Preview(rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) string { func Preview(rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) string {
//line views/mutators.qtpl:118 //line views/mutators.qtpl:114
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/mutators.qtpl:118 //line views/mutators.qtpl:114
WritePreview(qb422016, rq, hyphaName, textAreaFill, message, warning, renderedPage) WritePreview(qb422016, rq, hyphaName, textAreaFill, message, warning, renderedPage)
//line views/mutators.qtpl:118 //line views/mutators.qtpl:114
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/mutators.qtpl:118 //line views/mutators.qtpl:114
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/mutators.qtpl:118 //line views/mutators.qtpl:114
return qs422016 return qs422016
//line views/mutators.qtpl:118 //line views/mutators.qtpl:114
} }
//line views/mutators.qtpl:120 //line views/mutators.qtpl:116
func streameditScripts(qw422016 *qt422016.Writer) { func streameditScripts(qw422016 *qt422016.Writer) {
//line views/mutators.qtpl:120 //line views/mutators.qtpl:116
qw422016.N().S(` qw422016.N().S(`
<script src="/static/editor.js"></script> <script src="/static/editor.js"></script>
`) `)
//line views/mutators.qtpl:122 //line views/mutators.qtpl:118
for _, scriptPath := range cfg.EditScripts { for _, scriptPath := range cfg.EditScripts {
//line views/mutators.qtpl:122 //line views/mutators.qtpl:118
qw422016.N().S(` qw422016.N().S(`
<script src="`) <script src="`)
//line views/mutators.qtpl:123 //line views/mutators.qtpl:119
qw422016.E().S(scriptPath) qw422016.E().S(scriptPath)
//line views/mutators.qtpl:123 //line views/mutators.qtpl:119
qw422016.N().S(`"></script> qw422016.N().S(`"></script>
`) `)
//line views/mutators.qtpl:124 //line views/mutators.qtpl:120
} }
//line views/mutators.qtpl:124 //line views/mutators.qtpl:120
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/mutators.qtpl:125 //line views/mutators.qtpl:121
} }
//line views/mutators.qtpl:125 //line views/mutators.qtpl:121
func writeeditScripts(qq422016 qtio422016.Writer) { func writeeditScripts(qq422016 qtio422016.Writer) {
//line views/mutators.qtpl:125 //line views/mutators.qtpl:121
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/mutators.qtpl:125 //line views/mutators.qtpl:121
streameditScripts(qw422016) streameditScripts(qw422016)
//line views/mutators.qtpl:125 //line views/mutators.qtpl:121
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/mutators.qtpl:125 //line views/mutators.qtpl:121
} }
//line views/mutators.qtpl:125 //line views/mutators.qtpl:121
func editScripts() string { func editScripts() string {
//line views/mutators.qtpl:125 //line views/mutators.qtpl:121
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/mutators.qtpl:125 //line views/mutators.qtpl:121
writeeditScripts(qb422016) writeeditScripts(qb422016)
//line views/mutators.qtpl:125 //line views/mutators.qtpl:121
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/mutators.qtpl:125 //line views/mutators.qtpl:121
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/mutators.qtpl:125 //line views/mutators.qtpl:121
return qs422016 return qs422016
//line views/mutators.qtpl:125 //line views/mutators.qtpl:121
} }

View File

@ -17,7 +17,6 @@
{% code {% code
lc := l18n.FromRequest(rq) lc := l18n.FromRequest(rq)
%} %}
<div class="layout">
<main class="main-width media-tab"> <main class="main-width media-tab">
<h1>{%s= lc.Get("ui.media_title", &l18n.Replacements{"name": beautifulLink(h.CanonicalName())}) %}</h1> <h1>{%s= lc.Get("ui.media_title", &l18n.Replacements{"name": beautifulLink(h.CanonicalName())}) %}</h1>
{% switch h.(type) %} {% switch h.(type) %}
@ -81,7 +80,6 @@
</section> </section>
</main> </main>
</div>
{% endfunc %} {% endfunc %}
If `contents` == "", a helpful message is shown instead. If `contents` == "", a helpful message is shown instead.
@ -92,7 +90,6 @@ If you rename .prevnext, change the docs too.
siblings, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.CanonicalName()) siblings, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.CanonicalName())
lc := meta.Lc lc := meta.Lc
%} %}
<div class="layout">
<main class="main-width"> <main class="main-width">
<section id="hypha"> <section id="hypha">
{% if meta.U.CanProceed("edit") %} {% if meta.U.CanProceed("edit") %}
@ -135,12 +132,10 @@ If you rename .prevnext, change the docs too.
</main> </main>
{%s= categories.CategoryCard(meta, h.CanonicalName()) %} {%s= categories.CategoryCard(meta, h.CanonicalName()) %}
{%= siblingHyphae(siblings, meta.Lc) %} {%= siblingHyphae(siblings, meta.Lc) %}
</div>
{%= viewScripts() %} {%= viewScripts() %}
{% endfunc %} {% endfunc %}
{% func Revision(rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) %} {% func Revision(rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) %}
<div class="layout">
<main class="main-width"> <main class="main-width">
<section> <section>
<p>{%s lc.Get("ui.revision_warning") %} <a href="/rev-text/{%s revHash %}/{%s h.CanonicalName() %}">{%s lc.Get("ui.revision_link") %}</a></p> <p>{%s lc.Get("ui.revision_warning") %} <a href="/rev-text/{%s revHash %}/{%s h.CanonicalName() %}">{%s lc.Get("ui.revision_link") %}</a></p>
@ -148,7 +143,6 @@ If you rename .prevnext, change the docs too.
{%s= contents %} {%s= contents %}
</section> </section>
</main> </main>
</div>
{%= viewScripts() %} {%= viewScripts() %}
{% endfunc %} {% endfunc %}

View File

@ -66,576 +66,570 @@ func StreamMediaMenu(qw422016 *qt422016.Writer, rq *http.Request, h hyphae.Hypha
//line views/readers.qtpl:19 //line views/readers.qtpl:19
qw422016.N().S(` qw422016.N().S(`
<div class="layout">
<main class="main-width media-tab"> <main class="main-width media-tab">
<h1>`) <h1>`)
//line views/readers.qtpl:22 //line views/readers.qtpl:21
qw422016.N().S(lc.Get("ui.media_title", &l18n.Replacements{"name": beautifulLink(h.CanonicalName())})) qw422016.N().S(lc.Get("ui.media_title", &l18n.Replacements{"name": beautifulLink(h.CanonicalName())}))
//line views/readers.qtpl:22 //line views/readers.qtpl:21
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
`) `)
//line views/readers.qtpl:23 //line views/readers.qtpl:22
switch h.(type) { switch h.(type) {
//line views/readers.qtpl:24 //line views/readers.qtpl:23
case *hyphae.MediaHypha: case *hyphae.MediaHypha:
//line views/readers.qtpl:23
qw422016.N().S(`
<p class="explanation">`)
//line views/readers.qtpl:24 //line views/readers.qtpl:24
qw422016.N().S(`
<p class="explanation">`)
//line views/readers.qtpl:25
qw422016.E().S(lc.Get("ui.media_tip")) qw422016.E().S(lc.Get("ui.media_tip"))
//line views/readers.qtpl:25 //line views/readers.qtpl:24
qw422016.N().S(` <a href="/help/en/media" class="shy-link">`) qw422016.N().S(` <a href="/help/en/media" class="shy-link">`)
//line views/readers.qtpl:25 //line views/readers.qtpl:24
qw422016.E().S(lc.Get("ui.media_what_is")) qw422016.E().S(lc.Get("ui.media_what_is"))
//line views/readers.qtpl:25 //line views/readers.qtpl:24
qw422016.N().S(`</a></p> qw422016.N().S(`</a></p>
`) `)
//line views/readers.qtpl:26 //line views/readers.qtpl:25
default: default:
//line views/readers.qtpl:26 //line views/readers.qtpl:25
qw422016.N().S(` qw422016.N().S(`
<p class="explanation">`) <p class="explanation">`)
//line views/readers.qtpl:27 //line views/readers.qtpl:26
qw422016.E().S(lc.Get("ui.media_empty")) qw422016.E().S(lc.Get("ui.media_empty"))
//line views/readers.qtpl:27 //line views/readers.qtpl:26
qw422016.N().S(` <a href="/help/en/media" class="shy-link">`) qw422016.N().S(` <a href="/help/en/media" class="shy-link">`)
//line views/readers.qtpl:27 //line views/readers.qtpl:26
qw422016.E().S(lc.Get("ui.media_what_is")) qw422016.E().S(lc.Get("ui.media_what_is"))
//line views/readers.qtpl:27 //line views/readers.qtpl:26
qw422016.N().S(`</a></p> qw422016.N().S(`</a></p>
`) `)
//line views/readers.qtpl:28 //line views/readers.qtpl:27
} }
//line views/readers.qtpl:28 //line views/readers.qtpl:27
qw422016.N().S(` qw422016.N().S(`
<section class="amnt-grid"> <section class="amnt-grid">
`) `)
//line views/readers.qtpl:31 //line views/readers.qtpl:30
switch h := h.(type) { switch h := h.(type) {
//line views/readers.qtpl:32 //line views/readers.qtpl:31
case *hyphae.MediaHypha: case *hyphae.MediaHypha:
//line views/readers.qtpl:32 //line views/readers.qtpl:31
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:34 //line views/readers.qtpl:33
mime := mimetype.FromExtension(path.Ext(h.MediaFilePath())) mime := mimetype.FromExtension(path.Ext(h.MediaFilePath()))
fileinfo, err := os.Stat(h.MediaFilePath()) fileinfo, err := os.Stat(h.MediaFilePath())
//line views/readers.qtpl:35 //line views/readers.qtpl:34
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:36 //line views/readers.qtpl:35
if err == nil { if err == nil {
//line views/readers.qtpl:36 //line views/readers.qtpl:35
qw422016.N().S(` qw422016.N().S(`
<fieldset class="amnt-menu-block"> <fieldset class="amnt-menu-block">
<legend class="modal__title modal__title_small">`) <legend class="modal__title modal__title_small">`)
//line views/readers.qtpl:38 //line views/readers.qtpl:37
qw422016.E().S(lc.Get("ui.media_stat")) qw422016.E().S(lc.Get("ui.media_stat"))
//line views/readers.qtpl:38 //line views/readers.qtpl:37
qw422016.N().S(`</legend> qw422016.N().S(`</legend>
<p class="modal__confirmation-msg"><b>`) <p class="modal__confirmation-msg"><b>`)
//line views/readers.qtpl:39 //line views/readers.qtpl:38
qw422016.E().S(lc.Get("ui.media_stat_size")) qw422016.E().S(lc.Get("ui.media_stat_size"))
//line views/readers.qtpl:39 //line views/readers.qtpl:38
qw422016.N().S(`</b> `) qw422016.N().S(`</b> `)
//line views/readers.qtpl:39 //line views/readers.qtpl:38
qw422016.E().S(lc.GetPlural64("ui.media_size_value", fileinfo.Size())) qw422016.E().S(lc.GetPlural64("ui.media_size_value", fileinfo.Size()))
//line views/readers.qtpl:39 //line views/readers.qtpl:38
qw422016.N().S(`</p> qw422016.N().S(`</p>
<p><b>`) <p><b>`)
//line views/readers.qtpl:40 //line views/readers.qtpl:39
qw422016.E().S(lc.Get("ui.media_stat_mime")) qw422016.E().S(lc.Get("ui.media_stat_mime"))
//line views/readers.qtpl:40 //line views/readers.qtpl:39
qw422016.N().S(`</b> `) qw422016.N().S(`</b> `)
//line views/readers.qtpl:40 //line views/readers.qtpl:39
qw422016.E().S(mime) qw422016.E().S(mime)
//line views/readers.qtpl:40 //line views/readers.qtpl:39
qw422016.N().S(`</p> qw422016.N().S(`</p>
</fieldset> </fieldset>
`) `)
//line views/readers.qtpl:42 //line views/readers.qtpl:41
} }
//line views/readers.qtpl:42 //line views/readers.qtpl:41
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:44 //line views/readers.qtpl:43
if strings.HasPrefix(mime, "image/") { if strings.HasPrefix(mime, "image/") {
//line views/readers.qtpl:44 //line views/readers.qtpl:43
qw422016.N().S(` qw422016.N().S(`
<fieldset class="amnt-menu-block"> <fieldset class="amnt-menu-block">
<legend class="modal__title modal__title_small">`) <legend class="modal__title modal__title_small">`)
//line views/readers.qtpl:46 //line views/readers.qtpl:45
qw422016.E().S(lc.Get("ui.media_include")) qw422016.E().S(lc.Get("ui.media_include"))
//line views/readers.qtpl:46 //line views/readers.qtpl:45
qw422016.N().S(`</legend> qw422016.N().S(`</legend>
<p class="modal__confirmation-msg">`) <p class="modal__confirmation-msg">`)
//line views/readers.qtpl:47 //line views/readers.qtpl:46
qw422016.E().S(lc.Get("ui.media_include_tip")) qw422016.E().S(lc.Get("ui.media_include_tip"))
//line views/readers.qtpl:47 //line views/readers.qtpl:46
qw422016.N().S(`</p> qw422016.N().S(`</p>
<pre class="codeblock"><code>img { `) <pre class="codeblock"><code>img { `)
//line views/readers.qtpl:48 //line views/readers.qtpl:47
qw422016.E().S(h.CanonicalName()) qw422016.E().S(h.CanonicalName())
//line views/readers.qtpl:48 //line views/readers.qtpl:47
qw422016.N().S(` }</code></pre> qw422016.N().S(` }</code></pre>
</fieldset> </fieldset>
`) `)
//line views/readers.qtpl:50 //line views/readers.qtpl:49
} }
//line views/readers.qtpl:50 //line views/readers.qtpl:49
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:51 //line views/readers.qtpl:50
} }
//line views/readers.qtpl:51 //line views/readers.qtpl:50
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:53 //line views/readers.qtpl:52
if u.CanProceed("upload-binary") { if u.CanProceed("upload-binary") {
//line views/readers.qtpl:53 //line views/readers.qtpl:52
qw422016.N().S(` qw422016.N().S(`
<form action="/upload-binary/`) <form action="/upload-binary/`)
//line views/readers.qtpl:54 //line views/readers.qtpl:53
qw422016.E().S(h.CanonicalName()) qw422016.E().S(h.CanonicalName())
//line views/readers.qtpl:54 //line views/readers.qtpl:53
qw422016.N().S(`" qw422016.N().S(`"
method="post" enctype="multipart/form-data" method="post" enctype="multipart/form-data"
class="upload-binary modal amnt-menu-block"> class="upload-binary modal amnt-menu-block">
<fieldset class="modal__fieldset"> <fieldset class="modal__fieldset">
<legend class="modal__title modal__title_small">`) <legend class="modal__title modal__title_small">`)
//line views/readers.qtpl:58 //line views/readers.qtpl:57
qw422016.E().S(lc.Get("ui.media_new")) qw422016.E().S(lc.Get("ui.media_new"))
//line views/readers.qtpl:58 //line views/readers.qtpl:57
qw422016.N().S(`</legend> qw422016.N().S(`</legend>
<p class="modal__confirmation-msg">`) <p class="modal__confirmation-msg">`)
//line views/readers.qtpl:59 //line views/readers.qtpl:58
qw422016.E().S(lc.Get("ui.media_new_tip")) qw422016.E().S(lc.Get("ui.media_new_tip"))
//line views/readers.qtpl:59 //line views/readers.qtpl:58
qw422016.N().S(`</p> qw422016.N().S(`</p>
<label for="upload-binary__input"></label> <label for="upload-binary__input"></label>
<input type="file" id="upload-binary__input" name="binary"> <input type="file" id="upload-binary__input" name="binary">
<button type="submit" class="btn stick-to-bottom" value="Upload">`) <button type="submit" class="btn stick-to-bottom" value="Upload">`)
//line views/readers.qtpl:63 //line views/readers.qtpl:62
qw422016.E().S(lc.Get("ui.media_upload")) qw422016.E().S(lc.Get("ui.media_upload"))
//line views/readers.qtpl:63 //line views/readers.qtpl:62
qw422016.N().S(`</button> qw422016.N().S(`</button>
</fieldset> </fieldset>
</form> </form>
`) `)
//line views/readers.qtpl:66 //line views/readers.qtpl:65
} }
//line views/readers.qtpl:66 //line views/readers.qtpl:65
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:69 //line views/readers.qtpl:68
switch h := h.(type) { switch h := h.(type) {
//line views/readers.qtpl:70 //line views/readers.qtpl:69
case *hyphae.MediaHypha: case *hyphae.MediaHypha:
//line views/readers.qtpl:70 //line views/readers.qtpl:69
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:71 //line views/readers.qtpl:70
if u.CanProceed("remove-media") { if u.CanProceed("remove-media") {
//line views/readers.qtpl:71 //line views/readers.qtpl:70
qw422016.N().S(` qw422016.N().S(`
<form action="/remove-media/`) <form action="/remove-media/`)
//line views/readers.qtpl:72 //line views/readers.qtpl:71
qw422016.E().S(h.CanonicalName()) qw422016.E().S(h.CanonicalName())
//line views/readers.qtpl:72 //line views/readers.qtpl:71
qw422016.N().S(`" method="post" class="modal amnt-menu-block" method="POST"> qw422016.N().S(`" method="post" class="modal amnt-menu-block" method="POST">
<fieldset class="modal__fieldset"> <fieldset class="modal__fieldset">
<legend class="modal__title modal__title_small">`) <legend class="modal__title modal__title_small">`)
//line views/readers.qtpl:74 //line views/readers.qtpl:73
qw422016.E().S(lc.Get("ui.media_remove")) qw422016.E().S(lc.Get("ui.media_remove"))
//line views/readers.qtpl:74 //line views/readers.qtpl:73
qw422016.N().S(`</legend> qw422016.N().S(`</legend>
<p class="modal__confirmation-msg">`) <p class="modal__confirmation-msg">`)
//line views/readers.qtpl:75 //line views/readers.qtpl:74
qw422016.E().S(lc.Get("ui.media_remove_tip")) qw422016.E().S(lc.Get("ui.media_remove_tip"))
//line views/readers.qtpl:75 //line views/readers.qtpl:74
qw422016.N().S(`</p> qw422016.N().S(`</p>
<button type="submit" class="btn" value="Remove media">`) <button type="submit" class="btn" value="Remove media">`)
//line views/readers.qtpl:76 //line views/readers.qtpl:75
qw422016.E().S(lc.Get("ui.media_remove_button")) qw422016.E().S(lc.Get("ui.media_remove_button"))
//line views/readers.qtpl:76 //line views/readers.qtpl:75
qw422016.N().S(`</button> qw422016.N().S(`</button>
</fieldset> </fieldset>
</form> </form>
`) `)
//line views/readers.qtpl:79 //line views/readers.qtpl:78
} }
//line views/readers.qtpl:79 //line views/readers.qtpl:78
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:80 //line views/readers.qtpl:79
} }
//line views/readers.qtpl:80 //line views/readers.qtpl:79
qw422016.N().S(` qw422016.N().S(`
</section> </section>
</main> </main>
</div>
`) `)
//line views/readers.qtpl:85 //line views/readers.qtpl:83
} }
//line views/readers.qtpl:85 //line views/readers.qtpl:83
func WriteMediaMenu(qq422016 qtio422016.Writer, rq *http.Request, h hyphae.Hypha, u *user.User) { func WriteMediaMenu(qq422016 qtio422016.Writer, rq *http.Request, h hyphae.Hypha, u *user.User) {
//line views/readers.qtpl:85 //line views/readers.qtpl:83
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/readers.qtpl:85 //line views/readers.qtpl:83
StreamMediaMenu(qw422016, rq, h, u) StreamMediaMenu(qw422016, rq, h, u)
//line views/readers.qtpl:85 //line views/readers.qtpl:83
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/readers.qtpl:85 //line views/readers.qtpl:83
} }
//line views/readers.qtpl:85 //line views/readers.qtpl:83
func MediaMenu(rq *http.Request, h hyphae.Hypha, u *user.User) string { func MediaMenu(rq *http.Request, h hyphae.Hypha, u *user.User) string {
//line views/readers.qtpl:85 //line views/readers.qtpl:83
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/readers.qtpl:85 //line views/readers.qtpl:83
WriteMediaMenu(qb422016, rq, h, u) WriteMediaMenu(qb422016, rq, h, u)
//line views/readers.qtpl:85 //line views/readers.qtpl:83
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/readers.qtpl:85 //line views/readers.qtpl:83
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/readers.qtpl:85 //line views/readers.qtpl:83
return qs422016 return qs422016
//line views/readers.qtpl:85 //line views/readers.qtpl:83
} }
// If `contents` == "", a helpful message is shown instead. // If `contents` == "", a helpful message is shown instead.
// //
// If you rename .prevnext, change the docs too. // If you rename .prevnext, change the docs too.
//line views/readers.qtpl:90 //line views/readers.qtpl:88
func StreamHypha(qw422016 *qt422016.Writer, meta viewutil.Meta, h hyphae.Hypha, contents string) { func StreamHypha(qw422016 *qt422016.Writer, meta viewutil.Meta, h hyphae.Hypha, contents string) {
//line views/readers.qtpl:90 //line views/readers.qtpl:88
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:92 //line views/readers.qtpl:90
siblings, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.CanonicalName()) siblings, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.CanonicalName())
lc := meta.Lc lc := meta.Lc
//line views/readers.qtpl:94 //line views/readers.qtpl:92
qw422016.N().S(` qw422016.N().S(`
<div class="layout">
<main class="main-width"> <main class="main-width">
<section id="hypha"> <section id="hypha">
`) `)
//line views/readers.qtpl:98 //line views/readers.qtpl:95
if meta.U.CanProceed("edit") { if meta.U.CanProceed("edit") {
//line views/readers.qtpl:98 //line views/readers.qtpl:95
qw422016.N().S(` qw422016.N().S(`
<div class="btn btn_navititle"> <div class="btn btn_navititle">
<a class="btn__link_navititle" href="/edit/`) <a class="btn__link_navititle" href="/edit/`)
//line views/readers.qtpl:100 //line views/readers.qtpl:97
qw422016.E().S(h.CanonicalName()) qw422016.E().S(h.CanonicalName())
//line views/readers.qtpl:100 //line views/readers.qtpl:97
qw422016.N().S(`">`) qw422016.N().S(`">`)
//line views/readers.qtpl:100 //line views/readers.qtpl:97
qw422016.E().S(lc.Get("ui.edit_link")) qw422016.E().S(lc.Get("ui.edit_link"))
//line views/readers.qtpl:100 //line views/readers.qtpl:97
qw422016.N().S(`</a> qw422016.N().S(`</a>
</div> </div>
`) `)
//line views/readers.qtpl:102 //line views/readers.qtpl:99
} }
//line views/readers.qtpl:102 //line views/readers.qtpl:99
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:104 //line views/readers.qtpl:101
if cfg.UseAuth && util.IsProfileName(h.CanonicalName()) && meta.U.Name == strings.TrimPrefix(h.CanonicalName(), cfg.UserHypha+"/") { if cfg.UseAuth && util.IsProfileName(h.CanonicalName()) && meta.U.Name == strings.TrimPrefix(h.CanonicalName(), cfg.UserHypha+"/") {
//line views/readers.qtpl:104 //line views/readers.qtpl:101
qw422016.N().S(` qw422016.N().S(`
<div class="btn btn_navititle"> <div class="btn btn_navititle">
<a class="btn__link_navititle" href="/logout">`) <a class="btn__link_navititle" href="/logout">`)
//line views/readers.qtpl:106 //line views/readers.qtpl:103
qw422016.E().S(lc.Get("ui.logout_link")) qw422016.E().S(lc.Get("ui.logout_link"))
//line views/readers.qtpl:106 //line views/readers.qtpl:103
qw422016.N().S(`</a> qw422016.N().S(`</a>
</div> </div>
`) `)
//line views/readers.qtpl:108 //line views/readers.qtpl:105
if meta.U.Group == "admin" { if meta.U.Group == "admin" {
//line views/readers.qtpl:108 //line views/readers.qtpl:105
qw422016.N().S(` qw422016.N().S(`
<div class="btn btn_navititle"> <div class="btn btn_navititle">
<a class="btn__link_navititle" href="/admin">`) <a class="btn__link_navititle" href="/admin">`)
//line views/readers.qtpl:110 //line views/readers.qtpl:107
qw422016.E().S(lc.Get("ui.admin_panel")) qw422016.E().S(lc.Get("ui.admin_panel"))
//line views/readers.qtpl:110 //line views/readers.qtpl:107
qw422016.N().S(`<a> qw422016.N().S(`<a>
</div> </div>
`) `)
//line views/readers.qtpl:112 //line views/readers.qtpl:109
} }
//line views/readers.qtpl:112 //line views/readers.qtpl:109
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:113 //line views/readers.qtpl:110
} }
//line views/readers.qtpl:113 //line views/readers.qtpl:110
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:115 //line views/readers.qtpl:112
qw422016.N().S(NaviTitle(h)) qw422016.N().S(NaviTitle(h))
//line views/readers.qtpl:112
qw422016.N().S(`
`)
//line views/readers.qtpl:113
switch h.(type) {
//line views/readers.qtpl:114
case *hyphae.EmptyHypha:
//line views/readers.qtpl:114
qw422016.N().S(`
`)
//line views/readers.qtpl:115
streamnonExistentHyphaNotice(qw422016, h, meta.U, meta.Lc)
//line views/readers.qtpl:115 //line views/readers.qtpl:115
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:116 //line views/readers.qtpl:116
switch h.(type) {
//line views/readers.qtpl:117
case *hyphae.EmptyHypha:
//line views/readers.qtpl:117
qw422016.N().S(`
`)
//line views/readers.qtpl:118
streamnonExistentHyphaNotice(qw422016, h, meta.U, meta.Lc)
//line views/readers.qtpl:118
qw422016.N().S(`
`)
//line views/readers.qtpl:119
default: default:
//line views/readers.qtpl:119 //line views/readers.qtpl:116
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:120 //line views/readers.qtpl:117
qw422016.N().S(contents) qw422016.N().S(contents)
//line views/readers.qtpl:120 //line views/readers.qtpl:117
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:121 //line views/readers.qtpl:118
} }
//line views/readers.qtpl:121 //line views/readers.qtpl:118
qw422016.N().S(` qw422016.N().S(`
</section> </section>
<section class="prevnext"> <section class="prevnext">
`) `)
//line views/readers.qtpl:124 //line views/readers.qtpl:121
if prevHyphaName != "" { if prevHyphaName != "" {
//line views/readers.qtpl:124 //line views/readers.qtpl:121
qw422016.N().S(` qw422016.N().S(`
<a class="prevnext__el prevnext__prev" href="/hypha/`) <a class="prevnext__el prevnext__prev" href="/hypha/`)
//line views/readers.qtpl:125 //line views/readers.qtpl:122
qw422016.E().S(prevHyphaName) qw422016.E().S(prevHyphaName)
//line views/readers.qtpl:125 //line views/readers.qtpl:122
qw422016.N().S(`" rel="prev">← `) qw422016.N().S(`" rel="prev">← `)
//line views/readers.qtpl:125 //line views/readers.qtpl:122
qw422016.E().S(util.BeautifulName(path.Base(prevHyphaName))) qw422016.E().S(util.BeautifulName(path.Base(prevHyphaName)))
//line views/readers.qtpl:125 //line views/readers.qtpl:122
qw422016.N().S(`</a> qw422016.N().S(`</a>
`) `)
//line views/readers.qtpl:126 //line views/readers.qtpl:123
} }
//line views/readers.qtpl:126 //line views/readers.qtpl:123
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:127 //line views/readers.qtpl:124
if nextHyphaName != "" { if nextHyphaName != "" {
//line views/readers.qtpl:127 //line views/readers.qtpl:124
qw422016.N().S(` qw422016.N().S(`
<a class="prevnext__el prevnext__next" href="/hypha/`) <a class="prevnext__el prevnext__next" href="/hypha/`)
//line views/readers.qtpl:128 //line views/readers.qtpl:125
qw422016.E().S(nextHyphaName) qw422016.E().S(nextHyphaName)
//line views/readers.qtpl:128 //line views/readers.qtpl:125
qw422016.N().S(`" rel="next">`) qw422016.N().S(`" rel="next">`)
//line views/readers.qtpl:128 //line views/readers.qtpl:125
qw422016.E().S(util.BeautifulName(path.Base(nextHyphaName))) qw422016.E().S(util.BeautifulName(path.Base(nextHyphaName)))
//line views/readers.qtpl:128 //line views/readers.qtpl:125
qw422016.N().S(` </a> qw422016.N().S(` </a>
`) `)
//line views/readers.qtpl:129 //line views/readers.qtpl:126
} }
//line views/readers.qtpl:129 //line views/readers.qtpl:126
qw422016.N().S(` qw422016.N().S(`
</section> </section>
`) `)
//line views/readers.qtpl:131 //line views/readers.qtpl:128
StreamSubhyphae(qw422016, subhyphae, meta.Lc) StreamSubhyphae(qw422016, subhyphae, meta.Lc)
//line views/readers.qtpl:131 //line views/readers.qtpl:128
qw422016.N().S(` qw422016.N().S(`
<section id="hypha-bottom"> <section id="hypha-bottom">
`) `)
//line views/readers.qtpl:133 //line views/readers.qtpl:130
streamhyphaInfo(qw422016, meta, h) streamhyphaInfo(qw422016, meta, h)
//line views/readers.qtpl:133 //line views/readers.qtpl:130
qw422016.N().S(` qw422016.N().S(`
</section> </section>
</main> </main>
`) `)
//line views/readers.qtpl:136 //line views/readers.qtpl:133
qw422016.N().S(categories.CategoryCard(meta, h.CanonicalName())) qw422016.N().S(categories.CategoryCard(meta, h.CanonicalName()))
//line views/readers.qtpl:136 //line views/readers.qtpl:133
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:137 //line views/readers.qtpl:134
streamsiblingHyphae(qw422016, siblings, meta.Lc) streamsiblingHyphae(qw422016, siblings, meta.Lc)
//line views/readers.qtpl:137 //line views/readers.qtpl:134
qw422016.N().S(` qw422016.N().S(`
</div>
`) `)
//line views/readers.qtpl:139 //line views/readers.qtpl:135
streamviewScripts(qw422016) streamviewScripts(qw422016)
//line views/readers.qtpl:139 //line views/readers.qtpl:135
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:140 //line views/readers.qtpl:136
} }
//line views/readers.qtpl:140 //line views/readers.qtpl:136
func WriteHypha(qq422016 qtio422016.Writer, meta viewutil.Meta, h hyphae.Hypha, contents string) { func WriteHypha(qq422016 qtio422016.Writer, meta viewutil.Meta, h hyphae.Hypha, contents string) {
//line views/readers.qtpl:140 //line views/readers.qtpl:136
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/readers.qtpl:140 //line views/readers.qtpl:136
StreamHypha(qw422016, meta, h, contents) StreamHypha(qw422016, meta, h, contents)
//line views/readers.qtpl:140 //line views/readers.qtpl:136
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/readers.qtpl:140 //line views/readers.qtpl:136
} }
//line views/readers.qtpl:140 //line views/readers.qtpl:136
func Hypha(meta viewutil.Meta, h hyphae.Hypha, contents string) string { func Hypha(meta viewutil.Meta, h hyphae.Hypha, contents string) string {
//line views/readers.qtpl:140 //line views/readers.qtpl:136
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/readers.qtpl:140 //line views/readers.qtpl:136
WriteHypha(qb422016, meta, h, contents) WriteHypha(qb422016, meta, h, contents)
//line views/readers.qtpl:140 //line views/readers.qtpl:136
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/readers.qtpl:140 //line views/readers.qtpl:136
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/readers.qtpl:140 //line views/readers.qtpl:136
return qs422016 return qs422016
//line views/readers.qtpl:140 //line views/readers.qtpl:136
} }
//line views/readers.qtpl:142 //line views/readers.qtpl:138
func StreamRevision(qw422016 *qt422016.Writer, rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) { func StreamRevision(qw422016 *qt422016.Writer, rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) {
//line views/readers.qtpl:142 //line views/readers.qtpl:138
qw422016.N().S(` qw422016.N().S(`
<div class="layout">
<main class="main-width"> <main class="main-width">
<section> <section>
<p>`) <p>`)
//line views/readers.qtpl:146 //line views/readers.qtpl:141
qw422016.E().S(lc.Get("ui.revision_warning")) qw422016.E().S(lc.Get("ui.revision_warning"))
//line views/readers.qtpl:146 //line views/readers.qtpl:141
qw422016.N().S(` <a href="/rev-text/`) qw422016.N().S(` <a href="/rev-text/`)
//line views/readers.qtpl:146 //line views/readers.qtpl:141
qw422016.E().S(revHash) qw422016.E().S(revHash)
//line views/readers.qtpl:146 //line views/readers.qtpl:141
qw422016.N().S(`/`) qw422016.N().S(`/`)
//line views/readers.qtpl:146 //line views/readers.qtpl:141
qw422016.E().S(h.CanonicalName()) qw422016.E().S(h.CanonicalName())
//line views/readers.qtpl:146 //line views/readers.qtpl:141
qw422016.N().S(`">`) qw422016.N().S(`">`)
//line views/readers.qtpl:146 //line views/readers.qtpl:141
qw422016.E().S(lc.Get("ui.revision_link")) qw422016.E().S(lc.Get("ui.revision_link"))
//line views/readers.qtpl:146 //line views/readers.qtpl:141
qw422016.N().S(`</a></p> qw422016.N().S(`</a></p>
`) `)
//line views/readers.qtpl:147 //line views/readers.qtpl:142
qw422016.N().S(NaviTitle(h)) qw422016.N().S(NaviTitle(h))
//line views/readers.qtpl:147 //line views/readers.qtpl:142
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:148 //line views/readers.qtpl:143
qw422016.N().S(contents) qw422016.N().S(contents)
//line views/readers.qtpl:148 //line views/readers.qtpl:143
qw422016.N().S(` qw422016.N().S(`
</section> </section>
</main> </main>
</div>
`) `)
//line views/readers.qtpl:152 //line views/readers.qtpl:146
streamviewScripts(qw422016) streamviewScripts(qw422016)
//line views/readers.qtpl:152 //line views/readers.qtpl:146
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:153 //line views/readers.qtpl:147
} }
//line views/readers.qtpl:153 //line views/readers.qtpl:147
func WriteRevision(qq422016 qtio422016.Writer, rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) { func WriteRevision(qq422016 qtio422016.Writer, rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) {
//line views/readers.qtpl:153 //line views/readers.qtpl:147
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/readers.qtpl:153 //line views/readers.qtpl:147
StreamRevision(qw422016, rq, lc, h, contents, revHash) StreamRevision(qw422016, rq, lc, h, contents, revHash)
//line views/readers.qtpl:153 //line views/readers.qtpl:147
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/readers.qtpl:153 //line views/readers.qtpl:147
} }
//line views/readers.qtpl:153 //line views/readers.qtpl:147
func Revision(rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) string { func Revision(rq *http.Request, lc *l18n.Localizer, h hyphae.Hypha, contents, revHash string) string {
//line views/readers.qtpl:153 //line views/readers.qtpl:147
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/readers.qtpl:153 //line views/readers.qtpl:147
WriteRevision(qb422016, rq, lc, h, contents, revHash) WriteRevision(qb422016, rq, lc, h, contents, revHash)
//line views/readers.qtpl:153 //line views/readers.qtpl:147
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/readers.qtpl:153 //line views/readers.qtpl:147
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/readers.qtpl:153 //line views/readers.qtpl:147
return qs422016 return qs422016
//line views/readers.qtpl:153 //line views/readers.qtpl:147
} }
//line views/readers.qtpl:155 //line views/readers.qtpl:149
func streamviewScripts(qw422016 *qt422016.Writer) { func streamviewScripts(qw422016 *qt422016.Writer) {
//line views/readers.qtpl:155 //line views/readers.qtpl:149
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:156 //line views/readers.qtpl:150
for _, scriptPath := range cfg.ViewScripts { for _, scriptPath := range cfg.ViewScripts {
//line views/readers.qtpl:156 //line views/readers.qtpl:150
qw422016.N().S(` qw422016.N().S(`
<script src="`) <script src="`)
//line views/readers.qtpl:157 //line views/readers.qtpl:151
qw422016.E().S(scriptPath) qw422016.E().S(scriptPath)
//line views/readers.qtpl:157 //line views/readers.qtpl:151
qw422016.N().S(`"></script> qw422016.N().S(`"></script>
`) `)
//line views/readers.qtpl:158 //line views/readers.qtpl:152
} }
//line views/readers.qtpl:158 //line views/readers.qtpl:152
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:159 //line views/readers.qtpl:153
} }
//line views/readers.qtpl:159 //line views/readers.qtpl:153
func writeviewScripts(qq422016 qtio422016.Writer) { func writeviewScripts(qq422016 qtio422016.Writer) {
//line views/readers.qtpl:159 //line views/readers.qtpl:153
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/readers.qtpl:159 //line views/readers.qtpl:153
streamviewScripts(qw422016) streamviewScripts(qw422016)
//line views/readers.qtpl:159 //line views/readers.qtpl:153
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/readers.qtpl:159 //line views/readers.qtpl:153
} }
//line views/readers.qtpl:159 //line views/readers.qtpl:153
func viewScripts() string { func viewScripts() string {
//line views/readers.qtpl:159 //line views/readers.qtpl:153
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/readers.qtpl:159 //line views/readers.qtpl:153
writeviewScripts(qb422016) writeviewScripts(qb422016)
//line views/readers.qtpl:159 //line views/readers.qtpl:153
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/readers.qtpl:159 //line views/readers.qtpl:153
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/readers.qtpl:159 //line views/readers.qtpl:153
return qs422016 return qs422016
//line views/readers.qtpl:159 //line views/readers.qtpl:153
} }