summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/icons.js9
-rw-r--r--src/icons/image_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg1
-rw-r--r--src/icons/pause_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg1
-rw-r--r--src/icons/photo_album_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg1
-rw-r--r--src/icons/photo_frame_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg1
-rw-r--r--src/icons/play_arrow_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg1
-rwxr-xr-xsrc/icons/removefill.sh3
-rw-r--r--src/icons/settings_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg1
-rw-r--r--src/icons/skip_next_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg1
-rw-r--r--src/icons/skip_previous_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg1
-rw-r--r--src/icons/slideshow_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg1
-rw-r--r--src/index.js11
12 files changed, 28 insertions, 4 deletions
diff --git a/src/icons.js b/src/icons.js
new file mode 100644
index 0000000..af4cc70
--- /dev/null
+++ b/src/icons.js
@@ -0,0 +1,9 @@
+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/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"
diff --git a/src/icons/image_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg b/src/icons/image_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg
new file mode 100644
index 0000000..1ff79ee
--- /dev/null
+++ b/src/icons/image_24dp_FFFFFF_FILL1_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="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm40-160h480L570-480 450-320l-90-120-120 160Z"/></svg> \ No newline at end of file
diff --git a/src/icons/pause_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg b/src/icons/pause_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg
new file mode 100644
index 0000000..aa7aece
--- /dev/null
+++ b/src/icons/pause_24dp_FFFFFF_FILL1_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="M560-200v-560h160v560H560Zm-320 0v-560h160v560H240Z"/></svg> \ No newline at end of file
diff --git a/src/icons/photo_album_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg b/src/icons/photo_album_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg
new file mode 100644
index 0000000..95ead34
--- /dev/null
+++ b/src/icons/photo_album_24dp_FFFFFF_FILL1_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="M240-80q-33 0-56.5-23.5T160-160v-640q0-33 23.5-56.5T240-880h480q33 0 56.5 23.5T800-800v640q0 33-23.5 56.5T720-80H240Zm40-160h400L545-420 440-280l-65-87-95 127Zm160-280 100-60 100 60v-280H440v280Z"/></svg> \ No newline at end of file
diff --git a/src/icons/photo_frame_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg b/src/icons/photo_frame_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg
new file mode 100644
index 0000000..e26dccc
--- /dev/null
+++ b/src/icons/photo_frame_24dp_FFFFFF_FILL1_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="M240-120q-17 0-28.5-11.5T200-160v-40h-80q-33 0-56.5-23.5T40-280v-440q0-33 23.5-56.5T120-800h720q33 0 56.5 23.5T920-720v440q0 33-23.5 56.5T840-200h-80v40q0 17-11.5 28.5T720-120H240Zm-40-240h560L580-600 440-420 340-540 200-360Z"/></svg> \ No newline at end of file
diff --git a/src/icons/play_arrow_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg b/src/icons/play_arrow_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg
new file mode 100644
index 0000000..22dd0af
--- /dev/null
+++ b/src/icons/play_arrow_24dp_FFFFFF_FILL1_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="M320-200v-560l440 280-440 280Z"/></svg> \ No newline at end of file
diff --git a/src/icons/removefill.sh b/src/icons/removefill.sh
new file mode 100755
index 0000000..c61fd98
--- /dev/null
+++ b/src/icons/removefill.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+# Google Material Icons -- complete default settings
+sed -Ei 's/ ?fill="#[0-9a-fA-F]{6}"//' *.svg
diff --git a/src/icons/settings_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg b/src/icons/settings_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg
new file mode 100644
index 0000000..92240e4
--- /dev/null
+++ b/src/icons/settings_24dp_FFFFFF_FILL1_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="m370-80-16-128q-13-5-24.5-12T307-235l-119 50L78-375l103-78q-1-7-1-13.5v-27q0-6.5 1-13.5L78-585l110-190 119 50q11-8 23-15t24-12l16-128h220l16 128q13 5 24.5 12t22.5 15l119-50 110 190-103 78q1 7 1 13.5v27q0 6.5-2 13.5l103 78-110 190-118-50q-11 8-23 15t-24 12L590-80H370Zm112-260q58 0 99-41t41-99q0-58-41-99t-99-41q-59 0-99.5 41T342-480q0 58 40.5 99t99.5 41Z"/></svg> \ No newline at end of file
diff --git a/src/icons/skip_next_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg b/src/icons/skip_next_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg
new file mode 100644
index 0000000..ba0282f
--- /dev/null
+++ b/src/icons/skip_next_24dp_FFFFFF_FILL1_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="M660-240v-480h80v480h-80Zm-440 0v-480l360 240-360 240Z"/></svg> \ No newline at end of file
diff --git a/src/icons/skip_previous_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg b/src/icons/skip_previous_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg
new file mode 100644
index 0000000..ea45ca0
--- /dev/null
+++ b/src/icons/skip_previous_24dp_FFFFFF_FILL1_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="M220-240v-480h80v480h-80Zm520 0L380-480l360-240v480Z"/></svg> \ No newline at end of file
diff --git a/src/icons/slideshow_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg b/src/icons/slideshow_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg
new file mode 100644
index 0000000..17fb6dd
--- /dev/null
+++ b/src/icons/slideshow_24dp_FFFFFF_FILL1_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="m380-300 280-180-280-180v360ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Z"/></svg> \ No newline at end of file
diff --git a/src/index.js b/src/index.js
index 21d0134..59175a0 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,3 +1,4 @@
+import "./icons.js"
import initSlides from "./slides.js"
initSlides()
@@ -29,11 +30,13 @@ window.addEventListener("popstate", pathnameCallback)
pathnameCallback()
/* add event listeners for anchor elements in footer */
-function anchorRedirect(e) {
+function softRedirect(e) {
e.preventDefault()
- window.history.pushState({}, "", e.target.href);
+ let a = e.target
+ while (a.tagName !== "A" && a !== null)
+ a = a.parentElement
+ window.history.pushState({}, "", a.href);
pathnameCallback()
}
-for (const a of document.querySelectorAll("footer a"))
- a.addEventListener("click", anchorRedirect)
+document.querySelector("#menu").addEventListener("click", softRedirect)