Fix fonts and reduce number loaded
Add fonts to build.js
This commit is contained in:
Fraxle
2026-05-27 08:19:59 +01:00
parent 0c8cb1ba37
commit 2c0cac5094
5 changed files with 12 additions and 4 deletions
-2
View File
@@ -1,6 +1,4 @@
/* ── SELF-HOSTED FONTS ───────────────────────────────────────────────── */ /* ── SELF-HOSTED FONTS ───────────────────────────────────────────────── */
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/manrope-400.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/manrope-500.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/manrope-600.woff2') format('woff2'); } @font-face { font-family: 'Manrope'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/manrope-600.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/manrope-700.woff2') format('woff2'); } @font-face { font-family: 'Manrope'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/manrope-700.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/fraunces-700-normal.woff2') format('woff2'); } @font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/fraunces-700-normal.woff2') format('woff2'); }
+1 -1
View File
@@ -752,7 +752,7 @@
color: #b09870; color: #b09870;
border-top: 1px solid #e0d0a8; border-top: 1px solid #e0d0a8;
font-family: Manrope, sans-serif; font-family: Manrope, sans-serif;
font-weight: 400; font-weight: 600;
text-transform: none; text-transform: none;
letter-spacing: 0; letter-spacing: 0;
line-height: 1.7; line-height: 1.7;
Binary file not shown.
Binary file not shown.
+11 -1
View File
@@ -171,7 +171,17 @@ async function build() {
} }
} }
// 6. Copy static files // 6. Copy fonts
console.log(' Copying fonts...');
const fontsDir = path.join(ROOT, 'assets', 'fonts');
if (fs.existsSync(fontsDir)) {
for (const f of fs.readdirSync(fontsDir)) {
copyFile(path.join(fontsDir, f), path.join(DIST, 'fonts', f));
}
console.log(' -> fonts/ (' + fs.readdirSync(fontsDir).length + ' files)');
}
// 7. Copy static files
console.log(' Copying static files...'); console.log(' Copying static files...');
for (const f of ['robots.txt', 'sitemap.xml', 'og-image.png']) { for (const f of ['robots.txt', 'sitemap.xml', 'og-image.png']) {
const src = path.join(ROOT, f); const src = path.join(ROOT, f);