|
2 | 2 | {{ $class := .Class }}
|
3 | 3 | {{ $base := site.BaseURL }}
|
4 | 4 |
|
5 |
| -{{/* Visual breadcrumb rendering */}} |
6 | 5 | <nav aria-label="Breadcrumb" class="{{ $class }} md:inline-flex sm:hidden">
|
7 |
| - <ol class="flex flex-wrap space-x-1 capitalize"> |
| 6 | + <ol class="flex flex-wrap items-center capitalize text-sm space-x-2"> |
8 | 7 | <li>
|
9 |
| - <div class="flex items-center"> |
10 |
| - <a class="breadcrumb-link-parent text-primary dark:text-darkmode-primary" href="{{ $base | relLangURL }}"> |
11 |
| - <span class="breadcrumb-link-text">{{ i18n "home" | default "Home" }}</span> |
12 |
| - </a> |
13 |
| - <span class="px-1 text-gray-500 dark:text-gray-400" aria-hidden="true">/</span> |
14 |
| - </div> |
| 8 | + <a href="{{ $base | relLangURL }}" aria-label="Home" title="Home" class="text-gray-600 dark:text-gray-300 flex items-center justify-center w-7 h-7 bg-gray-100 dark:bg-darkmode-theme-dark rounded-md hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors"> |
| 9 | + {{ partial "icon.html" (dict "style" "solid" "name" "house" "class" "h-4 w-4") }} |
| 10 | + </a> |
15 | 11 | </li>
|
16 | 12 |
|
| 13 | + {{ $pages := slice }} |
17 | 14 | {{ if or (eq $context.Section "workshops") (eq $context.Section "contributors") }}
|
18 |
| - {{ $ncPage := site.GetPage "neuromorphic-computing" }} |
19 |
| - <li> |
20 |
| - <div class="flex items-center"> |
21 |
| - <a class="breadcrumb-link-parent text-primary dark:text-darkmode-primary" href="{{ ($ncPage.RelPermalink | default "/neuromorphic-computing/") | relLangURL }}"> |
22 |
| - <span class="breadcrumb-link-text">{{ $ncPage.Title | default "Neuromorphic Computing" }}</span> |
23 |
| - </a> |
24 |
| - <span class="px-1 text-gray-500 dark:text-gray-400" aria-hidden="true">/</span> |
25 |
| - </div> |
26 |
| - </li> |
| 15 | + {{ $ncPage := site.GetPage "neuromorphic-computing" }} |
| 16 | + {{ $pages = $pages | append (dict "Title" ($ncPage.Title | default "Neuromorphic Computing") "Permalink" (($ncPage.RelPermalink | default "/neuromorphic-computing/") | relLangURL)) }} |
27 | 17 | {{ end }}
|
28 | 18 |
|
29 | 19 | {{ range $context.Ancestors.Reverse }}
|
30 |
| - {{ if and (not .IsHome) (ne .Title "Pages") (ne .Title "") }} |
31 |
| - <li> |
32 |
| - <div class="flex items-center"> |
33 |
| - <a class="breadcrumb-link-parent text-primary dark:text-darkmode-primary" href="{{ .RelPermalink }}"> |
34 |
| - <span class="breadcrumb-link-text">{{ .Title }}</span> |
35 |
| - </a> |
36 |
| - <span class="px-1 text-gray-500 dark:text-gray-400" aria-hidden="true">/</span> |
37 |
| - </div> |
38 |
| - </li> |
39 |
| - {{ end }} |
| 20 | + {{ if and (not .IsHome) (ne .Title "Pages") (ne .Title "") }} |
| 21 | + {{ $pages = $pages | append . }} |
| 22 | + {{ end }} |
| 23 | + {{ end }} |
| 24 | + |
| 25 | + {{ range $pages }} |
| 26 | + <li class="text-gray-400 dark:text-gray-500" aria-hidden="true">/</li> |
| 27 | + <li> |
| 28 | + <a class="breadcrumb-link-parent text-indigo-600 dark:text-indigo-400" href="{{ .Permalink }}"> |
| 29 | + <span class="breadcrumb-link-text">{{ .Title }}</span> |
| 30 | + </a> |
| 31 | + </li> |
40 | 32 | {{ end }}
|
41 | 33 |
|
42 |
| - <li aria-current="page"> |
43 |
| - <div class="flex items-center"> |
44 |
| - <span class="text-text dark:text-darkmode-text">{{ $context.Title }}</span> |
45 |
| - </div> |
| 34 | + <li class="text-gray-400 dark:text-gray-500" aria-hidden="true">/</li> |
| 35 | + <li> |
| 36 | + <span class="text-text dark:text-darkmode-text font-semibold">{{ $context.Title }}</span> |
46 | 37 | </li>
|
47 | 38 | </ol>
|
48 | 39 | </nav>
|
0 commit comments