summaryrefslogtreecommitdiff
path: root/html
diff options
context:
space:
mode:
authorpdp8 <pdp8@pdp8.info>2024-01-30 23:46:06 +0100
committerpdp8 <pdp8@pdp8.info>2024-01-30 23:46:06 +0100
commit6cb7fdb0588d0acb5d589cdb45ea3fe13f8a807c (patch)
tree87a7b606f18b2af5b422a1b9b369dff9c3382f6a /html
parentbad322d279c18fdab6e116b1edef35c240a84553 (diff)
dark theme, lazy img/media loading, climbing integrated, IA links
Diffstat (limited to 'html')
-rw-r--r--html/pictures.html8
-rw-r--r--html/slideshow.js4
-rw-r--r--html/style.css83
3 files changed, 68 insertions, 27 deletions
diff --git a/html/pictures.html b/html/pictures.html
index 25bf1c2..e733266 100644
--- a/html/pictures.html
+++ b/html/pictures.html
@@ -1,15 +1,15 @@
<script src="https://media.pdp8.info/pictures/distances.js"></script>
<script src="/slideshow.js"></script>
-<img id="image"
+<img id="image" width="1024" height="768"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNgYAAAAAMAASsJTYQAAAAASUVORK5CYII="
alt />
<div id="controller">
- <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"
+ <a class="btn" onclick="toggle_play()"><i id="play-indicator" title="Pause slideshow" class="fa fa-inverse fa-pause"
aria-hidden="true"></i></a>
+ <a class="btn" onclick="new_selection()"><i id="shuffle-indicator" title="Next slideshow"
+ class="fa fa-inverse 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>
diff --git a/html/slideshow.js b/html/slideshow.js
index ea265e4..48a5395 100644
--- a/html/slideshow.js
+++ b/html/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").className = "fa fa-pause"
+ document.getElementById("play-indicator").className = "fa fa-inverse 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").className = "fa fa-play"
+ document.getElementById("play-indicator").className = "fa fa-inverse fa-play"
show_controls()
}
diff --git a/html/style.css b/html/style.css
index 63fdb65..1c8bf59 100644
--- a/html/style.css
+++ b/html/style.css
@@ -1,12 +1,12 @@
body {
+ background-color: black;
+ color: #eee;
width: 100vw;
margin: 0;
font-family: sans-serif;
}
nav {
- background: #000;
- color: #fff;
padding: 0.75em 0 1em 0;
}
@@ -21,13 +21,21 @@ nav img {
vertical-align: bottom;
}
-nav #logo img { height: 2em; }
+nav #logo img {
+ height: 2em;
+}
-nav .current { color: #fff; }
+nav .current {
+ color: white;
+}
-nav #menu { display:none; }
+nav #menu {
+ display: none;
+}
-nav a:hover { color: #fff; }
+nav a:hover {
+ color: white;
+}
@media screen and (max-width: 600px) {
nav .item {
@@ -43,16 +51,32 @@ nav a:hover { color: #fff; }
}
}
-.post { padding: 1em; }
+.post {
+ padding: 1em;
+}
-img, video {
- max-width: 100%;
+img,
+video {
max-height: 80vh;
+ max-width: 80vw;
+ object-fit: contain;
display: block;
margin-left: auto;
margin-right: auto;
}
+#image {
+ padding-top: 2.5%;
+ padding-bottom: 1%;
+}
+
+.cover {
+ max-height: min(50vh, 90vw);
+ max-width: min(50vh, 90vw);
+ margin-left: 0;
+ padding: 1em 0;
+}
+
iframe {
width: 100%;
height: 90vh;
@@ -63,16 +87,19 @@ a {
color: #888;
}
-#image {
- padding-top: 2.5%;
- padding-bottom: 1%;
+td {
+ padding-right: 1em;
+ font-size: larger;
}
-.cover {
- max-height: 50vh;
- margin-left: 0;
+audio {
+ width: 12.5em;
+ height: 2.5em;
}
+audio::-webkit-media-controls-panel {
+ background-color: #aaa;
+}
#controller {
position: fixed;
@@ -86,13 +113,14 @@ a {
.btn {
display: inline-block;
cursor: pointer;
- color: #000;
+ color: #111;
font-size: 2em;
font-weight: bold;
width: 4em;
}
-#prev, #next {
+#prev,
+#next {
cursor: pointer;
position: absolute;
color: lightgrey;
@@ -102,7 +130,20 @@ a {
bottom: 6vh;
}
-#prev { left: 1%; }
-#next { right: 1%; }
-#prev:hover, #next:hover { text-decoration: none; }
-#prev:active, #next:active { color: black; }
+#prev {
+ left: 1%;
+}
+
+#next {
+ right: 1%;
+}
+
+#prev:hover,
+#next:hover {
+ text-decoration: none;
+}
+
+#prev:active,
+#next:active {
+ color: black;
+} \ No newline at end of file