Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions layouts/_partials/breadcrumb.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@
{{- $enable := .enable -}}
{{- if (default $enable $page.Params.breadcrumbs) -}}
<div class="hx:mt-1.5 hx:flex hx:items-center hx:gap-1 hx:overflow-hidden hx:text-sm hx:text-gray-500 hx:dark:text-gray-400 hx:contrast-more:text-current">
{{- range $page.Ancestors.Reverse }}
{{- if not .IsHome }}
<div class="hx:whitespace-nowrap hx:transition-colors hx:min-w-[24px] hx:overflow-hidden hx:text-ellipsis hx:hover:text-gray-900 hx:dark:hover:text-gray-100">
<a href="{{ .RelPermalink }}" class="hx:inline-block hx:rounded-sm hx:hextra-focus-visible-inset">{{- partial "utils/title" . -}}</a>
</div>
{{- partial "utils/icon.html" (dict "name" "chevron-right" "attributes" "class=\"hx:w-3.5 hx:shrink-0 hx:rtl:-rotate-180\"") -}}
{{- if eq $page.Data.Plural "tags" }}
<div class="hx:whitespace-nowrap hx:transition-colors hx:hover:text-gray-900 hx:dark:hover:text-gray-100">
<a href="{{ $page.Parent.RelPermalink }}" class="hx:inline-block hx:rounded-sm hx:hextra-focus-visible-inset">{{ $page.Parent.Title }}</a>
</div>
{{- else }}
{{- range $page.Ancestors.Reverse }}
{{- if not .IsHome }}
<div class="hx:whitespace-nowrap hx:transition-colors hx:min-w-[24px] hx:overflow-hidden hx:text-ellipsis hx:hover:text-gray-900 hx:dark:hover:text-gray-100">
<a href="{{ .RelPermalink }}" class="hx:inline-block hx:rounded-sm hx:hextra-focus-visible-inset">{{- partial "utils/title" . -}}</a>
</div>
{{- partial "utils/icon.html" (dict "name" "chevron-right" "attributes" "class=\"hx:w-3.5 hx:shrink-0 hx:rtl:-rotate-180\"") -}}
{{ end -}}
{{ end -}}
{{ end -}}
{{- end }}
<div class="hx:whitespace-nowrap hx:transition-colors hx:font-medium hx:text-gray-700 hx:contrast-more:font-bold hx:contrast-more:text-current hx:dark:text-gray-100 hx:contrast-more:dark:text-current">
{{- partial "utils/title" $page -}}
</div>
Expand Down
2 changes: 1 addition & 1 deletion layouts/_partials/tags.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

{{- range $tag := $context.Params.tags -}}
{{- with $context.Site.GetPage (printf "/tags/%s" $tag) -}}
<a class="hx:inline-block hx:whitespace-nowrap hx:mr-2 hx:text-gray-500 hx:hover:text-gray-900 hx:dark:text-gray-400 hx:dark:hover:text-gray-100 hx:contrast-more:text-gray-800 hx:contrast-more:dark:text-gray-50" href="{{ .RelPermalink }}">#{{ $tag }}</a>
<a class="hx:inline-block hx:whitespace-nowrap hx:mr-2 hx:text-gray-500 hx:transition-colors hx:hover:text-gray-900 hx:dark:text-gray-400 hx:dark:hover:text-gray-100 hx:contrast-more:text-gray-800 hx:contrast-more:dark:text-gray-50" href="{{ .RelPermalink }}">#{{ $tag }}</a>
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion layouts/blog/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<main id="content" class="hx:w-full hx:min-w-0 hextra-max-content-width hx:px-6 hx:pt-4 hx:md:px-12">
{{ partial "breadcrumb.html" (dict "page" . "enable" false) }}
<br class="hx:mt-1.5 hx:text-sm" />
{{ if .Title }}<h1 class="hx:text-center hx:mt-2 hx:text-4xl hx:font-bold hx:tracking-tight hx:text-slate-900 hx:dark:text-slate-100">{{ .Title }}</h1>{{ end }}
{{ if .Title }}<h1 class="hx:text-center hx:mt-2 hx:text-4xl hx:font-bold hx:tracking-tight hx:text-slate-900 hx:dark:text-slate-100">{{ if eq .Data.Plural "tags" }}{{ .Data.Term }}{{ else }}{{ .Title }}{{ end }}</h1>{{ end }}
<div class="content">{{ .Content }}</div>
{{- $pages := partial "utils/sort-pages" (dict "page" . "by" site.Params.blog.list.sortBy "order" site.Params.blog.list.sortOrder) -}}
{{- $pagerSize := site.Params.blog.list.pagerSize | default 10 -}}
Expand Down
10 changes: 5 additions & 5 deletions layouts/taxonomy.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
{{ .Content }}
</div>
<div class="hx:grid hx:grid-cols-1 hx:md:grid-cols-2 hx:lg:grid-cols-3 hx:xl:grid-cols-4 hx:gap-4">
{{ range .Data.Terms }}
{{ range $term, $pages := .Data.Terms }}
<div class="hx:w-full">
<a
href="{{ .Page.RelPermalink }}"
title="{{ .Page.LinkTitle }}"
href="{{ $pages.Page.RelPermalink }}"
title="{{ if eq $.Data.Plural "tags" }}{{ $term }}{{ else }}{{ $pages.Page.LinkTitle }}{{ end }}"
class="hx:font-medium hx:hover:text-primary-600"
>
{{- .Page.LinkTitle -}}
<span class="hx:text-sm hx:text-gray-500">&nbsp;{{ .Count }}</span>
{{- if eq $.Data.Plural "tags" }}{{ $term }}{{ else }}{{ $pages.Page.LinkTitle }}{{ end -}}
<span class="hx:text-sm hx:text-gray-500">&nbsp;{{ $pages.Count }}</span>
</a>
</div>
{{ end }}
Expand Down
Loading