1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-12-14 14:20:25 +00:00

Write docs for prevnext

This commit is contained in:
Timur Ismagilov 2021-09-23 12:17:50 +03:00
parent b299d10d42
commit 71b404c4f0
5 changed files with 303 additions and 278 deletions

19
help/en/prevnext.myco Normal file
View File

@ -0,0 +1,19 @@
# Previous/next
Under every hypha there is a **previous/next** section with quick links to previous and next hyphae alphabetically.
This design encourages you to name your hyphae in such a way that clicking through these links would make sense. For example, if you are storing pages of a book, you should name them //p01//, //p02//, //p03//, etc.
It is impossible to change what hyphae are linked in this section. If you want to provide a different means of sequential navigation, just place some links by yourself.
## Hotkeys
Press `n` to go to the **n**ext page, press `p` to go to the **p**revious page.
## For administrators: how to remove these links
For some wikis, these links make little or no sense. In this case, it is better to hide them.
In file `your-wiki/static/custom.css` write this:
```css
.prevnext { display: none; }
```
The section would still be there, but no one will see it. The hotkeys will still work.

View File

@ -74,6 +74,8 @@
{% endfunc %} {% endfunc %}
If `contents` == "", a helpful message is shown instead. If `contents` == "", a helpful message is shown instead.
If you rename .prevnext, change the docs too.
{% func HyphaHTML(rq *http.Request, h *hyphae.Hypha, contents string) %} {% func HyphaHTML(rq *http.Request, h *hyphae.Hypha, contents string) %}
{% code {% code
siblings, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.Name) siblings, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.Name)

View File

@ -222,17 +222,19 @@ func AttachmentMenuHTML(rq *http.Request, h *hyphae.Hypha, u *user.User) string
} }
// If `contents` == "", a helpful message is shown instead. // If `contents` == "", a helpful message is shown instead.
//
// If you rename .prevnext, change the docs too.
//line views/readers.qtpl:77 //line views/readers.qtpl:79
func StreamHyphaHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hypha, contents string) { func StreamHyphaHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hypha, contents string) {
//line views/readers.qtpl:77 //line views/readers.qtpl:79
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:79 //line views/readers.qtpl:81
siblings, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.Name) siblings, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.Name)
u := user.FromRequest(rq) u := user.FromRequest(rq)
//line views/readers.qtpl:81 //line views/readers.qtpl:83
qw422016.N().S(` qw422016.N().S(`
<div class="layout"> <div class="layout">
<main class="main-width"> <main class="main-width">
@ -241,265 +243,265 @@ func StreamHyphaHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hyph
<a class="jump-btn__link" href="#hypha-bottom"></a> <a class="jump-btn__link" href="#hypha-bottom"></a>
</div> </div>
`) `)
//line views/readers.qtpl:88 //line views/readers.qtpl:90
if u.CanProceed("edit") { if u.CanProceed("edit") {
//line views/readers.qtpl:88 //line views/readers.qtpl:90
qw422016.N().S(`<div class="btn edit-btn"> qw422016.N().S(`<div class="btn edit-btn">
<a class="edit-btn__link" href="/edit/`) <a class="edit-btn__link" href="/edit/`)
//line views/readers.qtpl:89 //line views/readers.qtpl:91
qw422016.E().S(h.Name) qw422016.E().S(h.Name)
//line views/readers.qtpl:89 //line views/readers.qtpl:91
qw422016.N().S(`">Edit text</a> qw422016.N().S(`">Edit text</a>
</div>`) </div>`)
//line views/readers.qtpl:90 //line views/readers.qtpl:92
} }
//line views/readers.qtpl:90 //line views/readers.qtpl:92
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:91 //line views/readers.qtpl:93
qw422016.N().S(NaviTitleHTML(h)) qw422016.N().S(NaviTitleHTML(h))
//line views/readers.qtpl:91 //line views/readers.qtpl:93
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:92 //line views/readers.qtpl:94
if h.Exists { if h.Exists {
//line views/readers.qtpl:92 //line views/readers.qtpl:94
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:93 //line views/readers.qtpl:95
qw422016.N().S(contents) qw422016.N().S(contents)
//line views/readers.qtpl:93 //line views/readers.qtpl:95
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:94 //line views/readers.qtpl:96
} else { } else {
//line views/readers.qtpl:94 //line views/readers.qtpl:96
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:95 //line views/readers.qtpl:97
streamnonExistentHyphaNotice(qw422016, h, u) streamnonExistentHyphaNotice(qw422016, h, u)
//line views/readers.qtpl:95 //line views/readers.qtpl:97
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:96 //line views/readers.qtpl:98
} }
//line views/readers.qtpl:96 //line views/readers.qtpl:98
qw422016.N().S(` qw422016.N().S(`
</article> </article>
<section class="prevnext"> <section class="prevnext">
`) `)
//line views/readers.qtpl:99 //line views/readers.qtpl:101
if prevHyphaName != "" { if prevHyphaName != "" {
//line views/readers.qtpl:99 //line views/readers.qtpl:101
qw422016.N().S(` qw422016.N().S(`
<a class="prevnext__el prevnext__prev" href="/hypha/`) <a class="prevnext__el prevnext__prev" href="/hypha/`)
//line views/readers.qtpl:100 //line views/readers.qtpl:102
qw422016.E().S(prevHyphaName) qw422016.E().S(prevHyphaName)
//line views/readers.qtpl:100 //line views/readers.qtpl:102
qw422016.N().S(`" rel="prev">← `) qw422016.N().S(`" rel="prev">← `)
//line views/readers.qtpl:100 //line views/readers.qtpl:102
qw422016.E().S(util.BeautifulName(path.Base(prevHyphaName))) qw422016.E().S(util.BeautifulName(path.Base(prevHyphaName)))
//line views/readers.qtpl:100 //line views/readers.qtpl:102
qw422016.N().S(`</a> qw422016.N().S(`</a>
`) `)
//line views/readers.qtpl:101 //line views/readers.qtpl:103
} }
//line views/readers.qtpl:101 //line views/readers.qtpl:103
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:102 //line views/readers.qtpl:104
if nextHyphaName != "" { if nextHyphaName != "" {
//line views/readers.qtpl:102 //line views/readers.qtpl:104
qw422016.N().S(` qw422016.N().S(`
<a class="prevnext__el prevnext__next" href="/hypha/`) <a class="prevnext__el prevnext__next" href="/hypha/`)
//line views/readers.qtpl:103 //line views/readers.qtpl:105
qw422016.E().S(nextHyphaName) qw422016.E().S(nextHyphaName)
//line views/readers.qtpl:103 //line views/readers.qtpl:105
qw422016.N().S(`" rel="next">`) qw422016.N().S(`" rel="next">`)
//line views/readers.qtpl:103 //line views/readers.qtpl:105
qw422016.E().S(util.BeautifulName(path.Base(nextHyphaName))) qw422016.E().S(util.BeautifulName(path.Base(nextHyphaName)))
//line views/readers.qtpl:103 //line views/readers.qtpl:105
qw422016.N().S(` </a> qw422016.N().S(` </a>
`) `)
//line views/readers.qtpl:104 //line views/readers.qtpl:106
} }
//line views/readers.qtpl:104 //line views/readers.qtpl:106
qw422016.N().S(` qw422016.N().S(`
</section> </section>
`) `)
//line views/readers.qtpl:106 //line views/readers.qtpl:108
StreamSubhyphaeHTML(qw422016, subhyphae) StreamSubhyphaeHTML(qw422016, subhyphae)
//line views/readers.qtpl:106 //line views/readers.qtpl:108
qw422016.N().S(` qw422016.N().S(`
<section id="hypha-bottom"> <section id="hypha-bottom">
<div class="jump-btn"> <div class="jump-btn">
<a class="jump-btn__link" href="#hypha"></a> <a class="jump-btn__link" href="#hypha"></a>
</div> </div>
`) `)
//line views/readers.qtpl:111 //line views/readers.qtpl:113
streamhyphaInfo(qw422016, rq, h) streamhyphaInfo(qw422016, rq, h)
//line views/readers.qtpl:111 //line views/readers.qtpl:113
qw422016.N().S(` qw422016.N().S(`
</section> </section>
</main> </main>
`) `)
//line views/readers.qtpl:114 //line views/readers.qtpl:116
streamsiblingHyphaeHTML(qw422016, siblings) streamsiblingHyphaeHTML(qw422016, siblings)
//line views/readers.qtpl:114 //line views/readers.qtpl:116
qw422016.N().S(` qw422016.N().S(`
</div> </div>
`) `)
//line views/readers.qtpl:116 //line views/readers.qtpl:118
streamviewScripts(qw422016) streamviewScripts(qw422016)
//line views/readers.qtpl:116 //line views/readers.qtpl:118
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:117 //line views/readers.qtpl:119
} }
//line views/readers.qtpl:117 //line views/readers.qtpl:119
func WriteHyphaHTML(qq422016 qtio422016.Writer, rq *http.Request, h *hyphae.Hypha, contents string) { func WriteHyphaHTML(qq422016 qtio422016.Writer, rq *http.Request, h *hyphae.Hypha, contents string) {
//line views/readers.qtpl:117 //line views/readers.qtpl:119
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/readers.qtpl:117 //line views/readers.qtpl:119
StreamHyphaHTML(qw422016, rq, h, contents) StreamHyphaHTML(qw422016, rq, h, contents)
//line views/readers.qtpl:117 //line views/readers.qtpl:119
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/readers.qtpl:117 //line views/readers.qtpl:119
} }
//line views/readers.qtpl:117 //line views/readers.qtpl:119
func HyphaHTML(rq *http.Request, h *hyphae.Hypha, contents string) string { func HyphaHTML(rq *http.Request, h *hyphae.Hypha, contents string) string {
//line views/readers.qtpl:117 //line views/readers.qtpl:119
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/readers.qtpl:117 //line views/readers.qtpl:119
WriteHyphaHTML(qb422016, rq, h, contents) WriteHyphaHTML(qb422016, rq, h, contents)
//line views/readers.qtpl:117 //line views/readers.qtpl:119
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/readers.qtpl:117 //line views/readers.qtpl:119
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/readers.qtpl:117 //line views/readers.qtpl:119
return qs422016 return qs422016
//line views/readers.qtpl:117 //line views/readers.qtpl:119
} }
//line views/readers.qtpl:119 //line views/readers.qtpl:121
func StreamRevisionHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hypha, contents, revHash string) { func StreamRevisionHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hypha, contents, revHash string) {
//line views/readers.qtpl:119 //line views/readers.qtpl:121
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:121 //line views/readers.qtpl:123
siblings, subhyphae, _, _ := tree.Tree(h.Name) siblings, subhyphae, _, _ := tree.Tree(h.Name)
//line views/readers.qtpl:122 //line views/readers.qtpl:124
qw422016.N().S(` qw422016.N().S(`
<div class="layout"> <div class="layout">
<main class="main-width"> <main class="main-width">
<article> <article>
<p>Please note that viewing attachments of hyphae is not supported in history for now.</p> <p>Please note that viewing attachments of hyphae is not supported in history for now.</p>
`) `)
//line views/readers.qtpl:127 //line views/readers.qtpl:129
qw422016.N().S(NaviTitleHTML(h)) qw422016.N().S(NaviTitleHTML(h))
//line views/readers.qtpl:127 //line views/readers.qtpl:129
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:128 //line views/readers.qtpl:130
qw422016.N().S(contents) qw422016.N().S(contents)
//line views/readers.qtpl:128 //line views/readers.qtpl:130
qw422016.N().S(` qw422016.N().S(`
</article> </article>
`) `)
//line views/readers.qtpl:130 //line views/readers.qtpl:132
StreamSubhyphaeHTML(qw422016, subhyphae) StreamSubhyphaeHTML(qw422016, subhyphae)
//line views/readers.qtpl:130 //line views/readers.qtpl:132
qw422016.N().S(` qw422016.N().S(`
</main> </main>
`) `)
//line views/readers.qtpl:132 //line views/readers.qtpl:134
streamsiblingHyphaeHTML(qw422016, siblings) streamsiblingHyphaeHTML(qw422016, siblings)
//line views/readers.qtpl:132 //line views/readers.qtpl:134
qw422016.N().S(` qw422016.N().S(`
</div> </div>
`) `)
//line views/readers.qtpl:134 //line views/readers.qtpl:136
streamviewScripts(qw422016) streamviewScripts(qw422016)
//line views/readers.qtpl:134 //line views/readers.qtpl:136
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:135 //line views/readers.qtpl:137
} }
//line views/readers.qtpl:135 //line views/readers.qtpl:137
func WriteRevisionHTML(qq422016 qtio422016.Writer, rq *http.Request, h *hyphae.Hypha, contents, revHash string) { func WriteRevisionHTML(qq422016 qtio422016.Writer, rq *http.Request, h *hyphae.Hypha, contents, revHash string) {
//line views/readers.qtpl:135 //line views/readers.qtpl:137
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/readers.qtpl:135 //line views/readers.qtpl:137
StreamRevisionHTML(qw422016, rq, h, contents, revHash) StreamRevisionHTML(qw422016, rq, h, contents, revHash)
//line views/readers.qtpl:135 //line views/readers.qtpl:137
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/readers.qtpl:135 //line views/readers.qtpl:137
} }
//line views/readers.qtpl:135 //line views/readers.qtpl:137
func RevisionHTML(rq *http.Request, h *hyphae.Hypha, contents, revHash string) string { func RevisionHTML(rq *http.Request, h *hyphae.Hypha, contents, revHash string) string {
//line views/readers.qtpl:135 //line views/readers.qtpl:137
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/readers.qtpl:135 //line views/readers.qtpl:137
WriteRevisionHTML(qb422016, rq, h, contents, revHash) WriteRevisionHTML(qb422016, rq, h, contents, revHash)
//line views/readers.qtpl:135 //line views/readers.qtpl:137
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/readers.qtpl:135 //line views/readers.qtpl:137
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/readers.qtpl:135 //line views/readers.qtpl:137
return qs422016 return qs422016
//line views/readers.qtpl:135 //line views/readers.qtpl:137
} }
//line views/readers.qtpl:137 //line views/readers.qtpl:139
func streamviewScripts(qw422016 *qt422016.Writer) { func streamviewScripts(qw422016 *qt422016.Writer) {
//line views/readers.qtpl:137 //line views/readers.qtpl:139
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:138 //line views/readers.qtpl:140
for _, scriptPath := range cfg.ViewScripts { for _, scriptPath := range cfg.ViewScripts {
//line views/readers.qtpl:138 //line views/readers.qtpl:140
qw422016.N().S(` qw422016.N().S(`
<script src="`) <script src="`)
//line views/readers.qtpl:139 //line views/readers.qtpl:141
qw422016.E().S(scriptPath) qw422016.E().S(scriptPath)
//line views/readers.qtpl:139 //line views/readers.qtpl:141
qw422016.N().S(`"></script> qw422016.N().S(`"></script>
`) `)
//line views/readers.qtpl:140 //line views/readers.qtpl:142
} }
//line views/readers.qtpl:140 //line views/readers.qtpl:142
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/readers.qtpl:141 //line views/readers.qtpl:143
} }
//line views/readers.qtpl:141 //line views/readers.qtpl:143
func writeviewScripts(qq422016 qtio422016.Writer) { func writeviewScripts(qq422016 qtio422016.Writer) {
//line views/readers.qtpl:141 //line views/readers.qtpl:143
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/readers.qtpl:141 //line views/readers.qtpl:143
streamviewScripts(qw422016) streamviewScripts(qw422016)
//line views/readers.qtpl:141 //line views/readers.qtpl:143
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/readers.qtpl:141 //line views/readers.qtpl:143
} }
//line views/readers.qtpl:141 //line views/readers.qtpl:143
func viewScripts() string { func viewScripts() string {
//line views/readers.qtpl:141 //line views/readers.qtpl:143
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/readers.qtpl:141 //line views/readers.qtpl:143
writeviewScripts(qb422016) writeviewScripts(qb422016)
//line views/readers.qtpl:141 //line views/readers.qtpl:143
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/readers.qtpl:141 //line views/readers.qtpl:143
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/readers.qtpl:141 //line views/readers.qtpl:143
return qs422016 return qs422016
//line views/readers.qtpl:141 //line views/readers.qtpl:143
} }

View File

@ -165,6 +165,7 @@ It outputs a poorly formatted JSON, but it works and is valid.
<li><a href="/help/en/mycomarkup">Mycomarkup</a></li> <li><a href="/help/en/mycomarkup">Mycomarkup</a></li>
<li>Interface <li>Interface
<ul> <ul>
<li><a href="/help/en/prevnext">Previous/next</a></li>
<li><a href="/help/en/top_bar">Top bar</a></li> <li><a href="/help/en/top_bar">Top bar</a></li>
<li><a href="/help/en/sibling_hyphae_section">Sibling hyphae</a></li> <li><a href="/help/en/sibling_hyphae_section">Sibling hyphae</a></li>
<li>...</li> <li>...</li>

View File

@ -565,6 +565,7 @@ func streamhelpTopicsHTML(qw422016 *qt422016.Writer) {
<li><a href="/help/en/mycomarkup">Mycomarkup</a></li> <li><a href="/help/en/mycomarkup">Mycomarkup</a></li>
<li>Interface <li>Interface
<ul> <ul>
<li><a href="/help/en/prevnext">Previous/next</a></li>
<li><a href="/help/en/top_bar">Top bar</a></li> <li><a href="/help/en/top_bar">Top bar</a></li>
<li><a href="/help/en/sibling_hyphae_section">Sibling hyphae</a></li> <li><a href="/help/en/sibling_hyphae_section">Sibling hyphae</a></li>
<li>...</li> <li>...</li>
@ -586,87 +587,87 @@ func streamhelpTopicsHTML(qw422016 *qt422016.Writer) {
</ul> </ul>
</aside> </aside>
`) `)
//line views/stuff.qtpl:188 //line views/stuff.qtpl:189
} }
//line views/stuff.qtpl:188 //line views/stuff.qtpl:189
func writehelpTopicsHTML(qq422016 qtio422016.Writer) { func writehelpTopicsHTML(qq422016 qtio422016.Writer) {
//line views/stuff.qtpl:188 //line views/stuff.qtpl:189
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/stuff.qtpl:188 //line views/stuff.qtpl:189
streamhelpTopicsHTML(qw422016) streamhelpTopicsHTML(qw422016)
//line views/stuff.qtpl:188 //line views/stuff.qtpl:189
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/stuff.qtpl:188 //line views/stuff.qtpl:189
} }
//line views/stuff.qtpl:188 //line views/stuff.qtpl:189
func helpTopicsHTML() string { func helpTopicsHTML() string {
//line views/stuff.qtpl:188 //line views/stuff.qtpl:189
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/stuff.qtpl:188 //line views/stuff.qtpl:189
writehelpTopicsHTML(qb422016) writehelpTopicsHTML(qb422016)
//line views/stuff.qtpl:188 //line views/stuff.qtpl:189
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/stuff.qtpl:188 //line views/stuff.qtpl:189
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/stuff.qtpl:188 //line views/stuff.qtpl:189
return qs422016 return qs422016
//line views/stuff.qtpl:188 //line views/stuff.qtpl:189
} }
//line views/stuff.qtpl:190 //line views/stuff.qtpl:191
func streamhelpTopicBadgeHTML(qw422016 *qt422016.Writer, lang, topic string) { func streamhelpTopicBadgeHTML(qw422016 *qt422016.Writer, lang, topic string) {
//line views/stuff.qtpl:190 //line views/stuff.qtpl:191
qw422016.N().S(` qw422016.N().S(`
<a class="help-topic-badge" href="/help/`) <a class="help-topic-badge" href="/help/`)
//line views/stuff.qtpl:191 //line views/stuff.qtpl:192
qw422016.E().S(lang) qw422016.E().S(lang)
//line views/stuff.qtpl:191 //line views/stuff.qtpl:192
qw422016.N().S(`/`) qw422016.N().S(`/`)
//line views/stuff.qtpl:191 //line views/stuff.qtpl:192
qw422016.E().S(topic) qw422016.E().S(topic)
//line views/stuff.qtpl:191 //line views/stuff.qtpl:192
qw422016.N().S(`">?</a> qw422016.N().S(`">?</a>
`) `)
//line views/stuff.qtpl:192 //line views/stuff.qtpl:193
} }
//line views/stuff.qtpl:192 //line views/stuff.qtpl:193
func writehelpTopicBadgeHTML(qq422016 qtio422016.Writer, lang, topic string) { func writehelpTopicBadgeHTML(qq422016 qtio422016.Writer, lang, topic string) {
//line views/stuff.qtpl:192 //line views/stuff.qtpl:193
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/stuff.qtpl:192 //line views/stuff.qtpl:193
streamhelpTopicBadgeHTML(qw422016, lang, topic) streamhelpTopicBadgeHTML(qw422016, lang, topic)
//line views/stuff.qtpl:192 //line views/stuff.qtpl:193
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/stuff.qtpl:192 //line views/stuff.qtpl:193
} }
//line views/stuff.qtpl:192 //line views/stuff.qtpl:193
func helpTopicBadgeHTML(lang, topic string) string { func helpTopicBadgeHTML(lang, topic string) string {
//line views/stuff.qtpl:192 //line views/stuff.qtpl:193
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/stuff.qtpl:192 //line views/stuff.qtpl:193
writehelpTopicBadgeHTML(qb422016, lang, topic) writehelpTopicBadgeHTML(qb422016, lang, topic)
//line views/stuff.qtpl:192 //line views/stuff.qtpl:193
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/stuff.qtpl:192 //line views/stuff.qtpl:193
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/stuff.qtpl:192 //line views/stuff.qtpl:193
return qs422016 return qs422016
//line views/stuff.qtpl:192 //line views/stuff.qtpl:193
} }
//line views/stuff.qtpl:194 //line views/stuff.qtpl:195
func StreamUserListHTML(qw422016 *qt422016.Writer) { func StreamUserListHTML(qw422016 *qt422016.Writer) {
//line views/stuff.qtpl:194 //line views/stuff.qtpl:195
qw422016.N().S(` qw422016.N().S(`
<div class="layout"> <div class="layout">
<main class="main-width user-list"> <main class="main-width user-list">
<h1>List of users</h1> <h1>List of users</h1>
`) `)
//line views/stuff.qtpl:199 //line views/stuff.qtpl:200
var ( var (
admins = make([]string, 0) admins = make([]string, 0)
moderators = make([]string, 0) moderators = make([]string, 0)
@ -683,345 +684,345 @@ func StreamUserListHTML(qw422016 *qt422016.Writer) {
} }
} }
//line views/stuff.qtpl:214 //line views/stuff.qtpl:215
qw422016.N().S(` qw422016.N().S(`
<section> <section>
<h2>Admins</h2> <h2>Admins</h2>
<ol>`) <ol>`)
//line views/stuff.qtpl:217 //line views/stuff.qtpl:218
for _, name := range admins { for _, name := range admins {
//line views/stuff.qtpl:217 //line views/stuff.qtpl:218
qw422016.N().S(` qw422016.N().S(`
<li><a href="/hypha/`) <li><a href="/hypha/`)
//line views/stuff.qtpl:218 //line views/stuff.qtpl:219
qw422016.E().S(cfg.UserHypha) qw422016.E().S(cfg.UserHypha)
//line views/stuff.qtpl:218 //line views/stuff.qtpl:219
qw422016.N().S(`/`) qw422016.N().S(`/`)
//line views/stuff.qtpl:218 //line views/stuff.qtpl:219
qw422016.E().S(name) qw422016.E().S(name)
//line views/stuff.qtpl:218 //line views/stuff.qtpl:219
qw422016.N().S(`">`) qw422016.N().S(`">`)
//line views/stuff.qtpl:218 //line views/stuff.qtpl:219
qw422016.E().S(name) qw422016.E().S(name)
//line views/stuff.qtpl:218 //line views/stuff.qtpl:219
qw422016.N().S(`</a></li> qw422016.N().S(`</a></li>
`) `)
//line views/stuff.qtpl:219 //line views/stuff.qtpl:220
} }
//line views/stuff.qtpl:219 //line views/stuff.qtpl:220
qw422016.N().S(`</ol> qw422016.N().S(`</ol>
</section> </section>
<section> <section>
<h2>Moderators</h2> <h2>Moderators</h2>
<ol>`) <ol>`)
//line views/stuff.qtpl:223 //line views/stuff.qtpl:224
for _, name := range moderators { for _, name := range moderators {
//line views/stuff.qtpl:223 //line views/stuff.qtpl:224
qw422016.N().S(` qw422016.N().S(`
<li><a href="/hypha/`) <li><a href="/hypha/`)
//line views/stuff.qtpl:224 //line views/stuff.qtpl:225
qw422016.E().S(cfg.UserHypha) qw422016.E().S(cfg.UserHypha)
//line views/stuff.qtpl:224 //line views/stuff.qtpl:225
qw422016.N().S(`/`) qw422016.N().S(`/`)
//line views/stuff.qtpl:224 //line views/stuff.qtpl:225
qw422016.E().S(name) qw422016.E().S(name)
//line views/stuff.qtpl:224 //line views/stuff.qtpl:225
qw422016.N().S(`">`) qw422016.N().S(`">`)
//line views/stuff.qtpl:224 //line views/stuff.qtpl:225
qw422016.E().S(name) qw422016.E().S(name)
//line views/stuff.qtpl:224 //line views/stuff.qtpl:225
qw422016.N().S(`</a></li> qw422016.N().S(`</a></li>
`) `)
//line views/stuff.qtpl:225 //line views/stuff.qtpl:226
} }
//line views/stuff.qtpl:225 //line views/stuff.qtpl:226
qw422016.N().S(`</ol> qw422016.N().S(`</ol>
</section> </section>
<section> <section>
<h2>Editors</h2> <h2>Editors</h2>
<ol>`) <ol>`)
//line views/stuff.qtpl:229 //line views/stuff.qtpl:230
for _, name := range editors { for _, name := range editors {
//line views/stuff.qtpl:229 //line views/stuff.qtpl:230
qw422016.N().S(` qw422016.N().S(`
<li><a href="/hypha/`) <li><a href="/hypha/`)
//line views/stuff.qtpl:230 //line views/stuff.qtpl:231
qw422016.E().S(cfg.UserHypha) qw422016.E().S(cfg.UserHypha)
//line views/stuff.qtpl:230 //line views/stuff.qtpl:231
qw422016.N().S(`/`) qw422016.N().S(`/`)
//line views/stuff.qtpl:230 //line views/stuff.qtpl:231
qw422016.E().S(name) qw422016.E().S(name)
//line views/stuff.qtpl:230 //line views/stuff.qtpl:231
qw422016.N().S(`">`) qw422016.N().S(`">`)
//line views/stuff.qtpl:230 //line views/stuff.qtpl:231
qw422016.E().S(name) qw422016.E().S(name)
//line views/stuff.qtpl:230 //line views/stuff.qtpl:231
qw422016.N().S(`</a></li> qw422016.N().S(`</a></li>
`) `)
//line views/stuff.qtpl:231 //line views/stuff.qtpl:232
} }
//line views/stuff.qtpl:231 //line views/stuff.qtpl:232
qw422016.N().S(`</ol> qw422016.N().S(`</ol>
</section> </section>
</main> </main>
</div> </div>
`) `)
//line views/stuff.qtpl:235 //line views/stuff.qtpl:236
} }
//line views/stuff.qtpl:235 //line views/stuff.qtpl:236
func WriteUserListHTML(qq422016 qtio422016.Writer) { func WriteUserListHTML(qq422016 qtio422016.Writer) {
//line views/stuff.qtpl:235 //line views/stuff.qtpl:236
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/stuff.qtpl:235 //line views/stuff.qtpl:236
StreamUserListHTML(qw422016) StreamUserListHTML(qw422016)
//line views/stuff.qtpl:235 //line views/stuff.qtpl:236
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/stuff.qtpl:235 //line views/stuff.qtpl:236
} }
//line views/stuff.qtpl:235 //line views/stuff.qtpl:236
func UserListHTML() string { func UserListHTML() string {
//line views/stuff.qtpl:235 //line views/stuff.qtpl:236
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/stuff.qtpl:235 //line views/stuff.qtpl:236
WriteUserListHTML(qb422016) WriteUserListHTML(qb422016)
//line views/stuff.qtpl:235 //line views/stuff.qtpl:236
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/stuff.qtpl:235 //line views/stuff.qtpl:236
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/stuff.qtpl:235 //line views/stuff.qtpl:236
return qs422016 return qs422016
//line views/stuff.qtpl:235 //line views/stuff.qtpl:236
} }
//line views/stuff.qtpl:237 //line views/stuff.qtpl:238
func StreamHyphaListHTML(qw422016 *qt422016.Writer) { func StreamHyphaListHTML(qw422016 *qt422016.Writer) {
//line views/stuff.qtpl:237 //line views/stuff.qtpl:238
qw422016.N().S(` qw422016.N().S(`
<div class="layout"> <div class="layout">
<main class="main-width"> <main class="main-width">
<h1>List of hyphae</h1> <h1>List of hyphae</h1>
<p>This wiki has `) <p>This wiki has `)
//line views/stuff.qtpl:241 //line views/stuff.qtpl:242
qw422016.N().D(hyphae.Count()) qw422016.N().D(hyphae.Count())
//line views/stuff.qtpl:241 //line views/stuff.qtpl:242
qw422016.N().S(` hyphae.</p> qw422016.N().S(` hyphae.</p>
<ul class="hypha-list"> <ul class="hypha-list">
`) `)
//line views/stuff.qtpl:243 //line views/stuff.qtpl:244
for h := range hyphae.YieldExistingHyphae() { for h := range hyphae.YieldExistingHyphae() {
//line views/stuff.qtpl:243 //line views/stuff.qtpl:244
qw422016.N().S(` qw422016.N().S(`
<li class="hypha-list__entry"> <li class="hypha-list__entry">
<a class="hypha-list__link" href="/hypha/`) <a class="hypha-list__link" href="/hypha/`)
//line views/stuff.qtpl:245 //line views/stuff.qtpl:246
qw422016.E().S(h.Name) qw422016.E().S(h.Name)
//line views/stuff.qtpl:245 //line views/stuff.qtpl:246
qw422016.N().S(`">`) qw422016.N().S(`">`)
//line views/stuff.qtpl:245 //line views/stuff.qtpl:246
qw422016.E().S(util.BeautifulName(h.Name)) qw422016.E().S(util.BeautifulName(h.Name))
//line views/stuff.qtpl:245 //line views/stuff.qtpl:246
qw422016.N().S(`</a> qw422016.N().S(`</a>
`) `)
//line views/stuff.qtpl:246 //line views/stuff.qtpl:247
if h.BinaryPath != "" { if h.BinaryPath != "" {
//line views/stuff.qtpl:246 //line views/stuff.qtpl:247
qw422016.N().S(` qw422016.N().S(`
<span class="hypha-list__amnt-type">`) <span class="hypha-list__amnt-type">`)
//line views/stuff.qtpl:247 //line views/stuff.qtpl:248
qw422016.E().S(filepath.Ext(h.BinaryPath)[1:]) qw422016.E().S(filepath.Ext(h.BinaryPath)[1:])
//line views/stuff.qtpl:247 //line views/stuff.qtpl:248
qw422016.N().S(`</span> qw422016.N().S(`</span>
`) `)
//line views/stuff.qtpl:248 //line views/stuff.qtpl:249
} }
//line views/stuff.qtpl:248 //line views/stuff.qtpl:249
qw422016.N().S(` qw422016.N().S(`
</li> </li>
`) `)
//line views/stuff.qtpl:250 //line views/stuff.qtpl:251
} }
//line views/stuff.qtpl:250 //line views/stuff.qtpl:251
qw422016.N().S(` qw422016.N().S(`
</ul> </ul>
</main> </main>
</div> </div>
`) `)
//line views/stuff.qtpl:254 //line views/stuff.qtpl:255
} }
//line views/stuff.qtpl:254 //line views/stuff.qtpl:255
func WriteHyphaListHTML(qq422016 qtio422016.Writer) { func WriteHyphaListHTML(qq422016 qtio422016.Writer) {
//line views/stuff.qtpl:254 //line views/stuff.qtpl:255
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/stuff.qtpl:254 //line views/stuff.qtpl:255
StreamHyphaListHTML(qw422016) StreamHyphaListHTML(qw422016)
//line views/stuff.qtpl:254 //line views/stuff.qtpl:255
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/stuff.qtpl:254 //line views/stuff.qtpl:255
} }
//line views/stuff.qtpl:254 //line views/stuff.qtpl:255
func HyphaListHTML() string { func HyphaListHTML() string {
//line views/stuff.qtpl:254 //line views/stuff.qtpl:255
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/stuff.qtpl:254 //line views/stuff.qtpl:255
WriteHyphaListHTML(qb422016) WriteHyphaListHTML(qb422016)
//line views/stuff.qtpl:254 //line views/stuff.qtpl:255
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/stuff.qtpl:254 //line views/stuff.qtpl:255
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/stuff.qtpl:254 //line views/stuff.qtpl:255
return qs422016 return qs422016
//line views/stuff.qtpl:254 //line views/stuff.qtpl:255
} }
//line views/stuff.qtpl:256 //line views/stuff.qtpl:257
func StreamAboutHTML(qw422016 *qt422016.Writer) { func StreamAboutHTML(qw422016 *qt422016.Writer) {
//line views/stuff.qtpl:256 //line views/stuff.qtpl:257
qw422016.N().S(` qw422016.N().S(`
<div class="layout"> <div class="layout">
<main class="main-width"> <main class="main-width">
<section> <section>
<h1>About `) <h1>About `)
//line views/stuff.qtpl:260 //line views/stuff.qtpl:261
qw422016.E().S(cfg.WikiName) qw422016.E().S(cfg.WikiName)
//line views/stuff.qtpl:260 //line views/stuff.qtpl:261
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
<ul> <ul>
<li><b><a href="https://mycorrhiza.wiki">Mycorrhiza Wiki</a> version:</b> 1.5.0</li> <li><b><a href="https://mycorrhiza.wiki">Mycorrhiza Wiki</a> version:</b> 1.5.0</li>
`) `)
//line views/stuff.qtpl:263 //line views/stuff.qtpl:264
if cfg.UseAuth { if cfg.UseAuth {
//line views/stuff.qtpl:263 //line views/stuff.qtpl:264
qw422016.N().S(` <li><b>User count:</b> `) qw422016.N().S(` <li><b>User count:</b> `)
//line views/stuff.qtpl:264 //line views/stuff.qtpl:265
qw422016.N().DUL(user.Count()) qw422016.N().DUL(user.Count())
//line views/stuff.qtpl:264 //line views/stuff.qtpl:265
qw422016.N().S(`</li> qw422016.N().S(`</li>
<li><b>Home page:</b> <a href="/">`) <li><b>Home page:</b> <a href="/">`)
//line views/stuff.qtpl:265 //line views/stuff.qtpl:266
qw422016.E().S(cfg.HomeHypha) qw422016.E().S(cfg.HomeHypha)
//line views/stuff.qtpl:265 //line views/stuff.qtpl:266
qw422016.N().S(`</a></li> qw422016.N().S(`</a></li>
<li><b>Administrators:</b>`) <li><b>Administrators:</b>`)
//line views/stuff.qtpl:266 //line views/stuff.qtpl:267
for i, username := range user.ListUsersWithGroup("admin") { for i, username := range user.ListUsersWithGroup("admin") {
//line views/stuff.qtpl:267 //line views/stuff.qtpl:268
if i > 0 { if i > 0 {
//line views/stuff.qtpl:267 //line views/stuff.qtpl:268
qw422016.N().S(`<span aria-hidden="true">, </span> qw422016.N().S(`<span aria-hidden="true">, </span>
`) `)
//line views/stuff.qtpl:268 //line views/stuff.qtpl:269
} }
//line views/stuff.qtpl:268 //line views/stuff.qtpl:269
qw422016.N().S(` <a href="/hypha/`) qw422016.N().S(` <a href="/hypha/`)
//line views/stuff.qtpl:269 //line views/stuff.qtpl:270
qw422016.E().S(cfg.UserHypha) qw422016.E().S(cfg.UserHypha)
//line views/stuff.qtpl:269 //line views/stuff.qtpl:270
qw422016.N().S(`/`) qw422016.N().S(`/`)
//line views/stuff.qtpl:269 //line views/stuff.qtpl:270
qw422016.E().S(username) qw422016.E().S(username)
//line views/stuff.qtpl:269 //line views/stuff.qtpl:270
qw422016.N().S(`">`) qw422016.N().S(`">`)
//line views/stuff.qtpl:269 //line views/stuff.qtpl:270
qw422016.E().S(username) qw422016.E().S(username)
//line views/stuff.qtpl:269 //line views/stuff.qtpl:270
qw422016.N().S(`</a>`) qw422016.N().S(`</a>`)
//line views/stuff.qtpl:269 //line views/stuff.qtpl:270
} }
//line views/stuff.qtpl:269 //line views/stuff.qtpl:270
qw422016.N().S(`</li> qw422016.N().S(`</li>
`) `)
//line views/stuff.qtpl:270 //line views/stuff.qtpl:271
} else { } else {
//line views/stuff.qtpl:270 //line views/stuff.qtpl:271
qw422016.N().S(` <li>This wiki does not use authorization</li> qw422016.N().S(` <li>This wiki does not use authorization</li>
`) `)
//line views/stuff.qtpl:272 //line views/stuff.qtpl:273
} }
//line views/stuff.qtpl:272 //line views/stuff.qtpl:273
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> </div>
`) `)
//line views/stuff.qtpl:278 //line views/stuff.qtpl:279
} }
//line views/stuff.qtpl:278 //line views/stuff.qtpl:279
func WriteAboutHTML(qq422016 qtio422016.Writer) { func WriteAboutHTML(qq422016 qtio422016.Writer) {
//line views/stuff.qtpl:278 //line views/stuff.qtpl:279
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/stuff.qtpl:278 //line views/stuff.qtpl:279
StreamAboutHTML(qw422016) StreamAboutHTML(qw422016)
//line views/stuff.qtpl:278 //line views/stuff.qtpl:279
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/stuff.qtpl:278 //line views/stuff.qtpl:279
} }
//line views/stuff.qtpl:278 //line views/stuff.qtpl:279
func AboutHTML() string { func AboutHTML() string {
//line views/stuff.qtpl:278 //line views/stuff.qtpl:279
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/stuff.qtpl:278 //line views/stuff.qtpl:279
WriteAboutHTML(qb422016) WriteAboutHTML(qb422016)
//line views/stuff.qtpl:278 //line views/stuff.qtpl:279
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/stuff.qtpl:278 //line views/stuff.qtpl:279
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/stuff.qtpl:278 //line views/stuff.qtpl:279
return qs422016 return qs422016
//line views/stuff.qtpl:278 //line views/stuff.qtpl:279
} }
//line views/stuff.qtpl:280 //line views/stuff.qtpl:281
func StreamCommonScripts(qw422016 *qt422016.Writer) { func StreamCommonScripts(qw422016 *qt422016.Writer) {
//line views/stuff.qtpl:280 //line views/stuff.qtpl:281
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/stuff.qtpl:281 //line views/stuff.qtpl:282
for _, scriptPath := range cfg.CommonScripts { for _, scriptPath := range cfg.CommonScripts {
//line views/stuff.qtpl:281 //line views/stuff.qtpl:282
qw422016.N().S(` qw422016.N().S(`
<script src="`) <script src="`)
//line views/stuff.qtpl:282 //line views/stuff.qtpl:283
qw422016.E().S(scriptPath) qw422016.E().S(scriptPath)
//line views/stuff.qtpl:282 //line views/stuff.qtpl:283
qw422016.N().S(`"></script> qw422016.N().S(`"></script>
`) `)
//line views/stuff.qtpl:283 //line views/stuff.qtpl:284
} }
//line views/stuff.qtpl:283 //line views/stuff.qtpl:284
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/stuff.qtpl:284 //line views/stuff.qtpl:285
} }
//line views/stuff.qtpl:284 //line views/stuff.qtpl:285
func WriteCommonScripts(qq422016 qtio422016.Writer) { func WriteCommonScripts(qq422016 qtio422016.Writer) {
//line views/stuff.qtpl:284 //line views/stuff.qtpl:285
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/stuff.qtpl:284 //line views/stuff.qtpl:285
StreamCommonScripts(qw422016) StreamCommonScripts(qw422016)
//line views/stuff.qtpl:284 //line views/stuff.qtpl:285
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/stuff.qtpl:284 //line views/stuff.qtpl:285
} }
//line views/stuff.qtpl:284 //line views/stuff.qtpl:285
func CommonScripts() string { func CommonScripts() string {
//line views/stuff.qtpl:284 //line views/stuff.qtpl:285
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/stuff.qtpl:284 //line views/stuff.qtpl:285
WriteCommonScripts(qb422016) WriteCommonScripts(qb422016)
//line views/stuff.qtpl:284 //line views/stuff.qtpl:285
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/stuff.qtpl:284 //line views/stuff.qtpl:285
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/stuff.qtpl:284 //line views/stuff.qtpl:285
return qs422016 return qs422016
//line views/stuff.qtpl:284 //line views/stuff.qtpl:285
} }