From 1fff7cfdf184259b9fa1a03bcb4a43f114dc146a Mon Sep 17 00:00:00 2001 From: Alex Gu Date: Mon, 12 Jul 2021 18:23:25 +0300 Subject: [PATCH] Fix sibling hypha name --- help/en/hypha.myco | 2 +- static/default.css | 18 +++++++++--------- tree/tree.go | 4 ++-- tree/view.qtpl | 10 +++++----- tree/view.qtpl.go | 10 +++++----- views/nav.qtpl | 8 ++++---- views/nav.qtpl.go | 16 ++++++++-------- views/readers.qtpl | 8 ++++---- views/readers.qtpl.go | 8 ++++---- 9 files changed, 42 insertions(+), 42 deletions(-) diff --git a/help/en/hypha.myco b/help/en/hypha.myco index 97281da..93aa7cf 100644 --- a/help/en/hypha.myco +++ b/help/en/hypha.myco @@ -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/. diff --git a/static/default.css b/static/default.css index 7071e98..7085993 100644 --- a/static/default.css +++ b/static/default.css @@ -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; } diff --git a/tree/tree.go b/tree/tree.go index 9e08031..b04e1c4 100644 --- a/tree/tree.go +++ b/tree/tree.go @@ -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(`
  • %s
  • `, util.BeautifulName(path.Base(hyphaName))) + siblingsHTML += fmt.Sprintf(`
  • %s
  • `, 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(``, siblingsHTML), subhyphaeMatrix(children), prev, next + return fmt.Sprintf(``, siblingsHTML), subhyphaeMatrix(children), prev, next } type child struct { diff --git a/tree/view.qtpl b/tree/view.qtpl index bd47f32..bcaa28e 100644 --- a/tree/view.qtpl +++ b/tree/view.qtpl @@ -35,17 +35,17 @@ pseudographics: {% func siblingHTML(s *sibling) %} -
  • - +
  • + {%s util.BeautifulName(path.Base(s.name)) %} - + {% if s.directSubhyphaeCount > 0 %} - + {%d s.directSubhyphaeCount %} {% endif %} {% if s.indirectSubhyphaeCount > 0 %} - + ({%d s.indirectSubhyphaeCount %}) {% endif %} diff --git a/tree/view.qtpl.go b/tree/view.qtpl.go index 27302e5..e429bb6 100644 --- a/tree/view.qtpl.go +++ b/tree/view.qtpl.go @@ -155,8 +155,8 @@ func childHTML(c *child) string { func streamsiblingHTML(qw422016 *qt422016.Writer, s *sibling) { //line tree/view.qtpl:37 qw422016.N().S(` -
  • - + + `) //line tree/view.qtpl:42 if s.directSubhyphaeCount > 0 { //line tree/view.qtpl:42 qw422016.N().S(` - + `) //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(` - + (`) //line tree/view.qtpl:49 qw422016.N().D(s.indirectSubhyphaeCount) diff --git a/views/nav.qtpl b/views/nav.qtpl index 30ba398..ade1296 100644 --- a/views/nav.qtpl +++ b/views/nav.qtpl @@ -64,10 +64,10 @@ var navEntries = []navEntry{ {% endif %} {% endfunc %} -{% func sisterHyphaeHTML(sisters string) %} -