Compare commits

..

2 Commits

Author SHA1 Message Date
Fred Boniface 78fc63fe29 Remove screenshots from SW Cache 2024-07-12 19:53:45 +01:00
Fred Boniface 4526cfa3e0 Remove truetype font files 2024-07-12 19:37:48 +01:00
8 changed files with 15 additions and 9 deletions

View File

@ -1,35 +1,32 @@
/* FONTS */ /* FONTS */
@font-face { @font-face {
font-family: "firamono"; font-family: "firamono";
src: url("/font/firamono/firamono-regular.woff2") format("woff2"), url("/font/firamono/firamono-regular.woff") format("woff"), src: url("/font/firamono/firamono-regular.woff2") format("woff2"), url("/font/firamono/firamono-regular.woff") format("woff");
url("/font/firamono/firamono-regular.ttf") format("truetype");
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
@font-face { @font-face {
font-family: "firamono"; font-family: "firamono";
src: url("/font/firamono/firamono-500.woff2") format("woff2"), url("/font/firamono/firamono-500.woff") format("woff"), url("/font/firamono/firamono-500.ttf") format("truetype"); src: url("/font/firamono/firamono-500.woff2") format("woff2"), url("/font/firamono/firamono-500.woff") format("woff");
font-weight: 500; font-weight: 500;
font-style: normal; font-style: normal;
} }
@font-face { @font-face {
font-family: "urwgothic"; font-family: "urwgothic";
src: url("/font/urwgothic/urwgothic.woff2") format("woff2"), url("/font/urwgothic/urwgothic.woff") format("woff"), url("/font/urwgothic/urwgothic.ttf") format("truetype"); src: url("/font/urwgothic/urwgothic.woff2") format("woff2"), url("/font/urwgothic/urwgothic.woff") format("woff");
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
@font-face { @font-face {
font-family: "urwgothic"; font-family: "urwgothic";
src: url("/font/urwgothic/urwgothicDemi.woff2") format("woff2"), url("/font/urwgothic/urwgothicDemi.woff") format("woff"), src: url("/font/urwgothic/urwgothicDemi.woff2") format("woff2"), url("/font/urwgothic/urwgothicDemi.woff") format("woff");
url("/font/urwgothic/urwgothicDemi.ttf") format("truetype");
font-weight: 900; font-weight: 900;
font-style: normal; font-style: normal;
} }
@font-face { @font-face {
font-family: "ubuntu"; font-family: "ubuntu";
src: url("/font/ubuntumono/ubuntumono-regular.woff2") format("woff2"), url("/font/ubuntumono/ubuntumono-regular.woff") format("woff"), src: url("/font/ubuntumono/ubuntumono-regular.woff2") format("woff2"), url("/font/ubuntumono/ubuntumono-regular.woff") format("woff");
url("/font/ubuntumono/ubuntumono-regular.ttf") format("truetype");
font-weight: 400; font-weight: 400;
font-style: normal; font-style: normal;
} }

View File

@ -6,10 +6,18 @@ const cacheName = `ob-${version}`;
const assets = [...build, ...files, "/service-worker.js"]; const assets = [...build, ...files, "/service-worker.js"];
const excludePatterns = [
"/static/images/screnshots/",
"/images/screenshots",
];
self.addEventListener("install", (event) => { self.addEventListener("install", (event) => {
async function addToCache() { async function addToCache() {
const cache = await caches.open(cacheName); const cache = await caches.open(cacheName);
await cache.addAll(assets); const assetsToCache = assets.filter(asset => {
return !excludePatterns.some(pattern => asset.startsWith(pattern));
});
await cache.addAll(assetsToCache);
} }
event.waitUntil(addToCache()); event.waitUntil(addToCache());

Binary file not shown.

View File

@ -1,3 +1,4 @@
import adapter from "@sveltejs/adapter-static"; import adapter from "@sveltejs/adapter-static";
import { vitePreprocess } from "@sveltejs/kit/vite"; import { vitePreprocess } from "@sveltejs/kit/vite";