add simple theme
This commit is contained in:
parent
9e3457474b
commit
ec19540d92
102 changed files with 4646 additions and 1 deletions
19
themes/PaperMod/layouts/partials/breadcrumbs.html
Normal file
19
themes/PaperMod/layouts/partials/breadcrumbs.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
{{- if (.Param "ShowBreadCrumbs") -}}
|
||||
<div class="breadcrumbs">
|
||||
{{- $url := replace .Parent.Permalink (printf "%s" site.BaseURL) "" }}
|
||||
{{- $lang_url := strings.TrimPrefix (printf "%s/" .Lang) $url -}}
|
||||
|
||||
<a href="{{ "" | absLangURL }}">{{ i18n "home" | default "Home" }}</a>
|
||||
{{- $scratch := newScratch }}
|
||||
{{- range $index, $element := split $lang_url "/" }}
|
||||
|
||||
{{- $scratch.Add "path" (printf "%s/" $element )}}
|
||||
{{- $bc_pg := site.GetPage ($scratch.Get "path") -}}
|
||||
|
||||
{{- if (and ($bc_pg) (gt (len . ) 0))}}
|
||||
{{- print " » " | safeHTML -}}<a href="{{ $bc_pg.Permalink }}">{{ $bc_pg.Name }}</a>
|
||||
{{- end }}
|
||||
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end -}}
|
Loading…
Add table
Add a link
Reference in a new issue