fix: load Google Fonts correctly with strict CSP
Node.js CI / CI (pull_request) Successful in 1m37s
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m41s

- Allow fonts.googleapis.com in style-src and fonts.gstatic.com in font-src
- Add Google Fonts preconnect links and import (Griffy, Kalam, Creepster, Henny Penny)
- Set body font to Kalam and heading font to Griffy
- Disable Angular inlineCritical optimisation to prevent deferred CSS loading via onload attribute, which was blocked by the strict script-src CSP
This commit is contained in:
2026-03-05 10:26:31 -08:00
committed by Naomi Carrigan
parent 163738867b
commit 3b3ac3d1ef
4 changed files with 32 additions and 3 deletions
+5
View File
@@ -25,6 +25,11 @@
},
"configurations": {
"production": {
"optimization": {
"styles": {
"inlineCritical": false
}
},
"budgets": [
{
"type": "initial",
+3
View File
@@ -8,6 +8,9 @@
<meta name="description" content="Naomi's curated collection of games, books, music, shows, manga, and art. Browse, engage, and suggest new additions!" />
<meta name="theme-color" content="#9d4edd" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Creepster&family=Griffy&family=Henny+Penny&family=Kalam:wght@300;400;700&display=swap" rel="stylesheet" />
<script defer src="https://analytics.nhcarrigan.com/js/pa-YUXAn1vhhRttySUAw_LMN.js"></script>
<script>
window.plausible=window.plausible||function(){(plausible.q=plausible.q||[]).push(arguments)},plausible.init=plausible.init||function(i){plausible.o=i||{}};
+22 -1
View File
@@ -38,7 +38,7 @@
body {
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
font-family: 'Kalam', cursive;
font-size: 14pt;
line-height: 1.6;
color: var(--foreground);
@@ -75,10 +75,30 @@ body::after {
pointer-events: none;
}
@keyframes wiggle {
0%, 100% { transform: rotate(-2deg); }
50% { transform: rotate(2deg); }
}
h1, h2, h3, h4, h5, h6 {
margin-top: 0;
line-height: 1.2;
color: var(--witch-purple);
font-family: 'Griffy', cursive;
}
h1 {
animation: wiggle 4s ease-in-out infinite;
display: inline-block;
}
.witchy-accent,
.spooky-title {
font-family: 'Creepster', cursive;
}
.mystical-text {
font-family: 'Henny Penny', cursive;
}
a {
@@ -121,6 +141,7 @@ select:focus {
// Button base styles
button {
font-family: inherit;
transition: all 0.3s;
}