1
Fork 0

Add breadcrumbs for content

This commit is contained in:
Jake Howard 2017-12-27 18:40:47 +00:00
parent 6267296870
commit 050ffa0b58
Signed by: jake
GPG key ID: 57AFB45680EDD477
4 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,5 @@
<nav aria-label="breadcrumb" role="navigation">
<ol class="breadcrumb">
{{ partial "breadcrumbs/item.html" (dict "page" . "current" .) }}
</ol>
</nav>

View file

@ -0,0 +1,7 @@
{{ if .page.Parent }}{{ if not .page.Parent.IsHome }}
{{ partial "breadcrumbs/item.html" (dict "page" .page.Parent "current" .current) }}
{{ end }}{{ end }}
{{ if ne .page .current }}
<li class="breadcrumb-item"><a href="{{ .page.Permalink }}">{{ .page.LinkTitle }}</a></li>
{{ end }}

View file

@ -1,6 +1,7 @@
{{ if .Params.image }}
<div class="mb-3 image header-image" data-image="{{ .Params.image }}"></div>
{{ end }}
{{ partial "breadcrumbs/index.html" . }}
<h1 class="display-5">{{ .Title }}</h1>
<h5 class="my-3">{{ partial "subtitle.html" . }}</h5>
<p>{{ partial "content-details.html" . }}</p>

View file

@ -211,3 +211,16 @@ p code, li code {
.tag {
font-size: 1rem;
}
.breadcrumb {
background-color: initial;
padding: 0;
font-size: $spacer * 0.9;
margin-bottom: 0;
margin-top: $spacer * 1.5;
.breadcrumb-item + .breadcrumb-item::before {
padding: 0 0.2rem;
color: $black;
}
}