aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/pdfresources/index.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/pdfresources/index.html.erb')
-rw-r--r--app/views/pdfresources/index.html.erb23
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>