mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2024-12-13 05:50:27 +00:00
Provide a better non-existent hypha notive
This commit is contained in:
parent
dbae2b3547
commit
a540e8c3f8
9
.idea/codeStyles/Project.xml
generated
Normal file
9
.idea/codeStyles/Project.xml
generated
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<code_scheme name="Project" version="173">
|
||||||
|
<option name="OTHER_INDENT_OPTIONS">
|
||||||
|
<value>
|
||||||
|
<option name="USE_TAB_CHARACTER" value="true" />
|
||||||
|
</value>
|
||||||
|
</option>
|
||||||
|
</code_scheme>
|
||||||
|
</component>
|
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<state>
|
||||||
|
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
||||||
|
</state>
|
||||||
|
</component>
|
@ -113,9 +113,14 @@ func StreamDefaultCSS(qw422016 *qt422016.Writer) {
|
|||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line assets/assets.qtpl:10
|
//line assets/assets.qtpl:10
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`.non-existent-hypha { }
|
||||||
|
.non-existent-hypha__ways { display: flex; flex-direction: column; width: 100%; margin: 0 0 1rem 0;}
|
||||||
|
.non-existent-hypha__way { border: 1px #999 solid; border-radius: .25rem; padding: .25rem; }
|
||||||
|
.non-existent-hypha__title { margin-bottom: 1rem; }
|
||||||
|
.non-existent-hypha__subtitle { margin: 0; }
|
||||||
|
|
||||||
.amnt-grid { display: grid; grid-template-columns: 1fr 1fr; }
|
.amnt-grid { display: grid; grid-template-columns: 1fr 1fr; }
|
||||||
.upload-binary__input { display: block; margin: .25rem 0; }
|
#upload-binary__input { display: block; margin: .25rem 0 .5rem 0; }
|
||||||
|
|
||||||
.modal__title { font-size: 2rem; }
|
.modal__title { font-size: 2rem; }
|
||||||
.modal__title_small { font-size: 1.5rem; }
|
.modal__title_small { font-size: 1.5rem; }
|
||||||
@ -157,6 +162,12 @@ header { width: 100%; margin-bottom: 1rem; }
|
|||||||
main { padding: 1rem; margin: 0; }
|
main { padding: 1rem; margin: 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 500px) {
|
||||||
|
.non-existent-hypha__way { flex: 1; margin-right: .5rem; }
|
||||||
|
.non-existent-hypha__ways { flex-direction: row; }
|
||||||
|
.non-existent-hypha__way:last-child { margin-right: 0; }
|
||||||
|
}
|
||||||
|
|
||||||
/* No longer a phone but still small screen: draw normal tabs, center main */
|
/* No longer a phone but still small screen: draw normal tabs, center main */
|
||||||
@media screen and (min-width: 801px) {
|
@media screen and (min-width: 801px) {
|
||||||
.main-width { padding: 1rem 2rem; width: 800px; margin: 0 auto; }
|
.main-width { padding: 1rem 2rem; width: 800px; margin: 0 auto; }
|
||||||
@ -310,8 +321,13 @@ caption { caption-side: top; font-size: small; }
|
|||||||
.relative-hyphae__link { text-decoration: none; display: block; padding: .25rem .5rem; }
|
.relative-hyphae__link { text-decoration: none; display: block; padding: .25rem .5rem; }
|
||||||
|
|
||||||
|
|
||||||
|
.btn { display: inline-block; border: 1px #999 solid; border-radius: .25rem; text-decoration: none; padding: .25rem; font-size: 1rem; }
|
||||||
|
|
||||||
/* Color stuff */
|
/* Color stuff */
|
||||||
/* Lighter stuff #eee */
|
/* Lighter stuff #eee */
|
||||||
|
.btn { background-color: #eee; color: black; }
|
||||||
|
.btn:visited { color: black; }
|
||||||
|
|
||||||
article code,
|
article code,
|
||||||
article .codeblock,
|
article .codeblock,
|
||||||
.transclusion,
|
.transclusion,
|
||||||
@ -394,6 +410,7 @@ mark { background: rgba(130, 80, 30, 5); color: inherit; }
|
|||||||
@media screen and (max-width: 800px) {
|
@media screen and (max-width: 800px) {
|
||||||
.hypha-tabs { background-color: #232323; }
|
.hypha-tabs { background-color: #232323; }
|
||||||
}
|
}
|
||||||
|
.btn { background-color: #ddd; color: black; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
|
.non-existent-hypha { }
|
||||||
|
.non-existent-hypha__ways { display: flex; flex-direction: column; width: 100%; margin: 0 0 1rem 0;}
|
||||||
|
.non-existent-hypha__way { border: 1px #999 solid; border-radius: .25rem; padding: .25rem; }
|
||||||
|
.non-existent-hypha__title { margin-bottom: 1rem; }
|
||||||
|
.non-existent-hypha__subtitle { margin: 0; }
|
||||||
|
|
||||||
.amnt-grid { display: grid; grid-template-columns: 1fr 1fr; }
|
.amnt-grid { display: grid; grid-template-columns: 1fr 1fr; }
|
||||||
.upload-binary__input { display: block; margin: .25rem 0; }
|
#upload-binary__input { display: block; margin: .25rem 0 .5rem 0; }
|
||||||
|
|
||||||
.modal__title { font-size: 2rem; }
|
.modal__title { font-size: 2rem; }
|
||||||
.modal__title_small { font-size: 1.5rem; }
|
.modal__title_small { font-size: 1.5rem; }
|
||||||
@ -42,6 +47,12 @@ header { width: 100%; margin-bottom: 1rem; }
|
|||||||
main { padding: 1rem; margin: 0; }
|
main { padding: 1rem; margin: 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 500px) {
|
||||||
|
.non-existent-hypha__way { flex: 1; margin-right: .5rem; }
|
||||||
|
.non-existent-hypha__ways { flex-direction: row; }
|
||||||
|
.non-existent-hypha__way:last-child { margin-right: 0; }
|
||||||
|
}
|
||||||
|
|
||||||
/* No longer a phone but still small screen: draw normal tabs, center main */
|
/* No longer a phone but still small screen: draw normal tabs, center main */
|
||||||
@media screen and (min-width: 801px) {
|
@media screen and (min-width: 801px) {
|
||||||
.main-width { padding: 1rem 2rem; width: 800px; margin: 0 auto; }
|
.main-width { padding: 1rem 2rem; width: 800px; margin: 0 auto; }
|
||||||
@ -195,8 +206,13 @@ caption { caption-side: top; font-size: small; }
|
|||||||
.relative-hyphae__link { text-decoration: none; display: block; padding: .25rem .5rem; }
|
.relative-hyphae__link { text-decoration: none; display: block; padding: .25rem .5rem; }
|
||||||
|
|
||||||
|
|
||||||
|
.btn { display: inline-block; border: 1px #999 solid; border-radius: .25rem; text-decoration: none; padding: .25rem; font-size: 1rem; }
|
||||||
|
|
||||||
/* Color stuff */
|
/* Color stuff */
|
||||||
/* Lighter stuff #eee */
|
/* Lighter stuff #eee */
|
||||||
|
.btn { background-color: #eee; color: black; }
|
||||||
|
.btn:visited { color: black; }
|
||||||
|
|
||||||
article code,
|
article code,
|
||||||
article .codeblock,
|
article .codeblock,
|
||||||
.transclusion,
|
.transclusion,
|
||||||
@ -279,6 +295,7 @@ mark { background: rgba(130, 80, 30, 5); color: inherit; }
|
|||||||
@media screen and (max-width: 800px) {
|
@media screen and (max-width: 800px) {
|
||||||
.hypha-tabs { background-color: #232323; }
|
.hypha-tabs { background-color: #232323; }
|
||||||
}
|
}
|
||||||
|
.btn { background-color: #ddd; color: black; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,9 +1,47 @@
|
|||||||
{% import "path/filepath" %}
|
{% import "path/filepath" %}
|
||||||
{% import "strings" %}
|
{% import "strings" %}
|
||||||
|
|
||||||
{% import "github.com/bouncepaw/mycorrhiza/cfg" %}
|
{% import "github.com/bouncepaw/mycorrhiza/cfg" %}
|
||||||
{% import "github.com/bouncepaw/mycorrhiza/hyphae" %}
|
{% import "github.com/bouncepaw/mycorrhiza/hyphae" %}
|
||||||
|
{% import "github.com/bouncepaw/mycorrhiza/user" %}
|
||||||
{% import "github.com/bouncepaw/mycorrhiza/util" %}
|
{% import "github.com/bouncepaw/mycorrhiza/util" %}
|
||||||
|
|
||||||
|
{% func nonExistentHyphaNotice(h *hyphae.Hypha, u *user.User) %}
|
||||||
|
<section class="non-existent-hypha">
|
||||||
|
<h2 class="non-existent-hypha__title">This hypha does not exist</h2>
|
||||||
|
{% if user.AuthUsed && u.Group == "anon" %}
|
||||||
|
<p>You are not authorized to create new hyphae. Here is what you can do:</p>
|
||||||
|
<ul>
|
||||||
|
<li><a href="/login">Log in to your account, if you have one</a></li>
|
||||||
|
{% if cfg.UseRegistration %}<li><a href="/register">Register a new account</a></li>{% endif %}
|
||||||
|
</ul>
|
||||||
|
{% else %}
|
||||||
|
|
||||||
|
<div class="non-existent-hypha__ways">
|
||||||
|
<section class="non-existent-hypha__way">
|
||||||
|
<h3 class="non-existent-hypha__subtitle">📝 Write a text</h3>
|
||||||
|
<p>Write a note, a diary, an article, a story or anything textual using <a href="https://mycorrhiza.lesarbr.es/hypha/mycomarkup">Mycomarkup</a>.</p>
|
||||||
|
<p>Make sure to follow this wiki's writing conventions if there are any.</p>
|
||||||
|
<a class="btn" href="/edit/{%s h.Name %}">Create</a>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="non-existent-hypha__way">
|
||||||
|
<h3 class="non-existent-hypha__subtitle">🖼 Upload a media</h3>
|
||||||
|
<p>Upload a picture, a video or an audio. Most common formats can be accessed from the browser, others can be only downloaded afterwards. You can write a description for the media later.</p>
|
||||||
|
<form action="/upload-binary/{%s h.Name %}"
|
||||||
|
method="post" enctype="multipart/form-data"
|
||||||
|
class="upload-binary">
|
||||||
|
<label for="upload-binary__input"></label>
|
||||||
|
<input type="file" id="upload-binary__input" name="binary">
|
||||||
|
|
||||||
|
<input type="submit" class="btn" value="Upload">
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</section>
|
||||||
|
{% endfunc %}
|
||||||
|
|
||||||
{% func NaviTitleHTML(h *hyphae.Hypha) %}
|
{% func NaviTitleHTML(h *hyphae.Hypha) %}
|
||||||
{% code
|
{% code
|
||||||
var (
|
var (
|
||||||
|
@ -10,227 +10,325 @@ import "path/filepath"
|
|||||||
//line views/hypha.qtpl:2
|
//line views/hypha.qtpl:2
|
||||||
import "strings"
|
import "strings"
|
||||||
|
|
||||||
//line views/hypha.qtpl:3
|
//line views/hypha.qtpl:4
|
||||||
import "github.com/bouncepaw/mycorrhiza/cfg"
|
import "github.com/bouncepaw/mycorrhiza/cfg"
|
||||||
|
|
||||||
//line views/hypha.qtpl:4
|
//line views/hypha.qtpl:5
|
||||||
import "github.com/bouncepaw/mycorrhiza/hyphae"
|
import "github.com/bouncepaw/mycorrhiza/hyphae"
|
||||||
|
|
||||||
//line views/hypha.qtpl:5
|
//line views/hypha.qtpl:6
|
||||||
import "github.com/bouncepaw/mycorrhiza/util"
|
import "github.com/bouncepaw/mycorrhiza/user"
|
||||||
|
|
||||||
//line views/hypha.qtpl:7
|
//line views/hypha.qtpl:7
|
||||||
|
import "github.com/bouncepaw/mycorrhiza/util"
|
||||||
|
|
||||||
|
//line views/hypha.qtpl:9
|
||||||
import (
|
import (
|
||||||
qtio422016 "io"
|
qtio422016 "io"
|
||||||
|
|
||||||
qt422016 "github.com/valyala/quicktemplate"
|
qt422016 "github.com/valyala/quicktemplate"
|
||||||
)
|
)
|
||||||
|
|
||||||
//line views/hypha.qtpl:7
|
//line views/hypha.qtpl:9
|
||||||
var (
|
var (
|
||||||
_ = qtio422016.Copy
|
_ = qtio422016.Copy
|
||||||
_ = qt422016.AcquireByteBuffer
|
_ = qt422016.AcquireByteBuffer
|
||||||
)
|
)
|
||||||
|
|
||||||
//line views/hypha.qtpl:7
|
//line views/hypha.qtpl:9
|
||||||
|
func streamnonExistentHyphaNotice(qw422016 *qt422016.Writer, h *hyphae.Hypha, u *user.User) {
|
||||||
|
//line views/hypha.qtpl:9
|
||||||
|
qw422016.N().S(`
|
||||||
|
<section class="non-existent-hypha">
|
||||||
|
<h2 class="non-existent-hypha__title">This hypha does not exist</h2>
|
||||||
|
`)
|
||||||
|
//line views/hypha.qtpl:12
|
||||||
|
if user.AuthUsed && u.Group == "anon" {
|
||||||
|
//line views/hypha.qtpl:12
|
||||||
|
qw422016.N().S(`
|
||||||
|
<p>You are not authorized to create new hyphae. Here is what you can do:</p>
|
||||||
|
<ul>
|
||||||
|
<li><a href="/login">Log in to your account, if you have one</a></li>
|
||||||
|
`)
|
||||||
|
//line views/hypha.qtpl:16
|
||||||
|
if cfg.UseRegistration {
|
||||||
|
//line views/hypha.qtpl:16
|
||||||
|
qw422016.N().S(`<li><a href="/register">Register a new account</a></li>`)
|
||||||
|
//line views/hypha.qtpl:16
|
||||||
|
}
|
||||||
|
//line views/hypha.qtpl:16
|
||||||
|
qw422016.N().S(`
|
||||||
|
</ul>
|
||||||
|
`)
|
||||||
|
//line views/hypha.qtpl:18
|
||||||
|
} else {
|
||||||
|
//line views/hypha.qtpl:18
|
||||||
|
qw422016.N().S(`
|
||||||
|
|
||||||
|
<div class="non-existent-hypha__ways">
|
||||||
|
<section class="non-existent-hypha__way">
|
||||||
|
<h3 class="non-existent-hypha__subtitle">📝 Write a text</h3>
|
||||||
|
<p>Write a note, a diary, an article, a story or anything textual using <a href="https://mycorrhiza.lesarbr.es/hypha/mycomarkup">Mycomarkup</a>.</p>
|
||||||
|
<p>Make sure to follow this wiki's writing conventions if there are any.</p>
|
||||||
|
<a class="btn" href="/edit/`)
|
||||||
|
//line views/hypha.qtpl:25
|
||||||
|
qw422016.E().S(h.Name)
|
||||||
|
//line views/hypha.qtpl:25
|
||||||
|
qw422016.N().S(`">Create</a>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="non-existent-hypha__way">
|
||||||
|
<h3 class="non-existent-hypha__subtitle">🖼 Upload a media</h3>
|
||||||
|
<p>Upload a picture, a video or an audio. Most common formats can be accessed from the browser, others can be only downloaded afterwards. You can write a description for the media later.</p>
|
||||||
|
<form action="/upload-binary/`)
|
||||||
|
//line views/hypha.qtpl:31
|
||||||
|
qw422016.E().S(h.Name)
|
||||||
|
//line views/hypha.qtpl:31
|
||||||
|
qw422016.N().S(`"
|
||||||
|
method="post" enctype="multipart/form-data"
|
||||||
|
class="upload-binary">
|
||||||
|
<label for="upload-binary__input"></label>
|
||||||
|
<input type="file" id="upload-binary__input" name="binary">
|
||||||
|
|
||||||
|
<input type="submit" class="btn" value="Upload">
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
`)
|
||||||
|
//line views/hypha.qtpl:41
|
||||||
|
}
|
||||||
|
//line views/hypha.qtpl:41
|
||||||
|
qw422016.N().S(`
|
||||||
|
</section>
|
||||||
|
`)
|
||||||
|
//line views/hypha.qtpl:43
|
||||||
|
}
|
||||||
|
|
||||||
|
//line views/hypha.qtpl:43
|
||||||
|
func writenonExistentHyphaNotice(qq422016 qtio422016.Writer, h *hyphae.Hypha, u *user.User) {
|
||||||
|
//line views/hypha.qtpl:43
|
||||||
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
|
//line views/hypha.qtpl:43
|
||||||
|
streamnonExistentHyphaNotice(qw422016, h, u)
|
||||||
|
//line views/hypha.qtpl:43
|
||||||
|
qt422016.ReleaseWriter(qw422016)
|
||||||
|
//line views/hypha.qtpl:43
|
||||||
|
}
|
||||||
|
|
||||||
|
//line views/hypha.qtpl:43
|
||||||
|
func nonExistentHyphaNotice(h *hyphae.Hypha, u *user.User) string {
|
||||||
|
//line views/hypha.qtpl:43
|
||||||
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
|
//line views/hypha.qtpl:43
|
||||||
|
writenonExistentHyphaNotice(qb422016, h, u)
|
||||||
|
//line views/hypha.qtpl:43
|
||||||
|
qs422016 := string(qb422016.B)
|
||||||
|
//line views/hypha.qtpl:43
|
||||||
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
|
//line views/hypha.qtpl:43
|
||||||
|
return qs422016
|
||||||
|
//line views/hypha.qtpl:43
|
||||||
|
}
|
||||||
|
|
||||||
|
//line views/hypha.qtpl:45
|
||||||
func StreamNaviTitleHTML(qw422016 *qt422016.Writer, h *hyphae.Hypha) {
|
func StreamNaviTitleHTML(qw422016 *qt422016.Writer, h *hyphae.Hypha) {
|
||||||
//line views/hypha.qtpl:7
|
//line views/hypha.qtpl:45
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/hypha.qtpl:9
|
//line views/hypha.qtpl:47
|
||||||
var (
|
var (
|
||||||
prevAcc = "/hypha/"
|
prevAcc = "/hypha/"
|
||||||
parts = strings.Split(h.Name, "/")
|
parts = strings.Split(h.Name, "/")
|
||||||
)
|
)
|
||||||
|
|
||||||
//line views/hypha.qtpl:13
|
//line views/hypha.qtpl:51
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<h1 class="navi-title">
|
<h1 class="navi-title">
|
||||||
`)
|
`)
|
||||||
//line views/hypha.qtpl:15
|
//line views/hypha.qtpl:53
|
||||||
qw422016.N().S(`<a href="/hypha/`)
|
qw422016.N().S(`<a href="/hypha/`)
|
||||||
//line views/hypha.qtpl:16
|
//line views/hypha.qtpl:54
|
||||||
qw422016.E().S(cfg.HomeHypha)
|
qw422016.E().S(cfg.HomeHypha)
|
||||||
//line views/hypha.qtpl:16
|
//line views/hypha.qtpl:54
|
||||||
qw422016.N().S(`">`)
|
qw422016.N().S(`">`)
|
||||||
//line views/hypha.qtpl:17
|
//line views/hypha.qtpl:55
|
||||||
qw422016.N().S(cfg.NaviTitleIcon)
|
qw422016.N().S(cfg.NaviTitleIcon)
|
||||||
//line views/hypha.qtpl:17
|
//line views/hypha.qtpl:55
|
||||||
qw422016.N().S(`<span aria-hidden="true" class="navi-title__colon">:</span></a>`)
|
qw422016.N().S(`<span aria-hidden="true" class="navi-title__colon">:</span></a>`)
|
||||||
//line views/hypha.qtpl:21
|
//line views/hypha.qtpl:59
|
||||||
for i, part := range parts {
|
for i, part := range parts {
|
||||||
//line views/hypha.qtpl:22
|
//line views/hypha.qtpl:60
|
||||||
if i > 0 {
|
if i > 0 {
|
||||||
//line views/hypha.qtpl:22
|
//line views/hypha.qtpl:60
|
||||||
qw422016.N().S(`<span aria-hidden="true" class="navi-title__separator">/</span>`)
|
qw422016.N().S(`<span aria-hidden="true" class="navi-title__separator">/</span>`)
|
||||||
//line views/hypha.qtpl:24
|
//line views/hypha.qtpl:62
|
||||||
}
|
}
|
||||||
//line views/hypha.qtpl:24
|
//line views/hypha.qtpl:62
|
||||||
qw422016.N().S(`<a href="`)
|
qw422016.N().S(`<a href="`)
|
||||||
//line views/hypha.qtpl:26
|
//line views/hypha.qtpl:64
|
||||||
qw422016.E().S(prevAcc + part)
|
qw422016.E().S(prevAcc + part)
|
||||||
//line views/hypha.qtpl:26
|
//line views/hypha.qtpl:64
|
||||||
qw422016.N().S(`" rel="`)
|
qw422016.N().S(`" rel="`)
|
||||||
//line views/hypha.qtpl:26
|
//line views/hypha.qtpl:64
|
||||||
if i == len(parts)-1 {
|
if i == len(parts)-1 {
|
||||||
//line views/hypha.qtpl:26
|
//line views/hypha.qtpl:64
|
||||||
qw422016.N().S(`bookmark`)
|
qw422016.N().S(`bookmark`)
|
||||||
//line views/hypha.qtpl:26
|
//line views/hypha.qtpl:64
|
||||||
} else {
|
} else {
|
||||||
//line views/hypha.qtpl:26
|
//line views/hypha.qtpl:64
|
||||||
qw422016.N().S(`up`)
|
qw422016.N().S(`up`)
|
||||||
//line views/hypha.qtpl:26
|
//line views/hypha.qtpl:64
|
||||||
}
|
}
|
||||||
//line views/hypha.qtpl:26
|
//line views/hypha.qtpl:64
|
||||||
qw422016.N().S(`">`)
|
qw422016.N().S(`">`)
|
||||||
//line views/hypha.qtpl:27
|
//line views/hypha.qtpl:65
|
||||||
qw422016.N().S(util.BeautifulName(part))
|
qw422016.N().S(util.BeautifulName(part))
|
||||||
//line views/hypha.qtpl:27
|
//line views/hypha.qtpl:65
|
||||||
qw422016.N().S(`</a>`)
|
qw422016.N().S(`</a>`)
|
||||||
//line views/hypha.qtpl:29
|
//line views/hypha.qtpl:67
|
||||||
prevAcc += part + "/"
|
prevAcc += part + "/"
|
||||||
|
|
||||||
//line views/hypha.qtpl:30
|
//line views/hypha.qtpl:68
|
||||||
}
|
}
|
||||||
//line views/hypha.qtpl:31
|
//line views/hypha.qtpl:69
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</h1>
|
</h1>
|
||||||
`)
|
`)
|
||||||
//line views/hypha.qtpl:33
|
//line views/hypha.qtpl:71
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/hypha.qtpl:33
|
//line views/hypha.qtpl:71
|
||||||
func WriteNaviTitleHTML(qq422016 qtio422016.Writer, h *hyphae.Hypha) {
|
func WriteNaviTitleHTML(qq422016 qtio422016.Writer, h *hyphae.Hypha) {
|
||||||
//line views/hypha.qtpl:33
|
//line views/hypha.qtpl:71
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/hypha.qtpl:33
|
//line views/hypha.qtpl:71
|
||||||
StreamNaviTitleHTML(qw422016, h)
|
StreamNaviTitleHTML(qw422016, h)
|
||||||
//line views/hypha.qtpl:33
|
//line views/hypha.qtpl:71
|
||||||
qt422016.ReleaseWriter(qw422016)
|
qt422016.ReleaseWriter(qw422016)
|
||||||
//line views/hypha.qtpl:33
|
//line views/hypha.qtpl:71
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/hypha.qtpl:33
|
//line views/hypha.qtpl:71
|
||||||
func NaviTitleHTML(h *hyphae.Hypha) string {
|
func NaviTitleHTML(h *hyphae.Hypha) string {
|
||||||
//line views/hypha.qtpl:33
|
//line views/hypha.qtpl:71
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/hypha.qtpl:33
|
//line views/hypha.qtpl:71
|
||||||
WriteNaviTitleHTML(qb422016, h)
|
WriteNaviTitleHTML(qb422016, h)
|
||||||
//line views/hypha.qtpl:33
|
//line views/hypha.qtpl:71
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/hypha.qtpl:33
|
//line views/hypha.qtpl:71
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/hypha.qtpl:33
|
//line views/hypha.qtpl:71
|
||||||
return qs422016
|
return qs422016
|
||||||
//line views/hypha.qtpl:33
|
//line views/hypha.qtpl:71
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/hypha.qtpl:35
|
//line views/hypha.qtpl:73
|
||||||
func StreamAttachmentHTML(qw422016 *qt422016.Writer, h *hyphae.Hypha) {
|
func StreamAttachmentHTML(qw422016 *qt422016.Writer, h *hyphae.Hypha) {
|
||||||
//line views/hypha.qtpl:35
|
//line views/hypha.qtpl:73
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/hypha.qtpl:36
|
//line views/hypha.qtpl:74
|
||||||
switch filepath.Ext(h.BinaryPath) {
|
switch filepath.Ext(h.BinaryPath) {
|
||||||
//line views/hypha.qtpl:38
|
//line views/hypha.qtpl:76
|
||||||
case ".jpg", ".gif", ".png", ".webp", ".svg", ".ico":
|
case ".jpg", ".gif", ".png", ".webp", ".svg", ".ico":
|
||||||
//line views/hypha.qtpl:38
|
//line views/hypha.qtpl:76
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<div class="binary-container binary-container_with-img">
|
<div class="binary-container binary-container_with-img">
|
||||||
<a href="/binary/`)
|
<a href="/binary/`)
|
||||||
//line views/hypha.qtpl:40
|
//line views/hypha.qtpl:78
|
||||||
qw422016.N().S(h.Name)
|
qw422016.N().S(h.Name)
|
||||||
//line views/hypha.qtpl:40
|
//line views/hypha.qtpl:78
|
||||||
qw422016.N().S(`"><img src="/binary/`)
|
qw422016.N().S(`"><img src="/binary/`)
|
||||||
//line views/hypha.qtpl:40
|
//line views/hypha.qtpl:78
|
||||||
qw422016.N().S(h.Name)
|
qw422016.N().S(h.Name)
|
||||||
//line views/hypha.qtpl:40
|
//line views/hypha.qtpl:78
|
||||||
qw422016.N().S(`"/></a>
|
qw422016.N().S(`"/></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
`)
|
`)
|
||||||
//line views/hypha.qtpl:43
|
//line views/hypha.qtpl:81
|
||||||
case ".ogg", ".webm", ".mp4":
|
case ".ogg", ".webm", ".mp4":
|
||||||
//line views/hypha.qtpl:43
|
//line views/hypha.qtpl:81
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<div class="binary-container binary-container_with-video">
|
<div class="binary-container binary-container_with-video">
|
||||||
<video controls>
|
<video controls>
|
||||||
<source src="/binary/`)
|
<source src="/binary/`)
|
||||||
//line views/hypha.qtpl:46
|
//line views/hypha.qtpl:84
|
||||||
qw422016.N().S(h.Name)
|
qw422016.N().S(h.Name)
|
||||||
//line views/hypha.qtpl:46
|
//line views/hypha.qtpl:84
|
||||||
qw422016.N().S(`"/>
|
qw422016.N().S(`"/>
|
||||||
<p>Your browser does not support video. <a href="/binary/`)
|
<p>Your browser does not support video. <a href="/binary/`)
|
||||||
//line views/hypha.qtpl:47
|
//line views/hypha.qtpl:85
|
||||||
qw422016.N().S(h.Name)
|
qw422016.N().S(h.Name)
|
||||||
//line views/hypha.qtpl:47
|
//line views/hypha.qtpl:85
|
||||||
qw422016.N().S(`">Download video</a></p>
|
qw422016.N().S(`">Download video</a></p>
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
`)
|
`)
|
||||||
//line views/hypha.qtpl:51
|
//line views/hypha.qtpl:89
|
||||||
case ".mp3":
|
case ".mp3":
|
||||||
//line views/hypha.qtpl:51
|
//line views/hypha.qtpl:89
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<div class="binary-container binary-container_with-audio">
|
<div class="binary-container binary-container_with-audio">
|
||||||
<audio controls>
|
<audio controls>
|
||||||
<source src="/binary/`)
|
<source src="/binary/`)
|
||||||
//line views/hypha.qtpl:54
|
//line views/hypha.qtpl:92
|
||||||
qw422016.N().S(h.Name)
|
qw422016.N().S(h.Name)
|
||||||
//line views/hypha.qtpl:54
|
//line views/hypha.qtpl:92
|
||||||
qw422016.N().S(`"/>
|
qw422016.N().S(`"/>
|
||||||
<p>Your browser does not support audio. <a href="/binary/`)
|
<p>Your browser does not support audio. <a href="/binary/`)
|
||||||
//line views/hypha.qtpl:55
|
//line views/hypha.qtpl:93
|
||||||
qw422016.N().S(h.Name)
|
qw422016.N().S(h.Name)
|
||||||
//line views/hypha.qtpl:55
|
//line views/hypha.qtpl:93
|
||||||
qw422016.N().S(`">Download audio</a></p>
|
qw422016.N().S(`">Download audio</a></p>
|
||||||
</audio>
|
</audio>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
`)
|
`)
|
||||||
//line views/hypha.qtpl:59
|
//line views/hypha.qtpl:97
|
||||||
default:
|
default:
|
||||||
//line views/hypha.qtpl:59
|
//line views/hypha.qtpl:97
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<div class="binary-container binary-container_with-nothing">
|
<div class="binary-container binary-container_with-nothing">
|
||||||
<p><a href="/binary/`)
|
<p><a href="/binary/`)
|
||||||
//line views/hypha.qtpl:61
|
//line views/hypha.qtpl:99
|
||||||
qw422016.N().S(h.Name)
|
qw422016.N().S(h.Name)
|
||||||
//line views/hypha.qtpl:61
|
//line views/hypha.qtpl:99
|
||||||
qw422016.N().S(`">Download media</a></p>
|
qw422016.N().S(`">Download media</a></p>
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
//line views/hypha.qtpl:63
|
//line views/hypha.qtpl:101
|
||||||
}
|
}
|
||||||
//line views/hypha.qtpl:63
|
//line views/hypha.qtpl:101
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/hypha.qtpl:64
|
//line views/hypha.qtpl:102
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/hypha.qtpl:64
|
//line views/hypha.qtpl:102
|
||||||
func WriteAttachmentHTML(qq422016 qtio422016.Writer, h *hyphae.Hypha) {
|
func WriteAttachmentHTML(qq422016 qtio422016.Writer, h *hyphae.Hypha) {
|
||||||
//line views/hypha.qtpl:64
|
//line views/hypha.qtpl:102
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/hypha.qtpl:64
|
//line views/hypha.qtpl:102
|
||||||
StreamAttachmentHTML(qw422016, h)
|
StreamAttachmentHTML(qw422016, h)
|
||||||
//line views/hypha.qtpl:64
|
//line views/hypha.qtpl:102
|
||||||
qt422016.ReleaseWriter(qw422016)
|
qt422016.ReleaseWriter(qw422016)
|
||||||
//line views/hypha.qtpl:64
|
//line views/hypha.qtpl:102
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/hypha.qtpl:64
|
//line views/hypha.qtpl:102
|
||||||
func AttachmentHTML(h *hyphae.Hypha) string {
|
func AttachmentHTML(h *hyphae.Hypha) string {
|
||||||
//line views/hypha.qtpl:64
|
//line views/hypha.qtpl:102
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/hypha.qtpl:64
|
//line views/hypha.qtpl:102
|
||||||
WriteAttachmentHTML(qb422016, h)
|
WriteAttachmentHTML(qb422016, h)
|
||||||
//line views/hypha.qtpl:64
|
//line views/hypha.qtpl:102
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/hypha.qtpl:64
|
//line views/hypha.qtpl:102
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/hypha.qtpl:64
|
//line views/hypha.qtpl:102
|
||||||
return qs422016
|
return qs422016
|
||||||
//line views/hypha.qtpl:64
|
//line views/hypha.qtpl:102
|
||||||
}
|
}
|
||||||
|
@ -75,26 +75,17 @@ If `contents` == "", a helpful message is shown instead.
|
|||||||
{% func HyphaHTML(rq *http.Request, h *hyphae.Hypha, contents string) %}
|
{% func HyphaHTML(rq *http.Request, h *hyphae.Hypha, contents string) %}
|
||||||
{% code
|
{% code
|
||||||
relatives, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.Name)
|
relatives, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.Name)
|
||||||
|
u := user.FromRequest(rq)
|
||||||
%}
|
%}
|
||||||
{%= NavHTML(rq, h.Name, "page") %}
|
{%= NavHTML(rq, h.Name, "page") %}
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<main class="main-width">
|
<main class="main-width">
|
||||||
<article>
|
<article>
|
||||||
{%s= NaviTitleHTML(h) %}
|
{%s= NaviTitleHTML(h) %}
|
||||||
{% if contents == "" %}
|
{% if h.Exists %}
|
||||||
<p>This hypha has no text. Why not <a href="/edit/{%s h.Name %}">create it</a>?</p>
|
|
||||||
{% if u := user.FromRequest(rq); (!user.AuthUsed || u.Group != "anon") && !h.Exists %}
|
|
||||||
<form action="/upload-binary/{%s h.Name %}"
|
|
||||||
method="post" enctype="multipart/form-data"
|
|
||||||
class="upload-binary">
|
|
||||||
<label for="upload-binary__input">Upload an attachment:</label>
|
|
||||||
<input type="file" id="upload-binary__input" name="binary">
|
|
||||||
<input type="submit">
|
|
||||||
</form>
|
|
||||||
<br>
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
|
||||||
{%s= contents %}
|
{%s= contents %}
|
||||||
|
{% else %}
|
||||||
|
{%= nonExistentHyphaNotice(h, u) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</article>
|
</article>
|
||||||
<section class="prevnext">
|
<section class="prevnext">
|
||||||
|
@ -230,220 +230,199 @@ func StreamHyphaHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hyph
|
|||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:77
|
//line views/readers.qtpl:77
|
||||||
relatives, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.Name)
|
relatives, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.Name)
|
||||||
|
u := user.FromRequest(rq)
|
||||||
|
|
||||||
//line views/readers.qtpl:78
|
//line views/readers.qtpl:79
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:79
|
//line views/readers.qtpl:80
|
||||||
StreamNavHTML(qw422016, rq, h.Name, "page")
|
StreamNavHTML(qw422016, rq, h.Name, "page")
|
||||||
//line views/readers.qtpl:79
|
//line views/readers.qtpl:80
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<main class="main-width">
|
<main class="main-width">
|
||||||
<article>
|
<article>
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:83
|
//line views/readers.qtpl:84
|
||||||
qw422016.N().S(NaviTitleHTML(h))
|
qw422016.N().S(NaviTitleHTML(h))
|
||||||
//line views/readers.qtpl:83
|
//line views/readers.qtpl:84
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:84
|
|
||||||
if contents == "" {
|
|
||||||
//line views/readers.qtpl:84
|
|
||||||
qw422016.N().S(`
|
|
||||||
<p>This hypha has no text. Why not <a href="/edit/`)
|
|
||||||
//line views/readers.qtpl:85
|
//line views/readers.qtpl:85
|
||||||
qw422016.E().S(h.Name)
|
if h.Exists {
|
||||||
//line views/readers.qtpl:85
|
//line views/readers.qtpl:85
|
||||||
qw422016.N().S(`">create it</a>?</p>
|
|
||||||
`)
|
|
||||||
//line views/readers.qtpl:86
|
|
||||||
if u := user.FromRequest(rq); (!user.AuthUsed || u.Group != "anon") && !h.Exists {
|
|
||||||
//line views/readers.qtpl:86
|
|
||||||
qw422016.N().S(`
|
|
||||||
<form action="/upload-binary/`)
|
|
||||||
//line views/readers.qtpl:87
|
|
||||||
qw422016.E().S(h.Name)
|
|
||||||
//line views/readers.qtpl:87
|
|
||||||
qw422016.N().S(`"
|
|
||||||
method="post" enctype="multipart/form-data"
|
|
||||||
class="upload-binary">
|
|
||||||
<label for="upload-binary__input">Upload an attachment:</label>
|
|
||||||
<input type="file" id="upload-binary__input" name="binary">
|
|
||||||
<input type="submit">
|
|
||||||
</form>
|
|
||||||
<br>
|
|
||||||
`)
|
|
||||||
//line views/readers.qtpl:95
|
|
||||||
}
|
|
||||||
//line views/readers.qtpl:95
|
|
||||||
qw422016.N().S(`
|
|
||||||
`)
|
|
||||||
//line views/readers.qtpl:96
|
|
||||||
} else {
|
|
||||||
//line views/readers.qtpl:96
|
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:97
|
//line views/readers.qtpl:86
|
||||||
qw422016.N().S(contents)
|
qw422016.N().S(contents)
|
||||||
//line views/readers.qtpl:97
|
//line views/readers.qtpl:86
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:98
|
//line views/readers.qtpl:87
|
||||||
|
} else {
|
||||||
|
//line views/readers.qtpl:87
|
||||||
|
qw422016.N().S(`
|
||||||
|
`)
|
||||||
|
//line views/readers.qtpl:88
|
||||||
|
streamnonExistentHyphaNotice(qw422016, h, u)
|
||||||
|
//line views/readers.qtpl:88
|
||||||
|
qw422016.N().S(`
|
||||||
|
`)
|
||||||
|
//line views/readers.qtpl:89
|
||||||
}
|
}
|
||||||
//line views/readers.qtpl:98
|
//line views/readers.qtpl:89
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</article>
|
</article>
|
||||||
<section class="prevnext">
|
<section class="prevnext">
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:101
|
//line views/readers.qtpl:92
|
||||||
if prevHyphaName != "" {
|
if prevHyphaName != "" {
|
||||||
//line views/readers.qtpl:101
|
//line views/readers.qtpl:92
|
||||||
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:102
|
//line views/readers.qtpl:93
|
||||||
qw422016.E().S(prevHyphaName)
|
qw422016.E().S(prevHyphaName)
|
||||||
//line views/readers.qtpl:102
|
//line views/readers.qtpl:93
|
||||||
qw422016.N().S(`" rel="prev">← `)
|
qw422016.N().S(`" rel="prev">← `)
|
||||||
//line views/readers.qtpl:102
|
//line views/readers.qtpl:93
|
||||||
qw422016.E().S(util.BeautifulName(path.Base(prevHyphaName)))
|
qw422016.E().S(util.BeautifulName(path.Base(prevHyphaName)))
|
||||||
//line views/readers.qtpl:102
|
//line views/readers.qtpl:93
|
||||||
qw422016.N().S(`</a>
|
qw422016.N().S(`</a>
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:103
|
//line views/readers.qtpl:94
|
||||||
}
|
}
|
||||||
//line views/readers.qtpl:103
|
//line views/readers.qtpl:94
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:104
|
//line views/readers.qtpl:95
|
||||||
if nextHyphaName != "" {
|
if nextHyphaName != "" {
|
||||||
//line views/readers.qtpl:104
|
//line views/readers.qtpl:95
|
||||||
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:105
|
//line views/readers.qtpl:96
|
||||||
qw422016.E().S(nextHyphaName)
|
qw422016.E().S(nextHyphaName)
|
||||||
//line views/readers.qtpl:105
|
//line views/readers.qtpl:96
|
||||||
qw422016.N().S(`" rel="next">`)
|
qw422016.N().S(`" rel="next">`)
|
||||||
//line views/readers.qtpl:105
|
//line views/readers.qtpl:96
|
||||||
qw422016.E().S(util.BeautifulName(path.Base(nextHyphaName)))
|
qw422016.E().S(util.BeautifulName(path.Base(nextHyphaName)))
|
||||||
//line views/readers.qtpl:105
|
//line views/readers.qtpl:96
|
||||||
qw422016.N().S(` →</a>
|
qw422016.N().S(` →</a>
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:106
|
//line views/readers.qtpl:97
|
||||||
}
|
}
|
||||||
//line views/readers.qtpl:106
|
//line views/readers.qtpl:97
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</section>
|
</section>
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:108
|
//line views/readers.qtpl:99
|
||||||
StreamSubhyphaeHTML(qw422016, subhyphae)
|
StreamSubhyphaeHTML(qw422016, subhyphae)
|
||||||
//line views/readers.qtpl:108
|
//line views/readers.qtpl:99
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</main>
|
</main>
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:110
|
//line views/readers.qtpl:101
|
||||||
StreamRelativeHyphaeHTML(qw422016, relatives)
|
StreamRelativeHyphaeHTML(qw422016, relatives)
|
||||||
//line views/readers.qtpl:110
|
//line views/readers.qtpl:101
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:112
|
//line views/readers.qtpl:103
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/readers.qtpl:112
|
//line views/readers.qtpl:103
|
||||||
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:112
|
//line views/readers.qtpl:103
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/readers.qtpl:112
|
//line views/readers.qtpl:103
|
||||||
StreamHyphaHTML(qw422016, rq, h, contents)
|
StreamHyphaHTML(qw422016, rq, h, contents)
|
||||||
//line views/readers.qtpl:112
|
//line views/readers.qtpl:103
|
||||||
qt422016.ReleaseWriter(qw422016)
|
qt422016.ReleaseWriter(qw422016)
|
||||||
//line views/readers.qtpl:112
|
//line views/readers.qtpl:103
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/readers.qtpl:112
|
//line views/readers.qtpl:103
|
||||||
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:112
|
//line views/readers.qtpl:103
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/readers.qtpl:112
|
//line views/readers.qtpl:103
|
||||||
WriteHyphaHTML(qb422016, rq, h, contents)
|
WriteHyphaHTML(qb422016, rq, h, contents)
|
||||||
//line views/readers.qtpl:112
|
//line views/readers.qtpl:103
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/readers.qtpl:112
|
//line views/readers.qtpl:103
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/readers.qtpl:112
|
//line views/readers.qtpl:103
|
||||||
return qs422016
|
return qs422016
|
||||||
//line views/readers.qtpl:112
|
//line views/readers.qtpl:103
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/readers.qtpl:114
|
//line views/readers.qtpl:105
|
||||||
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:114
|
//line views/readers.qtpl:105
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:116
|
//line views/readers.qtpl:107
|
||||||
relatives, subhyphae, _, _ := tree.Tree(h.Name)
|
relatives, subhyphae, _, _ := tree.Tree(h.Name)
|
||||||
|
|
||||||
//line views/readers.qtpl:117
|
//line views/readers.qtpl:108
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:118
|
//line views/readers.qtpl:109
|
||||||
StreamNavHTML(qw422016, rq, h.Name, "revision", revHash)
|
StreamNavHTML(qw422016, rq, h.Name, "revision", revHash)
|
||||||
//line views/readers.qtpl:118
|
//line views/readers.qtpl:109
|
||||||
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 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 views/readers.qtpl:123
|
//line views/readers.qtpl:114
|
||||||
qw422016.N().S(NaviTitleHTML(h))
|
qw422016.N().S(NaviTitleHTML(h))
|
||||||
//line views/readers.qtpl:123
|
//line views/readers.qtpl:114
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:124
|
//line views/readers.qtpl:115
|
||||||
qw422016.N().S(contents)
|
qw422016.N().S(contents)
|
||||||
//line views/readers.qtpl:124
|
//line views/readers.qtpl:115
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</article>
|
</article>
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:126
|
//line views/readers.qtpl:117
|
||||||
StreamSubhyphaeHTML(qw422016, subhyphae)
|
StreamSubhyphaeHTML(qw422016, subhyphae)
|
||||||
//line views/readers.qtpl:126
|
//line views/readers.qtpl:117
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</main>
|
</main>
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:128
|
//line views/readers.qtpl:119
|
||||||
StreamRelativeHyphaeHTML(qw422016, relatives)
|
StreamRelativeHyphaeHTML(qw422016, relatives)
|
||||||
//line views/readers.qtpl:128
|
//line views/readers.qtpl:119
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:130
|
//line views/readers.qtpl:121
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/readers.qtpl:130
|
//line views/readers.qtpl:121
|
||||||
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:130
|
//line views/readers.qtpl:121
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/readers.qtpl:130
|
//line views/readers.qtpl:121
|
||||||
StreamRevisionHTML(qw422016, rq, h, contents, revHash)
|
StreamRevisionHTML(qw422016, rq, h, contents, revHash)
|
||||||
//line views/readers.qtpl:130
|
//line views/readers.qtpl:121
|
||||||
qt422016.ReleaseWriter(qw422016)
|
qt422016.ReleaseWriter(qw422016)
|
||||||
//line views/readers.qtpl:130
|
//line views/readers.qtpl:121
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/readers.qtpl:130
|
//line views/readers.qtpl:121
|
||||||
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:130
|
//line views/readers.qtpl:121
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/readers.qtpl:130
|
//line views/readers.qtpl:121
|
||||||
WriteRevisionHTML(qb422016, rq, h, contents, revHash)
|
WriteRevisionHTML(qb422016, rq, h, contents, revHash)
|
||||||
//line views/readers.qtpl:130
|
//line views/readers.qtpl:121
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/readers.qtpl:130
|
//line views/readers.qtpl:121
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/readers.qtpl:130
|
//line views/readers.qtpl:121
|
||||||
return qs422016
|
return qs422016
|
||||||
//line views/readers.qtpl:130
|
//line views/readers.qtpl:121
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user