| 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="<%= @meta_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": "<%= artist_url %>", |
| 25 | "name": "<%= t("nav_artists") %>" |
| 26 | } |
| 27 | },{ |
| 28 | "@type": "ListItem", |
| 29 | "position": 3, |
| 30 | "item": { |
| 31 | "@id": "<%= request.base_url %>/artis/<%= @song.album.artists[0].name.downcase.parameterize %>-<%= @song.album.artists[0].id %>", |
| 32 | "name": "<%= @song.album.artists[0].name %>" |
| 33 | } |
| 34 | },{ |
| 35 | "@type": "ListItem", |
| 36 | "position": 4, |
| 37 | "item": { |
| 38 | "@id": "<%= request.base_url %>/album/<%= @song.album.name.downcase.parameterize + '-' + @song.album.artists[0].name.downcase.parameterize %>-<%= @song.album.id %>", |
| 39 | "name": "<%= @song.album.name %>" |
| 40 | } |
| 41 | },{ |
| 42 | "@type": "ListItem", |
| 43 | "position": 5, |
| 44 | "item": { |
| 45 | "@id": "<%= request.url %>", |
| 46 | "name": "<%= @song.name %>" |
| 47 | } |
| 48 | }] |
| 49 | } |
| 50 | </script> |
| 51 | <% end %> |
| 52 | <main> |
| 53 | <div class="row g-5"> |
| 54 | <div class="col-md-12"> |
| 55 | <h1><%= @page_title %></h1> |
| 56 | </div> |
| 57 | </div> |
| 58 | <div class="row g-5"> |
| 59 | <div class="col-sm-1"> |
| 60 | <div class="position-sticky" style="top: 1rem;"> |
| 61 | <div class="text-center mt-3"> |
| 62 | <% if user_signed_in? && @song.users.include?(current_user) %> |
| 63 | <%= link_to( |
| 64 | '<i class="bi bi-heart-fill"></i>'.html_safe, |
| 65 | song_chord_pleas_unloved_path(id: @song.id), |
| 66 | remote: true, |
| 67 | method: :delete, |
| 68 | :id => "ajax_trigger" |
| 69 | ) |
| 70 | %> |
| 71 | <% else %> |
| 72 | <%= link_to( |
| 73 | '<i class="bi bi-heart"></i>'.html_safe, |
| 74 | song_chord_pleas_loved_path(id: @song.id), |
| 75 | remote: true, |
| 76 | method: :post, |
| 77 | :id => "ajax_trigger" |
| 78 | ) |
| 79 | %> |
| 80 | <% end %> |
| 81 | <span class="badge rounded-pill bg-warning text-dark"><%= @song.users.count %></span> |
| 82 | </div> |
| 83 | <div class="text-center mt-4"> |
| 84 | <i class="bi bi-graph-up-arrow"></i> |
| 85 | <span class="badge rounded-pill bg-warning text-dark"><%= @song.views_count %></span> |
| 86 | </div> |
| 87 | </div> |
| 88 | </div> |
| 89 | <div class="col-sm-9"> |
| 90 | <%= render('shared/partial_meta_top', author: @author, created_at: @song.created_at) %> |
| 91 | <h2 class="mb-2 mt-5">SplitFire AI</h2> |
| 92 | <div class=""> |
| 93 | <div> |
| 94 | We moved all the audio stuff to the <a href="https://splitfire.ai/" target="__target">SplitFire AI</a> app. |
| 95 | </div> |
| 96 | </div> |
| 97 | <%= render "shared/flash_message", object: flash %> |
| 98 | <div class="mb-3 mt-3"> |
| 99 | <%= form_for [@song, Comment.new] do |f| %> |
| 100 | <%= f.text_area :body, placeholder: "Add a comment", rows: "4" , cols: "50%" %><br/> |
| 101 | <%= f.hidden_field :user_id, value: current_user.id if user_signed_in? %> |
| 102 | <%= f.submit "Add Comment", class: "btn btn-primary" %> |
| 103 | <% end %> |
| 104 | </div> |
| 105 | <%= render(partial: 'comments/comment', collection: @song.comments) %> |
| 106 | </div> |
| 107 | <div class="col-sm-2"> |
| 108 | <%= render('partial_menus_aside', active_menu: 'audio') %> |
| 109 | </div> |
| 110 | </div> |
| 111 | <%= render "shared/partial_breadcrumbs" do %> |
| 112 | <li class="breadcrumb-item"><%= link_to t("nav_artists"), artist_url %></li> |
| 113 | <li class="breadcrumb-item"><%= link_to @song.album.artists[0].name, artist_detail_url(@song.album.artists[0].name.downcase.parameterize + "-" + @song.album.artists[0].id.to_s) %></li> |
| 114 | <li class="breadcrumb-item"><%= link_to @song.album.name, album_detail_url(@song.album.name.downcase.parameterize + '-' + @song.album.artists[0].name.downcase.parameterize + "-" + @song.album.id.to_s) %></li> |
| 115 | <li class="breadcrumb-item"><%= link_to @song.name, song_detail_path(@song.slug) %></li> |
| 116 | <% end %> |
| 117 | </main> |