summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpdp8 <pdp8@pdp8.info>2024-07-29 16:11:54 +0200
committerpdp8 <pdp8@pdp8.info>2024-07-29 16:11:54 +0200
commit6ab3d7e33e7b09158b2ccda67c9124e4471a3425 (patch)
tree3891e587d0d20be1e55ee4a055b672aa10407b39
parentcd53a2fe5fc8baf9750fbd2d9b0b4c855d8694a7 (diff)
section, footer instead of divs
-rwxr-xr-xclimbing.rb4
-rwxr-xr-xfile.rb4
-rw-r--r--html/style.css8
-rw-r--r--html/tail.html4
-rwxr-xr-xlib.rb11
-rwxr-xr-xmusic.rb4
-rwxr-xr-xpictures.rb5
-rwxr-xr-xvideos.rb4
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
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 += "<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'>&copy;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
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 += "<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
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 += "<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
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 += "<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