diff options
author | Marcin Chrzanowski <m@m-chrzan.xyz> | 2021-09-12 14:38:07 +0200 |
---|---|---|
committer | Marcin Chrzanowski <m@m-chrzan.xyz> | 2021-09-12 14:38:07 +0200 |
commit | 7994abe07c61df326223171c3e9b036d11275664 (patch) | |
tree | 4d224b36eb34e789dd061bab6d569a2daf929146 /templates/song.html.erb | |
parent | 9b33a8e5ae5048ff459c01e01cf27ff664a4b1a7 (diff) |
Add templates
Diffstat (limited to 'templates/song.html.erb')
-rw-r--r-- | templates/song.html.erb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/templates/song.html.erb b/templates/song.html.erb new file mode 100644 index 0000000..2c4164f --- /dev/null +++ b/templates/song.html.erb @@ -0,0 +1,23 @@ +<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)) -%> +<img src='<%= path_to (song_svg song.id) %>' /> +<%- end -%> + +<%- if !song.recordings.empty? -%> +<h3>Nagrania</h3> +<%- song.recordings.each do |recording| -%> +<p> +<%= recording.render -%> +</p> +<%- end -%> +<%- end -%> |