Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskim2311 committed Dec 3, 2024
1 parent f5606b0 commit b490923
Showing 1 changed file with 22 additions and 36 deletions.
58 changes: 22 additions & 36 deletions src/site/components/navigation-sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,35 +33,26 @@ <h4>{{ relatedPages.metadata.name }}</h4></div>
{% endif %}

<div class="sidenav-previous-page">
<a href="/{{previous.path}}">
{% if previous.display_title != empty %}
{{previous.display_title}}
{% else %}
{{previous.title}}
{% endif %}
</a>
<va-link
href="/{{ previous.path }}"
text="{{ previous.display_title if previous.display_title != empty else previous.title }}">
</va-link>
</div>
<ul class="usa-sidenav-list">
{% for page in relatedPages %}
{% unless relatedPages.metadata.name == page.display_title or relatedPages.metadata.name == page.title or page.hideFromSidebar %}
<li {% if page.path == path %}class="active-level"{% endif %}>
{% if page.href != empty %}
<a href="{{ page.href }}" onClick="recordEvent({ event: 'nav-sidenav' });">
{% if page.display_title != empty %}
{{ page.display_title }}
{% else %}
{{ page.title }}
{% endif %}
</a>
<va-link
href="{{ page.href }}"
text="{{ page.display_title if page.display_title != empty else page.title }}">
</va-link>
{% else %}
<a {% if page.path == path %}class="usa-current"{% endif %}
href="/{{ page.path }}" onClick="recordEvent({ event: 'nav-sidenav' });">
{% if page.display_title != empty %}
{{ page.display_title }}
{% else %}
{{ page.title }}
{% endif %}
</a>
<va-link
{% if page.path == path %}class="usa-current"{% endif %}
href="/{{ page.path }}"
text="{{ page.display_title if page.display_title != empty else page.title }}">
</va-link>
{% endif %}
{% if page.children != empty and path contains page.path %}
{% assign childPages = collections | get: page.children %}
Expand All @@ -70,22 +61,17 @@ <h4>{{ relatedPages.metadata.name }}</h4></div>
{% unless cpage.hideFromSidebar %}
<li {% if cpage.path == path %}class="active-level"{% endif %}>
{% if cpage.href != empty %}
<a href="{{ cpage.href }}" onClick="recordEvent({ event: 'nav-sidenav' });">
{% if cpage.display_title != empty %}
{{ cpage.display_title }}
{% else %}
{{ cpage.title }}
{% endif %}
<va-link
href="{{ cpage.href }}"
text="{{ cpage.display_title if cpage.display_title != empty else cpage.title }}">
</va-link>
</a>
{% else %}
<a {% if cpage.path == path %}class="usa-current"{% endif %}
href="/{{ cpage.path }}" onClick="recordEvent({ event: 'nav-sidenav' });">
{% if cpage.display_title != empty %}
{{ cpage.display_title }}
{% else %}
{{ cpage.title }}
{% endif %}
</a>
<va-link
{% if cpage.path == path %}class="usa-current"{% endif %}
href="/{{ cpage.path }}"
text="{{ cpage.display_title if cpage.display_title != empty else cpage.title }}" >
</va-link>
{% endif %}
</li>
{% endunless %}
Expand Down

0 comments on commit b490923

Please sign in to comment.