diff options
Diffstat (limited to '_includes/breadcrumbs.html')
| -rw-r--r-- | _includes/breadcrumbs.html | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/_includes/breadcrumbs.html b/_includes/breadcrumbs.html new file mode 100644 index 0000000..a4f992e --- /dev/null +++ b/_includes/breadcrumbs.html @@ -0,0 +1,23 @@ +<nav aria-label="Breadcrumb" id="breadcrumbs" style="font-size: 0.8em"> + {% assign crumbs = page.url | remove:'/index.html' | split: '/' %} + <a href="/">Home</a> + {% for crumb in crumbs offset: 1 %} {% if forloop.last %} / {{ page.title }} + {% else %} {% assign crumb_limit = forloop.index | plus: 1 %} / + <a + href="{% for crumb in crumbs limit: crumb_limit %}{{ crumb | append: '/' }}{% endfor %}" + > + {{ crumb | replace:'-',' ' | remove:'.html' | capitalize }} + </a> + {% endif %} {% endfor %} +</nav> + +<style> + nav[aria-label="Breadcrumb"] { + display: inline-block; + opacity: 0.5; + transition: opacity 0.1s; + } + nav[aria-label="Breadcrumb"]:hover { + opacity: 1; + } +</style> |