diff options
author | Matthew Lemon <y@yulqen.org> | 2024-11-13 10:07:50 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-11-13 10:07:50 +0000 |
commit | 018affc145e0b3c823e3e7dcaaada39858f5c8b3 (patch) | |
tree | 5b4c0d955a9d4cdb3001079004fa56b25887ac87 /app/views/pdfresources/index.html.erb | |
parent | 9442d56c5b4a9dc8b5111bb84ee0d24bcfc571af (diff) |
Very ghetto resource featured card layout
Diffstat (limited to '')
-rw-r--r-- | app/views/pdfresources/index.html.erb | 23 |
1 files changed, 11 insertions, 12 deletions
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 }%> - - <div class="flex justify-between items-center"> - <h1 class="font-bold text-4xl">Resources</h1> - <%= link_to "Add new resource", new_pdfresource_path, class: "rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium" %> + <div class="text-center"> + <h1 class="font-bold text-4xl m-12">Featured Resources</h1> </div> - - <div id="pdfresources" class="min-w-full"> - <% @pdfresources.each do |pdfresource| %> - <%= render pdfresource %> - <p> - <%= link_to "Show this pdfresource", pdfresource, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> - </p> + + <div id="pdfresources" class="flex flex-wrap space-x-2 justify-between"> + <% @pdfresources.where("feature_slot < 4").each do |pdfresource| %> + <%= render pdfresource %> <% end %> </div> + + <% 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 %> + </div> |