Skip to content

Commit 52bd3fe

Browse files
HeyItsGilbertclaude
andcommitted
feat(articles): add visual tile to article cards with featured_image fallback
Give regular article cards in the list layout a left-hand visual, mirroring the podcast card. When `featured_image` is set it renders a lazy-loaded cover image; otherwise it falls back to a generated terminal tile (gray-900 prompt showing the article's category) that echoes the homepage hero — so image-less articles still get an anchor. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent f85545c commit 52bd3fe

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

  • themes/powershell-community/layouts/_default

themes/powershell-community/layouts/_default/list.html

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,27 @@ <h2 class="text-xl font-bold text-gray-900 mb-3">
8181

8282
{{ else }}
8383
<!-- Regular Article Layout -->
84-
<div class="p-6">
84+
<div class="lg:flex">
85+
<div class="lg:w-1/4 p-6 lg:pr-0">
86+
{{ with .Params.featured_image }}
87+
<a href="{{ $.RelPermalink }}" class="block aspect-square rounded-lg overflow-hidden border border-gray-200 hover:border-blue-300 transition-colors duration-200">
88+
<img src="{{ . | relURL }}" alt="{{ $.Title }}" loading="lazy" class="w-full h-full object-cover">
89+
</a>
90+
{{ else }}
91+
<a href="{{ .RelPermalink }}" class="block aspect-square bg-gray-900 rounded-lg p-4 flex flex-col justify-center border border-blue-400 hover:border-blue-300 transition-colors duration-200">
92+
<div class="flex space-x-1.5 mb-3">
93+
<div class="w-2 h-2 bg-red-500 rounded-full"></div>
94+
<div class="w-2 h-2 bg-yellow-500 rounded-full"></div>
95+
<div class="w-2 h-2 bg-green-500 rounded-full"></div>
96+
</div>
97+
<div class="font-mono text-xs">
98+
<span class="text-blue-400">PS C:\&gt;</span>
99+
<div class="text-blue-300 mt-2 line-clamp-3">{{ with .Params.categories }}{{ index . 0 }}{{ else }}Get-Article{{ end }}</div>
100+
</div>
101+
</a>
102+
{{ end }}
103+
</div>
104+
<div class="lg:w-3/4 p-6 lg:pl-8">
85105
<div class="flex items-center justify-between text-sm text-gray-500 mb-3">
86106
<div class="flex items-center space-x-3">
87107
<time>{{ .Date.Format "Jan 2, 2006" }}</time>
@@ -122,6 +142,7 @@ <h2 class="text-xl font-bold text-gray-900 mb-3">
122142
</div>
123143
{{ end }}
124144
</div>
145+
</div>
125146
</div>
126147
{{ end }}
127148
</article>

0 commit comments

Comments
 (0)