aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/pdfresources/_pdfresource.html.erb
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-11-13 10:07:50 +0000
committerMatthew Lemon <y@yulqen.org>2024-11-13 10:07:50 +0000
commit018affc145e0b3c823e3e7dcaaada39858f5c8b3 (patch)
tree5b4c0d955a9d4cdb3001079004fa56b25887ac87 /app/views/pdfresources/_pdfresource.html.erb
parent9442d56c5b4a9dc8b5111bb84ee0d24bcfc571af (diff)
Very ghetto resource featured card layout
Diffstat (limited to 'app/views/pdfresources/_pdfresource.html.erb')
-rw-r--r--app/views/pdfresources/_pdfresource.html.erb29
1 files changed, 15 insertions, 14 deletions
diff --git a/app/views/pdfresources/_pdfresource.html.erb b/app/views/pdfresources/_pdfresource.html.erb
index d947dd1..2e0d86c 100644
--- a/app/views/pdfresources/_pdfresource.html.erb
+++ b/app/views/pdfresources/_pdfresource.html.erb
@@ -1,7 +1,16 @@
-<div id="<%= dom_id pdfresource %>">
+<div id="<%= dom_id pdfresource %>" class="w-[400px] p-3 border border-gray-500 bg-pink-300">
<p class="my-5">
- <strong class="block font-medium mb-1">Name:</strong>
- <%= pdfresource.name %>
+ <div>
+ <%= image_tag url_for(pdfresource.thumbnails.first), class: "object-cover"%>
+ </div>
+ </p>
+
+ <p class="my-5">
+ <strong class="block font-bold mb-1"><%= pdfresource.name %></strong>
+ </p>
+
+ <p class="my-5">
+ <%= pdfresource.card_description %>
</p>
<p class="my-5">
@@ -16,12 +25,6 @@
<% end %>
</p>
- <p class="my-5">
- <strong class="block font-medium mb-1">Thumbnails:</strong>
- <% pdfresource.thumbnails.each do |thumbnail| %>
- <div><%= link_to thumbnail.filename, thumbnail %></div>
- <% end %>
- </p>
<p class="my-5">
<strong class="block font-medium mb-1">Price:</strong>
@@ -48,9 +51,7 @@
<%= pdfresource.description %>
</p>
- <p class="my-5">
- <strong class="block font-medium mb-1">Card description:</strong>
- <%= pdfresource.card_description %>
+ <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>
+</div> \ No newline at end of file