[ARVADOS] updated: 1.3.0-1988-g2b65dd9fc
Git user
git at public.arvados.org
Wed Dec 11 21:07:05 UTC 2019
Summary of changes:
doc/_includes/_navbar_left.liquid | 32 +++++++++++++++++++++++++++++---
1 file changed, 29 insertions(+), 3 deletions(-)
via 2b65dd9fcf33f477d47cf7b5f8da15aa2b55a190 (commit)
from 3e8f849f40aed8fe2f6ce7e41c674195d177c52b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 2b65dd9fcf33f477d47cf7b5f8da15aa2b55a190
Author: Peter Amstutz <peter.amstutz at curii.com>
Date: Wed Dec 11 16:06:06 2019 -0500
15572: Fix up left nav rendering highlighting
Do the right thing with pages that are symlinks.
diff --git a/doc/_includes/_navbar_left.liquid b/doc/_includes/_navbar_left.liquid
index d3ac2932d..2e18980f2 100644
--- a/doc/_includes/_navbar_left.liquid
+++ b/doc/_includes/_navbar_left.liquid
@@ -4,6 +4,32 @@ Copyright (C) The Arvados Authors. All rights reserved.
SPDX-License-Identifier: CC-BY-SA-3.0
{% endcomment %}
+{% assign highlighturl = "" %}
+{% for section in site.navbar[page.navsection] %}
+ {% for entry in section %}
+ {% comment %}
+ Want to highlight the current page on the left nav.
+ But some pages have been renamed with a symlink from the old page to the new one.
+ Then the URL won't match.
+ So if the URL doesn't match, as a fallback look for a page with a matching title.
+ {% endcomment %}
+
+ {% for item in entry[1] %}
+ {% if site.pages[item].url == page.url %}
+ {% assign highlighturl = site.pages[item].url %}
+ {% endif %}
+ {% endfor %}
+
+ {% if highlighturl == "" %}
+ {% for item in entry[1] %}
+ {% if site.pages[item].title == page.title %}
+ {% assign highlighturl = site.pages[item].url %}
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+ {% endfor %}
+{% endfor %}
+
<div class="col-sm-3">
<div class="well">
<ol class="nav nav-list">
@@ -12,9 +38,9 @@ SPDX-License-Identifier: CC-BY-SA-3.0
<li><span class="nav-header">{{ entry[0] }}</span>
<ol class="nav nav-list">
{% for item in entry[1] %}
- {% assign p = site.pages[item] %}
- <li {% if p.url == page.url or p.title == page.title %} class="active activesubnav" {% elsif p.title == page.subnavsection %} class="activesubnav" {% endif %}>
- <a href="{{ site.baseurl }}{{ p.url }}">{{ p.title }}</a></li>
+ {% assign p = site.pages[item] %}
+ <li {% if p.url == highlighturl %} class="active activesubnav" {% elsif p.title == page.subnavsection %} class="activesubnav" {% endif %}>
+ <a href="{{ site.baseurl }}{{ p.url }}">{{ p.title }}</a></li>
{% endfor %}
</ol>
{% endfor %}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list