m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/templates/song.html.erb
blob: 5c8ef819f2d2463bba27a3e6433e9451cfaa88f3 (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: auto;'>
  <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 -%>