You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

31 lines
1.5 KiB

<ul class="aside-navlist-override">
{% for link in include.links %}
{% capture prefixedLinkUrl %}:{{ include.preceding_address }}{{ link.url }}/{% endcapture %}
{% capture prefixedPageUrl %}:{{ page.url }}/{% endcapture %}
{% if prefixedPageUrl contains prefixedLinkUrl %}
<li class="active">
{% else %}
<li>
{% endif %}
{% if link.url contains '#' %}
{% assign dataId = link.title | or:link.url | replace: '&amp;', 'and' | slugify %}
{% capture address %}{{ include.preceding_address }}#{{ link.url | anchor }}{% endcapture %}
<a class="anchor" href="{{ site.baseurl }}{{ address }}" data-test-id="navigation-{{ dataId }}">{{ link.title | or:link.url | remove:'#' }}</a>
{% else %}
{% capture address %}{{ include.preceding_address }}{{ link.url }}/{% endcapture %}
{% capture address_index %}{{ address }}index.html{% endcapture %}
{% assign_page link_data = address_index %}
{% assign dataId = link_data.title_nav | or:link_data.title | replace: '&amp;', 'and' | slugify %}
{% if link_data.type == 'folder' %}
<span class="folder" tabindex="0" data-test-id="navigation-{{ dataId }}">{{ link_data.title_nav | or:link_data.title }}</span>
{% else %}
<a href="{{ site.baseurl }}{{ address }}" data-test-id="navigation-{{ dataId }}">{{ link_data.title_nav | or:link_data.title }}</a>
{% endif %}
{% endif %}
{% if link.pages %}
{% include nav.html links=link.pages preceding_address=address %}
{% endif %}
</li>
{% endfor %}
</ul>