aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/pdfresources/_pdfresource.html.erb94
-rw-r--r--app/views/pdfresources/new.html.erb3
2 files changed, 51 insertions, 46 deletions
diff --git a/app/views/pdfresources/_pdfresource.html.erb b/app/views/pdfresources/_pdfresource.html.erb
index 7a2409e..3c8b3a8 100644
--- a/app/views/pdfresources/_pdfresource.html.erb
+++ b/app/views/pdfresources/_pdfresource.html.erb
@@ -3,58 +3,64 @@
<%= image_tag url_for(pdfresource.thumbnails.first), size: "500x100", class: "rounded-t-lg" %>
</div>
- <div class="ps-2">
- <p class="my-5">
- <strong class="block font-bold mb-2"><%= pdfresource.name %></strong>
- </p>
-
- <div class="px-6 pt-4 pb-2">
- <span class="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2">#photography</span>
- <span class="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2">#travel</span>
- <span class="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2">#winter</span>
- </div>
-
- <p class="my-5 text-gray-500 text-base">
- <%= pdfresource.card_description %>
- </p>
-
- <p class="my-5">
- <strong class="block font-medium mb-1">Stripe product:</strong>
- <%= pdfresource.stripe_product_id %>
- </p>
-
- <p class="my-5">
- <strong class="block font-medium mb-1">Pdfs:</strong>
- <% pdfresource.pdfs.each do |pdf| %>
+ <p class="my-5">
+ <strong class="block font-bold mb-2"><%= pdfresource.name %></strong>
+ </p>
+
+ <div class="px-6 pt-4 pb-2">
+ <span class="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2">#photography</span>
+ <span class="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2">#travel</span>
+ <span class="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2">#winter</span>
+ </div>
+
+ <p class="my-5 text-gray-500 text-base">
+ <%= pdfresource.card_description %>
+ </p>
+
+ <p class="my-5">
+ <strong class="block font-medium mb-1">Stripe product:</strong>
+ <%= pdfresource.stripe_product_id %>
+ </p>
+
+ <div class="my-5">
+ <strong class="block font-medium mb-1">PDFs:</strong>
+ <% pdfresource.pdfs.each do |pdf| %>
<div><%= link_to pdf.filename, pdf %></div>
<% end %>
- </p>
+ </div>
+ <div class="my-5">
+ <strong class="block font-medium mb-1">Snapshots:</strong>
+ <% pdfresource.pdf_snapshots.each do |image| %>
+ <div><%= link_to image.filename, image %></div>
+ <% end %>
+ </div>
- <p class="my-5">
- <strong class="block font-medium mb-1">Price:</strong>
- <%= pdfresource.price %>
- </p>
- <p class="my-5">
- <strong class="block font-medium mb-1">Age range:</strong>
- <%= pdfresource.age_range %>
- </p>
+ <p class="my-5">
+ <strong class="block font-medium mb-1">Price:</strong>
+ <%= pdfresource.price %>
+ </p>
+
+ <p class="my-5">
+ <strong class="block font-medium mb-1">Age range:</strong>
+ <%= pdfresource.age_range %>
+ </p>
- <p class="my-5">
- <strong class="block font-medium mb-1">Curriculum:</strong>
- <%= pdfresource.curriculum %>
- </p>
+ <p class="my-5">
+ <strong class="block font-medium mb-1">Curriculum:</strong>
+ <%= pdfresource.curriculum %>
+ </p>
- <p class="my-5">
- <strong class="block font-medium mb-1">Feature slot:</strong>
- <%= pdfresource.feature_slot %>
- </p>
+ <p class="my-5">
+ <strong class="block font-medium mb-1">Feature slot:</strong>
+ <%= pdfresource.feature_slot %>
+ </p>
- <p class="my-5">
- <strong class="block font-medium mb-1">Description:</strong>
- <%= pdfresource.description %>
- </p></div>
+ <p class="my-5">
+ <strong class="block font-medium mb-1">Description:</strong>
+ <%= pdfresource.description %>
+ </p>
<p>
<%= link_to "Show this pdfresource", pdfresource, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
diff --git a/app/views/pdfresources/new.html.erb b/app/views/pdfresources/new.html.erb
index 73f1a01..5fa06d1 100644
--- a/app/views/pdfresources/new.html.erb
+++ b/app/views/pdfresources/new.html.erb
@@ -1,5 +1,4 @@
-<div class="mx-auto md:w-1/2 w-full">
- <h1 class="font-bold text-4xl">Add a new Resource</h1>
+<div class="mx-auto md:w-1/2 w-full"> <h1 class="font-bold text-4xl">Add a new Resource</h1>
<%= render "form", pdfresource: @pdfresource %>