Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Commit

Permalink
[Docs] Active class for sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
cshold committed Nov 29, 2016
1 parent 6e6befb commit 2317e5c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/_includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<a class="docs-nav__link {% if page.url == '/index.html' %}active{% endif %}" href="{{ '/' | prepend: site.baseurl }}">Getting started</a>
</li>
<li>
<a class="docs-nav__link {% if page.url == '/theme/index.html' %}active{% endif %}" href="{{ '/theme' | prepend: site.baseurl }}">What's included</a>
<a class="docs-nav__link {% if page.url contains '/theme/' %}active{% endif %}" href="{{ '/theme' | prepend: site.baseurl }}">What's included</a>
</li>
<li>
<a class="docs-nav__link {% if page.url == '/commands/index.html' %}active{% endif %}" href="{{ '/commands' | prepend: site.baseurl }}">Commands</a>
<a class="docs-nav__link {% if page.url contains '/commands/' %}active{% endif %}" href="{{ '/commands' | prepend: site.baseurl }}">Commands</a>
<ul class="docs-sub-nav">
<li>
<a href="{{ '/commands/#global-commands' | prepend: site.baseurl }}" class="docs-sub-nav__link">Global commands</a>
Expand All @@ -21,7 +21,7 @@
</ul>
</li>
<li>
<a class="docs-nav__link {% if page.url == '/theme-scaffold/index.html' %}active{% endif %}" href="{{ '/theme-scaffold' | prepend: site.baseurl }}">Theme scaffold</a>
<a class="docs-nav__link {% if page.url contains '/theme-scaffold/' %}active{% endif %}" href="{{ '/theme-scaffold' | prepend: site.baseurl }}">Theme scaffold</a>
<ul class="docs-sub-nav">
<li>
<a href="{{ '/theme-scaffold/#templates-and-configuration' | prepend: site.baseurl }}" class="docs-sub-nav__link">Templates and configuration</a>
Expand All @@ -41,7 +41,7 @@
</ul>
</li>
<li>
<a class="docs-nav__link {% if page.url == '/css-examples/index.html' %}active{% endif %}" href="{{ '/css-examples' | prepend: site.baseurl }}">CSS examples</a>
<a class="docs-nav__link {% if page.url contains '/css-examples/' %}active{% endif %}" href="{{ '/css-examples' | prepend: site.baseurl }}">CSS examples</a>
<ul class="docs-sub-nav">
<li>
<a href="{{ '/css-examples/#breakpoints' | prepend: site.baseurl }}" class="docs-sub-nav__link">Breakpoints and media queries</a>
Expand All @@ -64,7 +64,7 @@
</ul>
</li>
<li>
<a class="docs-nav__link {% if page.url == '/js-examples/index.html' %}active{% endif %}" href="{{ '/js-examples' | prepend: site.baseurl }}">JS examples</a>
<a class="docs-nav__link {% if page.url contains '/js-examples/' %}active{% endif %}" href="{{ '/js-examples' | prepend: site.baseurl }}">JS examples</a>
<ul class="docs-sub-nav">
<li>
<a href="{{ '/js-examples/#trap-focus' | prepend: site.baseurl }}" class="docs-sub-nav__link">Trap focus</a>
Expand Down

0 comments on commit 2317e5c

Please sign in to comment.