feature/share-libs
erb 95 lines 3.76 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="<%= javanese_gamelan_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": "<%= javanese_gamelan_url %>",
25 "name": "<%= t("nav_javanese_gamelan") %>"
26 }
27 }]
28 }
29 </script>
30 <% end %>
31 <div class="row">
32 <div class="col-md-8">
33 <div class="bluebox-heading">
34 <h2><%= @page.title if @page %></h2>
35 <div class="lead">
36 <%= raw @page.page_content if @page %>
37 </div>
38 </div>
39 <div class="bluebox-heading">
40 <h3><%= t("our_javanese_gending_notation") %></h3>
41 </div>
42 <% @gendings.each_with_index do |gending, index| %>
43 <% if (index == 0 || index % 2 == 0) %>
44 <div class="row content-row">
45 <% end %>
46 <div class="col-md-6">
47 <section class="featured-post">
48 <a class="image-wrap" href="<%= javanese_gending_detail_path("gending-notation-" + gending.name.downcase.parameterize + "-" + gending.id.to_s) %>">
49 <%= image_pack_tag("image-placeholder-#{rand(0...3)}.jpg", alt:"#{gending.name} cover image.", style:"width:267px;height:165px;") %>
50 <span class="image-details"></span>
51 </a>
52 <h1>
53 <%= link_to gending.name,
54 javanese_gending_detail_path("gending-notation-" + gending.name.downcase.parameterize + "-" + gending.id.to_s) %>
55 </h1>
56 <p><%= strip_tags gending.description.truncate 60 %></p>
57 <div class="bluebox-info-line">
58 <span class="featured-post-date"><%= gending.updated_at.strftime("%B %-d, %Y") %></span>
59 <%= link_to t("see_gending_detail"),
60 javanese_gending_detail_path("gending-notation-" + gending.name.downcase.parameterize + "-" + gending.id.to_s),
61 class: "badge rounded-pill bg-warning float-end" %>
62 </div>
63 </section>
64 </div>
65 <% if (index == @gendings.size - 1 || (index != 0 && index % 2 != 0)) %>
66 </div>
67 <% end %>
68 <% end %>
69 <%= will_paginate @gendings, class: 'flickr_pagination' %>
70 </div>
71 <div class="col-md-4">
72 <aside>
73 <div class="bluebox-heading">
74 <h3><%= t("top_10_javanese_gending")%></h3>
75 </div>
76 <% @trending_gendings.each_with_index do |gending, index| %>
77
78 <h4>
79 <%= link_to "#{index + 1}. #{gending.name}",
80 javanese_gending_detail_path("gending-notation-" + gending.name.downcase.parameterize + "-" + gending.id.to_s) %>
81 </h4>
82 <span class="fst-italic fw-light">
83 <%= t("song_updated_at", date: gending.updated_at.strftime("%B %-d, %Y")) %>
84 </span>
85 <%= link_to t("see_gending_detail"),
86 javanese_gending_detail_path("gending-notation-" + gending.name.downcase.parameterize + "-" + gending.id.to_s),
87 class: "badge rounded-pill bg-warning float-end" %>
88
89 <% end %>
90 </aside>
91 </div>
92 </div>
93 <%= render "shared/partial_breadcrumbs" do %>
94 <li class="breadcrumb-item"><%= link_to t("nav_javanese_gamelan"), javanese_gamelan_path %></li>
95 <% end %>