From 018affc145e0b3c823e3e7dcaaada39858f5c8b3 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Wed, 13 Nov 2024 10:07:50 +0000 Subject: Very ghetto resource featured card layout --- app/views/pdfresources/index.html.erb | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'app/views/pdfresources/index.html.erb') diff --git a/app/views/pdfresources/index.html.erb b/app/views/pdfresources/index.html.erb index 5da2312..309dcdd 100644 --- a/app/views/pdfresources/index.html.erb +++ b/app/views/pdfresources/index.html.erb @@ -5,19 +5,18 @@ <% content_for :title, "Alphabet Learning - Resources" %> - <%= link_to "Log out", Current.session, class: "underline my-3", data: { turbo_method: :delete }%> - -
-

Resources

- <%= link_to "Add new resource", new_pdfresource_path, class: "rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium" %> +
+

Featured Resources

- -
- <% @pdfresources.each do |pdfresource| %> - <%= render pdfresource %> -

- <%= link_to "Show this pdfresource", pdfresource, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> -

+ +
+ <% @pdfresources.where("feature_slot < 4").each do |pdfresource| %> + <%= render pdfresource %> <% end %>
+ + <% if Current.session.user.is_admin %> + <%= link_to "Add new resource", new_pdfresource_path, class: "rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium" %> + <% end %> +
-- cgit v1.2.3