feature/share-libs
erb 76 lines 2.61 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="<%= song_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": "<%= song_url %>",
25 "name": "<%= t("nav_songs") %>"
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 <h2><%= @page.title if @page %></h2>
36 <div class="lead">
37 <%= raw @page.page_content if @page %>
38 </div>
39 </div>
40 <div class="bluebox-heading">
41 <h3><%= t("find_your_favorite_songs") %></h3>
42 </div>
43 <% @songs.each_with_index do |song, index| %>
44 <% if (index == 0 || index % 2 == 0) %>
45 <div class="row content-row">
46 <% end %>
47 <div class="col-md-6">
48 <section class="featured-post">
49 <a class="image-wrap" href="<%= song_detail_path(song.slug) %>">
50 <%= image_pack_tag("image-placeholder-#{rand(0...3)}.jpg", alt:"#{song.name} cover image.", style:"width:267px;height:165px;") %>
51 <span class="image-details"></span>
52 </a>
53 <h1>
54 <%= link_to song.name,
55 song_detail_path(song.slug) %>
56 </h1>
57 <p><%= strip_tags song.description.truncate 60 %></p>
58 <div class="bluebox-info-line">
59 <span class="featured-post-date"><%= song.updated_at.strftime("%B %-d, %Y") %></span>
60 <%= link_to t("see_song_detail"),
61 song_detail_path(song.slug),
62 class: "badge rounded-pill bg-warning float-end" %>
63 </div>
64 </section>
65 </div>
66 <% if (index == @songs.size - 1 || (index != 0 && index % 2 != 0)) %>
67 </div>
68 <% end %>
69 <% end %>
70 <%= will_paginate @songs, class: 'flickr_pagination' %>
71 </div>
72 <%= render("partial_aside_index.html") %>
73 </div>
74 <%= render "shared/partial_breadcrumbs" do %>
75 <li class="breadcrumb-item"><%= link_to t("nav_songs"), song_path %></li>
76 <% end %>