Believer
diff --git a/manifest.json b/manifest.json
index 36f39ec..8ea1538 100644
--- a/manifest.json
+++ b/manifest.json
@@ -9,43 +9,43 @@
"lang": "en-US",
"icons": [
{
- "src": "/src/assets/icons/logo48.png",
+ "src": "src/assets/icons/logo48.png",
"sizes": "48x48",
"type": "image/png"
},
{
- "src": "/src/assets/icons/logo72.png",
+ "src": "src/assets/icons/logo72.png",
"sizes": "72x72",
"type": "image/png"
},
{
- "src": "/src/assets/icons/logo96.png",
+ "src": "src/assets/icons/logo96.png",
"sizes": "96x96",
"type": "image/png"
},
{
- "src": "/src/assets/icons/logo144.png",
+ "src": "src/assets/icons/logo144.png",
"sizes": "144x144",
"type": "image/png"
},
{
- "src": "/src/assets/icons/logo168.png",
+ "src": "src/assets/icons/logo168.png",
"sizes": "168x168",
"type": "image/png"
},
{
- "src": "/src/assets/icons/logo192.png",
+ "src": "src/assets/icons/logo192.png",
"sizes": "192x192",
"type": "image/png"
},
{
- "src": "/src/assets/icons/logo512.png",
+ "src": "src/assets/icons/logo512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"screenshots" : [{
- "src": "/src/assets/screenshot.jpg",
+ "src": "src/assets/screenshot.jpg",
"sizes": "1280x580",
"type": "image/jpeg"
}]
diff --git a/public/assets/Songs.json b/public/assets/Songs.json
new file mode 100644
index 0000000..5400d6a
--- /dev/null
+++ b/public/assets/Songs.json
@@ -0,0 +1,50 @@
+[
+ {
+ "id": 0,
+ "name": "Believer",
+ "artist": "Imagine Dragons",
+ "cover": "/assets/covers/believer.webp",
+ "src": "/assets/songs/01 Believer.mp3",
+ "background": "/assets/backgrounds/believer.webm"
+ },
+ {
+ "id": 1,
+ "name": "Goodbyes",
+ "artist": "Post Malone",
+ "cover": "/assets/covers/goodbyes.webp",
+ "src": "/assets/songs/2_5323735572550780476.mp3",
+ "background": "/assets/backgrounds/goodbyes.webm"
+ },
+ {
+ "id": 2,
+ "name": "Paid My Dues",
+ "artist": "NF",
+ "cover": "/assets/covers/clouds.webp",
+ "src": "/assets/songs/10 PAID MY DUES.mp3",
+ "background": "/assets/backgrounds/clouds.webm"
+ },
+ {
+ "id": 3,
+ "name": "Blinding Lights",
+ "artist": "The Weeknd",
+ "cover": "/assets/covers/blindinglights.webp",
+ "src": "/assets/songs/The Weeknd - Blinding Lights.mp3",
+ "background": "/assets/backgrounds/blindinglights.webm"
+ },
+ {
+ "id": 4,
+ "name": "GraveYard",
+ "artist": "Halsey",
+ "cover": "/assets/covers/graveyard.webp",
+ "src": "/assets/songs/Halsey - Graveyard (2019) MELOVAZ.NET.mp3",
+ "background": "/assets/backgrounds/graveyard.webm"
+ },
+ {
+ "id": 5,
+ "name": "What I've Done",
+ "artist": "Linkin Park",
+ "cover": "/assets/covers/whativedone.webp",
+ "src": "/assets/songs/07 What I've Done.mp3",
+ "background": "/assets/backgrounds/whativedone.webm"
+ }
+]
diff --git a/src/assets/backgrounds/believer.webm b/public/assets/backgrounds/believer.webm
similarity index 100%
rename from src/assets/backgrounds/believer.webm
rename to public/assets/backgrounds/believer.webm
diff --git a/src/assets/backgrounds/blindinglights.webm b/public/assets/backgrounds/blindinglights.webm
similarity index 100%
rename from src/assets/backgrounds/blindinglights.webm
rename to public/assets/backgrounds/blindinglights.webm
diff --git a/src/assets/backgrounds/clouds.webm b/public/assets/backgrounds/clouds.webm
similarity index 100%
rename from src/assets/backgrounds/clouds.webm
rename to public/assets/backgrounds/clouds.webm
diff --git a/src/assets/backgrounds/goodbyes.webm b/public/assets/backgrounds/goodbyes.webm
similarity index 100%
rename from src/assets/backgrounds/goodbyes.webm
rename to public/assets/backgrounds/goodbyes.webm
diff --git a/src/assets/backgrounds/graveyard.webm b/public/assets/backgrounds/graveyard.webm
similarity index 100%
rename from src/assets/backgrounds/graveyard.webm
rename to public/assets/backgrounds/graveyard.webm
diff --git a/src/assets/backgrounds/visualize.webm b/public/assets/backgrounds/visualize.webm
similarity index 100%
rename from src/assets/backgrounds/visualize.webm
rename to public/assets/backgrounds/visualize.webm
diff --git a/src/assets/backgrounds/whativedone.webm b/public/assets/backgrounds/whativedone.webm
similarity index 100%
rename from src/assets/backgrounds/whativedone.webm
rename to public/assets/backgrounds/whativedone.webm
diff --git a/src/assets/covers/believer.webp b/public/assets/covers/believer.webp
similarity index 100%
rename from src/assets/covers/believer.webp
rename to public/assets/covers/believer.webp
diff --git a/src/assets/covers/blindinglights.webp b/public/assets/covers/blindinglights.webp
similarity index 100%
rename from src/assets/covers/blindinglights.webp
rename to public/assets/covers/blindinglights.webp
diff --git a/src/assets/covers/clouds.webp b/public/assets/covers/clouds.webp
similarity index 100%
rename from src/assets/covers/clouds.webp
rename to public/assets/covers/clouds.webp
diff --git a/src/assets/covers/goodbyes.webp b/public/assets/covers/goodbyes.webp
similarity index 100%
rename from src/assets/covers/goodbyes.webp
rename to public/assets/covers/goodbyes.webp
diff --git a/src/assets/covers/graveyard.webp b/public/assets/covers/graveyard.webp
similarity index 100%
rename from src/assets/covers/graveyard.webp
rename to public/assets/covers/graveyard.webp
diff --git a/src/assets/covers/whativedone.webp b/public/assets/covers/whativedone.webp
similarity index 100%
rename from src/assets/covers/whativedone.webp
rename to public/assets/covers/whativedone.webp
diff --git a/src/assets/icons/favicon.ico b/public/assets/icons/favicon.ico
similarity index 100%
rename from src/assets/icons/favicon.ico
rename to public/assets/icons/favicon.ico
diff --git a/src/assets/icons/logo144.png b/public/assets/icons/logo144.png
similarity index 100%
rename from src/assets/icons/logo144.png
rename to public/assets/icons/logo144.png
diff --git a/src/assets/icons/logo168.png b/public/assets/icons/logo168.png
similarity index 100%
rename from src/assets/icons/logo168.png
rename to public/assets/icons/logo168.png
diff --git a/src/assets/icons/logo192.png b/public/assets/icons/logo192.png
similarity index 100%
rename from src/assets/icons/logo192.png
rename to public/assets/icons/logo192.png
diff --git a/src/assets/icons/logo48.png b/public/assets/icons/logo48.png
similarity index 100%
rename from src/assets/icons/logo48.png
rename to public/assets/icons/logo48.png
diff --git a/src/assets/icons/logo512.png b/public/assets/icons/logo512.png
similarity index 100%
rename from src/assets/icons/logo512.png
rename to public/assets/icons/logo512.png
diff --git a/src/assets/icons/logo72.png b/public/assets/icons/logo72.png
similarity index 100%
rename from src/assets/icons/logo72.png
rename to public/assets/icons/logo72.png
diff --git a/src/assets/icons/logo96.png b/public/assets/icons/logo96.png
similarity index 100%
rename from src/assets/icons/logo96.png
rename to public/assets/icons/logo96.png
diff --git a/src/assets/logo.jpeg b/public/assets/logo.jpeg
similarity index 100%
rename from src/assets/logo.jpeg
rename to public/assets/logo.jpeg
diff --git a/src/assets/screenshot.jpg b/public/assets/screenshot.jpg
similarity index 100%
rename from src/assets/screenshot.jpg
rename to public/assets/screenshot.jpg
diff --git a/src/assets/songs/01 Believer.mp3 b/public/assets/songs/01 Believer.mp3
similarity index 100%
rename from src/assets/songs/01 Believer.mp3
rename to public/assets/songs/01 Believer.mp3
diff --git a/src/assets/songs/07 What I've Done.mp3 b/public/assets/songs/07 What I've Done.mp3
similarity index 100%
rename from src/assets/songs/07 What I've Done.mp3
rename to public/assets/songs/07 What I've Done.mp3
diff --git a/src/assets/songs/10 PAID MY DUES.mp3 b/public/assets/songs/10 PAID MY DUES.mp3
similarity index 100%
rename from src/assets/songs/10 PAID MY DUES.mp3
rename to public/assets/songs/10 PAID MY DUES.mp3
diff --git a/src/assets/songs/2_5323735572550780476.mp3 b/public/assets/songs/2_5323735572550780476.mp3
similarity index 100%
rename from src/assets/songs/2_5323735572550780476.mp3
rename to public/assets/songs/2_5323735572550780476.mp3
diff --git a/src/assets/songs/Halsey - Graveyard (2019) MELOVAZ.NET.mp3 b/public/assets/songs/Halsey - Graveyard (2019) MELOVAZ.NET.mp3
similarity index 100%
rename from src/assets/songs/Halsey - Graveyard (2019) MELOVAZ.NET.mp3
rename to public/assets/songs/Halsey - Graveyard (2019) MELOVAZ.NET.mp3
diff --git a/src/assets/songs/The Weeknd - Blinding Lights.mp3 b/public/assets/songs/The Weeknd - Blinding Lights.mp3
similarity index 100%
rename from src/assets/songs/The Weeknd - Blinding Lights.mp3
rename to public/assets/songs/The Weeknd - Blinding Lights.mp3
diff --git a/src/Components/GetSongs/GetSongs.ts b/src/Components/GetSongs/GetSongs.ts
index 430f66c..a05ac0d 100644
--- a/src/Components/GetSongs/GetSongs.ts
+++ b/src/Components/GetSongs/GetSongs.ts
@@ -10,7 +10,7 @@ interface Song {
}
const getSongs = () => {
- return axios.get("src/Songs.json").then((response) => {
+ return axios.get("/assets/Songs.json").then((response) => {
return response.data as Song[];
});
};
diff --git a/src/Components/MusicPlayer/MusicPlayer.ts b/src/Components/MusicPlayer/MusicPlayer.ts
index 466e6f8..3f0dcd8 100644
--- a/src/Components/MusicPlayer/MusicPlayer.ts
+++ b/src/Components/MusicPlayer/MusicPlayer.ts
@@ -53,7 +53,7 @@ class MusicPlayer {
this.songs = await this._fetchSongs();
this._musicControls.initialize();
- backgroundVideo.setAttribute("src", "src/assets/backgrounds/visualize.webm")
+ backgroundVideo.setAttribute("src", "/assets/backgrounds/visualize.webm")
timeline.addEventListener(
"click",
this._timeHandler.selectTime.bind(this._timeHandler)
@@ -74,7 +74,7 @@ function firstShowHandler() {
function animationHandler() {
playerBox.classList.add('opened-magical-square')
- backgroundVideo.setAttribute('src', "src/assets/backgrounds/believer.webm");
+ backgroundVideo.setAttribute('src', "/assets/backgrounds/believer.webm");
}
export { MusicPlayer };
diff --git a/src/Songs.json b/src/Songs.json
deleted file mode 100644
index 893dcc7..0000000
--- a/src/Songs.json
+++ /dev/null
@@ -1,50 +0,0 @@
-[
- {
- "id": 0,
- "name": "Believer",
- "artist": "Imagine Dragons",
- "cover": "src/assets/covers/believer.webp",
- "src": "src/assets/songs/01 Believer.mp3",
- "background": "src/assets/backgrounds/believer.webm"
- },
- {
- "id": 1,
- "name": "Goodbyes",
- "artist": "Post Malone",
- "cover": "src/assets/covers/goodbyes.webp",
- "src": "src/assets/songs/2_5323735572550780476.mp3",
- "background": "src/assets/backgrounds/goodbyes.webm"
- },
- {
- "id": 2,
- "name": "Paid My Dues",
- "artist": "NF",
- "cover": "src/assets/covers/clouds.webp",
- "src": "src/assets/songs/10 PAID MY DUES.mp3",
- "background": "src/assets/backgrounds/clouds.webm"
- },
- {
- "id": 3,
- "name": "Blinding Lights",
- "artist": "The Weeknd",
- "cover": "src/assets/covers/blindinglights.webp",
- "src": "src/assets/songs/The Weeknd - Blinding Lights.mp3",
- "background": "src/assets/backgrounds/blindinglights.webm"
- },
- {
- "id": 4,
- "name": "GraveYard",
- "artist": "Halsey",
- "cover": "src/assets/covers/graveyard.webp",
- "src": "src/assets/songs/Halsey - Graveyard (2019) MELOVAZ.NET.mp3",
- "background": "src/assets/backgrounds/graveyard.webm"
- },
- {
- "id": 5,
- "name": "What I've Done",
- "artist": "Linkin Park",
- "cover": "src/assets/covers/whativedone.webp",
- "src": "src/assets/songs/07 What I've Done.mp3",
- "background": "src/assets/backgrounds/whativedone.webm"
- }
-]
diff --git a/sw.js b/sw.js
index d95c063..ee98889 100644
--- a/sw.js
+++ b/sw.js
@@ -1,9 +1,9 @@
-const CACHE_NAME = 'cache-assets-v1';
+const CACHE_NAME = 'cache-assets-v3';
const songs = [
'believer', 'goodbyes', 'clouds', 'graveyard', 'blindinglights', 'whativedone'
]
-const CACHED_ASSETS = ['/', '/index.html', '/src/Songs.json',
-'/src/assets/backgrounds/visualize.webm',
+const CACHED_ASSETS = ['/', '/index.html', '/assets/Songs.json',
+'/assets/backgrounds/visualize.webm',
'https://fonts.gstatic.com/s/bebasneue/v14/JTUSjIg69CK48gW7PXoo9Wlhyw.woff2',
'https://fonts.gstatic.com/s/barlowcondensed/v12/HTxwL3I-JCGChYJ8VI-L6OO_au7B47rxz3bWuQ.woff2',
'https://fonts.gstatic.com/s/barlowcondensed/v12/HTx3L3I-JCGChYJ8VI-L6OO_au7B6xHT2g.woff2'];
@@ -14,8 +14,8 @@ self.addEventListener("install", (e) => {
.open(CACHE_NAME)
.then((cache) => {
songs.forEach(song => {
- CACHED_ASSETS.push(`/src/assets/covers/${song}.webp`);
- CACHED_ASSETS.push(`/src/assets/backgrounds/${song}.webm`);
+ CACHED_ASSETS.push(`/assets/covers/${song}.webp`);
+ CACHED_ASSETS.push(`/assets/backgrounds/${song}.webm`);
})
cache.addAll(CACHED_ASSETS);
})