summaryrefslogtreecommitdiff
path: root/climbing.rb
diff options
context:
space:
mode:
authorpdp8 <pdp8@pdp8.info>2024-07-28 09:44:00 +0200
committerpdp8 <pdp8@pdp8.info>2024-07-28 09:44:00 +0200
commitd987641d7b68fcfa8431b1835411bb1095a37961 (patch)
tree3fbc5e18a16ea0003adace63b1bdb0ea7521f1e7 /climbing.rb
parentd13dc919f9fe0e14e8b58ec2e6ce727a6bbc1621 (diff)
image albums, flex layout
Diffstat (limited to 'climbing.rb')
-rwxr-xr-xclimbing.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/climbing.rb b/climbing.rb
index 6705aba..139925d 100755
--- a/climbing.rb
+++ b/climbing.rb
@@ -11,10 +11,9 @@ Dir[File.join(MEDIA_DIR, 'climbing', '*.txt')].collect do |txt|
webm: txt.sub(MEDIA_DIR, MEDIA_URL).sub('.txt', '.webm'),
webp: txt.sub(MEDIA_DIR, MEDIA_URL).sub('.txt', '.webp') }
end.sort_by { |m| m[:date] }.reverse.each do |post|
- w, h = `ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=p=0 #{post[:webm]}`.chomp.split(',')
html += '<div class="post">'
html += "<h1>#{post[:date]}</h1>"
- html += "<video controls preload='none' width='#{w}' height='#{h}' poster=#{post[:webp]}>
+ html += "<video controls preload='none' poster=#{post[:webp]}>
<source src='#{post[:webm]}' type='video/webm'>
<source src='#{post[:mp4]}' type='video/mp4'>
<a href=#{post[:mp4]}>#{post[:mp4]}</a>
@@ -23,6 +22,5 @@ end.sort_by { |m| m[:date] }.reverse.each do |post|
html += post[:text]
html += '</div>'
end
-html += '<p>&nbsp;&copy; pdp8 <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>'
html += File.read(File.join(SNIPPETS, 'tail.html'))
print_html 'climbing', html