diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index 0eee6a96..ef5ca96d 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -3239,11 +3239,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); diff --git a/layouts/partials/article-link/_shortcode.html b/layouts/partials/article-link/_shortcode.html index 2d11ca81..d22e07d6 100644 --- a/layouts/partials/article-link/_shortcode.html +++ b/layouts/partials/article-link/_shortcode.html @@ -36,38 +36,28 @@ class="absolute inset-0" aria-label="{{ $.Title }}"> - {{- 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 }} - {{ 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 }} + {{ $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 }} + {{ 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 site.Params.images }} - - {{ end -}} - {{- end -}} - {{- end -}} + {{ else }} + {{ with .Resize "600x" }} +
+ {{ end }} + {{ end }} + {{ end }}
diff --git a/layouts/partials/article-link/card-related.html b/layouts/partials/article-link/card-related.html index 1bb08b23..5c04e221 100644 --- a/layouts/partials/article-link/card-related.html +++ b/layouts/partials/article-link/card-related.html @@ -5,41 +5,32 @@ {{ partial "article-link/_external-link.html" . | safeHTMLAttr }} class="absolute inset-0" aria-label="{{ $.Title }}"> - {{- 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 }} + + {{ $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 $.Site.Params.images }} - - {{ end -}} - {{- end -}} - {{- end -}} + {{ else }} + {{ with .Resize "600x" }} + + {{ end }} + {{ end }} + {{ end }} {{ if and .Draft .Site.Params.article.showDraftLabel }} {{ partial "badge.html" (i18n "article.draft" | emojify) }} diff --git a/layouts/partials/article-link/card.html b/layouts/partials/article-link/card.html index 1112516f..cbce15df 100644 --- a/layouts/partials/article-link/card.html +++ b/layouts/partials/article-link/card.html @@ -5,38 +5,29 @@ {{ partial "article-link/_external-link.html" . | safeHTMLAttr }} class="absolute inset-0" aria-label="{{ $.Title }}"> - {{- 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 -}} - {{ if .Params.hideFeatureImage }}{{ $featured = false }}{{ end }} - {{- with $featured -}} - {{ if or $disableImageOptimization (strings.HasSuffix $featured ".svg") }} - {{ with . }} -
- {{ end }} - {{ else }} - {{ with .Resize "600x" }} -
- {{ end }} + + {{ $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 }} + {{ if .Params.hideFeatureImage }}{{ $featured = false }}{{ end }} + {{ with $featured }} + {{ if or $disableImageOptimization (strings.HasSuffix $featured ".svg") }} + {{ with . }} +
{{ end }} - {{- else -}} - {{- with $.Site.Params.images }} - - {{ end -}} - {{- end -}} - {{- end -}} + {{ else }} + {{ with .Resize "600x" }} +
+ {{ end }} + {{ end }} + {{ end }} {{ if and .Draft .Site.Params.article.showDraftLabel }} {{ partial "badge.html" (i18n "article.draft" | emojify) }} diff --git a/layouts/partials/article-link/simple.html b/layouts/partials/article-link/simple.html index 07914ddc..c7e10e4f 100644 --- a/layouts/partials/article-link/simple.html +++ b/layouts/partials/article-link/simple.html @@ -33,38 +33,29 @@ {{ partial "article-link/_external-link.html" . | safeHTMLAttr }} class="absolute inset-0" aria-label="{{ $.Title }}"> - {{- 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 -}} - {{ if .Params.hideFeatureImage }}{{ $featured = false }}{{ end }} - {{- with $featured -}} - {{ if or $disableImageOptimization (strings.HasSuffix $featured ".svg") }} - {{ with . }} -
- {{ end }} - {{ else }} - {{ with .Resize "600x" }} -
- {{ end }} + + {{ $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 }} + {{ if .Params.hideFeatureImage }}{{ $featured = false }}{{ end }} + {{ with $featured }} + {{ if or $disableImageOptimization (strings.HasSuffix $featured ".svg") }} + {{ with . }} +
{{ end }} - {{- else -}} - {{- with $.Site.Params.images }} - - {{ end -}} - {{- end -}} - {{- end -}} + {{ else }} + {{ with .Resize "600x" }} +
+ {{ end }} + {{ end }} + {{ end }}