]> juplo.de Git - website/commitdiff
Fixed navigation for old (unlinked) project-versions frontend
authorKai Moritz <kai@juplo.de>
Sun, 26 Oct 2025 11:10:29 +0000 (12:10 +0100)
committerKai Moritz <kai@juplo.de>
Sun, 26 Oct 2025 11:10:29 +0000 (12:10 +0100)
dist/templates/layout.html

index 838e9234918d4b1f3127005335e63159ba4279ab..3a7a796c62a4e8fdf1d5cc7c28185c8feb6a6ceb 100644 (file)
                   th:each="entry : ${submenu}"
                   th:with="
                       child=${pos == len},
-                      selected=${!child and crumbs.get(pos) == entry},
+                      hidden=${!child && _canonical.get(crumbs.get(pos)) == entry},
+                      entry=${hidden?crumbs.get(pos):entry},
+                      selected=${!child and (crumbs.get(pos) == entry or hidden)},
                       leaf=${pos >= (len - 1) and not selected},
                       sibling=${pos + 1 == len and (_childs.get(uri) == null or uri == parent)},
                       childs=${entry == parent ? null : _childs.get(entry)}