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: 335b0fae186adc0c3cf908afb7d1ea2757b1f588 (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
28
<div
  class="breadcrumb"
  style="padding: 12px 0; line-height: 0.9em; 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.9em;">
  {{- if .p1.Parent -}}/{{- end -}}
  <a
    href="{{ if eq .p1 .p2 }}#{{ else }}{{ .p1.Permalink }}{{ end }}"
    class="breadcrumb-link {{ if eq .p1 .p2 }}active{{ end }}"
    aria-label="{{ if .p1.IsHome }}Home{{ else }}{{ .p1.Title }}{{ end }}"
    style="margin-left: 5px; font-size: 0.9em; color:{{ if eq .p1 .p2 }}var(--primaryHover){{else}}var(--primary){{ end }};"
    >{{- if .p1.IsHome -}}<i>{{- partial "icons/home" . -}}</i>{{- end -}}
  
    {{- .p1.Title | truncate 15 -}}
 </a
  >
</span>
{{ end }}