mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-01-31 11:29:09 +00:00
Move hypha tree to right, make hypha tabs look cuter
This commit is contained in:
parent
b662eb5219
commit
6dff3357d9
@ -106,7 +106,8 @@ func handlerPage(w http.ResponseWriter, rq *http.Request) {
|
||||
templates.PageHTML(rq, hyphaName,
|
||||
naviTitle(hyphaName),
|
||||
contents,
|
||||
treeHTML, prevHypha, nextHypha,
|
||||
treeHTML,
|
||||
prevHypha, nextHypha,
|
||||
hasAmnt),
|
||||
u,
|
||||
openGraph))
|
||||
|
@ -25,26 +25,28 @@ func StreamDefaultCSS(qw422016 *qt422016.Writer) {
|
||||
//line templates/asset.qtpl:2
|
||||
qw422016.N().S(`/* Layout stuff */
|
||||
@media screen and (min-width: 800px) {
|
||||
main { padding:1rem 2rem; margin: 0 auto; width: 800px; }
|
||||
.hypha-tabs { padding: 1rem 2rem; margin: 0 auto; width: 800px; }
|
||||
header { margin: 0 auto; width: 800px; }
|
||||
main { padding:1rem 2rem; margin: 0 auto; min-width: 500px; max-width: 800px; border-radius: .25rem; }
|
||||
.hypha-tabs { padding: 1rem 2rem; margin: 0 auto; min-width: 500px; max-width: 800px; }
|
||||
header { width: 100%; }
|
||||
.header-links { margin: 0 auto; min-width: 500px; max-width: 800px; }
|
||||
.header-links__entry { margin-right: 1.5rem; }
|
||||
.header-links__entry_user { margin: 0 2rem 0 auto; }
|
||||
.header-links__entry:nth-of-type(1),
|
||||
.hypha-tabs__tab:nth-of-type(1) { margin-left: 2rem; }
|
||||
.hypha-tabs__tab { margin-right: 1.5rem; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.2); border-bottom: 2px #ddd solid; padding: 0 .5rem; }
|
||||
.hypha-tabs__tab { padding: 0 .5rem; border-radius: .25rem .25rem 0 0; border: 1px #ddd solid; border-bottom: 2px #ddd solid; }
|
||||
.three-col { display: grid; grid-template-columns: 1fr auto 1fr; column-gap: 1rem; }
|
||||
main { grid-column: 2 / span 1; grid-row: 1 / span 2; }
|
||||
.relative-hyphae { grid-column: 3 / span 1; grid-row: 1 / span 1; min-width: 10rem; max-width: 20rem; }
|
||||
}
|
||||
@media screen and (max-width: 800px) {
|
||||
main { padding: 1rem; margin: 0; width: 100%; }
|
||||
.hypha-tabs{ padding: 1rem; margin: 0; width: 100%; }
|
||||
.hypha-tabs__tab { box-shadow: none; margin-right: .5rem; padding: .25rem .5rem; }
|
||||
header { width: 100%; }
|
||||
.header-links__entry { margin-right: .5rem; }
|
||||
}
|
||||
*, *::before, *::after {box-sizing: border-box;}
|
||||
html { height:100%; padding:0; }
|
||||
body {height:100%; margin:0; font-size:16px; font-family: 'PT Sans', 'Liberation Sans', sans-serif;}
|
||||
main {border-radius: 0 0 .25rem .25rem; }
|
||||
main > form {margin-bottom:1rem;}
|
||||
textarea {font-size:16px; font-family: 'PT Sans', 'Liberation Sans', sans-serif;}
|
||||
.edit_no-preview {height:100%;}
|
||||
@ -142,9 +144,14 @@ article .codeblock,
|
||||
.prevnext__el,
|
||||
table { background-color: #eee; }
|
||||
|
||||
.hypha-tabs__tab { background-color: #eee; }
|
||||
.hypha-tabs__tab { clip-path: inset(-20px -20px 0 -20px); }
|
||||
.hypha-tabs__tab a { color: black; }
|
||||
.hypha-tabs__tab_active { border-bottom: 2px white solid; background: white; }
|
||||
|
||||
@media screen and (max-width: 800px) {
|
||||
.hypha-tabs { background-color: white; }
|
||||
.hypha-tabs__tab { box-shadow: none; }
|
||||
.hypha-tabs,
|
||||
.hypha-tabs__tab { background-color: white; }
|
||||
}
|
||||
|
||||
/* Other stuff */
|
||||
@ -154,11 +161,7 @@ background-image: url("data:image/svg+xml,%3Csvg width='42' height='44' viewBox=
|
||||
header { background-color: #bbb; }
|
||||
.header-links__link { color: black; }
|
||||
.header-links__link:hover { background-color: #eee; }
|
||||
|
||||
main, .hypha-tabs__tab { background-color: white; }
|
||||
.hypha-tabs__tab { clip-path: inset(-20px -20px 0 -20px); }
|
||||
.hypha-tabs__tab a { color: black; }
|
||||
.hypha-tabs__tab_active { border-bottom: 2px white solid; }
|
||||
main { background-color: white; }
|
||||
|
||||
blockquote { border-left: 4px black solid; }
|
||||
.wikilink_new {color:#a55858;}
|
||||
@ -206,6 +209,10 @@ mark { background: rgba(130, 80, 30, 5); color: inherit; }
|
||||
}
|
||||
}
|
||||
|
||||
.layout-card { background-color: white; border-radius: .25rem; }
|
||||
.layout-card__title { font-size: 1rem; margin: 0; padding: .25rem .5rem; background-color: #eee; border-radius: .25rem .25rem 0 0; }
|
||||
|
||||
|
||||
`)
|
||||
//line templates/asset.qtpl:2
|
||||
qw422016.N().S(`
|
||||
|
@ -1,25 +1,27 @@
|
||||
/* Layout stuff */
|
||||
@media screen and (min-width: 800px) {
|
||||
main { padding:1rem 2rem; margin: 0 auto; width: 800px; }
|
||||
.hypha-tabs { padding: 1rem 2rem; margin: 0 auto; width: 800px; }
|
||||
header { margin: 0 auto; width: 800px; }
|
||||
main { padding:1rem 2rem; margin: 0 auto; min-width: 500px; max-width: 800px; border-radius: .25rem; }
|
||||
.hypha-tabs { padding: 1rem 2rem; margin: 0 auto; min-width: 500px; max-width: 800px; }
|
||||
header { width: 100%; }
|
||||
.header-links { margin: 0 auto; min-width: 500px; max-width: 800px; }
|
||||
.header-links__entry { margin-right: 1.5rem; }
|
||||
.header-links__entry_user { margin: 0 2rem 0 auto; }
|
||||
.header-links__entry:nth-of-type(1),
|
||||
.hypha-tabs__tab:nth-of-type(1) { margin-left: 2rem; }
|
||||
.hypha-tabs__tab { margin-right: 1.5rem; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.2); border-bottom: 2px #ddd solid; padding: 0 .5rem; }
|
||||
.hypha-tabs__tab { padding: 0 .5rem; border-radius: .25rem .25rem 0 0; border: 1px #ddd solid; border-bottom: 2px #ddd solid; }
|
||||
.three-col { display: grid; grid-template-columns: 1fr auto 1fr; column-gap: 1rem; }
|
||||
main { grid-column: 2 / span 1; grid-row: 1 / span 2; }
|
||||
.relative-hyphae { grid-column: 3 / span 1; grid-row: 1 / span 1; min-width: 10rem; max-width: 20rem; }
|
||||
}
|
||||
@media screen and (max-width: 800px) {
|
||||
main { padding: 1rem; margin: 0; width: 100%; }
|
||||
.hypha-tabs{ padding: 1rem; margin: 0; width: 100%; }
|
||||
.hypha-tabs__tab { box-shadow: none; margin-right: .5rem; padding: .25rem .5rem; }
|
||||
header { width: 100%; }
|
||||
.header-links__entry { margin-right: .5rem; }
|
||||
}
|
||||
*, *::before, *::after {box-sizing: border-box;}
|
||||
html { height:100%; padding:0; }
|
||||
body {height:100%; margin:0; font-size:16px; font-family: 'PT Sans', 'Liberation Sans', sans-serif;}
|
||||
main {border-radius: 0 0 .25rem .25rem; }
|
||||
main > form {margin-bottom:1rem;}
|
||||
textarea {font-size:16px; font-family: 'PT Sans', 'Liberation Sans', sans-serif;}
|
||||
.edit_no-preview {height:100%;}
|
||||
@ -117,9 +119,14 @@ article .codeblock,
|
||||
.prevnext__el,
|
||||
table { background-color: #eee; }
|
||||
|
||||
.hypha-tabs__tab { background-color: #eee; }
|
||||
.hypha-tabs__tab { clip-path: inset(-20px -20px 0 -20px); }
|
||||
.hypha-tabs__tab a { color: black; }
|
||||
.hypha-tabs__tab_active { border-bottom: 2px white solid; background: white; }
|
||||
|
||||
@media screen and (max-width: 800px) {
|
||||
.hypha-tabs { background-color: white; }
|
||||
.hypha-tabs__tab { box-shadow: none; }
|
||||
.hypha-tabs,
|
||||
.hypha-tabs__tab { background-color: white; }
|
||||
}
|
||||
|
||||
/* Other stuff */
|
||||
@ -129,11 +136,7 @@ background-image: url("data:image/svg+xml,%3Csvg width='42' height='44' viewBox=
|
||||
header { background-color: #bbb; }
|
||||
.header-links__link { color: black; }
|
||||
.header-links__link:hover { background-color: #eee; }
|
||||
|
||||
main, .hypha-tabs__tab { background-color: white; }
|
||||
.hypha-tabs__tab { clip-path: inset(-20px -20px 0 -20px); }
|
||||
.hypha-tabs__tab a { color: black; }
|
||||
.hypha-tabs__tab_active { border-bottom: 2px white solid; }
|
||||
main { background-color: white; }
|
||||
|
||||
blockquote { border-left: 4px black solid; }
|
||||
.wikilink_new {color:#a55858;}
|
||||
@ -181,3 +184,7 @@ mark { background: rgba(130, 80, 30, 5); color: inherit; }
|
||||
}
|
||||
}
|
||||
|
||||
.layout-card { background-color: white; border-radius: .25rem; }
|
||||
.layout-card__title { font-size: 1rem; margin: 0; padding: .25rem .5rem; background-color: #eee; border-radius: .25rem .25rem 0 0; }
|
||||
|
||||
|
||||
|
@ -28,8 +28,9 @@
|
||||
{% endfunc %}
|
||||
|
||||
If `contents` == "", a helpful message is shown instead.
|
||||
{% func PageHTML(rq *http.Request, hyphaName, naviTitle, contents, tree, prevHyphaName, nextHyphaName string, hasAmnt bool) %}
|
||||
{% func PageHTML(rq *http.Request, hyphaName, naviTitle, contents, relatives, prevHyphaName, nextHyphaName string, hasAmnt bool) %}
|
||||
{%= navHTML(rq, hyphaName, "page") %}
|
||||
<div class="three-col">
|
||||
<main>
|
||||
<article>
|
||||
{%s= naviTitle %}
|
||||
@ -60,8 +61,10 @@ If `contents` == "", a helpful message is shown instead.
|
||||
<input type="submit"/>
|
||||
</form>
|
||||
{% endif %}
|
||||
<aside>
|
||||
{%s= tree %}
|
||||
</aside>
|
||||
</main>
|
||||
<aside class="relative-hyphae layout-card">
|
||||
<h1 class="relative-hyphae__title layout-card__title">Relative hyphae</h1>
|
||||
{%s= relatives %}
|
||||
</aside>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
@ -144,7 +144,7 @@ func RevisionHTML(rq *http.Request, hyphaName, naviTitle, contents, tree, revHas
|
||||
// If `contents` == "", a helpful message is shown instead.
|
||||
|
||||
//line templates/readers.qtpl:31
|
||||
func StreamPageHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, naviTitle, contents, tree, 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
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
@ -152,105 +152,106 @@ func StreamPageHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, navi
|
||||
streamnavHTML(qw422016, rq, hyphaName, "page")
|
||||
//line templates/readers.qtpl:32
|
||||
qw422016.N().S(`
|
||||
<div class="three-col">
|
||||
<main>
|
||||
<article>
|
||||
`)
|
||||
//line templates/readers.qtpl:35
|
||||
//line templates/readers.qtpl:36
|
||||
qw422016.N().S(naviTitle)
|
||||
//line templates/readers.qtpl:35
|
||||
//line templates/readers.qtpl:36
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line templates/readers.qtpl:36
|
||||
//line templates/readers.qtpl:37
|
||||
if contents == "" {
|
||||
//line templates/readers.qtpl:36
|
||||
//line templates/readers.qtpl:37
|
||||
qw422016.N().S(`
|
||||
<p>This hypha has no text. Why not <a href="/edit/`)
|
||||
//line templates/readers.qtpl:37
|
||||
//line templates/readers.qtpl:38
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/readers.qtpl:37
|
||||
//line templates/readers.qtpl:38
|
||||
qw422016.N().S(`">create it</a>?</p>
|
||||
`)
|
||||
//line templates/readers.qtpl:38
|
||||
//line templates/readers.qtpl:39
|
||||
} else {
|
||||
//line templates/readers.qtpl:38
|
||||
//line templates/readers.qtpl:39
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line templates/readers.qtpl:39
|
||||
//line templates/readers.qtpl:40
|
||||
qw422016.N().S(contents)
|
||||
//line templates/readers.qtpl:39
|
||||
//line templates/readers.qtpl:40
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line templates/readers.qtpl:40
|
||||
//line templates/readers.qtpl:41
|
||||
}
|
||||
//line templates/readers.qtpl:40
|
||||
//line templates/readers.qtpl:41
|
||||
qw422016.N().S(`
|
||||
</article>
|
||||
<section class="prevnext">
|
||||
`)
|
||||
//line templates/readers.qtpl:43
|
||||
//line templates/readers.qtpl:44
|
||||
if prevHyphaName != "" {
|
||||
//line templates/readers.qtpl:43
|
||||
//line templates/readers.qtpl:44
|
||||
qw422016.N().S(`
|
||||
<a class="prevnext__el prevnext__prev" href="/page/`)
|
||||
//line templates/readers.qtpl:44
|
||||
//line templates/readers.qtpl:45
|
||||
qw422016.E().S(prevHyphaName)
|
||||
//line templates/readers.qtpl:44
|
||||
//line templates/readers.qtpl:45
|
||||
qw422016.N().S(`" rel="prev">← `)
|
||||
//line templates/readers.qtpl:44
|
||||
//line templates/readers.qtpl:45
|
||||
qw422016.E().S(path.Base(prevHyphaName))
|
||||
//line templates/readers.qtpl:44
|
||||
//line templates/readers.qtpl:45
|
||||
qw422016.N().S(`</a>
|
||||
`)
|
||||
//line templates/readers.qtpl:45
|
||||
//line templates/readers.qtpl:46
|
||||
}
|
||||
//line templates/readers.qtpl:45
|
||||
//line templates/readers.qtpl:46
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line templates/readers.qtpl:46
|
||||
//line templates/readers.qtpl:47
|
||||
if nextHyphaName != "" {
|
||||
//line templates/readers.qtpl:46
|
||||
//line templates/readers.qtpl:47
|
||||
qw422016.N().S(`
|
||||
<a class="prevnext__el prevnext__next" href="/page/`)
|
||||
//line templates/readers.qtpl:47
|
||||
//line templates/readers.qtpl:48
|
||||
qw422016.E().S(nextHyphaName)
|
||||
//line templates/readers.qtpl:47
|
||||
//line templates/readers.qtpl:48
|
||||
qw422016.N().S(`" rel="next">`)
|
||||
//line templates/readers.qtpl:47
|
||||
//line templates/readers.qtpl:48
|
||||
qw422016.E().S(path.Base(nextHyphaName))
|
||||
//line templates/readers.qtpl:47
|
||||
//line templates/readers.qtpl:48
|
||||
qw422016.N().S(` →</a>
|
||||
`)
|
||||
//line templates/readers.qtpl:48
|
||||
//line templates/readers.qtpl:49
|
||||
}
|
||||
//line templates/readers.qtpl:48
|
||||
//line templates/readers.qtpl:49
|
||||
qw422016.N().S(`
|
||||
</section>
|
||||
`)
|
||||
//line templates/readers.qtpl:50
|
||||
//line templates/readers.qtpl:51
|
||||
if u := user.FromRequest(rq); !user.AuthUsed || u.Group != "anon" {
|
||||
//line templates/readers.qtpl:50
|
||||
//line templates/readers.qtpl:51
|
||||
qw422016.N().S(`
|
||||
<form action="/upload-binary/`)
|
||||
//line templates/readers.qtpl:51
|
||||
//line templates/readers.qtpl:52
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/readers.qtpl:51
|
||||
//line templates/readers.qtpl:52
|
||||
qw422016.N().S(`"
|
||||
method="post" enctype="multipart/form-data"
|
||||
class="upload-amnt">
|
||||
`)
|
||||
//line templates/readers.qtpl:54
|
||||
//line templates/readers.qtpl:55
|
||||
if hasAmnt {
|
||||
//line templates/readers.qtpl:54
|
||||
//line templates/readers.qtpl:55
|
||||
qw422016.N().S(`
|
||||
<a class="upload-amnt__unattach" href="/unattach-ask/`)
|
||||
//line templates/readers.qtpl:55
|
||||
//line templates/readers.qtpl:56
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/readers.qtpl:55
|
||||
//line templates/readers.qtpl:56
|
||||
qw422016.N().S(`">Unattach current attachment?</a>
|
||||
`)
|
||||
//line templates/readers.qtpl:56
|
||||
//line templates/readers.qtpl:57
|
||||
}
|
||||
//line templates/readers.qtpl:56
|
||||
//line templates/readers.qtpl:57
|
||||
qw422016.N().S(`
|
||||
<label for="upload-binary__input">Upload a new attachment</label>
|
||||
<br>
|
||||
@ -258,44 +259,46 @@ func StreamPageHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, navi
|
||||
<input type="submit"/>
|
||||
</form>
|
||||
`)
|
||||
//line templates/readers.qtpl:62
|
||||
//line templates/readers.qtpl:63
|
||||
}
|
||||
//line templates/readers.qtpl:62
|
||||
//line templates/readers.qtpl:63
|
||||
qw422016.N().S(`
|
||||
<aside>
|
||||
`)
|
||||
//line templates/readers.qtpl:64
|
||||
qw422016.N().S(tree)
|
||||
//line templates/readers.qtpl:64
|
||||
qw422016.N().S(`
|
||||
</aside>
|
||||
</main>
|
||||
<aside class="relative-hyphae layout-card">
|
||||
<h1 class="relative-hyphae__title layout-card__title">Relative hyphae</h1>
|
||||
`)
|
||||
//line templates/readers.qtpl:67
|
||||
qw422016.N().S(relatives)
|
||||
//line templates/readers.qtpl:67
|
||||
qw422016.N().S(`
|
||||
</aside>
|
||||
</div>
|
||||
`)
|
||||
//line templates/readers.qtpl:67
|
||||
//line templates/readers.qtpl:70
|
||||
}
|
||||
|
||||
//line templates/readers.qtpl:67
|
||||
func WritePageHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, naviTitle, contents, tree, prevHyphaName, nextHyphaName string, hasAmnt bool) {
|
||||
//line templates/readers.qtpl:67
|
||||
//line templates/readers.qtpl:70
|
||||
func WritePageHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, naviTitle, contents, relatives, prevHyphaName, nextHyphaName string, hasAmnt bool) {
|
||||
//line templates/readers.qtpl:70
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line templates/readers.qtpl:67
|
||||
StreamPageHTML(qw422016, rq, hyphaName, naviTitle, contents, tree, prevHyphaName, nextHyphaName, hasAmnt)
|
||||
//line templates/readers.qtpl:67
|
||||
//line templates/readers.qtpl:70
|
||||
StreamPageHTML(qw422016, rq, hyphaName, naviTitle, contents, relatives, prevHyphaName, nextHyphaName, hasAmnt)
|
||||
//line templates/readers.qtpl:70
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line templates/readers.qtpl:67
|
||||
//line templates/readers.qtpl:70
|
||||
}
|
||||
|
||||
//line templates/readers.qtpl:67
|
||||
func PageHTML(rq *http.Request, hyphaName, naviTitle, contents, tree, prevHyphaName, nextHyphaName string, hasAmnt bool) string {
|
||||
//line templates/readers.qtpl:67
|
||||
//line templates/readers.qtpl:70
|
||||
func PageHTML(rq *http.Request, hyphaName, naviTitle, contents, relatives, prevHyphaName, nextHyphaName string, hasAmnt bool) string {
|
||||
//line templates/readers.qtpl:70
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line templates/readers.qtpl:67
|
||||
WritePageHTML(qb422016, rq, hyphaName, naviTitle, contents, tree, prevHyphaName, nextHyphaName, hasAmnt)
|
||||
//line templates/readers.qtpl:67
|
||||
//line templates/readers.qtpl:70
|
||||
WritePageHTML(qb422016, rq, hyphaName, naviTitle, contents, relatives, prevHyphaName, nextHyphaName, hasAmnt)
|
||||
//line templates/readers.qtpl:70
|
||||
qs422016 := string(qb422016.B)
|
||||
//line templates/readers.qtpl:67
|
||||
//line templates/readers.qtpl:70
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line templates/readers.qtpl:67
|
||||
//line templates/readers.qtpl:70
|
||||
return qs422016
|
||||
//line templates/readers.qtpl:67
|
||||
//line templates/readers.qtpl:70
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user