feature/share-libs
erb 81 lines 2.93 KB
Raw
1 <% content_for :meta_head do %>
2 <title><%= @meta_title %></title>
3 <meta name="description" content="<%= @meta_description %>">
4 <meta property="og:title" content="<%= @meta_title %>" />
5 <meta property="og:description" content="<%= @meta_description %>" />
6 <meta property="og:url" content="<%= album_url %>" />
7 <% end %>
8 <% content_for :breadcrumb do %>
9 <script type="application/ld+json">
10 {
11 "@context": "http://schema.org",
12 "@type": "BreadcrumbList",
13 "itemListElement": [{
14 "@type": "ListItem",
15 "position": 1,
16 "item": {
17 "@id": "<%= root_url %>",
18 "name": "<%= t("site_name") %>"
19 }
20 },{
21 "@type": "ListItem",
22 "position": 2,
23 "item": {
24 "@id": "<%= album_url %>",
25 "name": "<%= t("nav_albums") %>"
26 }
27 }]
28 }
29 </script>
30 <% end %>
31 <div class="row">
32 <!-- BEGIN content -->
33 <div class="col-md-8">
34 <div class="bluebox-heading">
35 <h1><%= @page.title if @page %></h1>
36 <div class="lead">
37 <%= raw @page.page_content if @page %>
38 </div>
39 </div>
40 <div class="bluebox-heading">
41 <h3><%= t("h2_find_new_albums") %></h3>
42 </div>
43 <% @albums.each_with_index do |album, index| %>
44 <% if (index == 0 || index % 2 == 0) %>
45 <div class="row content-row mb-3">
46 <% end %>
47 <div class="col-md-6">
48 <section class="featured-post">
49 <a class="image-wrap" href="<%= album_detail_path(album.name.downcase.parameterize + "-" + album.artists[0].name.downcase.parameterize + "-" + album.id.to_s) %>">
50 <%= image_pack_tag(
51 "image-placeholder-#{rand(0...3)}.jpg",
52 alt:"#{album.name} cover image.",
53 class: "img-thumbnail rounded mx-auto d-block"
54 ) %>
55 <span class="image-details"></span>
56 </a>
57 <h2>
58 <%= link_to album.name,
59 album_detail_path(album.name.downcase.parameterize + "-" + album.artists[0].name.downcase.parameterize + "-" + album.id.to_s) %>
60 </h2>
61 <p><%= strip_tags album.description.truncate 60 %></p>
62 <div class="bluebox-info-line">
63 <span class="featured-post-date"><%= album.updated_at.strftime("%B %-d, %Y") %></span>
64 <%= link_to t("see_album_detail"),
65 album_detail_path(album_friendly_url(album)),
66 class: "badge rounded-pill bg-warning" %>
67 </div>
68 </section>
69 </div>
70 <% if (index == @albums.size - 1 || (index != 0 && index % 2 != 0)) %>
71 </div>
72 <% end %>
73 <% end %>
74 <%= will_paginate(@albums, class: 'flickr_pagination') %>
75 </div>
76 <%= render("partial_aside") %>
77 <!-- END content -->
78 </div>
79 <%= render "shared/partial_breadcrumbs" do %>
80 <li class="breadcrumb-item"><%= link_to t("nav_albums"), album_path %></li>
81 <% end %>