diff options
-rw-r--r-- | _layouts/fullwidth.html | 19 | ||||
-rw-r--r-- | _layouts/page.html | 34 |
2 files changed, 36 insertions, 17 deletions
diff --git a/_layouts/fullwidth.html b/_layouts/fullwidth.html index de253bff0..ef7de85f1 100644 --- a/_layouts/fullwidth.html +++ b/_layouts/fullwidth.html @@ -1,7 +1,25 @@ --- layout: default --- +<div class="page-wrapper"> <div class="page"> +{% capture url_parts %} {{ page.url | remove: "/index.html" | replace:'/'," " }}{% endcapture %} + {% capture num_parts %}{{ url_parts | number_of_words | minus: 1 }}{% endcapture %} + {% assign previous="" %} + <ul class="breadcrumb"> + {% if num_parts == "-1" %} + {% elsif num_parts == "0" %} + <li><a href="/">Home</a></li> + {% else %} + <li><a href="/">Home</a></li> + {% for unused in page.content limit:num_parts %} + {% capture first_word %}{{ url_parts | truncatewords:1 | remove:"..."}}{% endcapture %} + {% capture previous %}{{ previous }}/{{ first_word }}{% endcapture %} + <li><a href="{{ previous }}/">{{ first_word | capitalize }}</a></li> + {% capture url_parts %}{{ url_parts | remove_first:first_word }}{% endcapture %} + {% endfor %} + {% endif %} + </ul> <div class="main-content-column-full-width"> <main role="main" class="main-content"> {{ content }} @@ -9,3 +27,4 @@ layout: default </div> </div> + </div> diff --git a/_layouts/page.html b/_layouts/page.html index 2c1869382..b753f54b7 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -3,23 +3,23 @@ layout: default --- <div class="page-wrapper"> <div class="page"> -{% capture url_parts %} {{ page.url | remove: "/index.html" | replace:'/'," " }}{% endcapture %} - {% capture num_parts %}{{ url_parts | number_of_words | minus: 1 }}{% endcapture %} - {% assign previous="" %} - <ul class="breadcrumb"> - {% if num_parts == "-1" %} - {% elsif num_parts == "0" %} - <li><a href="/">Home</a></li> - {% else %} - <li><a href="/">Home</a></li> - {% for unused in page.content limit:num_parts %} - {% capture first_word %}{{ url_parts | truncatewords:1 | remove:"..."}}{% endcapture %} - {% capture previous %}{{ previous }}/{{ first_word }}{% endcapture %} - <li><a href="{{ previous }}/">{{ first_word | capitalize }}</a></li> - {% capture url_parts %}{{ url_parts | remove_first:first_word }}{% endcapture %} - {% endfor %} - {% endif %} - </ul> + {% capture url_parts %} {{ page.url | remove: "/index.html" | replace:'/'," " }}{% endcapture %} + {% capture num_parts %}{{ url_parts | number_of_words | minus: 1 }}{% endcapture %} + {% assign previous="" %} + <ul class="breadcrumb"> + {% if num_parts == "-1" %} + {% elsif num_parts == "0" %} + <li><a href="/">Home</a></li> + {% else %} + <li><a href="/">Home</a></li> + {% for unused in page.content limit:num_parts %} + {% capture first_word %}{{ url_parts | truncatewords:1 | remove:"..."}}{% endcapture %} + {% capture previous %}{{ previous }}/{{ first_word }}{% endcapture %} + <li><a href="{{ previous }}/">{{ first_word | capitalize }}</a></li> + {% capture url_parts %}{{ url_parts | remove_first:first_word }}{% endcapture %} + {% endfor %} + {% endif %} + </ul> <div class="main-content-column"> <main role="main" class="main-content"> |