From e58324f1491709d9f73d1402186586c4810b4eb3 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Thu, 14 Nov 2024 16:33:24 +0000 Subject: Fixed the positioning of the three featured cards on index page --- app/views/pdfresources/_pdfresource.html.erb | 7 ++++--- app/views/pdfresources/index.html.erb | 13 +++++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/app/views/pdfresources/_pdfresource.html.erb b/app/views/pdfresources/_pdfresource.html.erb index 8c96080..7ce1807 100644 --- a/app/views/pdfresources/_pdfresource.html.erb +++ b/app/views/pdfresources/_pdfresource.html.erb @@ -1,6 +1,7 @@ -
-
- <%= image_tag url_for(pdfresource.thumbnails.first), size: "500x100", class: "rounded-t-lg" %> +
+ +
+ <%= image_tag url_for(pdfresource.thumbnails.first), class: "w-full h-full object-cover rounded-t-lg" %>

diff --git a/app/views/pdfresources/index.html.erb b/app/views/pdfresources/index.html.erb index 158e505..880fb90 100644 --- a/app/views/pdfresources/index.html.erb +++ b/app/views/pdfresources/index.html.erb @@ -9,10 +9,15 @@

Featured Resources

-
- <% @pdfresources.where("feature_slot < 4").each do |pdfresource| %> - <%= render pdfresource %> - <% end %> +
+ <% featured_resources = @pdfresources.where("feature_slot < 4").order(:feature_slot) %> +
+ <% featured_resources.each do |pdfresource| %> +
+ <%= render pdfresource %> +
+ <% end %> +
<% if Current.session.user.is_admin %> -- cgit v1.2.3