From 6ab3d7e33e7b09158b2ccda67c9124e4471a3425 Mon Sep 17 00:00:00 2001 From: pdp8 Date: Mon, 29 Jul 2024 16:11:54 +0200 Subject: section, footer instead of divs --- climbing.rb | 4 ++-- file.rb | 4 ++-- html/style.css | 8 ++------ html/tail.html | 4 ++-- lib.rb | 11 ----------- music.rb | 4 ++-- pictures.rb | 5 ++--- videos.rb | 4 ++-- 8 files changed, 14 insertions(+), 30 deletions(-) diff --git a/climbing.rb b/climbing.rb index c016bfa..7360601 100755 --- a/climbing.rb +++ b/climbing.rb @@ -6,7 +6,7 @@ html = File.read(File.join(SNIPPETS, 'head.html')) html += nav 'climbing' climbing.each do |dir| date = File.basename(dir) - html += "
" + html += "
" html += "

#{date}

" mp4 = Dir[File.join(dir, '*.mp4')].first.sub(MEDIA_DIR, MEDIA_URL) webm = Dir[File.join(dir, '*.webm')].first.sub(MEDIA_DIR, MEDIA_URL) @@ -18,7 +18,7 @@ climbing.each do |dir|

" html += File.read(File.join(dir, 'README')) - html += '

' + html += '' end html += File.read(File.join(SNIPPETS, 'tail.html')) print_html 'climbing', html diff --git a/file.rb b/file.rb index d9bfe78..06c53f9 100755 --- a/file.rb +++ b/file.rb @@ -5,8 +5,8 @@ path = ARGV[0] basename = File.basename(path, File.extname(path)) html = File.read(File.join(SNIPPETS, 'head.html')) html += nav basename -html += "
" +html += '
' html += File.read(path) -html += '
' +html += '' html += File.read(File.join(SNIPPETS, 'tail.html')) print_html basename, html diff --git a/html/style.css b/html/style.css index 7cce6d1..88449c4 100644 --- a/html/style.css +++ b/html/style.css @@ -90,8 +90,8 @@ iframe { border: none; } -.post { - /* margin: 1em 2em; */ +footer { + margin-top: 3em } .gallery { @@ -127,7 +127,3 @@ iframe { font-weight: bold; font-size: 3em; } - -.license { - margin-top: 3em -} \ No newline at end of file diff --git a/html/tail.html b/html/tail.html index 3da431f..4e86184 100644 --- a/html/tail.html +++ b/html/tail.html @@ -1,4 +1,4 @@ -
+
+ \ No newline at end of file diff --git a/lib.rb b/lib.rb index 77f350b..42ec515 100755 --- a/lib.rb +++ b/lib.rb @@ -42,17 +42,6 @@ def nav(cat) html end -def file_html(basename) - path = File.join(SNIPPETS, basename + '.html') - html = File.read(File.join(SNIPPETS, 'head.html')) - html += nav basename - html += "
" - html += File.read(path) - html += '
' - html += File.read(File.join(SNIPPETS, 'tail.html')) - print_html basename, html -end - def print_html(basename, html) out = File.join(WWW_DIR, basename + '.html') puts out diff --git a/music.rb b/music.rb index c01faf8..de6a7ed 100755 --- a/music.rb +++ b/music.rb @@ -7,7 +7,7 @@ html = File.read(File.join(SNIPPETS, 'head.html')) html += nav 'music' music.each do |dir| date = File.basename(dir).split('_')[0] - html += "
" + html += "
" title = File.basename(dir).split('_')[1..-1].join(' ') html += "

#{title}

" html += File.read(File.join(dir, 'README')).chomp.gsub("\n\n", '

').gsub("\n", '
') # + '

' @@ -40,7 +40,7 @@ music.each do |dir| "https://pdp8.bandcamp.com/album/#{title.gsub(' ', '-')}" end html += "

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

' + html += '' end html += File.read(File.join(SNIPPETS, 'tail.html')) print_html 'music', html diff --git a/pictures.rb b/pictures.rb index 246b0c5..252ca31 100755 --- a/pictures.rb +++ b/pictures.rb @@ -38,7 +38,6 @@ albums.each do |album| before = meta(images[(i - 1) % n], album)[:href] after = meta(images[(i + 1) % n], album)[:href] meta = meta img, album - html = File.read(File.join(SNIPPETS, 'head.html')) html += nav 'pictures' html += "
" @@ -65,7 +64,7 @@ albums.each do |album| FileUtils.mkdir_p www_dir images = File.readlines(album, chomp: true) n = images.size - html += "
" + html += "
" html += "

#{File.basename(album).gsub('_', ' ')}

\n" html += "' - html += '
' + html += '' end html += File.read(File.join(SNIPPETS, 'tail.html')) print_html 'pictures', html diff --git a/videos.rb b/videos.rb index 2dd37d7..d2c291e 100755 --- a/videos.rb +++ b/videos.rb @@ -7,7 +7,7 @@ html = File.read(File.join(SNIPPETS, 'head.html')) html += nav 'videos' videos.each_with_index do |dir, _i| date = File.basename(dir).split('_')[0] - html += "
" + html += "
" title = File.basename(dir).split('_')[1..-1].join(' ') html += "

#{title}

" txt = File.read(File.join(dir, 'README')) @@ -25,7 +25,7 @@ videos.each_with_index do |dir, _i|

" html += lines.join('
') - html += '

' + html += '' end html += File.read(File.join(SNIPPETS, 'tail.html')) print_html 'videos', html -- cgit v1.2.3