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

Merge pull request #76 from GuAlSe/master

Fix sibling hypha name
This commit is contained in:
Timur Ismagilov 2021-07-12 20:58:15 +05:00 committed by GitHub
commit 684172dab4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 42 additions and 42 deletions

View File

@ -25,7 +25,7 @@ A **subhypha** is a hypha that has a name starting with a name of a different hy
Thus, a **superhypha** is a reverse of subhypha: //Fruit// is the superhypha of //Fruit/Apple//. There can be only one superhypha.
**Sister hyphae** are hyphae that are subhyphae of the same hypha. For example, //Fruit/Apple// and //Fruit/Pear// are sister hyphae.
**Sibling hyphae** are hyphae that are subhyphae of the same hypha. For example, //Fruit/Apple// and //Fruit/Pear// are sibling hyphae.
## Word
Read the word //hypha// as /ˈhaɪfə/. The plural form is //hyphae//. Read it as /ˈhaɪfi/.

View File

@ -74,7 +74,7 @@ header { width: 100%; margin-bottom: 1rem; }
.layout { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; margin: 0 1rem; row-gap: 1rem; }
.main-width { margin: 0; }
main { grid-column: 1 / span 1; grid-row: 1 / span 2; }
.sister-hyphae, .edit-toolbar, .help-topics { grid-column: 2 / span 1; grid-row: 1 / span 1; }
.sibling-hyphae, .edit-toolbar, .help-topics { grid-column: 2 / span 1; grid-row: 1 / span 1; }
.layout-card { width: 100%; }
.edit-toolbar__buttons {display: grid; }
}
@ -89,7 +89,7 @@ header { width: 100%; margin-bottom: 1rem; }
.main-width { margin: 0 auto; }
.backlinks { grid-column: 1 / span 1; margin-right: 0; }
main { grid-column: 2 / span 1; }
.sister-hyphae, .edit-toolbar, .help-topics { grid-column: 3 / span 1; margin-left: 0; }
.sibling-hyphae, .edit-toolbar, .help-topics { grid-column: 3 / span 1; margin-left: 0; }
.edit-toolbar__buttons { grid-template-columns: 1fr; }
.backlinks__title { text-align: right; }
@ -193,11 +193,11 @@ caption { caption-side: top; font-size: small; }
.subhyphae__link { display: block; padding: .25rem; text-decoration: none; }
.subhyphae__link:hover { background: #eee; }
.sister-hyphae__list { padding: 0; margin: 0; }
.sister-hyphae__entry { clear: both; }
.sister-hyphae__count { display: inline-block; float: right; }
.sister-hyphae__entry_this { padding: .25rem .5rem; font-weight: bold; }
.sister-hyphae__link { text-decoration: none; display: block; padding: .25rem .5rem; }
.sibling-hyphae__list { padding: 0; margin: 0; }
.sibling-hyphae__entry { clear: both; }
.sibling-hyphae__count { display: inline-block; float: right; }
.sibling-hyphae__entry_this { padding: .25rem .5rem; font-weight: bold; }
.sibling-hyphae__link { text-decoration: none; display: block; padding: .25rem .5rem; }
/* Color stuff */
/* Lighter stuff #eee */
@ -255,7 +255,7 @@ blockquote { border-left: 2px #999 solid; }
.upload-amnt { border: #eee 1px solid; }
td { border: #ddd 1px solid; }
.sister-hyphae__link:hover, .backlinks__link:hover { background-color: #eee; }
.sibling-hyphae__link:hover, .backlinks__link:hover { background-color: #eee; }
/* Dark theme! */
@media (prefers-color-scheme: dark) {
@ -265,7 +265,7 @@ main, article, .hypha-tabs__tab, header, .layout-card { background-color: #3434
a, .wikilink_external { color: #f1fa8c; }
a:visited, .wikilink_external:visited { color: #ffb86c; }
.wikilink_new, .wikilink_new:visited { color: #dd4444; }
.subhyphae__link:hover, .sister-hyphae__link:hover, .backlinks__link:hover { background-color: #444; }
.subhyphae__link:hover, .sibling-hyphae__link:hover, .backlinks__link:hover { background-color: #444; }
.header-links__link, .header-links__link:visited,
.prevnext__el, .prevnext__el:visited { color: #ddd; }

View File

@ -87,7 +87,7 @@ func Tree(hyphaName string) (siblingsHTML, childrenHTML, prev, next string) {
for i, s := range siblings {
if s.name == hyphaName {
I = i
siblingsHTML += fmt.Sprintf(`<li class="sister-hyphae__entry sister-hyphae__entry_this"><span>%s</span></li>`, util.BeautifulName(path.Base(hyphaName)))
siblingsHTML += fmt.Sprintf(`<li class="sibling-hyphae__entry sibling-hyphae__entry_this"><span>%s</span></li>`, util.BeautifulName(path.Base(hyphaName)))
} else {
siblingsHTML += siblingHTML(s)
}
@ -98,7 +98,7 @@ func Tree(hyphaName string) (siblingsHTML, childrenHTML, prev, next string) {
if I != len(siblings)-1 && len(siblings) > 1 {
next = siblings[I+1].name
}
return fmt.Sprintf(`<ul class="sister-hyphae__list">%s</ul>`, siblingsHTML), subhyphaeMatrix(children), prev, next
return fmt.Sprintf(`<ul class="sibling-hyphae__list">%s</ul>`, siblingsHTML), subhyphaeMatrix(children), prev, next
}
type child struct {

View File

@ -35,17 +35,17 @@ pseudographics:
{% func siblingHTML(s *sibling) %}
<li class="sister-hyphae__entry">
<a class="sister-hyphae__link" href="/hypha/{%s s.name %}">
<li class="sibling-hyphae__entry">
<a class="sibling-hyphae__link" href="/hypha/{%s s.name %}">
{%s util.BeautifulName(path.Base(s.name)) %}
<span class="sister-hyphae__count">
<span class="sibling-hyphae__count">
{% if s.directSubhyphaeCount > 0 %}
<span class="sister-hyphae__direct-count">
<span class="sibling-hyphae__direct-count">
{%d s.directSubhyphaeCount %}
</span>
{% endif %}
{% if s.indirectSubhyphaeCount > 0 %}
<span class="sister-hyphae__indirect-count">
<span class="sibling-hyphae__indirect-count">
({%d s.indirectSubhyphaeCount %})
</span>
{% endif %}

View File

@ -155,8 +155,8 @@ func childHTML(c *child) string {
func streamsiblingHTML(qw422016 *qt422016.Writer, s *sibling) {
//line tree/view.qtpl:37
qw422016.N().S(`
<li class="sister-hyphae__entry">
<a class="sister-hyphae__link" href="/hypha/`)
<li class="sibling-hyphae__entry">
<a class="sibling-hyphae__link" href="/hypha/`)
//line tree/view.qtpl:39
qw422016.E().S(s.name)
//line tree/view.qtpl:39
@ -166,13 +166,13 @@ func streamsiblingHTML(qw422016 *qt422016.Writer, s *sibling) {
qw422016.E().S(util.BeautifulName(path.Base(s.name)))
//line tree/view.qtpl:40
qw422016.N().S(`
<span class="sister-hyphae__count">
<span class="sibling-hyphae__count">
`)
//line tree/view.qtpl:42
if s.directSubhyphaeCount > 0 {
//line tree/view.qtpl:42
qw422016.N().S(`
<span class="sister-hyphae__direct-count">
<span class="sibling-hyphae__direct-count">
`)
//line tree/view.qtpl:44
qw422016.N().D(s.directSubhyphaeCount)
@ -189,7 +189,7 @@ func streamsiblingHTML(qw422016 *qt422016.Writer, s *sibling) {
if s.indirectSubhyphaeCount > 0 {
//line tree/view.qtpl:47
qw422016.N().S(`
<span class="sister-hyphae__indirect-count">
<span class="sibling-hyphae__indirect-count">
(`)
//line tree/view.qtpl:49
qw422016.N().D(s.indirectSubhyphaeCount)

View File

@ -64,10 +64,10 @@ var navEntries = []navEntry{
{% endif %}
{% endfunc %}
{% func sisterHyphaeHTML(sisters string) %}
<aside class="sister-hyphae layout-card">
<h2 class="sister-hyphae__title layout-card__title">Sister hyphae</h2>
{%s= sisters %}
{% func siblingHyphaeHTML(siblings string) %}
<aside class="sibling-hyphae layout-card">
<h2 class="sibling-hyphae__title layout-card__title">Sibling hyphae</h2>
{%s= siblings %}
</aside>
{% endfunc %}

View File

@ -233,14 +233,14 @@ func UserMenuHTML(u *user.User) string {
}
//line views/nav.qtpl:67
func streamsisterHyphaeHTML(qw422016 *qt422016.Writer, sisters string) {
func streamsiblingHyphaeHTML(qw422016 *qt422016.Writer, siblings string) {
//line views/nav.qtpl:67
qw422016.N().S(`
<aside class="sister-hyphae layout-card">
<h2 class="sister-hyphae__title layout-card__title">Sister hyphae</h2>
<aside class="sibling-hyphae layout-card">
<h2 class="sibling-hyphae__title layout-card__title">Sibling hyphae</h2>
`)
//line views/nav.qtpl:70
qw422016.N().S(sisters)
qw422016.N().S(siblings)
//line views/nav.qtpl:70
qw422016.N().S(`
</aside>
@ -249,22 +249,22 @@ func streamsisterHyphaeHTML(qw422016 *qt422016.Writer, sisters string) {
}
//line views/nav.qtpl:72
func writesisterHyphaeHTML(qq422016 qtio422016.Writer, sisters string) {
func writesiblingHyphaeHTML(qq422016 qtio422016.Writer, siblings string) {
//line views/nav.qtpl:72
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/nav.qtpl:72
streamsisterHyphaeHTML(qw422016, sisters)
streamsiblingHyphaeHTML(qw422016, siblings)
//line views/nav.qtpl:72
qt422016.ReleaseWriter(qw422016)
//line views/nav.qtpl:72
}
//line views/nav.qtpl:72
func sisterHyphaeHTML(sisters string) string {
func siblingHyphaeHTML(siblings string) string {
//line views/nav.qtpl:72
qb422016 := qt422016.AcquireByteBuffer()
//line views/nav.qtpl:72
writesisterHyphaeHTML(qb422016, sisters)
writesiblingHyphaeHTML(qb422016, siblings)
//line views/nav.qtpl:72
qs422016 := string(qb422016.B)
//line views/nav.qtpl:72

View File

@ -77,7 +77,7 @@
If `contents` == "", a helpful message is shown instead.
{% func HyphaHTML(rq *http.Request, h *hyphae.Hypha, contents string) %}
{% code
sisters, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.Name)
siblings, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.Name)
u := user.FromRequest(rq)
%}
{%= NavHTML(rq, h.Name, "hypha") %}
@ -101,14 +101,14 @@ If `contents` == "", a helpful message is shown instead.
</section>
{%= SubhyphaeHTML(subhyphae) %}
</main>
{%= sisterHyphaeHTML(sisters) %}
{%= siblingHyphaeHTML(siblings) %}
</div>
{%= viewScripts() %}
{% endfunc %}
{% func RevisionHTML(rq *http.Request, h *hyphae.Hypha, contents, revHash string) %}
{% code
sisters, subhyphae, _, _ := tree.Tree(h.Name)
siblings, subhyphae, _, _ := tree.Tree(h.Name)
%}
{%= NavHTML(rq, h.Name, "revision", revHash) %}
<div class="layout">
@ -120,7 +120,7 @@ If `contents` == "", a helpful message is shown instead.
</article>
{%= SubhyphaeHTML(subhyphae) %}
</main>
{%= sisterHyphaeHTML(sisters) %}
{%= siblingHyphaeHTML(siblings) %}
</div>
{%= viewScripts() %}
{% endfunc %}

View File

@ -234,7 +234,7 @@ func StreamHyphaHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hyph
qw422016.N().S(`
`)
//line views/readers.qtpl:80
sisters, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.Name)
siblings, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.Name)
u := user.FromRequest(rq)
//line views/readers.qtpl:82
@ -326,7 +326,7 @@ func StreamHyphaHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hyph
</main>
`)
//line views/readers.qtpl:104
streamsisterHyphaeHTML(qw422016, sisters)
streamsiblingHyphaeHTML(qw422016, siblings)
//line views/readers.qtpl:104
qw422016.N().S(`
</div>
@ -371,7 +371,7 @@ func StreamRevisionHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.H
qw422016.N().S(`
`)
//line views/readers.qtpl:111
sisters, subhyphae, _, _ := tree.Tree(h.Name)
siblings, subhyphae, _, _ := tree.Tree(h.Name)
//line views/readers.qtpl:112
qw422016.N().S(`
@ -403,7 +403,7 @@ func StreamRevisionHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.H
</main>
`)
//line views/readers.qtpl:123
streamsisterHyphaeHTML(qw422016, sisters)
streamsiblingHyphaeHTML(qw422016, siblings)
//line views/readers.qtpl:123
qw422016.N().S(`
</div>