feature/share-libs
erb 110 lines 3.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="<%= @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": "<%= request.base_url %>",
18 "name": "Musik 88"
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": "<%= artist_detail_url %>",
32 "name": "<%= @artist.name %>"
33 }
34 }]
35 }
36 </script>
37 <% end %>
38 <main>
39 <div class="row g-5">
40 <div class="col-md-12">
41 <h1><%= @page_title %></h1>
42 <%= render('shared/flash_message', object: flash) %>
43 </div>
44 </div>
45 <div class="row g-5">
46 <div class="col-sm-3">
47 <div class="position-sticky" style="top: 1rem;">
48 <div class="text-center mt-4 mb-4">
49 <%= image_pack_tag(
50 "image-placeholder-#{rand(0...3)}.jpg",
51 alt:"#{@artist.name} image",
52 class: "img-thumbnail rounded-circle"
53 ) %>
54 </div>
55 <%= render('partial_meta', id: @artist.id, users: @artist.users, author: @artist.user, counter: @artist.views_count) %>
56 </div>
57 </div>
58 <div class="col-sm-9">
59 <div class="row mb-3">
60 <div class="col-md-12">
61 <%= raw @artist.description %>
62 </div>
63 </div>
64 <div class="row">
65 <div class="col-md-12">
66 <h2><%= @page_title_album %></h1>
67 <% @albums.each_with_index do |album, index| %>
68 <%= render('partial_album_row', album: album, index: index) %>
69 <% end %>
70 </div>
71 </div>
72 <% if !@albums_contribute_to.blank? %>
73 <div class="row">
74 <div class="col-md-12">
75 <h2><%= @page_title_album_contribute_to %></h1>
76 <% @albums_contribute_to.each_with_index do |album, index| %>
77 <%= render('partial_album_row', album: album, index: index) %>
78 <% end %>
79 </div>
80 </div>
81 <% end %>
82 <div class="row mt-3">
83 <h3 id="discussion"><%= t('discussion') %></h3>
84 <%= render "shared/flash_message", object: flash %>
85 <div class="mb-3">
86 <%= form_for [@artist, Comment.new] do |f| %>
87 <%= f.text_area :body, placeholder: t('discussion_comment_placeholder'), rows: "4" , cols: "50%" %><br/>
88 <%= f.hidden_field :user_id, value: current_user.id if user_signed_in? %>
89 <%= f.submit t('discussion_comment_button'), class: "btn btn-primary" %>
90 <% end %>
91 </div>
92 <%= render(partial: 'comments/comment', collection: @artist.comments) %>
93 </div>
94 </div>
95 </div>
96 <%= render 'shared/partial_breadcrumbs' do %>
97 <li class="breadcrumb-item">
98 <%= link_to(
99 t("nav_artists"),
100 artist_path
101 ) %>
102 </li>
103 <li class="breadcrumb-item">
104 <%= link_to(
105 @artist.name,
106 artist_detail_path(artist_friendly_url(@artist))
107 ) %>
108 </li>
109 <% end %>
110 </main>