mirror of
https://github.com/TrezOne/congo-hindi-gujarati.git
synced 2026-07-20 18:01:36 -04:00
✨ Add breadcrumbs
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<ol class="text-sm text-gray-400 dark:text-gray-600">
|
||||
{{ template "crumb" (dict "p1" . "p2" .) }}
|
||||
</ol>
|
||||
{{ define "crumb" }}
|
||||
{{ if .p1.Parent }}
|
||||
{{ template "crumb" (dict "p1" .p1.Parent "p2" .p2 ) }}
|
||||
{{ else if not .p1.IsHome }}
|
||||
{{ template "crumb" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
|
||||
{{ end }}
|
||||
<li class="inline {{ if or (eq .p1 .p2) (.p1.IsHome) }}hidden{{ end }}">
|
||||
<a href="{{ .p1.Permalink }}">{{ .p1.Title }}</a><span class="px-1 text-primary-500">/</span>
|
||||
</li>
|
||||
{{ end }}
|
||||
@@ -1,3 +1,6 @@
|
||||
{{ if .Site.Params.list.showBreadcrumbs | default false }}
|
||||
{{ partial "breadcrumbs.html" . }}
|
||||
{{ end }}
|
||||
<section class="prose dark:prose-light">
|
||||
<h1 class="mb-3 text-4xl font-extrabold">{{ .Title }}</h1>
|
||||
<section>{{ .Content }}</section>
|
||||
|
||||
Reference in New Issue
Block a user