| 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="<%= guitar_chords_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": "<%= guitar_chords_url %>", |
| 25 | "name": "<%= t("nav_chords") %>" |
| 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> |
| 37 | <% @chords.each_with_index do |chord, index| %> |
| 38 | <% if (index == 0 || index % 2 == 0) %> |
| 39 | <div class="row content-row mb-3"> |
| 40 | <% end %> |
| 41 | <div class="col-md-6"> |
| 42 | <section class="featured-post"> |
| 43 | <a class="itext-center" href="<%= guitar_chord_detail_path(chord.slug) %>"> |
| 44 | <%= image_pack_tag("image-placeholder-#{rand(0...3)}.jpg", alt:"#{t('guitar_chord')} #{chord.link_title}", class:"img-thumbnail rounded mx-auto d-block") %> |
| 45 | <span class="image-details"></span> |
| 46 | </a> |
| 47 | <h2> |
| 48 | <%= link_to t('guitar_chord_link', slug: chord.link_title), |
| 49 | guitar_chord_detail_path(chord.slug) %> |
| 50 | </h2> |
| 51 | <div class="bluebox-info-line"> |
| 52 | <span class="fst-italic fw-light"> |
| 53 | <%= chord.updated_at.strftime("%B %-d, %Y") %> |
| 54 | </span> |
| 55 | <%= link_to( |
| 56 | t("see_chord_detail"), |
| 57 | guitar_chord_detail_path(chord.slug), |
| 58 | class: 'badge rounded-pill bg-warning float-end' |
| 59 | ) %> |
| 60 | </div> |
| 61 | </section> |
| 62 | </div> |
| 63 | <% if (index == @chords.size - 1 || (index != 0 && index % 2 != 0)) %> |
| 64 | </div> |
| 65 | <% end %> |
| 66 | <% end %> |
| 67 | <%= will_paginate @chords %> |
| 68 | </div> |
| 69 | <div class="col-md-4"> |
| 70 | <aside> |
| 71 | <div class="bluebox-heading"> |
| 72 | <h2><%= t("top_10_guitar_chords")%></h2> |
| 73 | </div> |
| 74 | <div class="events-list widget-wrap"> |
| 75 | <% @trending_chords.each_with_index do |chord, index| %> |
| 76 | <section class="mt-5"> |
| 77 | <div class="details"> |
| 78 | <h4> |
| 79 | <%= link_to( |
| 80 | "#{index + 1}. #{t('guitar_chord_link', slug: chord.link_title)}", |
| 81 | guitar_chord_detail_path(chord.slug) |
| 82 | ) %> |
| 83 | </h4> |
| 84 | <%= link_to t("see_chord_detail"), |
| 85 | guitar_chord_detail_path(chord.slug), |
| 86 | class: "badge rounded-pill bg-warning" %> |
| 87 | <span class="fst-italic fw-light float-end"> |
| 88 | <%= chord.updated_at.strftime("%B %-d, %Y") %> |
| 89 | </span> |
| 90 | </div> |
| 91 | </section> |
| 92 | <% end %> |
| 93 | </div> |
| 94 | </aside> |
| 95 | </div> |
| 96 | </div> |
| 97 | <%= render "shared/partial_breadcrumbs" do %> |
| 98 | <li class="breadcrumb-item"><%= link_to t("nav_chords"), guitar_chords_path %></li> |
| 99 | <% end %> |