feature/share-libs
erb 113 lines 3.49 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="<%= @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": "<%= song_url %>",
25 "name": "<%= t("nav_songs") %>"
26 }
27 },{
28 "@type": "ListItem",
29 "position": 4,
30 "item": {
31 "@id": "<%= song_bridge_url %>",
32 "name": "<%= @song.name %>"
33 }
34 }]
35 }
36 </script>
37 <% end %>
38 <main>
39 <div class="row mb-3">
40 <div class="col-sm-3">
41 <div class="position-sticky" style="top: 1rem;">
42 <div class="text-center mt-4 mb-4">
43 <% if @song.image_url %>
44 <%= image_tag(
45 @song.image_url,
46 alt:"#{@song.name}",
47 size: "300x300",
48 class: "img-thumbnail img-fluid"
49 ) %>
50 <% else %>
51 <%= image_pack_tag(
52 "image-placeholder-#{rand(0...3)}.jpg",
53 alt:"#{@song.name} image",
54 size: "300x300",
55 class: "img-thumbnail img-fluid"
56 ) %>
57 <% end %>
58 <div class="provider-links mb-3">
59 <%= link_to(
60 "<i class='bi bi-#{@song.provider_type.to_s}' style='font-size: 2rem; color: blue;'></i>".html_safe,
61 @song.provider_url,
62 style: "padding: 0px",
63 target: '__blank'
64 ) %>
65 </div>
66 <% if @song.youtube? %>
67 <div class="mb-3">
68 <%= link_to(
69 "<i class='bi bi-arrow-down-up'></i>".html_safe,
70 @sf_link,
71 class: 'btn btn-primary btn-lg px-4',
72 title: 'Votes on SplitFire AI',
73 target: '__blank'
74 ) %>
75 </div>
76 <% end %>
77 <div class="song-albums">
78 <% @song_in_albums.each do |song| %>
79 <div>
80 <%= link_to(
81 song.name,
82 song.path
83 ) %>
84 </div>
85 <% end %>
86 </div>
87 </div>
88 </div>
89 </div>
90 <div class="col-sm-9">
91 <h1 class=""><%= @page_title %></h1>
92 <%= render('shared/flash_message', object: flash) %>
93 <div class="chords mt-5">
94 <% if @song.chord.present? %>
95 <h2>
96 <%= link_to(
97 t('song_chords_page_title', song_name: @song.name),
98 @song.chord.path
99 ) %>
100 </h2>
101 <% else %>
102 <div class="mb-3 mt-3">
103 <%= link_to('Share chord!', guitar_chord_add_path, class: 'btn btn-primary btn-lg px-4') %>
104 </div>
105 <% end %>
106 </div>
107 </div>
108 </div>
109 <%= render 'shared/partial_breadcrumbs' do %>
110 <li class="breadcrumb-item"><%= link_to t("nav_songs"), song_path %></li>
111 <li class="breadcrumb-item"><%= link_to @song.name, song_detail_path %></li>
112 <% end %>
113 </main>