chore: self-host fonts (Bricolage Grotesque, DM Sans) and HTMX — remove Google Fonts, jsDelivr, unpkg dependencies

This commit is contained in:
Deeman
2026-02-20 01:08:30 +01:00
parent 3f8f0a7187
commit 6d622e7663
8 changed files with 48 additions and 7 deletions

View File

@@ -16,6 +16,50 @@
font-display: swap; font-display: swap;
} }
/* ── Bricolage Grotesque (self-hosted, variable font) ── */
@font-face {
font-family: 'Bricolage Grotesque';
font-style: normal;
font-weight: 400 800;
font-display: swap;
src: url('../fonts/bricolage-grotesque-vietnamese.woff2') format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
font-family: 'Bricolage Grotesque';
font-style: normal;
font-weight: 400 800;
font-display: swap;
src: url('../fonts/bricolage-grotesque-latin-ext.woff2') format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: 'Bricolage Grotesque';
font-style: normal;
font-weight: 400 800;
font-display: swap;
src: url('../fonts/bricolage-grotesque-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* ── DM Sans (self-hosted, variable font) ── */
@font-face {
font-family: 'DM Sans';
font-style: normal;
font-weight: 400 700;
font-display: swap;
src: url('../fonts/dm-sans-latin-ext.woff2') format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: 'DM Sans';
font-style: normal;
font-weight: 400 700;
font-display: swap;
src: url('../fonts/dm-sans-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* ── Brand Theme ── */ /* ── Brand Theme ── */
@theme { @theme {
--font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif; --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;

File diff suppressed because one or more lines are too long

View File

@@ -11,11 +11,7 @@
<link rel="icon" type="image/png" sizes="32x32" href="{{ url_for('static', filename='images/favicon-32.png') }}?v=4"> <link rel="icon" type="image/png" sizes="32x32" href="{{ url_for('static', filename='images/favicon-32.png') }}?v=4">
<link rel="apple-touch-icon" href="{{ url_for('static', filename='images/apple-touch-icon.png') }}?v=4"> <link rel="apple-touch-icon" href="{{ url_for('static', filename='images/apple-touch-icon.png') }}?v=4">
<!-- Fonts --> <!-- Fonts (self-hosted, @font-face in output.css) -->
<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=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,700;12..96,800&family=DM+Sans:wght@400;500;600;700&display=swap" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/fontsource/fonts/commit-mono@latest/latin-400-normal.min.css" rel="stylesheet">
<!-- Tailwind (compiled) --> <!-- Tailwind (compiled) -->
<link rel="stylesheet" href="{{ url_for('static', filename='css/output.css') }}"> <link rel="stylesheet" href="{{ url_for('static', filename='css/output.css') }}">
@@ -186,8 +182,8 @@
</p> </p>
</footer> </footer>
<!-- HTMX --> <!-- HTMX (self-hosted) -->
<script src="https://unpkg.com/htmx.org@2.0.4"></script> <script src="{{ url_for('static', filename='js/htmx-2.0.4.min.js') }}"></script>
<script> <script>
// CSRF token for HTMX requests // CSRF token for HTMX requests
document.body.addEventListener('htmx:configRequest', function(e) { document.body.addEventListener('htmx:configRequest', function(e) {