Files
docker-docs/layouts/partials/breadcrumbs.html
David Karlsson c4f4b43b20 fix: make breadcrumbs fully truncate on mobile
The last element of the breadcrumb (page title) wasn't truncating.

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-01-28 23:20:00 +01:00

19 lines
585 B
HTML

{{ $scratch := partialCached "utils/tocparser.html" . . }}
{{ $ctx := . }}
<nav id="breadcrumbs" class="py-4 gap-4 flex items-center text-gray-light dark:text-gray-dark max-w-full min-w-0">
{{ with ($scratch.GetSortedMapValues "sections") }}
{{ range $i, $e := . }}
{{- if $i -}}
<span>/</span>
{{- end -}}
<a href="{{ $e.path }}" class="link truncate">{{ markdownify $e.title }}</a>
{{- end -}}
{{- end -}}
{{- with $scratch.Get "lastsection" -}}
<span>/</span>
<span class="truncate">{{ markdownify .title }}</span>
{{- end -}}
</nav>