Skip to content
This repository has been archived by the owner on Dec 20, 2021. It is now read-only.

Commit

Permalink
Вторая версия breadcrumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
uPagge committed Dec 2, 2020
1 parent 62560a9 commit cc1ec25
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion assets/css/_page/_single.scss
Expand Up @@ -285,7 +285,7 @@
border-bottom: none;

[theme=dark] & {
border-top: 1px dashed $global-border-color-dark;
border-top: 4px dashed $global-border-color-dark;
}
}

Expand Down
13 changes: 9 additions & 4 deletions layouts/partials/breadcrumbs.html
@@ -1,10 +1,15 @@
<div id="breadcrumbs">
<a href="/">Home</a> /
{{- $categories := index ($.Params.categories) 0 -}}
{{- $category := partialCached "function/path.html" $categories $categories | printf "/categories/%v" | $.Site.GetPage -}}
{{- $categories = (printf ` <a href="%v">%v</a> ` $category.RelPermalink $category.Title) -}}
{{- with $categories -}}
{{- $categories := slice -}}
{{- range $.Params.categories -}}
{{- $category := partialCached "function/path.html" . . | printf "/categories/%v" | $.Site.GetPage -}}
{{- $categories = $categories | append (printf `<a href="%v">&nbsp;%v</a> ` $category.RelPermalink $category.Title) -}}
{{- end -}}
{{- with delimit $categories "&nbsp;" -}}
{{ $first := index ($categories) 0 }}
{{- with $first -}}
{{- dict "Categories" . | T "includedInCategories" | safeHTML -}}
{{- end -}}
{{- end -}}
/ <a href="/"> {{ .Title }} </a>
</div>

0 comments on commit cc1ec25

Please sign in to comment.