Skip to content

Commit ba9b8b7

Browse files
committed
redirect
1 parent 1a63f76 commit ba9b8b7

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<ol class="text-sm text-neutral-500 dark:text-neutral-400 print:hidden">
2+
{{ template "crumb" (dict "p1" . "p2" .) }}
3+
</ol>
4+
{{ define "crumb" }}
5+
{{ if .p1.Parent }}
6+
{{ template "crumb" (dict "p1" .p1.Parent "p2" .p2 ) }}
7+
{{ else if not .p1.IsHome }}
8+
{{ template "crumb" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
9+
{{ end }}
10+
<li class="{{ if or (eq .p1 .p2) (.p1.IsHome) }}hidden{{ end }} inline">
11+
{{ $href := .p1.Permalink }}
12+
{{ if and (eq .p1.Section "visualizations") (eq .p1.Kind "section") }}
13+
{{ $href = .p1.Site.Home.RelPermalink }}
14+
{{ end }}
15+
<a
16+
class="dark:underline-neutral-600 decoration-neutral-300 hover:underline"
17+
href="{{ $href }}"
18+
>{{ if .p1.Title }}
19+
{{- .p1.Title -}}
20+
{{ else }}
21+
{{- .p1.Section -}}
22+
{{ end }}</a
23+
><span class="px-1 text-primary-500">/</span>
24+
</li>
25+
{{ end }}

0 commit comments

Comments
 (0)