summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Keller <tjk@tjkeller.xyz>2025-05-04 23:05:18 -0500
committerTim Keller <tjk@tjkeller.xyz>2025-05-04 23:05:18 -0500
commit2e43088aa2db9450a670540cbc899c141f5c1c1a (patch)
tree403d5d7113f372b3c2f919975bfabe46e9aa4def
parent7283da81b5f1f938fa407d6d3f0d5bb56e889b1b (diff)
downloadimmich-frame-2e43088aa2db9450a670540cbc899c141f5c1c1a.tar.xz
immich-frame-2e43088aa2db9450a670540cbc899c141f5c1c1a.zip
add share icons, fix html viewport, use postcss in css
-rw-r--r--public/index.html22
-rw-r--r--src/icons.js3
-rw-r--r--src/icons/download_24dp_FFFFFF_FILL0_wght400_GRAD0_opsz24.svg1
-rw-r--r--src/icons/share_24dp_FFFFFF_FILL0_wght400_GRAD0_opsz24.svg1
-rw-r--r--src/icons/visibility_off_24dp_FFFFFF_FILL0_wght400_GRAD0_opsz24.svg1
-rw-r--r--src/index.js1
-rw-r--r--src/style.css (renamed from public/style.css)59
7 files changed, 56 insertions, 32 deletions
diff --git a/public/index.html b/public/index.html
index 406122e..4ea10e9 100644
--- a/public/index.html
+++ b/public/index.html
@@ -7,7 +7,8 @@
<script src="https://unpkg.com/flickity@2/dist/flickity.pkgd.min.js"></script>
<script src="index.js" defer type="module"></script>
-->
- <link rel="stylesheet" href="/style.css">
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
<script src="/main.js" defer></script>
</head>
<body>
@@ -17,6 +18,15 @@
<div id="slideshow" style="display:none">
-->
<div id="slideshow">
+ <div id="slideshow-top-controls">
+ <div id="slideshow-share">
+ <button id="share"><svg alt="Share"><use xlink:href="#share"></use></svg></button>
+ <button id="download"><svg alt="Download"><use xlink:href="#download"></use></svg></button>
+ <!--
+ <button id="hide"><svg alt="Don't Show This Image"><use xlink:href="#skip_next"></use></svg></button>
+ -->
+ </div>
+ </div>
<div id="slideshow-carousel">
<div class="carousel-cell"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/82/tulip.jpg" /></div>
<div class="carousel-cell"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/82/grapes.jpg" /></div>
@@ -24,6 +34,11 @@
<div class="carousel-cell"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/82/wolf.jpg" /></div>
<div class="carousel-cell"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/82/shore.jpg" /></div>
</div>
+ <div id="slideshow-bottom-controls">
+ <button id="prevSlide"><svg alt="Previous Slide"><use xlink:href="#skip_previous"></use></svg></button>
+ <button id="playPause"><svg alt="Pause"><use xlink:href="#pause"></use></svg></button>
+ <button id="nextSlide"><svg alt="Next Slide"><use xlink:href="#skip_next"></use></svg></button>
+ </div>
</div>
<div id="albums" style="display:none">
</div>
@@ -32,11 +47,6 @@
</main>
<footer>
<div id="bottom-container">
- <div id="controls">
- <button id="prevSlide"><svg alt="Previous Slide"><use xlink:href="#skip_previous"></use></svg></button>
- <button id="playPause"><svg alt="Pause"><use xlink:href="#pause"></use></svg></button>
- <button id="nextSlide"><svg alt="Next Slide"><use xlink:href="#skip_next"></use></svg></button>
- </div>
<div id="menu">
<a href="/slideshow"><svg alt="Slideshow"><use xlink:href="#slideshow"></use></svg></a>
<a href="/albums"> <svg alt="Album Picker"><use xlink:href="#photo_album"></use></svg></a>
diff --git a/src/icons.js b/src/icons.js
index af4cc70..dd75a4a 100644
--- a/src/icons.js
+++ b/src/icons.js
@@ -1,9 +1,12 @@
+import "./icons/download_24dp_FFFFFF_FILL0_wght400_GRAD0_opsz24.svg"
import "./icons/image_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg"
import "./icons/pause_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg"
import "./icons/photo_album_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg"
import "./icons/photo_frame_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg"
import "./icons/play_arrow_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg"
+import "./icons/share_24dp_FFFFFF_FILL0_wght400_GRAD0_opsz24.svg"
import "./icons/settings_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg"
import "./icons/skip_next_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg"
import "./icons/skip_previous_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg"
import "./icons/slideshow_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg"
+import "./icons/visibility_off_24dp_FFFFFF_FILL0_wght400_GRAD0_opsz24.svg"
diff --git a/src/icons/download_24dp_FFFFFF_FILL0_wght400_GRAD0_opsz24.svg b/src/icons/download_24dp_FFFFFF_FILL0_wght400_GRAD0_opsz24.svg
new file mode 100644
index 0000000..e9ef3c9
--- /dev/null
+++ b/src/icons/download_24dp_FFFFFF_FILL0_wght400_GRAD0_opsz24.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px"><path d="M480-320 280-520l56-58 104 104v-326h80v326l104-104 56 58-200 200ZM240-160q-33 0-56.5-23.5T160-240v-120h80v120h480v-120h80v120q0 33-23.5 56.5T720-160H240Z"/></svg> \ No newline at end of file
diff --git a/src/icons/share_24dp_FFFFFF_FILL0_wght400_GRAD0_opsz24.svg b/src/icons/share_24dp_FFFFFF_FILL0_wght400_GRAD0_opsz24.svg
new file mode 100644
index 0000000..911d24e
--- /dev/null
+++ b/src/icons/share_24dp_FFFFFF_FILL0_wght400_GRAD0_opsz24.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px"><path d="M680-80q-50 0-85-35t-35-85q0-6 3-28L282-392q-16 15-37 23.5t-45 8.5q-50 0-85-35t-35-85q0-50 35-85t85-35q24 0 45 8.5t37 23.5l281-164q-2-7-2.5-13.5T560-760q0-50 35-85t85-35q50 0 85 35t35 85q0 50-35 85t-85 35q-24 0-45-8.5T598-672L317-508q2 7 2.5 13.5t.5 14.5q0 8-.5 14.5T317-452l281 164q16-15 37-23.5t45-8.5q50 0 85 35t35 85q0 50-35 85t-85 35Zm0-80q17 0 28.5-11.5T720-200q0-17-11.5-28.5T680-240q-17 0-28.5 11.5T640-200q0 17 11.5 28.5T680-160ZM200-440q17 0 28.5-11.5T240-480q0-17-11.5-28.5T200-520q-17 0-28.5 11.5T160-480q0 17 11.5 28.5T200-440Zm480-280q17 0 28.5-11.5T720-760q0-17-11.5-28.5T680-800q-17 0-28.5 11.5T640-760q0 17 11.5 28.5T680-720Zm0 520ZM200-480Zm480-280Z"/></svg> \ No newline at end of file
diff --git a/src/icons/visibility_off_24dp_FFFFFF_FILL0_wght400_GRAD0_opsz24.svg b/src/icons/visibility_off_24dp_FFFFFF_FILL0_wght400_GRAD0_opsz24.svg
new file mode 100644
index 0000000..41b5681
--- /dev/null
+++ b/src/icons/visibility_off_24dp_FFFFFF_FILL0_wght400_GRAD0_opsz24.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px"><path d="m644-428-58-58q9-47-27-88t-93-32l-58-58q17-8 34.5-12t37.5-4q75 0 127.5 52.5T660-500q0 20-4 37.5T644-428Zm128 126-58-56q38-29 67.5-63.5T832-500q-50-101-143.5-160.5T480-720q-29 0-57 4t-55 12l-62-62q41-17 84-25.5t90-8.5q151 0 269 83.5T920-500q-23 59-60.5 109.5T772-302Zm20 246L624-222q-35 11-70.5 16.5T480-200q-151 0-269-83.5T40-500q21-53 53-98.5t73-81.5L56-792l56-56 736 736-56 56ZM222-624q-29 26-53 57t-41 67q50 101 143.5 160.5T480-280q20 0 39-2.5t39-5.5l-36-38q-11 3-21 4.5t-21 1.5q-75 0-127.5-52.5T300-500q0-11 1.5-21t4.5-21l-84-82Zm319 93Zm-151 75Z"/></svg> \ No newline at end of file
diff --git a/src/index.js b/src/index.js
index 59175a0..6e35fa3 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,3 +1,4 @@
+import "./style.css"
import "./icons.js"
import initSlides from "./slides.js"
diff --git a/public/style.css b/src/style.css
index f8c26e2..0175b0c 100644
--- a/public/style.css
+++ b/src/style.css
@@ -11,7 +11,7 @@ svg {
height: 70vh;
width: 80vw;
- margin: 10px;
+ margin: 24px;
}
@@ -25,54 +25,61 @@ svg {
}
+/*
@media (max-width: 768px) {
.carousel-cell {
height: 100vh;
}
}
+*/
-
-footer {
- position: fixed;
- bottom: 0;
- width: 100%;
+#slideshow-share button,
+#slideshow-bottom-controls button {
+ background: none;
+ border: none;
+ padding: 0;
}
-#bottom-container {
- max-width: 1024px;
- margin: auto;
+#slideshow-share svg { height: 24px; width: 24px; }
+#slideshow-share button {
+ padding: 12px;
+ width: 48px;
+ height: 48px;
}
-#controls, #menu {
+#slideshow-share,
+#slideshow-bottom-controls {
display: flex;
-}
-#menu {
- width: 100%;
+ width: 80vw;
+ margin: auto;
+ justify-content: right;
}
-#controls {
- width: 80%;
+
+#slideshow-bottom-controls {
margin: auto;
- padding-bottom: 48px;
+ max-width: 768px;
+ button { width: 48px; height: 48px; }
}
-footer a, footer button {
- width: 100%;
-}
-footer svg {
- height: 48px;
- width: 100%;
+footer {
+ position: fixed;
+ bottom: 0;
+ width: 100%;
}
-#controls button {
- background: none;
- border: none;
- padding: 0;
+#bottom-container {
+ max-width: 1024px;
+ margin: auto;
}
#menu {
+ a { width: 100% }
+ svg { height: 48px; width: 100% }
+ display: flex;
+ width: 100%;
padding: 16px;
box-sizing: border-box;
border-top: 1px solid rgb(55, 65, 81);