Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation navigation fixes. #21288

Merged
merged 2 commits into from
Dec 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 8 additions & 11 deletions docs/_includes/nav-docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,33 @@
</form>

<nav class="bd-links" id="docsNavbarContent">
{% assign page_slug = page.url | split: '/' | last %}
{% for group in site.data.nav %}
{% assign link = group.pages | first %}
{% assign slug = group.title | downcase | replace: ' ', '-' || page.title | downcase | replace: ' ', '-' %}
{% assign link_slug = link.title | slugify %}
{% assign group_slug = group.title | slugify %}
{% assign active = nil %}

{% if page.url contains slug %}
{% if page.group == group_slug %}
{% assign active = 'active' %}
{% endif %}

<div class="bd-toc-item {{ active }}">
{% if slug == "examples" %}
<a class="bd-toc-link" href="{{ site.baseurl }}/{{ group.title | downcase | replace: ' ', '-' }}/">
{% else %}
<a class="bd-toc-link" href="{{ site.baseurl }}/{{ group.title | downcase | replace: ' ', '-' }}/{{ link.title | downcase | replace: ' ', '-' || page.title | downcase | replace: ' ', '-' }}{% if link.title || page.title %}/{% endif %}">
{% endif %}
<a class="bd-toc-link" href="{{ site.baseurl }}/{{ group_slug }}/{{ link_slug }}{% if link_slug %}/{% endif %}">
{{ group.title }}
</a>

<ul class="nav bd-sidenav">
{% for doc in group.pages %}
{% assign slug = doc.title | downcase | replace: ' ', '-' | replace:'-&-','-' %}
{% capture slug %}/{{ slug }}{% endcapture %}
{% assign doc_slug = doc.title | slugify %}
{% assign active = nil %}

{% if page.url contains slug %}
{% if page.group == group_slug and page_slug == doc_slug %}
{% assign active = 'active bd-sidenav-active' %}
{% endif %}

<li class="{{ active }}">
<a href="{{ site.baseurl }}/{{ group.title | downcase | replace: ' ', '-' }}/{{ doc.title | downcase | replace: ' ', '-' | replace:'-&-','-' }}/">
<a href="{{ site.baseurl }}/{{ group_slug }}/{{ doc_slug }}/">
{{ doc.title }}
</a>

Expand Down
1 change: 1 addition & 0 deletions docs/utilities/borders.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: docs
title: Borders
group: utilities
redirect_from: "/utilities/"
---

Use border utilities to quickly style the `border` and `border-radius` of an element. Great for images, buttons, or any other element.
Expand Down