Caching properly?
continuous-integration/drone/push Build is passing
Details
|
@ -1,12 +1,12 @@
|
|||
<script>
|
||||
let img = '/images/literallyme.jpg';
|
||||
let img = '/assets/images/literallyme.jpg';
|
||||
let clicked = false;
|
||||
function cursify() {
|
||||
if (!clicked) {
|
||||
img = '/images/whydidyoudothis.png';
|
||||
img = '/assets/images/whydidyoudothis.png';
|
||||
clicked = true;
|
||||
} else {
|
||||
img = '/images/literallyme.jpg';
|
||||
img = '/assets/images/literallyme.jpg';
|
||||
clicked = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
}}
|
||||
class="w-full h-full min-w-max"
|
||||
>
|
||||
<img src="/images/icons8-menu.svg" alt="Hamburger menu" />
|
||||
<img src="/assets/images/icons8-menu.svg" alt="Hamburger menu" />
|
||||
</button>
|
||||
|
||||
<Menu bind:open />
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
setSong({
|
||||
musicTitle: 'MUUUSIC MAN!',
|
||||
musicArtist: 'MatPat',
|
||||
musicUrl: '/music/MUUUSIC-MAN!.opus'
|
||||
musicUrl: '/assets/music/MUUUSIC-MAN!.opus'
|
||||
});
|
||||
}}
|
||||
class="mt-3 hover:cursor-pointer underline max-w-full shadow-lg hover:shadow-xl w-max bg-indigo-100 p-2 rounded-md"
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<Musicplayer />
|
||||
</div>
|
||||
<div
|
||||
class="flex flex-col bg-gradient-to-tr from-[#A2D2FF] to-[#FFAFCC] w-screen text-murasaki overflow-auto min-h-screen relative "
|
||||
class="flex flex-col bg-gradient-to-tr from-[#A2D2FF] to-[#FFAFCC] w-full text-murasaki overflow-auto min-h-screen relative "
|
||||
>
|
||||
<!-- Page content -->
|
||||
<div class="" style="padding-bottom: {footerHeight + 10}px;">
|
||||
|
|
|
@ -6,7 +6,7 @@ import { build, files, version } from '$service-worker';
|
|||
|
||||
const worker = (self as unknown) as ServiceWorkerGlobalScope;
|
||||
const STATIC_CACHE_NAME = `cache${version}`
|
||||
const APP_CACHE_NAME = `cache${version}`;
|
||||
const APP_CACHE_NAME = `offline${version}`;
|
||||
|
||||
// Hardcoded bunch of routes to always preemptively cache
|
||||
const routes = ["/", "/about"];
|
||||
|
@ -92,6 +92,7 @@ worker.addEventListener("fetch", (event) => {
|
|||
// Don't try to cache protocols other than http/https
|
||||
const isHttp = url.protocol.startsWith("http");
|
||||
const isStaticAsset = staticAssets.has(url.href);
|
||||
const isDev = url.host === self.location.host;
|
||||
const skipBecauseUncached = event.request.cache === 'only-if-cached' && !isStaticAsset;
|
||||
|
||||
if (isHttp && !skipBecauseUncached) {
|
||||
|
|
|
@ -3,43 +3,43 @@ import { readable } from "svelte/store";
|
|||
const musicStore = readable([
|
||||
{
|
||||
musicTitle: "I'm glad you're evil too (feat. Hatsune Miku)",
|
||||
musicUrl: "/music/im-glad-youre-evil-too.m4a",
|
||||
musicUrl: "/assets/music/im-glad-youre-evil-too.m4a",
|
||||
musicArtist: "PinocchioP",
|
||||
},
|
||||
{
|
||||
musicTitle: "God-ish (神っぽいな) feat. Hatsune Miku",
|
||||
musicArtist: "PinocchioP",
|
||||
musicUrl: "/music/godish.m4a",
|
||||
musicUrl: "/assets/music/godish.m4a",
|
||||
},
|
||||
{
|
||||
musicTitle: "Servant of Evil (悪ノ召使) feat. Kagamine Len",
|
||||
musicArtist: "Mothy / Akuno-p",
|
||||
musicUrl: "/music/servant-of-evil.m4a"
|
||||
musicUrl: "/assets/music/servant-of-evil.m4a"
|
||||
},
|
||||
{
|
||||
musicTitle: "Tokusya-Seizon Wonder-la-der!!",
|
||||
musicArtist: "Amane Kanata",
|
||||
musicUrl: "/music/Tokusya-Seizon Wonder-la-der!!.mp3"
|
||||
musicUrl: "/assets/music/Tokusya-Seizon Wonder-la-der!!.mp3"
|
||||
},
|
||||
{
|
||||
musicTitle: "Kegarenaki Barajuuji",
|
||||
musicArtist: "Ariabl'eyeS",
|
||||
musicUrl: "/music/kegarenaki-barajuuji.mp3"
|
||||
musicUrl: "/assets/music/kegarenaki-barajuuji.mp3"
|
||||
},
|
||||
{
|
||||
musicTitle: "-ERROR (Cover)",
|
||||
musicArtist: "Tokoyami Towa",
|
||||
musicUrl: "/music/error-towa.mp3"
|
||||
musicUrl: "/assets/music/error-towa.mp3"
|
||||
},
|
||||
{
|
||||
musicTitle: "Diamond City Lights",
|
||||
musicArtist: "LazuLight",
|
||||
musicUrl: "/music/diamond-city-lights-lazulight.opus"
|
||||
musicUrl: "/assets/music/diamond-city-lights-lazulight.opus"
|
||||
},
|
||||
{
|
||||
musicTitle: "TSUNAMI",
|
||||
musicArtist: "Finana Ryugu",
|
||||
musicUrl: "/music/tsunami-finana.opus"
|
||||
musicUrl: "/assets/music/tsunami-finana.opus"
|
||||
}
|
||||
]);
|
||||
|
||||
|
|
Before Width: | Height: | Size: 173 B After Width: | Height: | Size: 173 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 109 KiB |
Before Width: | Height: | Size: 624 KiB After Width: | Height: | Size: 624 KiB |
Before Width: | Height: | Size: 453 KiB After Width: | Height: | Size: 453 KiB |
|
@ -10,11 +10,6 @@ const config = {
|
|||
],
|
||||
kit: {
|
||||
adapter: adapter(),
|
||||
serviceWorker: {
|
||||
files: (filePath) => {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
|