aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/_default
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-08-29 21:33:14 -0400
committertdro <tdro@noreply.example.com>2022-08-29 21:33:14 -0400
commit89b84076599158502fcb31e49b72ba4229bf8bb3 (patch)
tree3c9b03c89ecf59ff59423bd405b9eac10032641f /themes/default/layouts/_default
parentdca6e41689f8f787aa9b5df0ded326c3138162ef (diff)
downloadcanory-89b84076599158502fcb31e49b72ba4229bf8bb3.tar.gz
canory-89b84076599158502fcb31e49b72ba4229bf8bb3.tar.bz2
canory-89b84076599158502fcb31e49b72ba4229bf8bb3.zip
themes/default/layouts/_default/home.xslt.xsl: Don't allow out of sync navigation
Diffstat (limited to 'themes/default/layouts/_default')
-rw-r--r--themes/default/layouts/_default/home.xslt.xsl88
1 files changed, 15 insertions, 73 deletions
diff --git a/themes/default/layouts/_default/home.xslt.xsl b/themes/default/layouts/_default/home.xslt.xsl
index c3fb009..012e8b5 100644
--- a/themes/default/layouts/_default/home.xslt.xsl
+++ b/themes/default/layouts/_default/home.xslt.xsl
@@ -27,83 +27,25 @@
<small>Back</small>
</a>
</icon-button>
-
<section>
<h2><xsl:value-of select="/rss/channel/title"/> Feed</h2>
<small>Web Feed Preview</small>
</section>
-
- <icon-navigator hidden="">
- <icon-button>
- <a id="nav-middle-home" href="/">
- {{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/home.svg")) }}
- <small>Home</small>
- </a>
- </icon-button>
- </icon-navigator>
-
- <icon-navigator hidden="">
- <icon-button>
- <a id="nav-middle-tag" href="/tags/">
- {{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/tag.svg")) }}
- <small>Tags</small>
- </a>
- </icon-button>
- </icon-navigator>
-
- <icon-navigator hidden="">
- <icon-button>
- <a id="nav-middle-clock" href="/archives/messages/">
- {{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/tabler/clock.svg")) }}
- <small>History</small>
- </a>
- </icon-button>
- </icon-navigator>
-
- <icon-navigator hidden="">
- <icon-button>
- <a id="nav-middle-book-2" href="/archives/tags/">
- {{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/tabler/book-2.svg")) }}
- <small>Records</small>
- </a>
- </icon-button>
- </icon-navigator>
-
- <icon-navigator hidden="">
- <icon-button>
- <a id="nav-middle-users" href="/authors/">
- {{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/users.svg")) }}
- <small>Authors</small>
- </a>
- </icon-button>
- </icon-navigator>
-
- <icon-navigator hidden="">
- <icon-button>
- <a id="nav-middle-rss" href="/rss.xml">
- {{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/rss.svg")) }}
- <small>RSS</small>
- </a>
- </icon-button>
- </icon-navigator>
-
- <icon-navigator hidden="">
- <icon-button>
- <a id="nav-middle-circle" href="/index.json">
- {{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/circle.svg")) }}
- <small>JSON</small>
- </a>
- </icon-button>
- </icon-navigator>
-
- <icon-navigator hidden="">
- <icon-button>
- <a id="nav-middle-git-commit" href="/sources/">
- {{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/git-commit.svg")) }}
- <small>Sources</small>
- </a>
- </icon-button>
- </icon-navigator>
+ {{ if .Site.Menus.main }}
+ {{ range .Site.Menus.main }}
+ <icon-navigator hidden="">
+ <icon-button>
+ <a id="nav-middle-{{ path.Base .Identifier }}" href="{{ .URL | absURL }}">
+ {{ with .Identifier }}
+ {{ $icon := print (partial "function-paths.html" "static") "/icons/" . ".svg" }}
+ {{ safeHTML (readFile $icon) }}
+ {{ end }}
+ <small>{{ delimit (first 1 (split .Name " ")) " " }}</small>
+ </a>
+ </icon-button>
+ </icon-navigator>
+ {{ end }}
+ {{ end }}
</nav>
<navigation-separator><hr hidden=""></hr></navigation-separator>
<xsl:for-each select="/rss/channel/item">