Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruPagge <upagge@mail.ru>2020-12-02 22:45:30 +0300
committeruPagge <upagge@mail.ru>2020-12-02 22:45:30 +0300
commit62560a9d35f60acdfaec8c92b5912b64226ce877 (patch)
treefabfd7f999b9ede7329a82f52bdcff7774076c30 /layouts/partials
parent577d3c0e73e9bded4c7d0cc17ccec45694f43546 (diff)
Первая версия breadcrumbs
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/breadcrumbs.html14
1 files changed, 8 insertions, 6 deletions
diff --git a/layouts/partials/breadcrumbs.html b/layouts/partials/breadcrumbs.html
index 1c806d1..502ba8d 100644
--- a/layouts/partials/breadcrumbs.html
+++ b/layouts/partials/breadcrumbs.html
@@ -1,8 +1,10 @@
<div id="breadcrumbs">
- <a href="/">Home</a>
- {{ range (split .RelPermalink "/") }}
- {{ if gt (len . ) 0 }}
- / <a href="/{{ . }}">{{ humanize (replace . "posts" "blog") }}</a>
- {{ end }}
- {{ end }}
+ <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 -}}
+ {{- dict "Categories" . | T "includedInCategories" | safeHTML -}}
+ {{- end -}}
+ / <a href="/"> {{ .Title }} </a>
</div> \ No newline at end of file