m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/templates/song.html.erb
blob: 71a77bc5a2b1f7671f649f878d6e64327eea037e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<h2><%= song.title -%></h2>
<a href='<%= path_to (song_pdf song.id) %>'>[PDF]</a>

<% song.split_lyrics.each do |paragraph| -%>
<p>
  <%- paragraph.each do |line| -%>
  <%= line %> <br />
  <%- end -%>
</p>
<%- end -%>

<%- if File.file?(src (song_ly song.id)) -%>
<div style='overflow: scroll;'>
  <img src='<%= path_to (song_svg song.id) %>' />
</div>
<%- end -%>

<%- if !song.recordings.empty? -%>
<h3>Nagrania</h3>
<%- song.recordings.each do |recording| -%>
<p>
<%= recording.render -%>
</p>
<%- end -%>
<%- end -%>