fix: global resources fallback incorrectly removed in #2978

This commit is contained in:
ZhenShuo Leo committed 2026-07-05 14:37:14 +08:00
1 parent 1f14448333
commit c164484993
9 files changed
+48 -14

No files matched your search

+7 -2
View File
@@ -24,6 +24,9 @@
{{ end }}
{{ else }}
{{ $featured = $p.Resources.Get . }}
{{ if not $featured }}
{{ $featured = resources.Get . }}
{{ end }}
{{ end }}
{{ end }}
@@ -61,13 +64,15 @@
<article
class="article-link--card relative min-h-full min-w-full overflow-hidden rounded-lg border border-neutral-300 dark:border-neutral-600">
{{ with $featuredURL }}
<div class="flex-none relative overflow-hidden thumbnail_card" style="--thumbnail-aspect-ratio: {{ $thumbnailAspectRatio }}">
<div
class="flex-none relative overflow-hidden thumbnail_card"
style="--thumbnail-aspect-ratio: {{ $thumbnailAspectRatio }}">
<img
src="{{ . }}"
role="presentation"
loading="lazy"
decoding="async"
class="not-prose absolute inset-0 w-full h-full object-cover">
class="not-prose absolute inset-0 w-full h-full object-cover" />
</div>
{{ end }}
{{ if and .Draft .Site.Params.article.showDraftLabel }}