aboutsummaryrefslogblamecommitdiffstats
path: root/app/views/pdfresources/_pdfresource.html.erb
blob: 7ce180706115163ffb868e7720ed8e3fea7bfab4 (plain) (tree)
1
2
3
4
5
6
7
8



                                                                                                            

        
                  
                                                                                  



















                                                                                                                                   

                                                 
        
 


                                                              



                                            

             
 



                                                                                     
 








                                                              
 



                                                               
 



                                                                 
 



                                                                
 

                                                                                                                                
      
     
<div id="<%= dom_id pdfresource %>" class="h-full rounded overflow-hidden shadow-lg border p-5">

  <div class="aspect-w-16 aspect-h-9 mb-4">
    <%= image_tag url_for(pdfresource.thumbnails.first), class: "w-full h-full object-cover rounded-t-lg" %>
  </div>

  <p class="my-5">
    <%= link_to pdfresource.name, pdfresource, class: "text-blue-500 font-bold" %>
  </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 %>
  </div>

  <div class="my-5">
    <strong class="block font-medium mb-1">Snapshots:</strong>
    <% pdfresource.pdf_snapshots.each do |image| %>
      <div>
        <%= image_tag url_for(image) %>
        <%= link_to image.filename, image %>
      </div>
    <% end %>
  </div>

  <p class="my-5">
    <strong class="block font-medium mb-1">Resource type:</strong>
    <%= pdfresource.resource_type&.name if pdfresource.respond_to?(:resource_type) %>
  </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">Feature slot:</strong>
    <%= pdfresource.feature_slot %>
  </p>

  <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" %>
  </p>
</div>