feature/share-libs
erb 75 lines 2.54 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-12">
33 <h2><%= @page.title if @page %></h2>
34 <div class="lead">
35 <%= raw @page.page_content if @page %>
36 </div>
37 </div>
38 </div>
39 <div class="row">
40 <div class="col-12">
41 <table class="table table-striped">
42 <thead>
43 <tr>
44 <th scope="col">#</th>
45 <th scope="col"><%= t("gending_name") %></th>
46 <th scope="col"></th>
47 <th scope="col"><%= t("added_by") %></th>
48 </tr>
49 </thead>
50 <tbody>
51 <% @gendings.each_with_index do |gending, index| %>
52 <tr>
53 <th scope="row"><%= @gendings.offset + index + 1 %></th>
54 <td>
55 <%= image_pack_tag("image-placeholder-#{rand(0...3)}.jpg", alt:"#{gending.name} cover image.", style:"width:100px;height:100px;", class: 'img-thumbnail rounded-circle mx-auto d-block') %>
56 </td>
57 <td>
58 <%= link_to gending.name, javanese_gending_detail_path("gending-notation-" + gending.slug) %>
59 <% if gending.users.count > 0 %>
60 <%= render('partial_like_this', users: gending.users) %>
61 <% end %>
62 </td>
63 <td>
64 <%= link_to("@#{gending.user_or_nowhereman.username_or_name}", profile_path(gending.user_or_nowhereman.username_or_id), title: "@#{gending.user_or_nowhereman.username_or_name}") %>
65 </td>
66 </tr>
67 <% end %>
68 </tbody>
69 </table>
70 <%= will_paginate @gendings, class: 'flickr_pagination' %>
71 </div>
72 </div>
73 <%= render "shared/partial_breadcrumbs" do %>
74 <li class="breadcrumb-item"><%= link_to t("nav_javanese_gamelan"), javanese_gamelan_path %></li>
75 <% end %>