Skip to content

Commit

Permalink
added breadcrumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Stone committed May 17, 2023
1 parent 1cf7666 commit 8f70012
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 0 deletions.
25 changes: 25 additions & 0 deletions _includes/txt-breadcrumbs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!--
TEXT, BREADCRUMBS
-------------------------------------------------------------------------------
available parameters:
* required
-------------------------------------------------------------------------------
-->

<div id="breadcrumbs">
{% assign crumbs = page.url | remove:'/index.html' | split: '/' %}
<a href="/">Home</a>
{% for crumb in crumbs offset: 1 %}
{% if forloop.last %}
/ {{ page.title }}
{% else %}
/ <a href="{% assign crumb_limit = forloop.index | plus: 1 %}{% for crumb in crumbs limit: crumb_limit %}{{ crumb | append: '/' | replace:'without-plugin/','without-plugins/' }}{% endfor %}">{{ crumb | replace:'-',' ' | remove:'.html' | capitalize }}</a>
{% endif %}
{% endfor %}
</div>
3 changes: 3 additions & 0 deletions _layouts/back-proj.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

<main class="page-content layout-wrapper back-proj" aria-label="Content">
{{ content }}
<button class="to-top js-to-top">
Back to Top &uarr;
</button>
</main>


Expand Down
3 changes: 3 additions & 0 deletions _layouts/back-pub.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

<main class="page-content layout-wrapper back-pub" aria-label="Content">
{{ content }}
<button class="to-top js-to-top">
Back to Top &uarr;
</button>
</main>


Expand Down
1 change: 1 addition & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@


<div class="page-intro-text">
{% include txt-breadcrumbs.html %}
<h1 class="page-title">{{ page.title }}</h1>

{% if page.intro %}
Expand Down
6 changes: 6 additions & 0 deletions _layouts/highlight.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

<main class="page-content layout-wrapper sci-highlight" aria-label="Content">

{% include txt-breadcrumbs.html %}

{% include txt-cat.html
field = page.field
sdl = page.sdl
Expand Down Expand Up @@ -50,6 +52,10 @@ <h1 class="page-title">{{ page.title }}</h1>

{% endif %}

<button class="to-top js-to-top">
Back to Top &uarr;
</button>

</main>


Expand Down
6 changes: 6 additions & 0 deletions _sass/template/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ body {
}
}

.theme--sky .to-top,
.theme--sky .to-top a {
color: color(blue, XXXX);
text-decoration-color: color(blue, XXX);
}




Expand Down
24 changes: 24 additions & 0 deletions _sass/template/components/_component--breadcrumbs.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* Component: Header
*
* @description
* -
*/

#breadcrumbs {
grid-column: span 12;
@include stack(xs);
margin-top: 9px !important;
@include typestyle($sans-xs-reg);
color: color(neutral, XXXX);
text-transform: uppercase;
@include respond-to(m){
grid-column: 4 / 12;
}
}

.theme--sky #breadcrumbs,
.theme--sky #breadcrumbs a {
color: color(blue, XXXX);
text-decoration-color: color(blue, XXX);
}
1 change: 1 addition & 0 deletions assets/css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
@import
'template/components/component--aside',
'template/components/component--back',
'template/components/component--breadcrumbs',
'template/components/component--footer',
'template/components/component--header',
'template/components/component--home',
Expand Down

0 comments on commit 8f70012

Please sign in to comment.