diff --git a/src/animations.js b/src/animations.js new file mode 100644 index 0000000..e410db1 --- /dev/null +++ b/src/animations.js @@ -0,0 +1,23 @@ +const STOP_STATE_POINTS = "650,0, 1350,0, 1350,500, 650,500"; +const PLAY_STATE_POINTS = "0,0, 2000,250, 2000,250, 0,500"; + +const startIcebergsAnimation = () => { + [1, 2, 3].map((i) => { + const polygon = document.getElementById(`iceberg${i}`); + polygon.classList.add("active"); + }); +}; + +const stopIcebergsAnimation = () => { + [1, 2, 3].map((i) => { + const polygon = document.getElementById(`iceberg${i}`); + polygon.classList.remove("active"); + }); +}; + +export { + startIcebergsAnimation, + stopIcebergsAnimation, + STOP_STATE_POINTS, + PLAY_STATE_POINTS, +}; diff --git a/src/dom.js b/src/dom.js new file mode 100644 index 0000000..398575a --- /dev/null +++ b/src/dom.js @@ -0,0 +1,15 @@ +const audio = document.querySelector("audio"); +const playButton = document.querySelector(".play-stream"); +const playButtonAnimation = document.getElementById("play-button-animation"); +const artistBlock = document.querySelector(".now-playing_artist"); +const titleBlock = document.querySelector(".now-playing_song"); +const logoDot = document.querySelector(".logo_dot"); + +export { + audio, + playButton, + playButtonAnimation, + artistBlock, + titleBlock, + logoDot, +}; diff --git a/src/fonts/Inter.ttf b/src/fonts/Inter.ttf new file mode 100644 index 0000000..e724708 Binary files /dev/null and b/src/fonts/Inter.ttf differ diff --git a/src/fonts/lato-lightitalic.woff b/src/fonts/lato-lightitalic.woff deleted file mode 100644 index 86b3600..0000000 Binary files a/src/fonts/lato-lightitalic.woff and /dev/null differ diff --git a/src/fonts/lato-lightitalic.woff2 b/src/fonts/lato-lightitalic.woff2 deleted file mode 100644 index 77aabad..0000000 Binary files a/src/fonts/lato-lightitalic.woff2 and /dev/null differ diff --git a/src/fonts/lato-regular-webfont.woff2 b/src/fonts/lato-regular-webfont.woff2 deleted file mode 100644 index 495cb9e..0000000 Binary files a/src/fonts/lato-regular-webfont.woff2 and /dev/null differ diff --git a/src/index.html b/src/index.html index d0d8a32..ba4902e 100644 --- a/src/index.html +++ b/src/index.html @@ -43,14 +43,20 @@
-