update breadcrumb
This commit is contained in:
parent
4523fa4fc9
commit
76ed462707
@ -1,3 +1,6 @@
|
|||||||
|
- id: home
|
||||||
|
translation: Home
|
||||||
|
|
||||||
- id: read_more
|
- id: read_more
|
||||||
translation: Read More
|
translation: Read More
|
||||||
|
|
||||||
@ -23,7 +26,7 @@
|
|||||||
translation: Back To Home
|
translation: Back To Home
|
||||||
|
|
||||||
- id: search_input_placeholder
|
- id: search_input_placeholder
|
||||||
translation: Search Post ..
|
translation: Search Post ...
|
||||||
|
|
||||||
- id: no_results_for
|
- id: no_results_for
|
||||||
translation: No results for
|
translation: No results for
|
||||||
|
@ -1,9 +1,18 @@
|
|||||||
{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }}
|
{{ $context := .Context }}
|
||||||
{{ $lang := .Lang | urlize }}
|
{{ $class := .Class }}
|
||||||
{{ $.Scratch.Add "path" .Site.BaseURL }}
|
{{ $base := site.BaseURL }}
|
||||||
<ul class="breadcrumb mt-6 inline-flex">
|
{{ $url := replace $context.Permalink ( printf "%s" $base) "" }}
|
||||||
|
{{ $lang := $context.Lang }}
|
||||||
|
{{ $.Scratch.Add "path" $base }}
|
||||||
|
|
||||||
|
|
||||||
|
<ul class="{{ $class }} inline-flex">
|
||||||
<li class="mx-1 capitalize">
|
<li class="mx-1 capitalize">
|
||||||
<a class="text-primary dark:text-darkmode-primary" href="/">Home</a>
|
<a
|
||||||
|
class="text-primary dark:text-darkmode-primary"
|
||||||
|
href="{{ $base | relLangURL }}">
|
||||||
|
{{ i18n "home" | default "Home" }}
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{ range $index, $element := split $url "/" }}
|
{{ range $index, $element := split $url "/" }}
|
||||||
{{ if ne $element $lang }}
|
{{ if ne $element $lang }}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<div
|
<div
|
||||||
class="from-body to-theme-light dark:from-darkmode-body dark:to-darkmode-theme-light rounded-2xl bg-gradient-to-b px-8 py-14">
|
class="from-body to-theme-light dark:from-darkmode-body dark:to-darkmode-theme-light rounded-2xl bg-gradient-to-b px-8 py-14">
|
||||||
<h1>{{ .Title | title }}</h1>
|
<h1>{{ .Title | title }}</h1>
|
||||||
{{ partial "components/breadcrumb" . }}
|
{{ partial "components/breadcrumb" (dict "Context" . "Class" "mt-6") }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
Loading…
Reference in New Issue
Block a user