From 8e35f990bd46ca9584f2b2dc7f77ab525e90a15b Mon Sep 17 00:00:00 2001 From: Daniel Nitsikopoulos Date: Mon, 6 Mar 2023 16:22:16 +1100 Subject: [PATCH] Add photos to post previews --- app/templates/shared/_post.html.slim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/templates/shared/_post.html.slim b/app/templates/shared/_post.html.slim index bc283c8..23c0b05 100644 --- a/app/templates/shared/_post.html.slim +++ b/app/templates/shared/_post.html.slim @@ -2,8 +2,11 @@ div class="mb-8 h-entry" h3 class="text-xl font-semibold text-blue-600 mb-2" a class="border-b-2 border-transparent hover:border-blue-600 hover:border-b-2" href="/post/#{post.slug}" = post.display_title - div class="e-content prose-a:text-blue-600 prose-a:no-underline hover:prose-a:underline p-name text-base prose prose-ul:list-none prose-ul:pl-0 prose-li:pl-0 text-gray-800 dark:text-gray-200 prose-a:dark:text-gray-100" + div class="e-content prose-p:mb-0 prose-img:my-2 prose-a:text-blue-600 prose-a:no-underline hover:prose-a:underline p-name text-base prose prose-ul:list-none prose-ul:pl-0 prose-li:pl-0 text-gray-800 dark:text-gray-200 prose-a:dark:text-gray-100" == post.excerpt + div class="grid gap-4 grid-flow-row grid-cols-4 grid-rows-1" + -post.photos.each do |photo| + img class="w-44 h-44 object-cover rounded" src=photo["value"] == render :tags, tags: post.tags p class="text-sm text-blue-400"