chore(app): added prefetching images & fonts; optimized assets

This commit is contained in:
2026-01-22 00:26:47 +01:00
parent b1e3346b59
commit c97806c920
10 changed files with 72 additions and 54 deletions
+11
View File
@@ -1,5 +1,6 @@
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
@@ -24,11 +25,21 @@
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png" />
<meta name="theme-color" content="#ffffff" />
<!-- Preloads -->
<link rel="preload" href="/fonts/libre-franklin-500.woff2" as="font" type="font/woff2" crossorigin />
<link rel="preload" href="/fonts/libre-franklin-700.woff2" as="font" type="font/woff2" crossorigin />
<link rel="preload" href="/fonts/libre-franklin-800.woff2" as="font" type="font/woff2" crossorigin />
<link rel="preload" href="/fonts/libre-franklin-regular.woff2" as="font" type="font/woff2" crossorigin />
<link rel="preload" href="/favicon.ico" as="image" />
<title>GeneraTOR</title>
<meta name="description" content="Generator rozkazów pisemnych online" />
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+18 -11
View File
@@ -1,24 +1,31 @@
@font-face {
font-family: 'Libre Franklin';
src: url('/fonts/LibreFranklin-Bold.woff2') format('woff2');
font-weight: 800;
font-style: normal;
font-display: swap;
font-family: 'Libre Franklin';
font-style: normal;
font-weight: 400;
src: url('/fonts/libre-franklin-regular.woff2') format('woff2');
}
@font-face {
font-display: swap;
font-family: 'Libre Franklin';
src: url('/fonts/LibreFranklin-Regular.woff2') format('woff2');
font-style: normal;
font-weight: 500;
font-style: normal;
font-display: swap;
src: url('/fonts/libre-franklin-500.woff2') format('woff2');
}
@font-face {
font-family: 'Libre Franklin';
src: url('/fonts/LibreFranklin-SemiBold.woff2') format('woff2');
font-weight: 700;
font-style: normal;
font-display: swap;
font-family: 'Libre Franklin';
font-style: normal;
font-weight: 700;
src: url('/fonts/libre-franklin-700.woff2') format('woff2');
}
@font-face {
font-display: swap;
font-family: 'Libre Franklin';
font-style: normal;
font-weight: 800;
src: url('/fonts/libre-franklin-800.woff2') format('woff2');
}
+1 -1
View File
@@ -23,7 +23,7 @@ export default defineConfig({
VitePWA({
registerType: 'prompt',
workbox: {
globPatterns: ['**/*.{js,css,html,png,svg,img}'],
globPatterns: ['**/*.{js,css,html,png,svg,img,woff2,ico}'],
runtimeCaching: [
{
urlPattern: /^https:\/\/stacjownik.spythere.eu\/\/api\/getSceneries/i,