From d987641d7b68fcfa8431b1835411bb1095a37961 Mon Sep 17 00:00:00 2001 From: pdp8 Date: Sun, 28 Jul 2024 09:44:00 +0200 Subject: image albums, flex layout --- music.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'music.rb') diff --git a/music.rb b/music.rb index e86e0c5..c63f17d 100755 --- a/music.rb +++ b/music.rb @@ -5,10 +5,9 @@ require_relative 'lib' music = Dir[File.join(MEDIA_DIR, 'music', '20*')].sort.reverse html = File.read(File.join(SNIPPETS, 'head.html')) html += nav 'music' -html += '
← prev | - faircamp webring | - random | - next →
' +html += '
+faircamp webring:   +← prev | random | next →
' music.each do |dir| date = File.basename(dir).split('_')[0] html += "
" @@ -22,7 +21,7 @@ music.each do |dir| html += '' copyrights_file = File.join(dir, 'copyrights') copyrights = File.readlines(copyrights_file).collect { |l| l.chomp } if File.exist? copyrights_file - Dir[File.join(dir, '*mp3')].each_with_index do |mp3, _i| + Dir[File.join(dir, '*mp3')].each do |mp3| mp3 = File.join(MEDIA_URL, mp3.sub(MEDIA_DIR, '')) name = File.basename(mp3, '.mp3')[3..-1].gsub('_', ' ') html += '' @@ -46,6 +45,5 @@ music.each do |dir| html += "

Bandcamp: #{bc}" html += '' end -html += '

© pdp8 Creative Commons Attribution 4.0 International License' html += File.read(File.join(SNIPPETS, 'tail.html')) print_html 'music', html -- cgit v1.2.3