diff options
-rwxr-xr-x | climbing.rb | 4 | ||||
-rwxr-xr-x | file.rb | 4 | ||||
-rw-r--r-- | html/style.css | 8 | ||||
-rw-r--r-- | html/tail.html | 4 | ||||
-rwxr-xr-x | lib.rb | 11 | ||||
-rwxr-xr-x | music.rb | 4 | ||||
-rwxr-xr-x | pictures.rb | 5 | ||||
-rwxr-xr-x | 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 += "<div class='post' id='#{date}'>" + html += "<section id='#{date}'>" html += "<h1>#{date}</h1>" 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| </video><p> " html += File.read(File.join(dir, 'README')) - html += '</div>' + html += '</section>' end html += File.read(File.join(SNIPPETS, 'tail.html')) print_html 'climbing', html @@ -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 += "<div class='post'>" +html += '<section>' html += File.read(path) -html += '</div>' +html += '</section>' 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 @@ -<div class='license'> +<footer> <a href='mailto:info@pdp8.info'>©pdp8</a> <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a> @@ -6,7 +6,7 @@ no tracking, cookies, javascript, or server-side scripting. source code: <a href='https://git.pdp8.info/pdp8.info/tree/'>https://git.pdp8.info/pdp8.info/tree/</a> </p> -</div> +</footer> </body> </html>
\ No newline at end of file @@ -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 += "<div class='post'>" - html += File.read(path) - html += '</div>' - 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 @@ -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 += "<div class='post' id='#{date}'>" + html += "<section id='#{date}'>" title = File.basename(dir).split('_')[1..-1].join(' ') html += "<h1>#{title}</h1>" html += File.read(File.join(dir, 'README')).chomp.gsub("\n\n", '<p>').gsub("\n", '<br>') # + '<p>' @@ -40,7 +40,7 @@ music.each do |dir| "https://pdp8.bandcamp.com/album/#{title.gsub(' ', '-')}" end html += "<p>Bandcamp: <a href='#{bc}'>#{bc}</a>" - html += '</div>' + html += '</section>' 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 += "<div class='slide'>" @@ -65,7 +64,7 @@ albums.each do |album| FileUtils.mkdir_p www_dir images = File.readlines(album, chomp: true) n = images.size - html += "<div class='post' id='#{File.basename album}'>" + html += "<section id='#{File.basename album}'>" html += "<h1><a href='#{meta(images.first, album)[:href]}'>#{File.basename(album).gsub('_', ' ')}</a></h1>\n" html += "<div class='gallery'>" @@ -76,7 +75,7 @@ albums.each do |album| html += "src='#{meta[:thumb]}'></a>" end html += '</div>' - html += '</div>' + html += '</section>' end html += File.read(File.join(SNIPPETS, 'tail.html')) print_html 'pictures', html @@ -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 += "<div class='post' id='#{date}'>" + html += "<section id='#{date}'>" title = File.basename(dir).split('_')[1..-1].join(' ') html += "<h1>#{title}</h1>" txt = File.read(File.join(dir, 'README')) @@ -25,7 +25,7 @@ videos.each_with_index do |dir, _i| </video><p> " html += lines.join('<br>') - html += '</div>' + html += '</section>' end html += File.read(File.join(SNIPPETS, 'tail.html')) print_html 'videos', html |