1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2025-05-01 06:34:04 +00:00

Improve layout

This commit is contained in:
bouncepaw 2021-01-26 10:41:57 +05:00
parent f5ad2daf44
commit d25c953409
20 changed files with 762 additions and 665 deletions

View File

@ -85,12 +85,14 @@ html { height:100%; padding:0; }
body {height:100%; margin:0; font-size:16px; font-family: 'PT Sans', 'Liberation Sans', sans-serif;} body {height:100%; margin:0; font-size:16px; font-family: 'PT Sans', 'Liberation Sans', sans-serif;}
main > form {margin-bottom:1rem;} main > form {margin-bottom:1rem;}
textarea {font-size:16px; font-family: 'PT Sans', 'Liberation Sans', sans-serif;} textarea {font-size:16px; font-family: 'PT Sans', 'Liberation Sans', sans-serif;}
.edit_no-preview {height:100%;}
.edit_with-preview .edit-form textarea { min-height: 500px; } .edit { min-height: 80vh; }
.edit__title { margin-top: 0; }
.edit__preview { border: 2px dashed #ddd; } .edit__preview { border: 2px dashed #ddd; }
.edit-form {height:90%;} .edit-form {height:70vh;}
.edit-form textarea {width:100%;height:90%;} .edit-form textarea {width:100%;height:95%;}
.edit-form__save { font-weight: bold; } .edit-form__save { font-weight: bold; }
.icon {margin-right: .25rem; vertical-align: bottom; } .icon {margin-right: .25rem; vertical-align: bottom; }
main h1:not(.navi-title) {font-size:1.7rem;} main h1:not(.navi-title) {font-size:1.7rem;}
@ -220,6 +222,7 @@ main, article, .hypha-tabs__tab, header, .layout-card { background-color: #3434
a, .wikilink_external { color: #f1fa8c; } a, .wikilink_external { color: #f1fa8c; }
a:visited, .wikilink_external:visited { color: #ffb86c; } a:visited, .wikilink_external:visited { color: #ffb86c; }
.wikilink_new, .wikilink_new:visited { color: #dd4444; } .wikilink_new, .wikilink_new:visited { color: #dd4444; }
.navitree__link:hover { background-color: #444; }
.header-links__link, .header-links__link:visited, .header-links__link, .header-links__link:visited,
.prevnext__el, .prevnext__el:visited { color: #ddd; } .prevnext__el, .prevnext__el:visited { color: #ddd; }

View File

@ -1,7 +1,8 @@
{% import "github.com/bouncepaw/mycorrhiza/user" %} {% import "github.com/bouncepaw/mycorrhiza/user" %}
{% func LoginHTML() %} {% func LoginHTML() %}
<main> <div class="layout">
<main class="main-width">
<section> <section>
{% if user.AuthUsed %} {% if user.AuthUsed %}
<h1>Login</h1> <h1>Login</h1>
@ -25,10 +26,12 @@
{% endif %} {% endif %}
</section> </section>
</main> </main>
</div>
{% endfunc %} {% endfunc %}
{% func LoginErrorHTML(err string) %} {% func LoginErrorHTML(err string) %}
<main> <div class="layout">
<main class="main-width">
<section> <section>
{% switch err %} {% switch err %}
{% case "unknown username" %} {% case "unknown username" %}
@ -41,10 +44,12 @@
<p><a href="/login">← Try again</a></p> <p><a href="/login">← Try again</a></p>
</section> </section>
</main> </main>
</div>
{% endfunc %} {% endfunc %}
{% func LogoutHTML(can bool) %} {% func LogoutHTML(can bool) %}
<main> <div class="layout">
<main class="main-width">
<section> <section>
{% if can %} {% if can %}
<h1>Log out?</h1> <h1>Log out?</h1>
@ -57,4 +62,5 @@
{% endif %} {% endif %}
</section> </section>
</main> </main>
</div>
{% endfunc %} {% endfunc %}

View File

@ -24,12 +24,13 @@ var (
func StreamLoginHTML(qw422016 *qt422016.Writer) { func StreamLoginHTML(qw422016 *qt422016.Writer) {
//line templates/auth.qtpl:3 //line templates/auth.qtpl:3
qw422016.N().S(` qw422016.N().S(`
<main> <div class="layout">
<main class="main-width">
<section> <section>
`) `)
//line templates/auth.qtpl:6 //line templates/auth.qtpl:7
if user.AuthUsed { if user.AuthUsed {
//line templates/auth.qtpl:6 //line templates/auth.qtpl:7
qw422016.N().S(` qw422016.N().S(`
<h1>Login</h1> <h1>Login</h1>
<form method="post" action="/login-data" id="login-form" enctype="multipart/form-data"> <form method="post" action="/login-data" id="login-form" enctype="multipart/form-data">
@ -47,172 +48,177 @@ func StreamLoginHTML(qw422016 *qt422016.Writer) {
<a href="/">Cancel</a> <a href="/">Cancel</a>
</form> </form>
`) `)
//line templates/auth.qtpl:22 //line templates/auth.qtpl:23
} else { } else {
//line templates/auth.qtpl:22 //line templates/auth.qtpl:23
qw422016.N().S(` qw422016.N().S(`
<p>Administrator of this wiki have not configured any authorization method. You can make edits anonymously.</p> <p>Administrator of this wiki have not configured any authorization method. You can make edits anonymously.</p>
<p><a href="/"> Go home</a></p> <p><a href="/"> Go home</a></p>
`) `)
//line templates/auth.qtpl:25 //line templates/auth.qtpl:26
} }
//line templates/auth.qtpl:25 //line templates/auth.qtpl:26
qw422016.N().S(` qw422016.N().S(`
</section> </section>
</main> </main>
</div>
`) `)
//line templates/auth.qtpl:28 //line templates/auth.qtpl:30
} }
//line templates/auth.qtpl:28 //line templates/auth.qtpl:30
func WriteLoginHTML(qq422016 qtio422016.Writer) { func WriteLoginHTML(qq422016 qtio422016.Writer) {
//line templates/auth.qtpl:28 //line templates/auth.qtpl:30
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/auth.qtpl:28 //line templates/auth.qtpl:30
StreamLoginHTML(qw422016) StreamLoginHTML(qw422016)
//line templates/auth.qtpl:28 //line templates/auth.qtpl:30
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line templates/auth.qtpl:28 //line templates/auth.qtpl:30
} }
//line templates/auth.qtpl:28 //line templates/auth.qtpl:30
func LoginHTML() string { func LoginHTML() string {
//line templates/auth.qtpl:28 //line templates/auth.qtpl:30
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line templates/auth.qtpl:28 //line templates/auth.qtpl:30
WriteLoginHTML(qb422016) WriteLoginHTML(qb422016)
//line templates/auth.qtpl:28 //line templates/auth.qtpl:30
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line templates/auth.qtpl:28 //line templates/auth.qtpl:30
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line templates/auth.qtpl:28 //line templates/auth.qtpl:30
return qs422016 return qs422016
//line templates/auth.qtpl:28 //line templates/auth.qtpl:30
} }
//line templates/auth.qtpl:30 //line templates/auth.qtpl:32
func StreamLoginErrorHTML(qw422016 *qt422016.Writer, err string) { func StreamLoginErrorHTML(qw422016 *qt422016.Writer, err string) {
//line templates/auth.qtpl:30 //line templates/auth.qtpl:32
qw422016.N().S(` qw422016.N().S(`
<main> <div class="layout">
<main class="main-width">
<section> <section>
`) `)
//line templates/auth.qtpl:33 //line templates/auth.qtpl:36
switch err { switch err {
//line templates/auth.qtpl:34 //line templates/auth.qtpl:37
case "unknown username": case "unknown username":
//line templates/auth.qtpl:34 //line templates/auth.qtpl:37
qw422016.N().S(` qw422016.N().S(`
<p class="error">Unknown username.</p> <p class="error">Unknown username.</p>
`) `)
//line templates/auth.qtpl:36 //line templates/auth.qtpl:39
case "wrong password": case "wrong password":
//line templates/auth.qtpl:36 //line templates/auth.qtpl:39
qw422016.N().S(` qw422016.N().S(`
<p class="error">Wrong password.</p> <p class="error">Wrong password.</p>
`) `)
//line templates/auth.qtpl:38 //line templates/auth.qtpl:41
default: default:
//line templates/auth.qtpl:38 //line templates/auth.qtpl:41
qw422016.N().S(` qw422016.N().S(`
<p class="error">`) <p class="error">`)
//line templates/auth.qtpl:39 //line templates/auth.qtpl:42
qw422016.E().S(err) qw422016.E().S(err)
//line templates/auth.qtpl:39 //line templates/auth.qtpl:42
qw422016.N().S(`</p> qw422016.N().S(`</p>
`) `)
//line templates/auth.qtpl:40 //line templates/auth.qtpl:43
} }
//line templates/auth.qtpl:40 //line templates/auth.qtpl:43
qw422016.N().S(` qw422016.N().S(`
<p><a href="/login"> Try again</a></p> <p><a href="/login"> Try again</a></p>
</section> </section>
</main> </main>
</div>
`) `)
//line templates/auth.qtpl:44 //line templates/auth.qtpl:48
} }
//line templates/auth.qtpl:44 //line templates/auth.qtpl:48
func WriteLoginErrorHTML(qq422016 qtio422016.Writer, err string) { func WriteLoginErrorHTML(qq422016 qtio422016.Writer, err string) {
//line templates/auth.qtpl:44 //line templates/auth.qtpl:48
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/auth.qtpl:44 //line templates/auth.qtpl:48
StreamLoginErrorHTML(qw422016, err) StreamLoginErrorHTML(qw422016, err)
//line templates/auth.qtpl:44 //line templates/auth.qtpl:48
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line templates/auth.qtpl:44 //line templates/auth.qtpl:48
} }
//line templates/auth.qtpl:44 //line templates/auth.qtpl:48
func LoginErrorHTML(err string) string { func LoginErrorHTML(err string) string {
//line templates/auth.qtpl:44 //line templates/auth.qtpl:48
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line templates/auth.qtpl:44 //line templates/auth.qtpl:48
WriteLoginErrorHTML(qb422016, err) WriteLoginErrorHTML(qb422016, err)
//line templates/auth.qtpl:44 //line templates/auth.qtpl:48
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line templates/auth.qtpl:44 //line templates/auth.qtpl:48
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line templates/auth.qtpl:44 //line templates/auth.qtpl:48
return qs422016 return qs422016
//line templates/auth.qtpl:44 //line templates/auth.qtpl:48
} }
//line templates/auth.qtpl:46 //line templates/auth.qtpl:50
func StreamLogoutHTML(qw422016 *qt422016.Writer, can bool) { func StreamLogoutHTML(qw422016 *qt422016.Writer, can bool) {
//line templates/auth.qtpl:46 //line templates/auth.qtpl:50
qw422016.N().S(` qw422016.N().S(`
<main> <div class="layout">
<main class="main-width">
<section> <section>
`) `)
//line templates/auth.qtpl:49 //line templates/auth.qtpl:54
if can { if can {
//line templates/auth.qtpl:49 //line templates/auth.qtpl:54
qw422016.N().S(` qw422016.N().S(`
<h1>Log out?</h1> <h1>Log out?</h1>
<p><a href="/logout-confirm"><strong>Confirm</strong></a></p> <p><a href="/logout-confirm"><strong>Confirm</strong></a></p>
<p><a href="/">Cancel</a></p> <p><a href="/">Cancel</a></p>
`) `)
//line templates/auth.qtpl:53 //line templates/auth.qtpl:58
} else { } else {
//line templates/auth.qtpl:53 //line templates/auth.qtpl:58
qw422016.N().S(` qw422016.N().S(`
<p>You cannot log out because you are not logged in.</p> <p>You cannot log out because you are not logged in.</p>
<p><a href="/login">Login</a></p> <p><a href="/login">Login</a></p>
<p><a href="/login"> Home</a></p> <p><a href="/login"> Home</a></p>
`) `)
//line templates/auth.qtpl:57 //line templates/auth.qtpl:62
} }
//line templates/auth.qtpl:57 //line templates/auth.qtpl:62
qw422016.N().S(` qw422016.N().S(`
</section> </section>
</main> </main>
</div>
`) `)
//line templates/auth.qtpl:60 //line templates/auth.qtpl:66
} }
//line templates/auth.qtpl:60 //line templates/auth.qtpl:66
func WriteLogoutHTML(qq422016 qtio422016.Writer, can bool) { func WriteLogoutHTML(qq422016 qtio422016.Writer, can bool) {
//line templates/auth.qtpl:60 //line templates/auth.qtpl:66
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/auth.qtpl:60 //line templates/auth.qtpl:66
StreamLogoutHTML(qw422016, can) StreamLogoutHTML(qw422016, can)
//line templates/auth.qtpl:60 //line templates/auth.qtpl:66
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line templates/auth.qtpl:60 //line templates/auth.qtpl:66
} }
//line templates/auth.qtpl:60 //line templates/auth.qtpl:66
func LogoutHTML(can bool) string { func LogoutHTML(can bool) string {
//line templates/auth.qtpl:60 //line templates/auth.qtpl:66
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line templates/auth.qtpl:60 //line templates/auth.qtpl:66
WriteLogoutHTML(qb422016, can) WriteLogoutHTML(qb422016, can)
//line templates/auth.qtpl:60 //line templates/auth.qtpl:66
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line templates/auth.qtpl:60 //line templates/auth.qtpl:66
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line templates/auth.qtpl:60 //line templates/auth.qtpl:66
return qs422016 return qs422016
//line templates/auth.qtpl:60 //line templates/auth.qtpl:66
} }

View File

@ -11,11 +11,11 @@ type navEntry struct {
var navEntries = []navEntry{ var navEntries = []navEntry{
{"page", "Hypha"}, {"page", "Hypha"},
{"edit", "Edit"}, {"edit", "Edit"},
{"text", "Raw text"},
{"history", "History"}, {"history", "History"},
{"revision", "NOT REACHED"}, {"revision", "NOT REACHED"},
{"rename-ask", "Rename"}, {"rename-ask", "Rename"},
{"delete-ask", "Delete"}, {"delete-ask", "Delete"},
{"text", "Raw text"},
} }
%} %}
@ -56,3 +56,9 @@ var navEntries = []navEntry{
{% endif %} {% endif %}
{% endfunc %} {% endfunc %}
{% func relativeHyphae(relatives string) %}
<aside class="relative-hyphae layout-card">
<h1 class="relative-hyphae__title layout-card__title">Relative hyphae</h1>
{%s= relatives %}
</aside>
{% endfunc %}

View File

@ -37,11 +37,11 @@ type navEntry struct {
var navEntries = []navEntry{ var navEntries = []navEntry{
{"page", "Hypha"}, {"page", "Hypha"},
{"edit", "Edit"}, {"edit", "Edit"},
{"text", "Raw text"},
{"history", "History"}, {"history", "History"},
{"revision", "NOT REACHED"}, {"revision", "NOT REACHED"},
{"rename-ask", "Rename"}, {"rename-ask", "Rename"},
{"delete-ask", "Delete"}, {"delete-ask", "Delete"},
{"text", "Raw text"},
} }
//line templates/common.qtpl:22 //line templates/common.qtpl:22
@ -211,3 +211,45 @@ func userMenuHTML(u *user.User) string {
return qs422016 return qs422016
//line templates/common.qtpl:57 //line templates/common.qtpl:57
} }
//line templates/common.qtpl:59
func streamrelativeHyphae(qw422016 *qt422016.Writer, relatives string) {
//line templates/common.qtpl:59
qw422016.N().S(`
<aside class="relative-hyphae layout-card">
<h1 class="relative-hyphae__title layout-card__title">Relative hyphae</h1>
`)
//line templates/common.qtpl:62
qw422016.N().S(relatives)
//line templates/common.qtpl:62
qw422016.N().S(`
</aside>
`)
//line templates/common.qtpl:64
}
//line templates/common.qtpl:64
func writerelativeHyphae(qq422016 qtio422016.Writer, relatives string) {
//line templates/common.qtpl:64
qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/common.qtpl:64
streamrelativeHyphae(qw422016, relatives)
//line templates/common.qtpl:64
qt422016.ReleaseWriter(qw422016)
//line templates/common.qtpl:64
}
//line templates/common.qtpl:64
func relativeHyphae(relatives string) string {
//line templates/common.qtpl:64
qb422016 := qt422016.AcquireByteBuffer()
//line templates/common.qtpl:64
writerelativeHyphae(qb422016, relatives)
//line templates/common.qtpl:64
qs422016 := string(qb422016.B)
//line templates/common.qtpl:64
qt422016.ReleaseByteBuffer(qb422016)
//line templates/common.qtpl:64
return qs422016
//line templates/common.qtpl:64
}

View File

@ -60,12 +60,14 @@ html { height:100%; padding:0; }
body {height:100%; margin:0; font-size:16px; font-family: 'PT Sans', 'Liberation Sans', sans-serif;} body {height:100%; margin:0; font-size:16px; font-family: 'PT Sans', 'Liberation Sans', sans-serif;}
main > form {margin-bottom:1rem;} main > form {margin-bottom:1rem;}
textarea {font-size:16px; font-family: 'PT Sans', 'Liberation Sans', sans-serif;} textarea {font-size:16px; font-family: 'PT Sans', 'Liberation Sans', sans-serif;}
.edit_no-preview {height:100%;}
.edit_with-preview .edit-form textarea { min-height: 500px; } .edit { min-height: 80vh; }
.edit__title { margin-top: 0; }
.edit__preview { border: 2px dashed #ddd; } .edit__preview { border: 2px dashed #ddd; }
.edit-form {height:90%;} .edit-form {height:70vh;}
.edit-form textarea {width:100%;height:90%;} .edit-form textarea {width:100%;height:95%;}
.edit-form__save { font-weight: bold; } .edit-form__save { font-weight: bold; }
.icon {margin-right: .25rem; vertical-align: bottom; } .icon {margin-right: .25rem; vertical-align: bottom; }
main h1:not(.navi-title) {font-size:1.7rem;} main h1:not(.navi-title) {font-size:1.7rem;}

View File

@ -3,7 +3,8 @@
This dialog is to be shown to a user when they try to delete a hypha. This dialog is to be shown to a user when they try to delete a hypha.
{% func DeleteAskHTML(rq *http.Request, hyphaName string, isOld bool) %} {% func DeleteAskHTML(rq *http.Request, hyphaName string, isOld bool) %}
{%= navHTML(rq, hyphaName, "delete-ask") %} {%= navHTML(rq, hyphaName, "delete-ask") %}
<main> <div class="layout">
<main class="main-width">
{% if isOld %} {% if isOld %}
<section> <section>
<h1>Delete {%s hyphaName %}?</h1> <h1>Delete {%s hyphaName %}?</h1>
@ -16,6 +17,7 @@ This dialog is to be shown to a user when they try to delete a hypha.
{%= cannotDeleteDueToNonExistence(hyphaName) %} {%= cannotDeleteDueToNonExistence(hyphaName) %}
{% endif %} {% endif %}
</main> </main>
</div>
{% endfunc %} {% endfunc %}
{% func cannotDeleteDueToNonExistence(hyphaName string) %} {% func cannotDeleteDueToNonExistence(hyphaName string) %}

View File

@ -31,124 +31,126 @@ func StreamDeleteAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName
streamnavHTML(qw422016, rq, hyphaName, "delete-ask") streamnavHTML(qw422016, rq, hyphaName, "delete-ask")
//line templates/delete.qtpl:5 //line templates/delete.qtpl:5
qw422016.N().S(` qw422016.N().S(`
<main> <div class="layout">
<main class="main-width">
`) `)
//line templates/delete.qtpl:7 //line templates/delete.qtpl:8
if isOld { if isOld {
//line templates/delete.qtpl:7 //line templates/delete.qtpl:8
qw422016.N().S(` qw422016.N().S(`
<section> <section>
<h1>Delete `) <h1>Delete `)
//line templates/delete.qtpl:9 //line templates/delete.qtpl:10
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line templates/delete.qtpl:9 //line templates/delete.qtpl:10
qw422016.N().S(`?</h1> qw422016.N().S(`?</h1>
<p>Do you really want to delete hypha <em>`) <p>Do you really want to delete hypha <em>`)
//line templates/delete.qtpl:10 //line templates/delete.qtpl:11
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line templates/delete.qtpl:10 //line templates/delete.qtpl:11
qw422016.N().S(`</em>?</p> qw422016.N().S(`</em>?</p>
<p>In this version of MycorrhizaWiki you cannot undelete a deleted hypha but the history can still be accessed.</p> <p>In this version of MycorrhizaWiki you cannot undelete a deleted hypha but the history can still be accessed.</p>
<p><a href="/delete-confirm/`) <p><a href="/delete-confirm/`)
//line templates/delete.qtpl:12 //line templates/delete.qtpl:13
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line templates/delete.qtpl:12 //line templates/delete.qtpl:13
qw422016.N().S(`"><strong>Confirm</strong></a></p> qw422016.N().S(`"><strong>Confirm</strong></a></p>
<p><a href="/page/`) <p><a href="/page/`)
//line templates/delete.qtpl:13 //line templates/delete.qtpl:14
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line templates/delete.qtpl:13 //line templates/delete.qtpl:14
qw422016.N().S(`">Cancel</a></p> qw422016.N().S(`">Cancel</a></p>
</section> </section>
`) `)
//line templates/delete.qtpl:15 //line templates/delete.qtpl:16
} else { } else {
//line templates/delete.qtpl:15 //line templates/delete.qtpl:16
qw422016.N().S(` qw422016.N().S(`
`) `)
//line templates/delete.qtpl:16 //line templates/delete.qtpl:17
streamcannotDeleteDueToNonExistence(qw422016, hyphaName) streamcannotDeleteDueToNonExistence(qw422016, hyphaName)
//line templates/delete.qtpl:16 //line templates/delete.qtpl:17
qw422016.N().S(` qw422016.N().S(`
`) `)
//line templates/delete.qtpl:17 //line templates/delete.qtpl:18
} }
//line templates/delete.qtpl:17 //line templates/delete.qtpl:18
qw422016.N().S(` qw422016.N().S(`
</main> </main>
</div>
`) `)
//line templates/delete.qtpl:19 //line templates/delete.qtpl:21
} }
//line templates/delete.qtpl:19 //line templates/delete.qtpl:21
func WriteDeleteAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string, isOld bool) { func WriteDeleteAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
//line templates/delete.qtpl:19 //line templates/delete.qtpl:21
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/delete.qtpl:19 //line templates/delete.qtpl:21
StreamDeleteAskHTML(qw422016, rq, hyphaName, isOld) StreamDeleteAskHTML(qw422016, rq, hyphaName, isOld)
//line templates/delete.qtpl:19 //line templates/delete.qtpl:21
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line templates/delete.qtpl:19 //line templates/delete.qtpl:21
} }
//line templates/delete.qtpl:19 //line templates/delete.qtpl:21
func DeleteAskHTML(rq *http.Request, hyphaName string, isOld bool) string { func DeleteAskHTML(rq *http.Request, hyphaName string, isOld bool) string {
//line templates/delete.qtpl:19 //line templates/delete.qtpl:21
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line templates/delete.qtpl:19 //line templates/delete.qtpl:21
WriteDeleteAskHTML(qb422016, rq, hyphaName, isOld) WriteDeleteAskHTML(qb422016, rq, hyphaName, isOld)
//line templates/delete.qtpl:19 //line templates/delete.qtpl:21
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line templates/delete.qtpl:19 //line templates/delete.qtpl:21
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line templates/delete.qtpl:19 //line templates/delete.qtpl:21
return qs422016 return qs422016
//line templates/delete.qtpl:19 //line templates/delete.qtpl:21
} }
//line templates/delete.qtpl:21 //line templates/delete.qtpl:23
func streamcannotDeleteDueToNonExistence(qw422016 *qt422016.Writer, hyphaName string) { func streamcannotDeleteDueToNonExistence(qw422016 *qt422016.Writer, hyphaName string) {
//line templates/delete.qtpl:21 //line templates/delete.qtpl:23
qw422016.N().S(` qw422016.N().S(`
<section> <section>
<h1>Cannot delete `) <h1>Cannot delete `)
//line templates/delete.qtpl:23 //line templates/delete.qtpl:25
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line templates/delete.qtpl:23 //line templates/delete.qtpl:25
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
<p>This hypha does not exist.</p> <p>This hypha does not exist.</p>
<p><a href="/page/`) <p><a href="/page/`)
//line templates/delete.qtpl:25 //line templates/delete.qtpl:27
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line templates/delete.qtpl:25 //line templates/delete.qtpl:27
qw422016.N().S(`">Go back</a></p> qw422016.N().S(`">Go back</a></p>
</section> </section>
`) `)
//line templates/delete.qtpl:27 //line templates/delete.qtpl:29
} }
//line templates/delete.qtpl:27 //line templates/delete.qtpl:29
func writecannotDeleteDueToNonExistence(qq422016 qtio422016.Writer, hyphaName string) { func writecannotDeleteDueToNonExistence(qq422016 qtio422016.Writer, hyphaName string) {
//line templates/delete.qtpl:27 //line templates/delete.qtpl:29
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/delete.qtpl:27 //line templates/delete.qtpl:29
streamcannotDeleteDueToNonExistence(qw422016, hyphaName) streamcannotDeleteDueToNonExistence(qw422016, hyphaName)
//line templates/delete.qtpl:27 //line templates/delete.qtpl:29
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line templates/delete.qtpl:27 //line templates/delete.qtpl:29
} }
//line templates/delete.qtpl:27 //line templates/delete.qtpl:29
func cannotDeleteDueToNonExistence(hyphaName string) string { func cannotDeleteDueToNonExistence(hyphaName string) string {
//line templates/delete.qtpl:27 //line templates/delete.qtpl:29
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line templates/delete.qtpl:27 //line templates/delete.qtpl:29
writecannotDeleteDueToNonExistence(qb422016, hyphaName) writecannotDeleteDueToNonExistence(qb422016, hyphaName)
//line templates/delete.qtpl:27 //line templates/delete.qtpl:29
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line templates/delete.qtpl:27 //line templates/delete.qtpl:29
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line templates/delete.qtpl:27 //line templates/delete.qtpl:29
return qs422016 return qs422016
//line templates/delete.qtpl:27 //line templates/delete.qtpl:29
} }

View File

@ -1,9 +1,11 @@
{% import "net/http" %} {% import "net/http" %}
{% import "github.com/bouncepaw/mycorrhiza/util" %}
{% func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) %} {% func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) %}
{%s= navHTML(rq, hyphaName, "edit") %} {%s= navHTML(rq, hyphaName, "edit") %}
<main class="edit edit_no-preview"> <div class="layout">
<h1>Edit {%s hyphaName %}</h1> <main class="main-width edit edit_no-preview">
<h1 class="edit__title">Edit {%s util.BeautifulName(hyphaName) %}</h1>
{%s= warning %} {%s= warning %}
<form method="post" class="edit-form" <form method="post" class="edit-form"
action="/upload-text/{%s hyphaName %}"> action="/upload-text/{%s hyphaName %}">
@ -14,11 +16,13 @@
<a href="/page/{%s hyphaName %}" class="edit-form__cancel">Cancel</a> <a href="/page/{%s hyphaName %}" class="edit-form__cancel">Cancel</a>
</form> </form>
</main> </main>
</div>
{% endfunc %} {% endfunc %}
{% func PreviewHTML(rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) %} {% func PreviewHTML(rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) %}
{%s= navHTML(rq, hyphaName, "edit") %} {%s= navHTML(rq, hyphaName, "edit") %}
<main class="edit edit_with-preview"> <div class="layout">
<main class="main-width edit edit_with-preview">
<h1>Edit {%s hyphaName %} (preview)</h1> <h1>Edit {%s hyphaName %} (preview)</h1>
{%s= warning %} {%s= warning %}
<form method="post" class="edit-form" <form method="post" class="edit-form"
@ -32,4 +36,5 @@
<p class="warning">Note that the hypha is not saved yet. You can preview the changes ↓</p> <p class="warning">Note that the hypha is not saved yet. You can preview the changes ↓</p>
<section class="edit__preview">{%s= renderedPage %}</section> <section class="edit__preview">{%s= renderedPage %}</section>
</main> </main>
</div>
{% endfunc %} {% endfunc %}

View File

@ -7,163 +7,170 @@ package templates
//line templates/mutators.qtpl:1 //line templates/mutators.qtpl:1
import "net/http" import "net/http"
//line templates/mutators.qtpl:3 //line templates/mutators.qtpl:2
import "github.com/bouncepaw/mycorrhiza/util"
//line templates/mutators.qtpl:4
import ( import (
qtio422016 "io" qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate" qt422016 "github.com/valyala/quicktemplate"
) )
//line templates/mutators.qtpl:3 //line templates/mutators.qtpl:4
var ( var (
_ = qtio422016.Copy _ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer _ = qt422016.AcquireByteBuffer
) )
//line templates/mutators.qtpl:3 //line templates/mutators.qtpl:4
func StreamEditHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) { func StreamEditHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) {
//line templates/mutators.qtpl:3 //line templates/mutators.qtpl:4
qw422016.N().S(` qw422016.N().S(`
`) `)
//line templates/mutators.qtpl:4 //line templates/mutators.qtpl:5
qw422016.N().S(navHTML(rq, hyphaName, "edit")) qw422016.N().S(navHTML(rq, hyphaName, "edit"))
//line templates/mutators.qtpl:4 //line templates/mutators.qtpl:5
qw422016.N().S(` qw422016.N().S(`
<main class="edit edit_no-preview"> <div class="layout">
<h1>Edit `) <main class="main-width edit edit_no-preview">
//line templates/mutators.qtpl:6 <h1 class="edit__title">Edit `)
qw422016.E().S(hyphaName) //line templates/mutators.qtpl:8
//line templates/mutators.qtpl:6 qw422016.E().S(util.BeautifulName(hyphaName))
//line templates/mutators.qtpl:8
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
`) `)
//line templates/mutators.qtpl:7 //line templates/mutators.qtpl:9
qw422016.N().S(warning) qw422016.N().S(warning)
//line templates/mutators.qtpl:7 //line templates/mutators.qtpl:9
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 templates/mutators.qtpl:9 //line templates/mutators.qtpl:11
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line templates/mutators.qtpl:9 //line templates/mutators.qtpl:11
qw422016.N().S(`"> qw422016.N().S(`">
<textarea name="text">`) <textarea name="text">`)
//line templates/mutators.qtpl:10 //line templates/mutators.qtpl:12
qw422016.E().S(textAreaFill) qw422016.E().S(textAreaFill)
//line templates/mutators.qtpl:10 //line templates/mutators.qtpl:12
qw422016.N().S(`</textarea> qw422016.N().S(`</textarea>
<br/> <br/>
<input type="submit" name="action" value="Save" class="edit-form__save"/> <input type="submit" name="action" value="Save" class="edit-form__save"/>
<input type="submit" name="action" value="Preview" class="edit-form__preview"> <input type="submit" name="action" value="Preview" class="edit-form__preview">
<a href="/page/`) <a href="/page/`)
//line templates/mutators.qtpl:14 //line templates/mutators.qtpl:16
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line templates/mutators.qtpl:14 //line templates/mutators.qtpl:16
qw422016.N().S(`" class="edit-form__cancel">Cancel</a> qw422016.N().S(`" class="edit-form__cancel">Cancel</a>
</form> </form>
</main> </main>
</div>
`) `)
//line templates/mutators.qtpl:17 //line templates/mutators.qtpl:20
} }
//line templates/mutators.qtpl:17 //line templates/mutators.qtpl:20
func WriteEditHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) { func WriteEditHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) {
//line templates/mutators.qtpl:17 //line templates/mutators.qtpl:20
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/mutators.qtpl:17 //line templates/mutators.qtpl:20
StreamEditHTML(qw422016, rq, hyphaName, textAreaFill, warning) StreamEditHTML(qw422016, rq, hyphaName, textAreaFill, warning)
//line templates/mutators.qtpl:17 //line templates/mutators.qtpl:20
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line templates/mutators.qtpl:17 //line templates/mutators.qtpl:20
} }
//line templates/mutators.qtpl:17 //line templates/mutators.qtpl:20
func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) string { func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) string {
//line templates/mutators.qtpl:17 //line templates/mutators.qtpl:20
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line templates/mutators.qtpl:17 //line templates/mutators.qtpl:20
WriteEditHTML(qb422016, rq, hyphaName, textAreaFill, warning) WriteEditHTML(qb422016, rq, hyphaName, textAreaFill, warning)
//line templates/mutators.qtpl:17 //line templates/mutators.qtpl:20
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line templates/mutators.qtpl:17 //line templates/mutators.qtpl:20
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line templates/mutators.qtpl:17 //line templates/mutators.qtpl:20
return qs422016 return qs422016
//line templates/mutators.qtpl:17 //line templates/mutators.qtpl:20
} }
//line templates/mutators.qtpl:19 //line templates/mutators.qtpl:22
func StreamPreviewHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) { func StreamPreviewHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) {
//line templates/mutators.qtpl:19 //line templates/mutators.qtpl:22
qw422016.N().S(` qw422016.N().S(`
`) `)
//line templates/mutators.qtpl:20 //line templates/mutators.qtpl:23
qw422016.N().S(navHTML(rq, hyphaName, "edit")) qw422016.N().S(navHTML(rq, hyphaName, "edit"))
//line templates/mutators.qtpl:20 //line templates/mutators.qtpl:23
qw422016.N().S(` qw422016.N().S(`
<main class="edit edit_with-preview"> <div class="layout">
<main class="main-width edit edit_with-preview">
<h1>Edit `) <h1>Edit `)
//line templates/mutators.qtpl:22 //line templates/mutators.qtpl:26
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line templates/mutators.qtpl:22 //line templates/mutators.qtpl:26
qw422016.N().S(` (preview)</h1> qw422016.N().S(` (preview)</h1>
`) `)
//line templates/mutators.qtpl:23 //line templates/mutators.qtpl:27
qw422016.N().S(warning) qw422016.N().S(warning)
//line templates/mutators.qtpl:23 //line templates/mutators.qtpl:27
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 templates/mutators.qtpl:25 //line templates/mutators.qtpl:29
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line templates/mutators.qtpl:25 //line templates/mutators.qtpl:29
qw422016.N().S(`"> qw422016.N().S(`">
<textarea name="text">`) <textarea name="text">`)
//line templates/mutators.qtpl:26 //line templates/mutators.qtpl:30
qw422016.E().S(textAreaFill) qw422016.E().S(textAreaFill)
//line templates/mutators.qtpl:26 //line templates/mutators.qtpl:30
qw422016.N().S(`</textarea> qw422016.N().S(`</textarea>
<br/> <br/>
<input type="submit" name="action" value="Save" class="edit-form__save"/> <input type="submit" name="action" value="Save" class="edit-form__save"/>
<input type="submit" name="action" value="Preview" class="edit-form__preview"> <input type="submit" name="action" value="Preview" class="edit-form__preview">
<a href="/page/`) <a href="/page/`)
//line templates/mutators.qtpl:30 //line templates/mutators.qtpl:34
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line templates/mutators.qtpl:30 //line templates/mutators.qtpl:34
qw422016.N().S(`" class="edit-form__cancel">Cancel</a> qw422016.N().S(`" class="edit-form__cancel">Cancel</a>
</form> </form>
<p class="warning">Note that the hypha is not saved yet. You can preview the changes </p> <p class="warning">Note that the hypha is not saved yet. You can preview the changes </p>
<section class="edit__preview">`) <section class="edit__preview">`)
//line templates/mutators.qtpl:33 //line templates/mutators.qtpl:37
qw422016.N().S(renderedPage) qw422016.N().S(renderedPage)
//line templates/mutators.qtpl:33 //line templates/mutators.qtpl:37
qw422016.N().S(`</section> qw422016.N().S(`</section>
</main> </main>
</div>
`) `)
//line templates/mutators.qtpl:35 //line templates/mutators.qtpl:40
} }
//line templates/mutators.qtpl:35 //line templates/mutators.qtpl:40
func WritePreviewHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) { func WritePreviewHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) {
//line templates/mutators.qtpl:35 //line templates/mutators.qtpl:40
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/mutators.qtpl:35 //line templates/mutators.qtpl:40
StreamPreviewHTML(qw422016, rq, hyphaName, textAreaFill, warning, renderedPage) StreamPreviewHTML(qw422016, rq, hyphaName, textAreaFill, warning, renderedPage)
//line templates/mutators.qtpl:35 //line templates/mutators.qtpl:40
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line templates/mutators.qtpl:35 //line templates/mutators.qtpl:40
} }
//line templates/mutators.qtpl:35 //line templates/mutators.qtpl:40
func PreviewHTML(rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) string { func PreviewHTML(rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) string {
//line templates/mutators.qtpl:35 //line templates/mutators.qtpl:40
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line templates/mutators.qtpl:35 //line templates/mutators.qtpl:40
WritePreviewHTML(qb422016, rq, hyphaName, textAreaFill, warning, renderedPage) WritePreviewHTML(qb422016, rq, hyphaName, textAreaFill, warning, renderedPage)
//line templates/mutators.qtpl:35 //line templates/mutators.qtpl:40
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line templates/mutators.qtpl:35 //line templates/mutators.qtpl:40
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line templates/mutators.qtpl:35 //line templates/mutators.qtpl:40
return qs422016 return qs422016
//line templates/mutators.qtpl:35 //line templates/mutators.qtpl:40
} }

View File

@ -4,67 +4,65 @@
{% func HistoryHTML(rq *http.Request, hyphaName, list string) %} {% func HistoryHTML(rq *http.Request, hyphaName, list string) %}
{%= navHTML(rq, hyphaName, "history") %} {%= navHTML(rq, hyphaName, "history") %}
<main> <div class="layout">
<main class="main-width">
<article class="history"> <article class="history">
<h1>History of {%s hyphaName %}</h1> <h1>History of {%s hyphaName %}</h1>
{%s= list %} {%s= list %}
</article> </article>
</main> </main>
</div>
{% endfunc %} {% endfunc %}
{% func RevisionHTML(rq *http.Request, hyphaName, naviTitle, contents, tree, revHash string) %} {% func RevisionHTML(rq *http.Request, hyphaName, naviTitle, contents, relatives, revHash string) %}
{%= navHTML(rq, hyphaName, "revision", revHash) %} {%= navHTML(rq, hyphaName, "revision", revHash) %}
<main> <div class="layout">
<main class="main-width">
<article> <article>
<p>Please note that viewing binary parts of hyphae is not supported in history for now.</p> <p>Please note that viewing binary parts of hyphae is not supported in history for now.</p>
{%s= naviTitle %} {%s= naviTitle %}
{%s= contents %} {%s= contents %}
</article> </article>
<hr/>
<aside>
{%s= tree %}
</aside>
</main> </main>
{%= relativeHyphae(relatives) %}
</div>
{% endfunc %} {% endfunc %}
If `contents` == "", a helpful message is shown instead. If `contents` == "", a helpful message is shown instead.
{% func PageHTML(rq *http.Request, hyphaName, naviTitle, contents, relatives, prevHyphaName, nextHyphaName string, hasAmnt bool) %} {% func PageHTML(rq *http.Request, hyphaName, naviTitle, contents, relatives, prevHyphaName, nextHyphaName string, hasAmnt bool) %}
{%= navHTML(rq, hyphaName, "page") %} {%= navHTML(rq, hyphaName, "page") %}
<div class="layout"> <div class="layout">
<main class="main-width"> <main class="main-width">
<article> <article>
{%s= naviTitle %} {%s= naviTitle %}
{% if contents == "" %} {% if contents == "" %}
<p>This hypha has no text. Why not <a href="/edit/{%s hyphaName %}">create it</a>?</p> <p>This hypha has no text. Why not <a href="/edit/{%s hyphaName %}">create it</a>?</p>
{% else %} {% else %}
{%s= contents %} {%s= contents %}
{% endif %} {% endif %}
</article> </article>
<section class="prevnext"> <section class="prevnext">
{% if prevHyphaName != "" %} {% if prevHyphaName != "" %}
<a class="prevnext__el prevnext__prev" href="/page/{%s prevHyphaName %}" rel="prev">← {%s path.Base(prevHyphaName) %}</a> <a class="prevnext__el prevnext__prev" href="/page/{%s prevHyphaName %}" rel="prev">← {%s path.Base(prevHyphaName) %}</a>
{% endif %} {% endif %}
{% if nextHyphaName != "" %} {% if nextHyphaName != "" %}
<a class="prevnext__el prevnext__next" href="/page/{%s nextHyphaName %}" rel="next">{%s path.Base(nextHyphaName) %} →</a> <a class="prevnext__el prevnext__next" href="/page/{%s nextHyphaName %}" rel="next">{%s path.Base(nextHyphaName) %} →</a>
{% endif %} {% endif %}
</section> </section>
{% if u := user.FromRequest(rq); !user.AuthUsed || u.Group != "anon" %} {% if u := user.FromRequest(rq); !user.AuthUsed || u.Group != "anon" %}
<form action="/upload-binary/{%s hyphaName %}" <form action="/upload-binary/{%s hyphaName %}"
method="post" enctype="multipart/form-data" method="post" enctype="multipart/form-data"
class="upload-amnt"> class="upload-amnt">
{% if hasAmnt %} {% if hasAmnt %}
<a class="upload-amnt__unattach" href="/unattach-ask/{%s hyphaName %}">Unattach current attachment?</a> <a class="upload-amnt__unattach" href="/unattach-ask/{%s hyphaName %}">Unattach current attachment?</a>
{% endif %} {% endif %}
<label for="upload-binary__input">Upload a new attachment</label> <label for="upload-binary__input">Upload a new attachment</label>
<br> <br>
<input type="file" id="upload-binary__input" name="binary"/> <input type="file" id="upload-binary__input" name="binary"/>
<input type="submit"/> <input type="submit"/>
</form> </form>
{% endif %} {% endif %}
</main> </main>
<aside class="relative-hyphae layout-card"> {%= relativeHyphae(relatives) %}
<h1 class="relative-hyphae__title layout-card__title">Relative hyphae</h1>
{%s= relatives %}
</aside>
</div> </div>
{% endfunc %} {% endfunc %}

View File

@ -35,270 +35,268 @@ func StreamHistoryHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, l
streamnavHTML(qw422016, rq, hyphaName, "history") streamnavHTML(qw422016, rq, hyphaName, "history")
//line templates/readers.qtpl:6 //line templates/readers.qtpl:6
qw422016.N().S(` qw422016.N().S(`
<main> <div class="layout">
<main class="main-width">
<article class="history"> <article class="history">
<h1>History of `) <h1>History of `)
//line templates/readers.qtpl:9 //line templates/readers.qtpl:10
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line templates/readers.qtpl:9 //line templates/readers.qtpl:10
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
`) `)
//line templates/readers.qtpl:10 //line templates/readers.qtpl:11
qw422016.N().S(list) qw422016.N().S(list)
//line templates/readers.qtpl:10 //line templates/readers.qtpl:11
qw422016.N().S(` qw422016.N().S(`
</article> </article>
</main> </main>
</div>
`) `)
//line templates/readers.qtpl:13 //line templates/readers.qtpl:15
} }
//line templates/readers.qtpl:13 //line templates/readers.qtpl:15
func WriteHistoryHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, list string) { func WriteHistoryHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, list string) {
//line templates/readers.qtpl:13 //line templates/readers.qtpl:15
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/readers.qtpl:13 //line templates/readers.qtpl:15
StreamHistoryHTML(qw422016, rq, hyphaName, list) StreamHistoryHTML(qw422016, rq, hyphaName, list)
//line templates/readers.qtpl:13 //line templates/readers.qtpl:15
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line templates/readers.qtpl:13 //line templates/readers.qtpl:15
} }
//line templates/readers.qtpl:13 //line templates/readers.qtpl:15
func HistoryHTML(rq *http.Request, hyphaName, list string) string { func HistoryHTML(rq *http.Request, hyphaName, list string) string {
//line templates/readers.qtpl:13 //line templates/readers.qtpl:15
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line templates/readers.qtpl:13 //line templates/readers.qtpl:15
WriteHistoryHTML(qb422016, rq, hyphaName, list) WriteHistoryHTML(qb422016, rq, hyphaName, list)
//line templates/readers.qtpl:13 //line templates/readers.qtpl:15
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line templates/readers.qtpl:13 //line templates/readers.qtpl:15
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line templates/readers.qtpl:13 //line templates/readers.qtpl:15
return qs422016 return qs422016
//line templates/readers.qtpl:13 //line templates/readers.qtpl:15
} }
//line templates/readers.qtpl:15 //line templates/readers.qtpl:17
func StreamRevisionHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, naviTitle, contents, tree, revHash string) { func StreamRevisionHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, naviTitle, contents, relatives, revHash string) {
//line templates/readers.qtpl:15 //line templates/readers.qtpl:17
qw422016.N().S(` qw422016.N().S(`
`) `)
//line templates/readers.qtpl:16 //line templates/readers.qtpl:18
streamnavHTML(qw422016, rq, hyphaName, "revision", revHash) streamnavHTML(qw422016, rq, hyphaName, "revision", revHash)
//line templates/readers.qtpl:16 //line templates/readers.qtpl:18
qw422016.N().S(` qw422016.N().S(`
<main> <div class="layout">
<main class="main-width">
<article> <article>
<p>Please note that viewing binary parts of hyphae is not supported in history for now.</p> <p>Please note that viewing binary parts of hyphae is not supported in history for now.</p>
`) `)
//line templates/readers.qtpl:20 //line templates/readers.qtpl:23
qw422016.N().S(naviTitle) qw422016.N().S(naviTitle)
//line templates/readers.qtpl:20 //line templates/readers.qtpl:23
qw422016.N().S(` qw422016.N().S(`
`) `)
//line templates/readers.qtpl:21 //line templates/readers.qtpl:24
qw422016.N().S(contents) qw422016.N().S(contents)
//line templates/readers.qtpl:21 //line templates/readers.qtpl:24
qw422016.N().S(` qw422016.N().S(`
</article> </article>
<hr/>
<aside>
`)
//line templates/readers.qtpl:25
qw422016.N().S(tree)
//line templates/readers.qtpl:25
qw422016.N().S(`
</aside>
</main> </main>
`) `)
//line templates/readers.qtpl:28 //line templates/readers.qtpl:27
streamrelativeHyphae(qw422016, relatives)
//line templates/readers.qtpl:27
qw422016.N().S(`
</div>
`)
//line templates/readers.qtpl:29
} }
//line templates/readers.qtpl:28 //line templates/readers.qtpl:29
func WriteRevisionHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, naviTitle, contents, tree, revHash string) { func WriteRevisionHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, naviTitle, contents, relatives, revHash string) {
//line templates/readers.qtpl:28 //line templates/readers.qtpl:29
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/readers.qtpl:28 //line templates/readers.qtpl:29
StreamRevisionHTML(qw422016, rq, hyphaName, naviTitle, contents, tree, revHash) StreamRevisionHTML(qw422016, rq, hyphaName, naviTitle, contents, relatives, revHash)
//line templates/readers.qtpl:28 //line templates/readers.qtpl:29
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line templates/readers.qtpl:28 //line templates/readers.qtpl:29
} }
//line templates/readers.qtpl:28 //line templates/readers.qtpl:29
func RevisionHTML(rq *http.Request, hyphaName, naviTitle, contents, tree, revHash string) string { func RevisionHTML(rq *http.Request, hyphaName, naviTitle, contents, relatives, revHash string) string {
//line templates/readers.qtpl:28 //line templates/readers.qtpl:29
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line templates/readers.qtpl:28 //line templates/readers.qtpl:29
WriteRevisionHTML(qb422016, rq, hyphaName, naviTitle, contents, tree, revHash) WriteRevisionHTML(qb422016, rq, hyphaName, naviTitle, contents, relatives, revHash)
//line templates/readers.qtpl:28 //line templates/readers.qtpl:29
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line templates/readers.qtpl:28 //line templates/readers.qtpl:29
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line templates/readers.qtpl:28 //line templates/readers.qtpl:29
return qs422016 return qs422016
//line templates/readers.qtpl:28 //line templates/readers.qtpl:29
} }
// If `contents` == "", a helpful message is shown instead. // If `contents` == "", a helpful message is shown instead.
//line templates/readers.qtpl:31 //line templates/readers.qtpl:32
func StreamPageHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, naviTitle, contents, relatives, prevHyphaName, nextHyphaName string, hasAmnt bool) { func StreamPageHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, naviTitle, contents, relatives, prevHyphaName, nextHyphaName string, hasAmnt bool) {
//line templates/readers.qtpl:31 //line templates/readers.qtpl:32
qw422016.N().S(` qw422016.N().S(`
`) `)
//line templates/readers.qtpl:32 //line templates/readers.qtpl:33
streamnavHTML(qw422016, rq, hyphaName, "page") streamnavHTML(qw422016, rq, hyphaName, "page")
//line templates/readers.qtpl:32 //line templates/readers.qtpl:33
qw422016.N().S(` qw422016.N().S(`
<div class="layout"> <div class="layout">
<main class="main-width"> <main class="main-width">
<article> <article>
`)
//line templates/readers.qtpl:36
qw422016.N().S(naviTitle)
//line templates/readers.qtpl:36
qw422016.N().S(`
`)
//line templates/readers.qtpl:37
if contents == "" {
//line templates/readers.qtpl:37
qw422016.N().S(`
<p>This hypha has no text. Why not <a href="/edit/`)
//line templates/readers.qtpl:38
qw422016.E().S(hyphaName)
//line templates/readers.qtpl:38
qw422016.N().S(`">create it</a>?</p>
`)
//line templates/readers.qtpl:39
} else {
//line templates/readers.qtpl:39
qw422016.N().S(`
`)
//line templates/readers.qtpl:40
qw422016.N().S(contents)
//line templates/readers.qtpl:40
qw422016.N().S(`
`)
//line templates/readers.qtpl:41
}
//line templates/readers.qtpl:41
qw422016.N().S(`
</article>
<section class="prevnext">
`)
//line templates/readers.qtpl:44
if prevHyphaName != "" {
//line templates/readers.qtpl:44
qw422016.N().S(`
<a class="prevnext__el prevnext__prev" href="/page/`)
//line templates/readers.qtpl:45
qw422016.E().S(prevHyphaName)
//line templates/readers.qtpl:45
qw422016.N().S(`" rel="prev">← `)
//line templates/readers.qtpl:45
qw422016.E().S(path.Base(prevHyphaName))
//line templates/readers.qtpl:45
qw422016.N().S(`</a>
`)
//line templates/readers.qtpl:46
}
//line templates/readers.qtpl:46
qw422016.N().S(`
`)
//line templates/readers.qtpl:47
if nextHyphaName != "" {
//line templates/readers.qtpl:47
qw422016.N().S(`
<a class="prevnext__el prevnext__next" href="/page/`)
//line templates/readers.qtpl:48
qw422016.E().S(nextHyphaName)
//line templates/readers.qtpl:48
qw422016.N().S(`" rel="next">`)
//line templates/readers.qtpl:48
qw422016.E().S(path.Base(nextHyphaName))
//line templates/readers.qtpl:48
qw422016.N().S(` </a>
`)
//line templates/readers.qtpl:49
}
//line templates/readers.qtpl:49
qw422016.N().S(`
</section>
`)
//line templates/readers.qtpl:51
if u := user.FromRequest(rq); !user.AuthUsed || u.Group != "anon" {
//line templates/readers.qtpl:51
qw422016.N().S(`
<form action="/upload-binary/`)
//line templates/readers.qtpl:52
qw422016.E().S(hyphaName)
//line templates/readers.qtpl:52
qw422016.N().S(`"
method="post" enctype="multipart/form-data"
class="upload-amnt">
`)
//line templates/readers.qtpl:55
if hasAmnt {
//line templates/readers.qtpl:55
qw422016.N().S(`
<a class="upload-amnt__unattach" href="/unattach-ask/`)
//line templates/readers.qtpl:56
qw422016.E().S(hyphaName)
//line templates/readers.qtpl:56
qw422016.N().S(`">Unattach current attachment?</a>
`)
//line templates/readers.qtpl:57
}
//line templates/readers.qtpl:57
qw422016.N().S(`
<label for="upload-binary__input">Upload a new attachment</label>
<br>
<input type="file" id="upload-binary__input" name="binary"/>
<input type="submit"/>
</form>
`)
//line templates/readers.qtpl:63
}
//line templates/readers.qtpl:63
qw422016.N().S(`
</main>
<aside class="relative-hyphae layout-card">
<h1 class="relative-hyphae__title layout-card__title">Relative hyphae</h1>
`) `)
//line templates/readers.qtpl:67 //line templates/readers.qtpl:37
qw422016.N().S(relatives) qw422016.N().S(naviTitle)
//line templates/readers.qtpl:67 //line templates/readers.qtpl:37
qw422016.N().S(`
`)
//line templates/readers.qtpl:38
if contents == "" {
//line templates/readers.qtpl:38
qw422016.N().S(`
<p>This hypha has no text. Why not <a href="/edit/`)
//line templates/readers.qtpl:39
qw422016.E().S(hyphaName)
//line templates/readers.qtpl:39
qw422016.N().S(`">create it</a>?</p>
`)
//line templates/readers.qtpl:40
} else {
//line templates/readers.qtpl:40
qw422016.N().S(`
`)
//line templates/readers.qtpl:41
qw422016.N().S(contents)
//line templates/readers.qtpl:41
qw422016.N().S(`
`)
//line templates/readers.qtpl:42
}
//line templates/readers.qtpl:42
qw422016.N().S(`
</article>
<section class="prevnext">
`)
//line templates/readers.qtpl:45
if prevHyphaName != "" {
//line templates/readers.qtpl:45
qw422016.N().S(`
<a class="prevnext__el prevnext__prev" href="/page/`)
//line templates/readers.qtpl:46
qw422016.E().S(prevHyphaName)
//line templates/readers.qtpl:46
qw422016.N().S(`" rel="prev">← `)
//line templates/readers.qtpl:46
qw422016.E().S(path.Base(prevHyphaName))
//line templates/readers.qtpl:46
qw422016.N().S(`</a>
`)
//line templates/readers.qtpl:47
}
//line templates/readers.qtpl:47
qw422016.N().S(`
`)
//line templates/readers.qtpl:48
if nextHyphaName != "" {
//line templates/readers.qtpl:48
qw422016.N().S(`
<a class="prevnext__el prevnext__next" href="/page/`)
//line templates/readers.qtpl:49
qw422016.E().S(nextHyphaName)
//line templates/readers.qtpl:49
qw422016.N().S(`" rel="next">`)
//line templates/readers.qtpl:49
qw422016.E().S(path.Base(nextHyphaName))
//line templates/readers.qtpl:49
qw422016.N().S(` </a>
`)
//line templates/readers.qtpl:50
}
//line templates/readers.qtpl:50
qw422016.N().S(`
</section>
`)
//line templates/readers.qtpl:52
if u := user.FromRequest(rq); !user.AuthUsed || u.Group != "anon" {
//line templates/readers.qtpl:52
qw422016.N().S(`
<form action="/upload-binary/`)
//line templates/readers.qtpl:53
qw422016.E().S(hyphaName)
//line templates/readers.qtpl:53
qw422016.N().S(`"
method="post" enctype="multipart/form-data"
class="upload-amnt">
`)
//line templates/readers.qtpl:56
if hasAmnt {
//line templates/readers.qtpl:56
qw422016.N().S(`
<a class="upload-amnt__unattach" href="/unattach-ask/`)
//line templates/readers.qtpl:57
qw422016.E().S(hyphaName)
//line templates/readers.qtpl:57
qw422016.N().S(`">Unattach current attachment?</a>
`)
//line templates/readers.qtpl:58
}
//line templates/readers.qtpl:58
qw422016.N().S(`
<label for="upload-binary__input">Upload a new attachment</label>
<br>
<input type="file" id="upload-binary__input" name="binary"/>
<input type="submit"/>
</form>
`)
//line templates/readers.qtpl:64
}
//line templates/readers.qtpl:64
qw422016.N().S(`
</main>
`)
//line templates/readers.qtpl:66
streamrelativeHyphae(qw422016, relatives)
//line templates/readers.qtpl:66
qw422016.N().S(` qw422016.N().S(`
</aside>
</div> </div>
`) `)
//line templates/readers.qtpl:70 //line templates/readers.qtpl:68
} }
//line templates/readers.qtpl:70 //line templates/readers.qtpl:68
func WritePageHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, naviTitle, contents, relatives, prevHyphaName, nextHyphaName string, hasAmnt bool) { func WritePageHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, naviTitle, contents, relatives, prevHyphaName, nextHyphaName string, hasAmnt bool) {
//line templates/readers.qtpl:70 //line templates/readers.qtpl:68
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/readers.qtpl:70 //line templates/readers.qtpl:68
StreamPageHTML(qw422016, rq, hyphaName, naviTitle, contents, relatives, prevHyphaName, nextHyphaName, hasAmnt) StreamPageHTML(qw422016, rq, hyphaName, naviTitle, contents, relatives, prevHyphaName, nextHyphaName, hasAmnt)
//line templates/readers.qtpl:70 //line templates/readers.qtpl:68
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line templates/readers.qtpl:70 //line templates/readers.qtpl:68
} }
//line templates/readers.qtpl:70 //line templates/readers.qtpl:68
func PageHTML(rq *http.Request, hyphaName, naviTitle, contents, relatives, prevHyphaName, nextHyphaName string, hasAmnt bool) string { func PageHTML(rq *http.Request, hyphaName, naviTitle, contents, relatives, prevHyphaName, nextHyphaName string, hasAmnt bool) string {
//line templates/readers.qtpl:70 //line templates/readers.qtpl:68
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line templates/readers.qtpl:70 //line templates/readers.qtpl:68
WritePageHTML(qb422016, rq, hyphaName, naviTitle, contents, relatives, prevHyphaName, nextHyphaName, hasAmnt) WritePageHTML(qb422016, rq, hyphaName, naviTitle, contents, relatives, prevHyphaName, nextHyphaName, hasAmnt)
//line templates/readers.qtpl:70 //line templates/readers.qtpl:68
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line templates/readers.qtpl:70 //line templates/readers.qtpl:68
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line templates/readers.qtpl:70 //line templates/readers.qtpl:68
return qs422016 return qs422016
//line templates/readers.qtpl:70 //line templates/readers.qtpl:68
} }

View File

@ -1,5 +1,6 @@
{% func RecentChangesHTML(changes []string, n int) %} {% func RecentChangesHTML(changes []string, n int) %}
<main class="recent-changes"> <div class="layout">
<main class="main-width recent-changes">
<h1>Recent Changes</h1> <h1>Recent Changes</h1>
<p><a href="/">← Back</a></p> <p><a href="/">← Back</a></p>
@ -40,4 +41,5 @@
{% endif %} {% endif %}
</section> </section>
</main> </main>
</div>
{% endfunc %} {% endfunc %}

View File

@ -21,58 +21,59 @@ var (
func StreamRecentChangesHTML(qw422016 *qt422016.Writer, changes []string, n int) { func StreamRecentChangesHTML(qw422016 *qt422016.Writer, changes []string, n int) {
//line templates/recent_changes.qtpl:1 //line templates/recent_changes.qtpl:1
qw422016.N().S(` qw422016.N().S(`
<main class="recent-changes"> <div class="layout">
<main class="main-width recent-changes">
<h1>Recent Changes</h1> <h1>Recent Changes</h1>
<p><a href="/"> Back</a></p> <p><a href="/"> Back</a></p>
<nav class="recent-changes__count"> <nav class="recent-changes__count">
See See
`) `)
//line templates/recent_changes.qtpl:8 //line templates/recent_changes.qtpl:9
for _, m := range []int{20, 0, 50, 0, 100} { for _, m := range []int{20, 0, 50, 0, 100} {
//line templates/recent_changes.qtpl:8 //line templates/recent_changes.qtpl:9
qw422016.N().S(` qw422016.N().S(`
`) `)
//line templates/recent_changes.qtpl:9 //line templates/recent_changes.qtpl:10
switch m { switch m {
//line templates/recent_changes.qtpl:10 //line templates/recent_changes.qtpl:11
case 0: case 0:
//line templates/recent_changes.qtpl:10 //line templates/recent_changes.qtpl:11
qw422016.N().S(` qw422016.N().S(`
<span aria-hidden="true">|</span> <span aria-hidden="true">|</span>
`) `)
//line templates/recent_changes.qtpl:12 //line templates/recent_changes.qtpl:13
case n: case n:
//line templates/recent_changes.qtpl:12 //line templates/recent_changes.qtpl:13
qw422016.N().S(` qw422016.N().S(`
<b>`) <b>`)
//line templates/recent_changes.qtpl:13 //line templates/recent_changes.qtpl:14
qw422016.N().D(n) qw422016.N().D(n)
//line templates/recent_changes.qtpl:13 //line templates/recent_changes.qtpl:14
qw422016.N().S(`</b> qw422016.N().S(`</b>
`) `)
//line templates/recent_changes.qtpl:14 //line templates/recent_changes.qtpl:15
default: default:
//line templates/recent_changes.qtpl:14 //line templates/recent_changes.qtpl:15
qw422016.N().S(` qw422016.N().S(`
<a href="/recent-changes/`) <a href="/recent-changes/`)
//line templates/recent_changes.qtpl:15 //line templates/recent_changes.qtpl:16
qw422016.N().D(m) qw422016.N().D(m)
//line templates/recent_changes.qtpl:15 //line templates/recent_changes.qtpl:16
qw422016.N().S(`">`) qw422016.N().S(`">`)
//line templates/recent_changes.qtpl:15 //line templates/recent_changes.qtpl:16
qw422016.N().D(m) qw422016.N().D(m)
//line templates/recent_changes.qtpl:15 //line templates/recent_changes.qtpl:16
qw422016.N().S(`</a> qw422016.N().S(`</a>
`) `)
//line templates/recent_changes.qtpl:16 //line templates/recent_changes.qtpl:17
} }
//line templates/recent_changes.qtpl:16 //line templates/recent_changes.qtpl:17
qw422016.N().S(` qw422016.N().S(`
`) `)
//line templates/recent_changes.qtpl:17 //line templates/recent_changes.qtpl:18
} }
//line templates/recent_changes.qtpl:17 //line templates/recent_changes.qtpl:18
qw422016.N().S(` qw422016.N().S(`
recent changes recent changes
</nav> </nav>
@ -80,80 +81,81 @@ func StreamRecentChangesHTML(qw422016 *qt422016.Writer, changes []string, n int)
<p><img class="icon" width="20" height="20" src="https://upload.wikimedia.org/wikipedia/commons/4/46/Generic_Feed-icon.svg">Subscribe via <a href="/recent-changes-rss">RSS</a>, <a href="/recent-changes-atom">Atom</a> or <a href="/recent-changes-json">JSON feed</a>.</p> <p><img class="icon" width="20" height="20" src="https://upload.wikimedia.org/wikipedia/commons/4/46/Generic_Feed-icon.svg">Subscribe via <a href="/recent-changes-rss">RSS</a>, <a href="/recent-changes-atom">Atom</a> or <a href="/recent-changes-json">JSON feed</a>.</p>
`) `)
//line templates/recent_changes.qtpl:28 //line templates/recent_changes.qtpl:29
qw422016.N().S(` qw422016.N().S(`
<section class="recent-changes__list" role="feed"> <section class="recent-changes__list" role="feed">
`) `)
//line templates/recent_changes.qtpl:31 //line templates/recent_changes.qtpl:32
if len(changes) == 0 { if len(changes) == 0 {
//line templates/recent_changes.qtpl:31 //line templates/recent_changes.qtpl:32
qw422016.N().S(` qw422016.N().S(`
<p>Could not find any recent changes.</p> <p>Could not find any recent changes.</p>
`) `)
//line templates/recent_changes.qtpl:33 //line templates/recent_changes.qtpl:34
} else { } else {
//line templates/recent_changes.qtpl:33 //line templates/recent_changes.qtpl:34
qw422016.N().S(` qw422016.N().S(`
`) `)
//line templates/recent_changes.qtpl:34 //line templates/recent_changes.qtpl:35
for i, entry := range changes { for i, entry := range changes {
//line templates/recent_changes.qtpl:34 //line templates/recent_changes.qtpl:35
qw422016.N().S(` qw422016.N().S(`
<ul class="recent-changes__entry rc-entry" role="article" <ul class="recent-changes__entry rc-entry" role="article"
aria-setsize="`) aria-setsize="`)
//line templates/recent_changes.qtpl:36 //line templates/recent_changes.qtpl:37
qw422016.N().D(n) qw422016.N().D(n)
//line templates/recent_changes.qtpl:36 //line templates/recent_changes.qtpl:37
qw422016.N().S(`" aria-posinset="`) qw422016.N().S(`" aria-posinset="`)
//line templates/recent_changes.qtpl:36 //line templates/recent_changes.qtpl:37
qw422016.N().D(i) qw422016.N().D(i)
//line templates/recent_changes.qtpl:36 //line templates/recent_changes.qtpl:37
qw422016.N().S(`"> qw422016.N().S(`">
`) `)
//line templates/recent_changes.qtpl:37 //line templates/recent_changes.qtpl:38
qw422016.N().S(entry) qw422016.N().S(entry)
//line templates/recent_changes.qtpl:37 //line templates/recent_changes.qtpl:38
qw422016.N().S(` qw422016.N().S(`
</ul> </ul>
`) `)
//line templates/recent_changes.qtpl:39 //line templates/recent_changes.qtpl:40
} }
//line templates/recent_changes.qtpl:39 //line templates/recent_changes.qtpl:40
qw422016.N().S(` qw422016.N().S(`
`) `)
//line templates/recent_changes.qtpl:40 //line templates/recent_changes.qtpl:41
} }
//line templates/recent_changes.qtpl:40 //line templates/recent_changes.qtpl:41
qw422016.N().S(` qw422016.N().S(`
</section> </section>
</main> </main>
</div>
`) `)
//line templates/recent_changes.qtpl:43 //line templates/recent_changes.qtpl:45
} }
//line templates/recent_changes.qtpl:43 //line templates/recent_changes.qtpl:45
func WriteRecentChangesHTML(qq422016 qtio422016.Writer, changes []string, n int) { func WriteRecentChangesHTML(qq422016 qtio422016.Writer, changes []string, n int) {
//line templates/recent_changes.qtpl:43 //line templates/recent_changes.qtpl:45
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/recent_changes.qtpl:43 //line templates/recent_changes.qtpl:45
StreamRecentChangesHTML(qw422016, changes, n) StreamRecentChangesHTML(qw422016, changes, n)
//line templates/recent_changes.qtpl:43 //line templates/recent_changes.qtpl:45
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line templates/recent_changes.qtpl:43 //line templates/recent_changes.qtpl:45
} }
//line templates/recent_changes.qtpl:43 //line templates/recent_changes.qtpl:45
func RecentChangesHTML(changes []string, n int) string { func RecentChangesHTML(changes []string, n int) string {
//line templates/recent_changes.qtpl:43 //line templates/recent_changes.qtpl:45
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line templates/recent_changes.qtpl:43 //line templates/recent_changes.qtpl:45
WriteRecentChangesHTML(qb422016, changes, n) WriteRecentChangesHTML(qb422016, changes, n)
//line templates/recent_changes.qtpl:43 //line templates/recent_changes.qtpl:45
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line templates/recent_changes.qtpl:43 //line templates/recent_changes.qtpl:45
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line templates/recent_changes.qtpl:43 //line templates/recent_changes.qtpl:45
return qs422016 return qs422016
//line templates/recent_changes.qtpl:43 //line templates/recent_changes.qtpl:45
} }

View File

@ -2,7 +2,8 @@
This dialog is to be shown to a user when they try to rename a hypha. This dialog is to be shown to a user when they try to rename a hypha.
{% func RenameAskHTML(rq *http.Request, hyphaName string, isOld bool) %} {% func RenameAskHTML(rq *http.Request, hyphaName string, isOld bool) %}
{%= navHTML(rq, hyphaName, "rename-ask") %} {%= navHTML(rq, hyphaName, "rename-ask") %}
<main> <div class="layout">
<main class="main-width">
{%- if isOld -%} {%- if isOld -%}
<section> <section>
<h1>Rename {%s hyphaName %}</h1> <h1>Rename {%s hyphaName %}</h1>
@ -26,6 +27,7 @@ This dialog is to be shown to a user when they try to rename a hypha.
{%= cannotRenameDueToNonExistence(hyphaName) %} {%= cannotRenameDueToNonExistence(hyphaName) %}
{%- endif -%} {%- endif -%}
</main> </main>
</div>
{% endfunc %} {% endfunc %}
{% func cannotRenameDueToNonExistence(hyphaName string) %} {% func cannotRenameDueToNonExistence(hyphaName string) %}

View File

@ -31,28 +31,29 @@ func StreamRenameAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName
streamnavHTML(qw422016, rq, hyphaName, "rename-ask") streamnavHTML(qw422016, rq, hyphaName, "rename-ask")
//line templates/rename.qtpl:4 //line templates/rename.qtpl:4
qw422016.N().S(` qw422016.N().S(`
<main> <div class="layout">
<main class="main-width">
`) `)
//line templates/rename.qtpl:6 //line templates/rename.qtpl:7
if isOld { if isOld {
//line templates/rename.qtpl:6 //line templates/rename.qtpl:7
qw422016.N().S(` <section> qw422016.N().S(` <section>
<h1>Rename `) <h1>Rename `)
//line templates/rename.qtpl:8 //line templates/rename.qtpl:9
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line templates/rename.qtpl:8 //line templates/rename.qtpl:9
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
<form action="/rename-confirm/`) <form action="/rename-confirm/`)
//line templates/rename.qtpl:9 //line templates/rename.qtpl:10
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line templates/rename.qtpl:9 //line templates/rename.qtpl:10
qw422016.N().S(`" method="post" enctype="multipart/form-data"> qw422016.N().S(`" method="post" enctype="multipart/form-data">
<fieldset> <fieldset>
<legend>New name</legend> <legend>New name</legend>
<input type="text" value="`) <input type="text" value="`)
//line templates/rename.qtpl:12 //line templates/rename.qtpl:13
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line templates/rename.qtpl:12 //line templates/rename.qtpl:13
qw422016.N().S(`" required autofocus id="new-name" name="new-name"/> qw422016.N().S(`" required autofocus id="new-name" name="new-name"/>
</fieldset> </fieldset>
@ -67,92 +68,93 @@ func StreamRenameAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName
</form> </form>
</section> </section>
`) `)
//line templates/rename.qtpl:25 //line templates/rename.qtpl:26
} else { } else {
//line templates/rename.qtpl:25 //line templates/rename.qtpl:26
qw422016.N().S(` `) qw422016.N().S(` `)
//line templates/rename.qtpl:26 //line templates/rename.qtpl:27
streamcannotRenameDueToNonExistence(qw422016, hyphaName) streamcannotRenameDueToNonExistence(qw422016, hyphaName)
//line templates/rename.qtpl:26 //line templates/rename.qtpl:27
qw422016.N().S(` qw422016.N().S(`
`) `)
//line templates/rename.qtpl:27 //line templates/rename.qtpl:28
} }
//line templates/rename.qtpl:27 //line templates/rename.qtpl:28
qw422016.N().S(`</main> qw422016.N().S(`</main>
</div>
`) `)
//line templates/rename.qtpl:29 //line templates/rename.qtpl:31
} }
//line templates/rename.qtpl:29 //line templates/rename.qtpl:31
func WriteRenameAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string, isOld bool) { func WriteRenameAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
//line templates/rename.qtpl:29 //line templates/rename.qtpl:31
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/rename.qtpl:29 //line templates/rename.qtpl:31
StreamRenameAskHTML(qw422016, rq, hyphaName, isOld) StreamRenameAskHTML(qw422016, rq, hyphaName, isOld)
//line templates/rename.qtpl:29 //line templates/rename.qtpl:31
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line templates/rename.qtpl:29 //line templates/rename.qtpl:31
} }
//line templates/rename.qtpl:29 //line templates/rename.qtpl:31
func RenameAskHTML(rq *http.Request, hyphaName string, isOld bool) string { func RenameAskHTML(rq *http.Request, hyphaName string, isOld bool) string {
//line templates/rename.qtpl:29 //line templates/rename.qtpl:31
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line templates/rename.qtpl:29 //line templates/rename.qtpl:31
WriteRenameAskHTML(qb422016, rq, hyphaName, isOld) WriteRenameAskHTML(qb422016, rq, hyphaName, isOld)
//line templates/rename.qtpl:29 //line templates/rename.qtpl:31
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line templates/rename.qtpl:29 //line templates/rename.qtpl:31
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line templates/rename.qtpl:29 //line templates/rename.qtpl:31
return qs422016 return qs422016
//line templates/rename.qtpl:29 //line templates/rename.qtpl:31
} }
//line templates/rename.qtpl:31 //line templates/rename.qtpl:33
func streamcannotRenameDueToNonExistence(qw422016 *qt422016.Writer, hyphaName string) { func streamcannotRenameDueToNonExistence(qw422016 *qt422016.Writer, hyphaName string) {
//line templates/rename.qtpl:31 //line templates/rename.qtpl:33
qw422016.N().S(` qw422016.N().S(`
<section> <section>
<h1>Cannot rename `) <h1>Cannot rename `)
//line templates/rename.qtpl:33 //line templates/rename.qtpl:35
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line templates/rename.qtpl:33 //line templates/rename.qtpl:35
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
<p>This hypha does not exist.</p> <p>This hypha does not exist.</p>
<p><a href="/page/`) <p><a href="/page/`)
//line templates/rename.qtpl:35 //line templates/rename.qtpl:37
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line templates/rename.qtpl:35 //line templates/rename.qtpl:37
qw422016.N().S(`">Go back</a></p> qw422016.N().S(`">Go back</a></p>
</section> </section>
`) `)
//line templates/rename.qtpl:37 //line templates/rename.qtpl:39
} }
//line templates/rename.qtpl:37 //line templates/rename.qtpl:39
func writecannotRenameDueToNonExistence(qq422016 qtio422016.Writer, hyphaName string) { func writecannotRenameDueToNonExistence(qq422016 qtio422016.Writer, hyphaName string) {
//line templates/rename.qtpl:37 //line templates/rename.qtpl:39
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/rename.qtpl:37 //line templates/rename.qtpl:39
streamcannotRenameDueToNonExistence(qw422016, hyphaName) streamcannotRenameDueToNonExistence(qw422016, hyphaName)
//line templates/rename.qtpl:37 //line templates/rename.qtpl:39
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line templates/rename.qtpl:37 //line templates/rename.qtpl:39
} }
//line templates/rename.qtpl:37 //line templates/rename.qtpl:39
func cannotRenameDueToNonExistence(hyphaName string) string { func cannotRenameDueToNonExistence(hyphaName string) string {
//line templates/rename.qtpl:37 //line templates/rename.qtpl:39
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line templates/rename.qtpl:37 //line templates/rename.qtpl:39
writecannotRenameDueToNonExistence(qb422016, hyphaName) writecannotRenameDueToNonExistence(qb422016, hyphaName)
//line templates/rename.qtpl:37 //line templates/rename.qtpl:39
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line templates/rename.qtpl:37 //line templates/rename.qtpl:39
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line templates/rename.qtpl:37 //line templates/rename.qtpl:39
return qs422016 return qs422016
//line templates/rename.qtpl:37 //line templates/rename.qtpl:39
} }

View File

@ -27,7 +27,8 @@
{% endfunc %} {% endfunc %}
{% func HyphaListHTML(tbody string, pageCount int) %} {% func HyphaListHTML(tbody string, pageCount int) %}
<main> <div class="layout">
<main class="main-width">
<h1>List of hyphae</h1> <h1>List of hyphae</h1>
<p>This wiki has {%d pageCount %} hyphae.</p> <p>This wiki has {%d pageCount %} hyphae.</p>
<table> <table>
@ -42,6 +43,7 @@
</tbody> </tbody>
</table> </table>
</main> </main>
</div>
{% endfunc %} {% endfunc %}
{% func HyphaListRowHTML(hyphaName, binaryMime string, binaryPresent bool) %} {% func HyphaListRowHTML(hyphaName, binaryMime string, binaryPresent bool) %}
@ -56,7 +58,8 @@
{% endfunc %} {% endfunc %}
{% func AboutHTML() %} {% func AboutHTML() %}
<main> <div class="layout">
<main class="main-width">
<section> <section>
<h1>About {%s util.SiteName %}</h1> <h1>About {%s util.SiteName %}</h1>
<ul> <ul>
@ -75,4 +78,5 @@
<p>See <a href="/list">/list</a> for information about hyphae on this wiki.</p> <p>See <a href="/list">/list</a> for information about hyphae on this wiki.</p>
</section> </section>
</main> </main>
</div>
{% endfunc %} {% endfunc %}

View File

@ -117,12 +117,13 @@ func BaseHTML(title, body string, u *user.User, headElements ...string) string {
func StreamHyphaListHTML(qw422016 *qt422016.Writer, tbody string, pageCount int) { func StreamHyphaListHTML(qw422016 *qt422016.Writer, tbody string, pageCount int) {
//line templates/stuff.qtpl:29 //line templates/stuff.qtpl:29
qw422016.N().S(` qw422016.N().S(`
<main> <div class="layout">
<main class="main-width">
<h1>List of hyphae</h1> <h1>List of hyphae</h1>
<p>This wiki has `) <p>This wiki has `)
//line templates/stuff.qtpl:32 //line templates/stuff.qtpl:33
qw422016.N().D(pageCount) qw422016.N().D(pageCount)
//line templates/stuff.qtpl:32 //line templates/stuff.qtpl:33
qw422016.N().S(` hyphae.</p> qw422016.N().S(` hyphae.</p>
<table> <table>
<thead> <thead>
@ -133,203 +134,206 @@ func StreamHyphaListHTML(qw422016 *qt422016.Writer, tbody string, pageCount int)
</thead> </thead>
<tbody> <tbody>
`) `)
//line templates/stuff.qtpl:41 //line templates/stuff.qtpl:42
qw422016.N().S(tbody) qw422016.N().S(tbody)
//line templates/stuff.qtpl:41 //line templates/stuff.qtpl:42
qw422016.N().S(` qw422016.N().S(`
</tbody> </tbody>
</table> </table>
</main> </main>
</div>
`) `)
//line templates/stuff.qtpl:45 //line templates/stuff.qtpl:47
} }
//line templates/stuff.qtpl:45 //line templates/stuff.qtpl:47
func WriteHyphaListHTML(qq422016 qtio422016.Writer, tbody string, pageCount int) { func WriteHyphaListHTML(qq422016 qtio422016.Writer, tbody string, pageCount int) {
//line templates/stuff.qtpl:45 //line templates/stuff.qtpl:47
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/stuff.qtpl:45 //line templates/stuff.qtpl:47
StreamHyphaListHTML(qw422016, tbody, pageCount) StreamHyphaListHTML(qw422016, tbody, pageCount)
//line templates/stuff.qtpl:45 //line templates/stuff.qtpl:47
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line templates/stuff.qtpl:45 //line templates/stuff.qtpl:47
} }
//line templates/stuff.qtpl:45 //line templates/stuff.qtpl:47
func HyphaListHTML(tbody string, pageCount int) string { func HyphaListHTML(tbody string, pageCount int) string {
//line templates/stuff.qtpl:45 //line templates/stuff.qtpl:47
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line templates/stuff.qtpl:45 //line templates/stuff.qtpl:47
WriteHyphaListHTML(qb422016, tbody, pageCount) WriteHyphaListHTML(qb422016, tbody, pageCount)
//line templates/stuff.qtpl:45 //line templates/stuff.qtpl:47
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line templates/stuff.qtpl:45 //line templates/stuff.qtpl:47
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line templates/stuff.qtpl:45 //line templates/stuff.qtpl:47
return qs422016 return qs422016
//line templates/stuff.qtpl:45 //line templates/stuff.qtpl:47
} }
//line templates/stuff.qtpl:47 //line templates/stuff.qtpl:49
func StreamHyphaListRowHTML(qw422016 *qt422016.Writer, hyphaName, binaryMime string, binaryPresent bool) { func StreamHyphaListRowHTML(qw422016 *qt422016.Writer, hyphaName, binaryMime string, binaryPresent bool) {
//line templates/stuff.qtpl:47 //line templates/stuff.qtpl:49
qw422016.N().S(` qw422016.N().S(`
<tr> <tr>
<td><a href="/page/`) <td><a href="/page/`)
//line templates/stuff.qtpl:49 //line templates/stuff.qtpl:51
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line templates/stuff.qtpl:49 //line templates/stuff.qtpl:51
qw422016.N().S(`">`) qw422016.N().S(`">`)
//line templates/stuff.qtpl:49 //line templates/stuff.qtpl:51
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line templates/stuff.qtpl:49 //line templates/stuff.qtpl:51
qw422016.N().S(`</a></td> qw422016.N().S(`</a></td>
`) `)
//line templates/stuff.qtpl:50 //line templates/stuff.qtpl:52
if binaryPresent { if binaryPresent {
//line templates/stuff.qtpl:50 //line templates/stuff.qtpl:52
qw422016.N().S(` qw422016.N().S(`
<td>`) <td>`)
//line templates/stuff.qtpl:51 //line templates/stuff.qtpl:53
qw422016.E().S(binaryMime) qw422016.E().S(binaryMime)
//line templates/stuff.qtpl:51 //line templates/stuff.qtpl:53
qw422016.N().S(`</td> qw422016.N().S(`</td>
`) `)
//line templates/stuff.qtpl:52 //line templates/stuff.qtpl:54
} else { } else {
//line templates/stuff.qtpl:52 //line templates/stuff.qtpl:54
qw422016.N().S(` qw422016.N().S(`
<td></td> <td></td>
`) `)
//line templates/stuff.qtpl:54 //line templates/stuff.qtpl:56
} }
//line templates/stuff.qtpl:54 //line templates/stuff.qtpl:56
qw422016.N().S(` qw422016.N().S(`
</tr> </tr>
`) `)
//line templates/stuff.qtpl:56 //line templates/stuff.qtpl:58
} }
//line templates/stuff.qtpl:56 //line templates/stuff.qtpl:58
func WriteHyphaListRowHTML(qq422016 qtio422016.Writer, hyphaName, binaryMime string, binaryPresent bool) { func WriteHyphaListRowHTML(qq422016 qtio422016.Writer, hyphaName, binaryMime string, binaryPresent bool) {
//line templates/stuff.qtpl:56 //line templates/stuff.qtpl:58
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/stuff.qtpl:56 //line templates/stuff.qtpl:58
StreamHyphaListRowHTML(qw422016, hyphaName, binaryMime, binaryPresent) StreamHyphaListRowHTML(qw422016, hyphaName, binaryMime, binaryPresent)
//line templates/stuff.qtpl:56 //line templates/stuff.qtpl:58
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line templates/stuff.qtpl:56 //line templates/stuff.qtpl:58
} }
//line templates/stuff.qtpl:56 //line templates/stuff.qtpl:58
func HyphaListRowHTML(hyphaName, binaryMime string, binaryPresent bool) string { func HyphaListRowHTML(hyphaName, binaryMime string, binaryPresent bool) string {
//line templates/stuff.qtpl:56 //line templates/stuff.qtpl:58
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line templates/stuff.qtpl:56 //line templates/stuff.qtpl:58
WriteHyphaListRowHTML(qb422016, hyphaName, binaryMime, binaryPresent) WriteHyphaListRowHTML(qb422016, hyphaName, binaryMime, binaryPresent)
//line templates/stuff.qtpl:56 //line templates/stuff.qtpl:58
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line templates/stuff.qtpl:56 //line templates/stuff.qtpl:58
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line templates/stuff.qtpl:56 //line templates/stuff.qtpl:58
return qs422016 return qs422016
//line templates/stuff.qtpl:56 //line templates/stuff.qtpl:58
} }
//line templates/stuff.qtpl:58 //line templates/stuff.qtpl:60
func StreamAboutHTML(qw422016 *qt422016.Writer) { func StreamAboutHTML(qw422016 *qt422016.Writer) {
//line templates/stuff.qtpl:58 //line templates/stuff.qtpl:60
qw422016.N().S(` qw422016.N().S(`
<main> <div class="layout">
<main class="main-width">
<section> <section>
<h1>About `) <h1>About `)
//line templates/stuff.qtpl:61 //line templates/stuff.qtpl:64
qw422016.E().S(util.SiteName) qw422016.E().S(util.SiteName)
//line templates/stuff.qtpl:61 //line templates/stuff.qtpl:64
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
<ul> <ul>
<li><b><a href="https://mycorrhiza.lesarbr.es">MycorrhizaWiki</a> version:</b> β 0.13 indev</li> <li><b><a href="https://mycorrhiza.lesarbr.es">MycorrhizaWiki</a> version:</b> β 0.13 indev</li>
`) `)
//line templates/stuff.qtpl:64 //line templates/stuff.qtpl:67
if user.AuthUsed { if user.AuthUsed {
//line templates/stuff.qtpl:64 //line templates/stuff.qtpl:67
qw422016.N().S(` <li><b>User count:</b> `) qw422016.N().S(` <li><b>User count:</b> `)
//line templates/stuff.qtpl:65 //line templates/stuff.qtpl:68
qw422016.N().D(user.Count()) qw422016.N().D(user.Count())
//line templates/stuff.qtpl:65 //line templates/stuff.qtpl:68
qw422016.N().S(`</li> qw422016.N().S(`</li>
<li><b>Home page:</b> <a href="/">`) <li><b>Home page:</b> <a href="/">`)
//line templates/stuff.qtpl:66 //line templates/stuff.qtpl:69
qw422016.E().S(util.HomePage) qw422016.E().S(util.HomePage)
//line templates/stuff.qtpl:66 //line templates/stuff.qtpl:69
qw422016.N().S(`</a></li> qw422016.N().S(`</a></li>
<li><b>Administrators:</b>`) <li><b>Administrators:</b>`)
//line templates/stuff.qtpl:67 //line templates/stuff.qtpl:70
for i, username := range user.ListUsersWithGroup("admin") { for i, username := range user.ListUsersWithGroup("admin") {
//line templates/stuff.qtpl:68 //line templates/stuff.qtpl:71
if i > 0 { if i > 0 {
//line templates/stuff.qtpl:68 //line templates/stuff.qtpl:71
qw422016.N().S(`<span aria-hidden="true">, </span> qw422016.N().S(`<span aria-hidden="true">, </span>
`) `)
//line templates/stuff.qtpl:69 //line templates/stuff.qtpl:72
} }
//line templates/stuff.qtpl:69 //line templates/stuff.qtpl:72
qw422016.N().S(` <a href="/page/`) qw422016.N().S(` <a href="/page/`)
//line templates/stuff.qtpl:70 //line templates/stuff.qtpl:73
qw422016.E().S(util.UserHypha) qw422016.E().S(util.UserHypha)
//line templates/stuff.qtpl:70 //line templates/stuff.qtpl:73
qw422016.N().S(`/`) qw422016.N().S(`/`)
//line templates/stuff.qtpl:70 //line templates/stuff.qtpl:73
qw422016.E().S(username) qw422016.E().S(username)
//line templates/stuff.qtpl:70 //line templates/stuff.qtpl:73
qw422016.N().S(`">`) qw422016.N().S(`">`)
//line templates/stuff.qtpl:70 //line templates/stuff.qtpl:73
qw422016.E().S(username) qw422016.E().S(username)
//line templates/stuff.qtpl:70 //line templates/stuff.qtpl:73
qw422016.N().S(`</a>`) qw422016.N().S(`</a>`)
//line templates/stuff.qtpl:70 //line templates/stuff.qtpl:73
} }
//line templates/stuff.qtpl:70 //line templates/stuff.qtpl:73
qw422016.N().S(`</li> qw422016.N().S(`</li>
`) `)
//line templates/stuff.qtpl:71 //line templates/stuff.qtpl:74
} else { } else {
//line templates/stuff.qtpl:71 //line templates/stuff.qtpl:74
qw422016.N().S(` <li>This wiki does not use authorization</li> qw422016.N().S(` <li>This wiki does not use authorization</li>
`) `)
//line templates/stuff.qtpl:73 //line templates/stuff.qtpl:76
} }
//line templates/stuff.qtpl:73 //line templates/stuff.qtpl:76
qw422016.N().S(` </ul> qw422016.N().S(` </ul>
<p>See <a href="/list">/list</a> for information about hyphae on this wiki.</p> <p>See <a href="/list">/list</a> for information about hyphae on this wiki.</p>
</section> </section>
</main> </main>
</div>
`) `)
//line templates/stuff.qtpl:78 //line templates/stuff.qtpl:82
} }
//line templates/stuff.qtpl:78 //line templates/stuff.qtpl:82
func WriteAboutHTML(qq422016 qtio422016.Writer) { func WriteAboutHTML(qq422016 qtio422016.Writer) {
//line templates/stuff.qtpl:78 //line templates/stuff.qtpl:82
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/stuff.qtpl:78 //line templates/stuff.qtpl:82
StreamAboutHTML(qw422016) StreamAboutHTML(qw422016)
//line templates/stuff.qtpl:78 //line templates/stuff.qtpl:82
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line templates/stuff.qtpl:78 //line templates/stuff.qtpl:82
} }
//line templates/stuff.qtpl:78 //line templates/stuff.qtpl:82
func AboutHTML() string { func AboutHTML() string {
//line templates/stuff.qtpl:78 //line templates/stuff.qtpl:82
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line templates/stuff.qtpl:78 //line templates/stuff.qtpl:82
WriteAboutHTML(qb422016) WriteAboutHTML(qb422016)
//line templates/stuff.qtpl:78 //line templates/stuff.qtpl:82
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line templates/stuff.qtpl:78 //line templates/stuff.qtpl:82
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line templates/stuff.qtpl:78 //line templates/stuff.qtpl:82
return qs422016 return qs422016
//line templates/stuff.qtpl:78 //line templates/stuff.qtpl:82
} }

View File

@ -1,7 +1,8 @@
{% import "net/http" %} {% import "net/http" %}
{% func UnattachAskHTML(rq *http.Request, hyphaName string, isOld bool) %} {% func UnattachAskHTML(rq *http.Request, hyphaName string, isOld bool) %}
<main>
{%= navHTML(rq, hyphaName, "unattach-ask") %} {%= navHTML(rq, hyphaName, "unattach-ask") %}
<div class="layout">
<main class="main-width">
{%- if isOld -%} {%- if isOld -%}
<section> <section>
<h1>Unattach {%s hyphaName %}?</h1> <h1>Unattach {%s hyphaName %}?</h1>
@ -13,6 +14,7 @@
{%= cannotUnattachDueToNonExistence(hyphaName) %} {%= cannotUnattachDueToNonExistence(hyphaName) %}
{%- endif -%} {%- endif -%}
</main> </main>
</div>
{% endfunc %} {% endfunc %}
{% func cannotUnattachDueToNonExistence(hyphaName string) %} {% func cannotUnattachDueToNonExistence(hyphaName string) %}

View File

@ -24,125 +24,127 @@ var (
func StreamUnattachAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string, isOld bool) { func StreamUnattachAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
//line templates/unattach.qtpl:2 //line templates/unattach.qtpl:2
qw422016.N().S(` qw422016.N().S(`
<main>
`) `)
//line templates/unattach.qtpl:4 //line templates/unattach.qtpl:3
streamnavHTML(qw422016, rq, hyphaName, "unattach-ask") streamnavHTML(qw422016, rq, hyphaName, "unattach-ask")
//line templates/unattach.qtpl:4 //line templates/unattach.qtpl:3
qw422016.N().S(` qw422016.N().S(`
<div class="layout">
<main class="main-width">
`) `)
//line templates/unattach.qtpl:5 //line templates/unattach.qtpl:6
if isOld { if isOld {
//line templates/unattach.qtpl:5 //line templates/unattach.qtpl:6
qw422016.N().S(` <section> qw422016.N().S(` <section>
<h1>Unattach `) <h1>Unattach `)
//line templates/unattach.qtpl:7 //line templates/unattach.qtpl:8
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line templates/unattach.qtpl:7 //line templates/unattach.qtpl:8
qw422016.N().S(`?</h1> qw422016.N().S(`?</h1>
<p>Do you really want to unattach hypha <em>`) <p>Do you really want to unattach hypha <em>`)
//line templates/unattach.qtpl:8 //line templates/unattach.qtpl:9
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line templates/unattach.qtpl:8 //line templates/unattach.qtpl:9
qw422016.N().S(`</em>?</p> qw422016.N().S(`</em>?</p>
<p><a href="/unattach-confirm/`) <p><a href="/unattach-confirm/`)
//line templates/unattach.qtpl:9 //line templates/unattach.qtpl:10
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line templates/unattach.qtpl:9 //line templates/unattach.qtpl:10
qw422016.N().S(`"><strong>Confirm</strong></a></p> qw422016.N().S(`"><strong>Confirm</strong></a></p>
<p><a href="/page/`) <p><a href="/page/`)
//line templates/unattach.qtpl:10 //line templates/unattach.qtpl:11
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line templates/unattach.qtpl:10 //line templates/unattach.qtpl:11
qw422016.N().S(`">Cancel</a></p> qw422016.N().S(`">Cancel</a></p>
</section> </section>
`) `)
//line templates/unattach.qtpl:12 //line templates/unattach.qtpl:13
} else { } else {
//line templates/unattach.qtpl:12 //line templates/unattach.qtpl:13
qw422016.N().S(` `) qw422016.N().S(` `)
//line templates/unattach.qtpl:13 //line templates/unattach.qtpl:14
streamcannotUnattachDueToNonExistence(qw422016, hyphaName) streamcannotUnattachDueToNonExistence(qw422016, hyphaName)
//line templates/unattach.qtpl:13 //line templates/unattach.qtpl:14
qw422016.N().S(` qw422016.N().S(`
`) `)
//line templates/unattach.qtpl:14 //line templates/unattach.qtpl:15
} }
//line templates/unattach.qtpl:14 //line templates/unattach.qtpl:15
qw422016.N().S(`</main> qw422016.N().S(`</main>
</div>
`) `)
//line templates/unattach.qtpl:16 //line templates/unattach.qtpl:18
} }
//line templates/unattach.qtpl:16 //line templates/unattach.qtpl:18
func WriteUnattachAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string, isOld bool) { func WriteUnattachAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
//line templates/unattach.qtpl:16 //line templates/unattach.qtpl:18
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/unattach.qtpl:16 //line templates/unattach.qtpl:18
StreamUnattachAskHTML(qw422016, rq, hyphaName, isOld) StreamUnattachAskHTML(qw422016, rq, hyphaName, isOld)
//line templates/unattach.qtpl:16 //line templates/unattach.qtpl:18
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line templates/unattach.qtpl:16 //line templates/unattach.qtpl:18
} }
//line templates/unattach.qtpl:16 //line templates/unattach.qtpl:18
func UnattachAskHTML(rq *http.Request, hyphaName string, isOld bool) string { func UnattachAskHTML(rq *http.Request, hyphaName string, isOld bool) string {
//line templates/unattach.qtpl:16 //line templates/unattach.qtpl:18
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line templates/unattach.qtpl:16 //line templates/unattach.qtpl:18
WriteUnattachAskHTML(qb422016, rq, hyphaName, isOld) WriteUnattachAskHTML(qb422016, rq, hyphaName, isOld)
//line templates/unattach.qtpl:16 //line templates/unattach.qtpl:18
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line templates/unattach.qtpl:16 //line templates/unattach.qtpl:18
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line templates/unattach.qtpl:16 //line templates/unattach.qtpl:18
return qs422016 return qs422016
//line templates/unattach.qtpl:16 //line templates/unattach.qtpl:18
} }
//line templates/unattach.qtpl:18 //line templates/unattach.qtpl:20
func streamcannotUnattachDueToNonExistence(qw422016 *qt422016.Writer, hyphaName string) { func streamcannotUnattachDueToNonExistence(qw422016 *qt422016.Writer, hyphaName string) {
//line templates/unattach.qtpl:18 //line templates/unattach.qtpl:20
qw422016.N().S(` qw422016.N().S(`
<section> <section>
<h1>Cannot unattach `) <h1>Cannot unattach `)
//line templates/unattach.qtpl:20 //line templates/unattach.qtpl:22
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line templates/unattach.qtpl:20 //line templates/unattach.qtpl:22
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
<p>This hypha does not exist.</p> <p>This hypha does not exist.</p>
<p><a href="/page/`) <p><a href="/page/`)
//line templates/unattach.qtpl:22 //line templates/unattach.qtpl:24
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line templates/unattach.qtpl:22 //line templates/unattach.qtpl:24
qw422016.N().S(`">Go back</a></p> qw422016.N().S(`">Go back</a></p>
</section> </section>
`) `)
//line templates/unattach.qtpl:24 //line templates/unattach.qtpl:26
} }
//line templates/unattach.qtpl:24 //line templates/unattach.qtpl:26
func writecannotUnattachDueToNonExistence(qq422016 qtio422016.Writer, hyphaName string) { func writecannotUnattachDueToNonExistence(qq422016 qtio422016.Writer, hyphaName string) {
//line templates/unattach.qtpl:24 //line templates/unattach.qtpl:26
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/unattach.qtpl:24 //line templates/unattach.qtpl:26
streamcannotUnattachDueToNonExistence(qw422016, hyphaName) streamcannotUnattachDueToNonExistence(qw422016, hyphaName)
//line templates/unattach.qtpl:24 //line templates/unattach.qtpl:26
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line templates/unattach.qtpl:24 //line templates/unattach.qtpl:26
} }
//line templates/unattach.qtpl:24 //line templates/unattach.qtpl:26
func cannotUnattachDueToNonExistence(hyphaName string) string { func cannotUnattachDueToNonExistence(hyphaName string) string {
//line templates/unattach.qtpl:24 //line templates/unattach.qtpl:26
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line templates/unattach.qtpl:24 //line templates/unattach.qtpl:26
writecannotUnattachDueToNonExistence(qb422016, hyphaName) writecannotUnattachDueToNonExistence(qb422016, hyphaName)
//line templates/unattach.qtpl:24 //line templates/unattach.qtpl:26
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line templates/unattach.qtpl:24 //line templates/unattach.qtpl:26
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line templates/unattach.qtpl:24 //line templates/unattach.qtpl:26
return qs422016 return qs422016
//line templates/unattach.qtpl:24 //line templates/unattach.qtpl:26
} }