diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index 0eee6a96..ce5cc6a3 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -2543,13 +2543,6 @@ body.zen-mode-enable { } } } - .group-hover\:underline-offset-2 { - &:is(:where(.group):hover *) { - @media (hover: hover) { - text-underline-offset: 2px; - } - } - } .group-hover\:opacity-100 { &:is(:where(.group):hover *) { @media (hover: hover) { @@ -2640,6 +2633,18 @@ body.zen-mode-enable { border-top-color: transparent; } } + .before\:absolute { + &::before { + content: var(--tw-content); + position: absolute; + } + } + .before\:inset-0 { + &::before { + content: var(--tw-content); + inset: calc(var(--spacing) * 0); + } + } .after\:clear-both { &::after { content: var(--tw-content); @@ -3239,11 +3244,6 @@ body.zen-mode-enable { display: inline; } } - .ltr\:text-right { - &:where(:dir(ltr), [dir="ltr"], [dir="ltr"] *) { - text-align: right; - } - } .rtl\:left-0 { &:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) { left: calc(var(--spacing) * 0); @@ -3855,9 +3855,6 @@ pre { text-decoration-thickness: 3px; text-underline-offset: 4px; } -.group-hover-card:hover:has(.group-hover-cancel:hover) .group-hover-card-title { - text-decoration: none !important; -} @layer base { [type='text'],input:where(:not([type])),[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select { appearance: none; diff --git a/assets/css/main.css b/assets/css/main.css index 023eef06..db602162 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -278,8 +278,3 @@ pre { text-decoration-thickness: 3px; text-underline-offset: 4px; } - -/* Cancel group hover if .group-hover-card contains .group-hover-cancel*/ -.group-hover-card:hover:has(.group-hover-cancel:hover) .group-hover-card-title { - text-decoration: none !important; -} diff --git a/layouts/partials/article-link/_shortcode.html b/layouts/partials/article-link/_shortcode.html index 2d11ca81..50381dcc 100644 --- a/layouts/partials/article-link/_shortcode.html +++ b/layouts/partials/article-link/_shortcode.html @@ -1,10 +1,13 @@ +{{/* Used by + 1. article shortcode +*/}} {{ $target := .target }} {{ $shortcodeShowSummary := .showSummary }} {{ $shortcodeCompactSummary := .compactSummary }} {{ $constrainItemsWidth := site.Params.list.constrainItemsWidth | default false }} {{ $disableImageOptimization := site.Params.disableImageOptimization | default false }} -{{ $articleClasses := "group-hover-card group flex flex-wrap md:flex-nowrap article relative" }} +{{ $articleClasses := "flex flex-wrap md:flex-nowrap article relative" }} {{ if site.Params.list.showCards }} {{ $articleClasses = delimit (slice $articleClasses "border border-neutral-200 dark:border-neutral-700 border-2 rounded-md overflow-hidden") " " }} {{ else }} @@ -29,67 +32,55 @@ {{ $articleClasses = delimit (slice $articleClasses "max-w-prose") " " }} {{ end }} - -
- - - {{- with $target.Params.images -}} - {{- range first 6 . }} - - {{ end -}} - {{- else -}} - {{- $images := $target.Resources.ByType "image" -}} - {{- $featured := $images.GetMatch "*feature*" -}} - {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} - {{ if and $target.Params.featureimage (not $featured) }} - {{- $url:= $target.Params.featureimage -}} - {{ $featured = resources.GetRemote $url }} +{{ $featured := "" }} +{{ $featuredURL := "" }} +{{ if not $target.Params.hideFeatureImage }} + {{ with $target.Params.featureimage }} + {{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }} + {{ $featured = resources.GetRemote . }} + {{ else }} + {{ $featured = resources.Get . }} {{ end }} - {{- if not $featured }} + {{ end }} + + {{ if not $featured }} + {{ $images := $target.Resources.ByType "image" }} + {{ range slice "*feature*" "*cover*" "*thumbnail*" }} + {{ if not $featured }}{{ $featured = $images.GetMatch . }}{{ end }} + {{ end }} + {{ if not $featured }} {{ with site.Params.defaultFeaturedImage }}{{ $featured = resources.Get . }}{{ end }} - {{ end -}} - {{ if $target.Params.hideFeatureImage }}{{ $featured = false }}{{ end }} - {{- with $featured -}} - {{ if or $disableImageOptimization (strings.HasSuffix $featured ".svg") }} - {{ with . }} -
- {{ end }} - {{ else }} - {{ with .Resize "600x" }} -
- {{ end }} - {{ end }} - {{- else -}} - {{- with site.Params.images }} - - {{ end -}} - {{- end -}} - {{- end -}} + {{ end }} + {{ end }} + + {{ with $featured }} + {{ $featuredURL = .RelPermalink }} + {{ if not (or $disableImageOptimization (eq .MediaType.SubType "svg")) }} + {{ $featuredURL = (.Resize "600x").RelPermalink }} + {{ end }} + {{ end }} +{{ end }} +
+ {{ with $featuredURL }} +
+ {{ end }}
-
- {{ with $target.Params.externalUrl }} -
- -
- {{ else }} -
- {{ $target.Title | emojify }} -
- {{ end }} + {{ end }} + +
{{ if and $target.Draft site.Params.article.showDraftLabel }}
{{ partial "badge.html" (i18n "article.draft" | emojify) }} @@ -98,8 +89,8 @@ {{ if templates.Exists "partials/extend-article-link.html" }} {{ partial "extend-article-link.html" $target }} {{ end }} -
-
+ +
{{ partial "article-meta/basic.html" $target }}
{{ $showSummary := false }} @@ -122,4 +113,4 @@
{{ end }}
-
+
diff --git a/layouts/partials/article-link/card-related.html b/layouts/partials/article-link/card-related.html index 1bb08b23..f333c223 100644 --- a/layouts/partials/article-link/card-related.html +++ b/layouts/partials/article-link/card-related.html @@ -1,67 +1,63 @@ +{{/* Used by + 1. layouts/partials/related.html (related articles in single page) +*/}} {{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }} -
- - {{- with $.Params.images -}} - {{- range first 6 . }} - - {{ end -}} - {{- else -}} - {{- $images := $.Resources.ByType "image" -}} - {{- $featured := $images.GetMatch "*feature*" -}} - {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} - {{ if and .Params.featureimage (not $featured) }} - {{- $url:= .Params.featureimage -}} - {{ $featured = resources.GetRemote $url }} - {{ end }} - {{- if not $featured }} - {{ with .Site.Params.defaultFeaturedImage }}{{ $featured = resources.Get . }}{{ end }} - {{ end -}} - {{- with $featured -}} - {{ if or $disableImageOptimization (strings.HasSuffix $featured ".svg") }} - {{ with . }} - - {{ end }} - {{ else }} - {{ with .Resize "600x" }} - - {{ end }} - {{ end }} - {{- else -}} - {{- with $.Site.Params.images }} - - {{ end -}} - {{- end -}} - {{- end -}} + +{{ $featured := "" }} +{{ $featuredURL := "" }} +{{ with .Params.featureimage }} + {{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }} + {{ $featured = resources.GetRemote . }} + {{ else }} + {{ $featured = resources.Get . }} + {{ end }} +{{ end }} + +{{ if not $featured }} + {{ $images := $.Resources.ByType "image" }} + {{ range slice "*feature*" "*cover*" "*thumbnail*" }} + {{ if not $featured }}{{ $featured = $images.GetMatch . }}{{ end }} + {{ end }} + {{ if not $featured }} + {{ with site.Params.defaultFeaturedImage }}{{ $featured = resources.Get . }}{{ end }} + {{ end }} +{{ end }} + +{{ with $featured }} + {{ $featuredURL = .RelPermalink }} + {{ if not (or $disableImageOptimization (eq .MediaType.SubType "svg")) }} + {{ $featuredURL = (.Resize "600x").RelPermalink }} + {{ end }} +{{ end }} + + +
+ {{ with $featuredURL }} + + {{ end }} {{ if and .Draft .Site.Params.article.showDraftLabel }} {{ partial "badge.html" (i18n "article.draft" | emojify) }} {{ end }}
- {{ with .Params.externalUrl }} -
- {{ $.Title | emojify }} - - - - -
- {{ else }} -
- {{ .Title | emojify }} -
- {{ end }} -
+
+ +

+ {{ .Title | emojify }} + {{ if .Params.externalUrl }} + + + + + {{ end }} +

+
+
+
{{ partial "article-meta/basic.html" . }}
{{ if .Params.showSummary | default (.Site.Params.list.showSummary | default false) }} @@ -69,4 +65,4 @@ {{ end }}
-
+
diff --git a/layouts/partials/article-link/card.html b/layouts/partials/article-link/card.html index 1112516f..6f9e9ba9 100644 --- a/layouts/partials/article-link/card.html +++ b/layouts/partials/article-link/card.html @@ -1,64 +1,67 @@ +{{/* Used by + 1. list.html and term.html (when the cardView option is enabled) + 2. Recent articles template (when the cardView option is enabled) + 3. Shortcode list.html +*/}} {{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }} -
- - {{- with $.Params.images -}} - {{- range first 6 . }} - - {{ end -}} - {{- else -}} - {{- $images := $.Resources.ByType "image" -}} - {{- $featured := $images.GetMatch "*feature*" -}} - {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} - {{ if and .Params.featureimage (not $featured) }} - {{- $url:= .Params.featureimage -}} - {{ $featured = resources.GetRemote $url }} + +{{ $featured := "" }} +{{ $featuredURL := "" }} +{{ if not .Params.hideFeatureImage }} + {{ with .Params.featureimage }} + {{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }} + {{ $featured = resources.GetRemote . }} + {{ else }} + {{ $featured = resources.Get . }} {{ end }} - {{- if not $featured }} + {{ end }} + + {{ if not $featured }} + {{ $images := $.Resources.ByType "image" }} + {{ range slice "*feature*" "*cover*" "*thumbnail*" }} + {{ if not $featured }}{{ $featured = $images.GetMatch . }}{{ end }} + {{ end }} + {{ if not $featured }} {{ with .Site.Params.defaultFeaturedImage }}{{ $featured = resources.Get . }}{{ end }} - {{ end -}} - {{ if .Params.hideFeatureImage }}{{ $featured = false }}{{ end }} - {{- with $featured -}} - {{ if or $disableImageOptimization (strings.HasSuffix $featured ".svg") }} - {{ with . }} -
- {{ end }} - {{ else }} - {{ with .Resize "600x" }} -
- {{ end }} - {{ end }} - {{- else -}} - {{- with $.Site.Params.images }} - - {{ end -}} - {{- end -}} - {{- end -}} + {{ end }} + {{ end }} + + {{ with $featured }} + {{ $featuredURL = .RelPermalink }} + {{ if not (or $disableImageOptimization (eq .MediaType.SubType "svg")) }} + {{ $featuredURL = (.Resize "600x").RelPermalink }} + {{ end }} + {{ end }} +{{ end }} + + +
+ {{ with $featuredURL }} +
+ {{ end }} {{ if and .Draft .Site.Params.article.showDraftLabel }} {{ partial "badge.html" (i18n "article.draft" | emojify) }} {{ end }}
- {{ with .Params.externalUrl }} -
- {{ $.Title | emojify }} - - - - -
- {{ else }} -
- {{ .Title | emojify }} -
- {{ end }} -
+
+ +

+ {{ .Title | emojify }} + {{ if .Params.externalUrl }} + + + + + {{ end }} +

+
+
+
{{ partial "article-meta/basic.html" . }}
{{ if .Params.showSummary | default (.Site.Params.list.showSummary | default false) }} @@ -66,4 +69,4 @@ {{ end }}
-
+
diff --git a/layouts/partials/article-link/simple.html b/layouts/partials/article-link/simple.html index 07914ddc..54b7c3b0 100644 --- a/layouts/partials/article-link/simple.html +++ b/layouts/partials/article-link/simple.html @@ -1,6 +1,11 @@ +{{/* Used by + 1. list.html and term.html (when the cardView option is not enabled) + 2. Recent articles template (when the cardView option is not enabled) + 3. Shortcode list.html +*/}} {{ $constrainItemsWidth := .Page.Site.Params.list.constrainItemsWidth | default false }} -{{ $articleClasses := "group-hover-card group flex flex-wrap md:flex-nowrap article relative" }} +{{ $articleClasses := "flex flex-wrap md:flex-nowrap article relative" }} {{ if .Site.Params.list.showCards }} {{ $articleClasses = delimit (slice $articleClasses "border border-neutral-200 dark:border-neutral-700 border-2 rounded-md overflow-hidden") " " }} {{ else }} @@ -27,71 +32,63 @@ {{ $articleClasses = delimit (slice $articleClasses "max-w-prose") " " }} {{ end }} - -
- - {{- with $.Params.images -}} - {{- range first 6 . }} - - {{ end -}} - {{- else -}} - {{- $images := $.Resources.ByType "image" -}} - {{- $featured := $images.GetMatch "*feature*" -}} - {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} - {{ if and .Params.featureimage (not $featured) }} - {{- $url:= .Params.featureimage -}} - {{ $featured = resources.GetRemote $url }} +{{ $featured := "" }} +{{ $featuredURL := "" }} +{{ if not .Params.hideFeatureImage }} + {{ with .Params.featureimage }} + {{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }} + {{ $featured = resources.GetRemote . }} + {{ else }} + {{ $featured = resources.Get . }} {{ end }} - {{- if not $featured }} + {{ end }} + + {{ if not $featured }} + {{ $images := $.Resources.ByType "image" }} + {{ range slice "*feature*" "*cover*" "*thumbnail*" }} + {{ if not $featured }}{{ $featured = $images.GetMatch . }}{{ end }} + {{ end }} + {{ if not $featured }} {{ with .Site.Params.defaultFeaturedImage }}{{ $featured = resources.Get . }}{{ end }} - {{ end -}} - {{ if .Params.hideFeatureImage }}{{ $featured = false }}{{ end }} - {{- with $featured -}} - {{ if or $disableImageOptimization (strings.HasSuffix $featured ".svg") }} - {{ with . }} -
- {{ end }} - {{ else }} - {{ with .Resize "600x" }} -
- {{ end }} - {{ end }} - {{- else -}} - {{- with $.Site.Params.images }} - - {{ end -}} - {{- end -}} - {{- end -}} + {{ end }} + {{ end }} + + {{ with $featured }} + {{ $featuredURL = .RelPermalink }} + {{ if not (or $disableImageOptimization (eq .MediaType.SubType "svg")) }} + {{ $featuredURL = (.Resize "600x").RelPermalink }} + {{ end }} + {{ end }} +{{ end }} +
+ {{ with $featuredURL }} +
+ {{ end }}
-
- {{ with .Params.externalUrl }} -
- {{ $.Title | emojify }} - - - - -
- {{ else }} - - {{ end }} + {{ if .Params.externalUrl }} + + + + + {{ end }} + + {{ if and .Draft .Site.Params.article.showDraftLabel }}
{{ partial "badge.html" (i18n "article.draft" | emojify) }}
{{ end }} {{ if templates.Exists "partials/extend-article-link.html" }} {{ partial "extend-article-link.html" . }} {{ end }} -
-
+ +
{{ partial "article-meta/basic.html" . }}
{{ if .Params.showSummary | default (.Site.Params.list.showSummary | default false) }} @@ -99,4 +96,4 @@ {{ end }}
-
+
diff --git a/layouts/partials/hero/background.html b/layouts/partials/hero/background.html index caa0dd96..026faad6 100644 --- a/layouts/partials/hero/background.html +++ b/layouts/partials/hero/background.html @@ -1,16 +1,23 @@ {{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }} -{{- $images := .Resources.ByType "image" -}} -{{- $featured := $images.GetMatch "*background*" -}} -{{- if not $featured }}{{ $featured = $images.GetMatch "*feature*" }}{{ end -}} -{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} - -{{ if and .Params.featureimage (not $featured) }} - {{- $url:= .Params.featureimage -}} - {{ $featured = resources.GetRemote $url }} +{{ $featured := "" }} +{{ if .Params.featureimage }} + {{ $url := .Params.featureimage }} + {{ if or (strings.HasPrefix $url "http:") (strings.HasPrefix $url "https:") }} + {{ $featured = resources.GetRemote $url }} + {{ else }} + {{ $featured = resources.Get $url }} + {{ end }} {{ end }} -{{- if not $featured }} +{{ if not $featured }} + {{ $images := $.Resources.ByType "image" }} + {{ range slice "*background*" "*feature*" "*cover*" "*thumbnail*" }} + {{ if not $featured }}{{ $featured = $images.GetMatch . }}{{ end }} + {{ end }} +{{ end }} + +{{ if not $featured }} {{ with .Site.Params.defaultBackgroundImage }} {{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }} {{ $featured = resources.GetRemote . }} @@ -18,7 +25,7 @@ {{ $featured = resources.Get . }} {{ end }} {{ end }} -{{ end -}} +{{ end }} {{ $isParentList := eq (.Scratch.Get "scope") "list" }} {{ $shouldBlur := $.Params.layoutBackgroundBlur | default (or diff --git a/layouts/partials/hero/basic.html b/layouts/partials/hero/basic.html index 54e84ed3..34ec0f3b 100644 --- a/layouts/partials/hero/basic.html +++ b/layouts/partials/hero/basic.html @@ -1,16 +1,23 @@ {{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }} -{{- $images := .Resources.ByType "image" -}} -{{- $featured := $images.GetMatch "*background*" -}} -{{- if not $featured }}{{ $featured = $images.GetMatch "*feature*" }}{{ end -}} -{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} - -{{ if and .Params.featureimage (not $featured) }} - {{- $url:= .Params.featureimage -}} - {{ $featured = resources.GetRemote $url }} +{{ $featured := "" }} +{{ if .Params.featureimage }} + {{ $url := .Params.featureimage }} + {{ if or (strings.HasPrefix $url "http:") (strings.HasPrefix $url "https:") }} + {{ $featured = resources.GetRemote $url }} + {{ else }} + {{ $featured = resources.Get $url }} + {{ end }} {{ end }} -{{- if not $featured }} +{{ if not $featured }} + {{ $images := $.Resources.ByType "image" }} + {{ range slice "*background*" "*feature*" "*cover*" "*thumbnail*" }} + {{ if not $featured }}{{ $featured = $images.GetMatch . }}{{ end }} + {{ end }} +{{ end }} + +{{ if not $featured }} {{ with .Site.Params.defaultBackgroundImage }} {{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }} {{ $featured = resources.GetRemote . }} @@ -18,7 +25,7 @@ {{ $featured = resources.Get . }} {{ end }} {{ end }} -{{ end -}} +{{ end }} {{- with $featured -}} {{ if or $disableImageOptimization (strings.HasSuffix $featured ".svg") }} diff --git a/layouts/partials/hero/big.html b/layouts/partials/hero/big.html index 7fbaeba6..2a0ad286 100644 --- a/layouts/partials/hero/big.html +++ b/layouts/partials/hero/big.html @@ -1,16 +1,23 @@ {{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }} -{{- $images := .Resources.ByType "image" -}} -{{- $featured := $images.GetMatch "*background*" -}} -{{- if not $featured }}{{ $featured = $images.GetMatch "*feature*" }}{{ end -}} -{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} - +{{ $featured := "" }} {{ if .Params.featureimage }} - {{- $url:= .Params.featureimage -}} - {{- if not $featured }}{{ $featured = resources.GetRemote $url }}{{ end -}} + {{ $url := .Params.featureimage }} + {{ if or (strings.HasPrefix $url "http:") (strings.HasPrefix $url "https:") }} + {{ $featured = resources.GetRemote $url }} + {{ else }} + {{ $featured = resources.Get $url }} + {{ end }} {{ end }} -{{- if not $featured }} +{{ if not $featured }} + {{ $images := $.Resources.ByType "image" }} + {{ range slice "*background*" "*feature*" "*cover*" "*thumbnail*" }} + {{ if not $featured }}{{ $featured = $images.GetMatch . }}{{ end }} + {{ end }} +{{ end }} + +{{ if not $featured }} {{ with .Site.Params.defaultBackgroundImage }} {{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }} {{ $featured = resources.GetRemote . }} @@ -18,7 +25,7 @@ {{ $featured = resources.Get . }} {{ end }} {{ end }} -{{ end -}} +{{ end }} {{ $caption := "" }} {{ if .Params.featureimagecaption }} diff --git a/layouts/partials/hero/thumbAndBackground.html b/layouts/partials/hero/thumbAndBackground.html index 9be2cef0..a0b4cc94 100644 --- a/layouts/partials/hero/thumbAndBackground.html +++ b/layouts/partials/hero/thumbAndBackground.html @@ -1,9 +1,9 @@ {{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }} -{{- $images := .Resources.ByType "image" -}} -{{- $background := $images.GetMatch "*background*" -}} +{{ $images := .Resources.ByType "image" }} +{{ $background := $images.GetMatch "*background*" }} -{{- if not $background }} +{{ if not $background }} {{ with .Site.Params.defaultBackgroundImage }} {{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }} {{ $background = resources.GetRemote . }} @@ -11,19 +11,30 @@ {{ $background = resources.Get . }} {{ end }} {{ end }} -{{ end -}} - -{{- if not $background }}{{ $background = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} -{{- if not $background }}{{ $background = $images.GetMatch "*feature*" }}{{ end -}} -{{- $featured := $images.GetMatch "*feature*" -}} -{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} -{{ if .Params.featureimage }} - {{- $url:= .Params.featureimage -}} - {{- if not $featured }}{{ $featured = resources.GetRemote $url }}{{ end -}} {{ end }} -{{- if not $featured }}{{ $featured = $images.GetMatch "*background*" }}{{ end -}} -{{- if not $featured }} +{{ range slice "*cover*" "*thumbnail*" "*feature*" }} + {{ if not $background }}{{ $background = $images.GetMatch . }}{{ end }} +{{ end }} + +{{ $featured := "" }} +{{ if .Params.featureimage }} + {{ $url := .Params.featureimage }} + {{ if or (strings.HasPrefix $url "http:") (strings.HasPrefix $url "https:") }} + {{ $featured = resources.GetRemote $url }} + {{ else }} + {{ $featured = resources.Get $url }} + {{ end }} +{{ end }} + +{{ if not $featured }} + {{ $images := $.Resources.ByType "image" }} + {{ range slice "*feature*" "*cover*" "*thumbnail*" "*background*" }} + {{ if not $featured }}{{ $featured = $images.GetMatch . }}{{ end }} + {{ end }} +{{ end }} + +{{ if not $featured }} {{ with .Site.Params.defaultFeaturedImage }} {{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }} {{ $featured = resources.GetRemote . }} @@ -31,7 +42,7 @@ {{ $featured = resources.Get . }} {{ end }} {{ end }} -{{ end -}} +{{ end }} {{ $isParentList := eq (.Scratch.Get "scope") "list" }} {{ $shouldBlur := $.Params.layoutBackgroundBlur | default (or diff --git a/layouts/partials/term-link/card.html b/layouts/partials/term-link/card.html index 280a74d4..4fa7ca31 100644 --- a/layouts/partials/term-link/card.html +++ b/layouts/partials/term-link/card.html @@ -1,31 +1,21 @@
+ class="border-neutral-200 dark:border-neutral-700 border-2 rounded overflow-hidden shadow-2xl relative"> {{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }} - {{- with site.Params.images -}} - {{- range first 6 . }} - - {{ end -}} - {{- else -}} - {{- $images := .Page.Resources.ByType "image" -}} - {{- $featured := $images.GetMatch "*feature*" -}} - {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} - {{- with $featured -}} - {{ if $disableImageOptimization }} - {{ with . }} -
- {{ end }} - {{ else }} - {{ with .Resize "600x" }} -
- {{ end }} + {{- $images := .Page.Resources.ByType "image" -}} + {{- $featured := $images.GetMatch "*feature*" -}} + {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} + {{- with $featured -}} + {{ if $disableImageOptimization }} + {{ with . }} +
{{ end }} - {{- else -}} - {{- with site.Params.images }} - - {{ end -}} - {{- end -}} + {{ else }} + {{ with .Resize "600x" }} +
+ {{ end }} + {{ end }} {{- end -}} {{ if site.Params.taxonomy.showTermCount | default true }}