From 050ffa0b58dde17694ac8371ffc8ac09263b5411 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Wed, 27 Dec 2017 18:40:47 +0000 Subject: [PATCH] Add breadcrumbs for content --- layouts/partials/breadcrumbs/index.html | 5 +++++ layouts/partials/breadcrumbs/item.html | 7 +++++++ layouts/partials/content.html | 1 + static/src/scss/style.scss | 13 +++++++++++++ 4 files changed, 26 insertions(+) create mode 100644 layouts/partials/breadcrumbs/index.html create mode 100644 layouts/partials/breadcrumbs/item.html diff --git a/layouts/partials/breadcrumbs/index.html b/layouts/partials/breadcrumbs/index.html new file mode 100644 index 0000000..fd04931 --- /dev/null +++ b/layouts/partials/breadcrumbs/index.html @@ -0,0 +1,5 @@ + diff --git a/layouts/partials/breadcrumbs/item.html b/layouts/partials/breadcrumbs/item.html new file mode 100644 index 0000000..fe1626c --- /dev/null +++ b/layouts/partials/breadcrumbs/item.html @@ -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 }} + +{{ end }} diff --git a/layouts/partials/content.html b/layouts/partials/content.html index 2aa2b1e..db00271 100644 --- a/layouts/partials/content.html +++ b/layouts/partials/content.html @@ -1,6 +1,7 @@ {{ if .Params.image }}
{{ end }} +{{ partial "breadcrumbs/index.html" . }}

{{ .Title }}

{{ partial "subtitle.html" . }}

{{ partial "content-details.html" . }}

diff --git a/static/src/scss/style.scss b/static/src/scss/style.scss index f0255b8..376b891 100644 --- a/static/src/scss/style.scss +++ b/static/src/scss/style.scss @@ -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; + } +}