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

breadcrumb.html « partials « layouts - github.com/darshanbaral/ghazal.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6de8efaddef9186daa3a22a69a7eafe38a8dbf1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<div
  class="breadcrumb"
  style="padding: 12px 0; line-height: 0.85em; text-align: right;"
>
  {{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
</div>
{{ define "breadcrumbnav" }}
{{ if .p1.Parent }}
{{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 ) }}
{{ else if not .p1.IsHome }}
{{ template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
{{ end }}
<span style="font-size: 0.8em;">
  {{ if .p1.Parent }}/{{- end -}}
  <a
    href="{{ if eq .p1 .p2 }}#{{ else }}{{ .p1.Permalink }}{{ end }}"
    class="breadcrumb-link {{ if eq .p1 .p2 }}active{{ end }}"
    style="margin-left: 5px; font-size: 0.85em; color:{{ if eq .p1 .p2 }}var(--primaryColor){{else}}var(--textColor){{ end }};"
    >{{- if .p1.IsHome -}}<i>{{- partial "icons/home" . -}}</i>{{- end -}}
    {{- if gt (len .p1.Title) 15 -}}
    {{- substr .p1.Title 0 15 -}}...
    {{- else -}}
    {{- .p1.Title -}}
    {{- end -}}</a
  >
</span>
{{ end }}