From a4c8741f7f608e083e3e6d7ccd481a833e7ad987 Mon Sep 17 00:00:00 2001 From: Timur Ismagilov Date: Tue, 6 Jul 2021 23:09:45 +0500 Subject: [PATCH] =?UTF-8?q?Relative=20hyphae=E2=86=92sister=20hyphae,=20wh?= =?UTF-8?q?ere=20it=20makes=20sense?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CSS class has changed, please update your custom styles --- 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 ++++---- 8 files changed, 41 insertions(+), 41 deletions(-) diff --git a/static/default.css b/static/default.css index 7cecd71..a4503b9 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; } - .relative-hyphae, .edit-toolbar { grid-column: 2 / span 1; grid-row: 1 / span 1; } + .sister-hyphae, .edit-toolbar { 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; } - .relative-hyphae, .edit-toolbar { grid-column: 3 / span 1; margin-left: 0; } + .sister-hyphae, .edit-toolbar { grid-column: 3 / span 1; margin-left: 0; } .edit-toolbar__buttons { grid-template-columns: 1fr; } .backlinks__title { text-align: right; } @@ -192,11 +192,11 @@ caption { caption-side: top; font-size: small; } .subhyphae__link { display: block; padding: .25rem; text-decoration: none; } .subhyphae__link:hover { background: #eee; } -.relative-hyphae__list { padding: 0; margin: 0; } -.relative-hyphae__entry { clear: both; } -.relative-hyphae__count { display: inline-block; float: right; } -.relative-hyphae__entry_this { padding: .25rem .5rem; font-weight: bold; } -.relative-hyphae__link { text-decoration: none; display: block; padding: .25rem .5rem; } +.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; } /* Color stuff */ /* Lighter stuff #eee */ @@ -254,7 +254,7 @@ blockquote { border-left: 2px #999 solid; } .upload-amnt { border: #eee 1px solid; } td { border: #ddd 1px solid; } -.relative-hyphae__link:hover, .backlinks__link:hover { background-color: #eee; } +.sister-hyphae__link:hover, .backlinks__link:hover { background-color: #eee; } /* Dark theme! */ @media (prefers-color-scheme: dark) { @@ -264,7 +264,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, .relative-hyphae__link:hover, .backlinks__link:hover { background-color: #444; } +.subhyphae__link:hover, .sister-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 fe3a196..9e08031 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 353a912..bd47f32 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 c078bb0..27302e5 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 fa4abbf..30ba398 100644 --- a/views/nav.qtpl +++ b/views/nav.qtpl @@ -64,10 +64,10 @@ var navEntries = []navEntry{ {% endif %} {% endfunc %} -{% func RelativeHyphaeHTML(relatives string) %} -