summary refs log tree commit diff
diff options
context:
space:
mode:
authorpdp8 <pdp8@pdp8.info>2022-08-26 13:54:38 +0200
committerpdp8 <pdp8@pdp8.info>2022-08-26 13:54:38 +0200
commit85c6172481beb92b17c89e7c1dfbac4c5b8b3310 (patch)
tree7355fb9b3fbc60110304d466d758091ff3460a63
parentd684a873fce8ed3e19d514839afbf831162c2ed8 (diff)
ForkAwesome reintroduced to fix compatibility of media buttons
-rwxr-xr-xhtml.rb8
-rw-r--r--snippets/head.html1
-rw-r--r--snippets/pictures.html8
-rw-r--r--snippets/slideshow.js4
-rw-r--r--snippets/style.css2
5 files changed, 12 insertions, 11 deletions
diff --git a/html.rb b/html.rb
index c4a7a5d..5ab6dae 100755
--- a/html.rb
+++ b/html.rb
@@ -50,13 +50,13 @@ def music_html
     Dir[File.join(dir, "*mp3")].each do |mp3|
       mp3 = "/" + mp3.sub(ROOT, '')
       html += "<tr>"
-      html += "<td>#{File.basename(mp3, '.mp3')}</td>"
       html += "<td>
         <audio controls>
         <source src='#{mp3}' type='audio/mpeg'>
         </audio>
-        </td>
-        </tr>"
+        </td>"
+      html += "<td>#{File.basename(mp3, '.mp3')[3..-1]}</td>"
+      html += "</tr>"
     end
     html += "</table>"
     bc = "https://pdp8.bandcamp.com/#{title.gsub(' ', '-')}"
@@ -96,7 +96,7 @@ def video_html
     html += "</div>"
     html += "<hr>"
   end
-  html += '<p>&copy; pdp8 <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>'
+  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 "videos", html
 end
diff --git a/snippets/head.html b/snippets/head.html
index daf67fa..78f38da 100644
--- a/snippets/head.html
+++ b/snippets/head.html
@@ -6,6 +6,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0">
     <title>pdp8</title>
+    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fork-awesome@1.2.0/css/fork-awesome.min.css" integrity="sha256-XoaMnoYC5TH6/+ihMEnospgm0J1PM/nioxbOUdnM8HY=" crossorigin="anonymous">
     <link rel="stylesheet" type="text/css" href="/style.css">
     <link rel="icon" type="image/png" href="/pdp8.png">
     <link rel="alternate" type="application/rss+xml" title="pdp8 rss feed" href="https://pdp8.info/rss.xml">
diff --git a/snippets/pictures.html b/snippets/pictures.html
index ae61260..359de8d 100644
--- a/snippets/pictures.html
+++ b/snippets/pictures.html
@@ -4,13 +4,13 @@
 <img id="image" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNgYAAAAAMAASsJTYQAAAAASUVORK5CYII=" alt/>
 
 <div id="controller">
-  <a class="btn" onclick="toggle_play()"><span id="play-indicator" title="Pause slideshow">&#x23F8;</span></a>
-  <a class="btn" onclick="new_selection()"><span title="Next slideshow">&#x23E9;&#xfe0e;</span></a>
+  <a class="btn" onclick="toggle_play()"><i id="play-indicator" title="Pause slideshow" class="fa fa-pause" aria-hidden="true"></i></a>
+  <a class="btn" onclick="new_selection()"><i id="shuffle-indicator" title="Next slideshow" class="fa fa-random" aria-hidden="true"></i></a>
   <p>&copy; pdp8 <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>
 </div>
 
-<a id="prev" onclick="prev()">&#10094;</a>
-<a id="next" onclick="next()">&#10095;</a>
+<a id="prev" onclick="prev()">&lsaquo;</a>
+<a id="next" onclick="next()">&rsaquo;</a>
 
 <script> 
   (function() { new_selection(); play() })();
diff --git a/snippets/slideshow.js b/snippets/slideshow.js
index 4ed2ef8..23d7c3e 100644
--- a/snippets/slideshow.js
+++ b/snippets/slideshow.js
@@ -52,7 +52,7 @@ function play() {
   playing = 1
   interval = setInterval(function () { next() }, 3000);
   document.getElementById("play-indicator").title = "Pause slideshow"
-  document.getElementById("play-indicator").innerText = "\u23F8"
+  document.getElementById("play-indicator").className = "fa fa-pause"
   hide_controls()
 }
 
@@ -60,7 +60,7 @@ function stop() {
   playing = 0
   clearInterval(interval)
   document.getElementById("play-indicator").title = "Play slideshow"
-  document.getElementById("play-indicator").innerText = "\u23F5"
+  document.getElementById("play-indicator").className = "fa fa-play"
   show_controls()
 }
 
diff --git a/snippets/style.css b/snippets/style.css
index 6dcd519..63fdb65 100644
--- a/snippets/style.css
+++ b/snippets/style.css
@@ -43,7 +43,7 @@ nav a:hover { color: #fff; }
   }
 }
 
-.post { padding: 2em; }
+.post { padding: 1em; }
 
 img, video {
   max-width: 100%;