diff --git a/app/templates/photos/index.html.slim b/app/templates/photos/index.html.slim
index 6ab66a0..068919a 100644
--- a/app/templates/photos/index.html.slim
+++ b/app/templates/photos/index.html.slim
@@ -5,6 +5,6 @@ div class="mb-12 prose dark:prose-invert max-w-prose mx-auto text-gray-800 dark:
div class="grid grid-cols-3 gap-4 mb-4 max-w-prose mx-auto"
- photos.each do |post|
- == render "shared/photo_post", post: post
+ == render "shared/photo_post", post: post, extended: true
div class="max-w-screen-md mx-auto border-t-4 border-solid border-gray-400 dark:border-gray-600"
diff --git a/app/templates/posts/show.html.slim b/app/templates/posts/show.html.slim
index 4092313..5dd86a7 100644
--- a/app/templates/posts/show.html.slim
+++ b/app/templates/posts/show.html.slim
@@ -94,7 +94,7 @@ article class="h-entry"
= year
div class="grid grid-cols-3 gap-4 mb-4 max-w-prose mx-auto"
-posts.each do |post|
- == render "shared/photo_post", post: post
+ == render "shared/photo_post", post: post, extended: false
div class="mb-4 max-w-screen-md mx-auto border-t-4 border-solid border-gray-400 dark:border-gray-600"
div class="max-w-prose mx-auto text-gray-600 dark:text-gray-200 flex"
diff --git a/app/templates/shared/_photo_post.html.slim b/app/templates/shared/_photo_post.html.slim
index 057ce77..c6f1212 100644
--- a/app/templates/shared/_photo_post.html.slim
+++ b/app/templates/shared/_photo_post.html.slim
@@ -1,4 +1,9 @@
-- post.photos.each_with_index do |photo, idx|
+- if extended
+ - post.photos.each_with_index do |photo, idx|
+ div class="rounded max-w-xs"
+ a href="#{post.permalink}#photo-#{idx}"
+ img class="rounded object-cover transition-transform ease-out hover:scale-105 h-48 w-48" src="#{photo["value"]}" alt="#{photo["alt"]}"
+- else
div class="rounded max-w-xs"
- a href="#{post.permalink}#photo-#{idx}"
- img class="rounded object-cover transition-transform ease-out hover:scale-105 h-48 w-48" src="#{photo["value"]}" alt="#{photo["alt"]}"
+ a href="#{post.permalink}"
+ img class="rounded object-cover transition-transform ease-out hover:scale-105 h-48 w-48" src="#{post.photos[0]["value"]}" alt="#{post.photos[0]["alt"]}"
\ No newline at end of file