chore(fonts.css): font cleanup + optimization

This commit is contained in:
Cory Dransfeldt 2025-05-18 14:02:07 -07:00
parent 0e565970a5
commit 3a0649ee9c
No known key found for this signature in database
12 changed files with 27 additions and 10 deletions

View file

@ -43,6 +43,7 @@ class OembedHandler extends BaseHandler
} }
$results = $this->fetchFromApi('optimized_oembed', 'url=eq.' . urlencode($relativePath)); $results = $this->fetchFromApi('optimized_oembed', 'url=eq.' . urlencode($relativePath));
if (!empty($results)) { if (!empty($results)) {
$item = $results[0]; $item = $results[0];
@ -58,6 +59,7 @@ class OembedHandler extends BaseHandler
} }
$segments = explode('/', trim($relativePath, '/')); $segments = explode('/', trim($relativePath, '/'));
if (count($segments) === 1 && $segments[0] !== '') { if (count($segments) === 1 && $segments[0] !== '') {
$title = ucwords(str_replace('-', ' ', $segments[0])) . ' • ' . $globals['author']; $title = ucwords(str_replace('-', ' ', $segments[0])) . ' • ' . $globals['author'];

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "coryd.dev", "name": "coryd.dev",
"version": "6.0.9", "version": "6.0.11",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "coryd.dev", "name": "coryd.dev",
"version": "6.0.9", "version": "6.0.11",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"minisearch": "^7.1.2", "minisearch": "^7.1.2",

View file

@ -1,6 +1,6 @@
{ {
"name": "coryd.dev", "name": "coryd.dev",
"version": "6.0.9", "version": "6.0.11",
"description": "The source for my personal site. Built using 11ty (and other tools).", "description": "The source for my personal site. Built using 11ty (and other tools).",
"type": "module", "type": "module",
"engines": { "engines": {

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.

View file

@ -8,16 +8,32 @@
@font-face { @font-face {
font-family: "DM Sans"; font-family: "DM Sans";
src: url("/assets/fonts/dm.woff2") format("woff2"); src: url("/assets/fonts/dm-regular.woff2") format("woff2");
font-weight: 100 700; font-weight: 400;
font-style: normal; font-style: normal;
font-display: swap; font-display: swap;
} }
@font-face { @font-face {
font-family: "DM Sans"; font-family: "DM Sans";
src: url("/assets/fonts/dmi.woff2") format("woff2"); src: url("/assets/fonts/dm-bold.woff2") format("woff2");
font-weight: 100 700; font-weight: 700;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: "DM Sans";
src: url("/assets/fonts/dm-regular-italic.woff2") format("woff2");
font-weight: 400;
font-style: italic;
font-display: optional;
}
@font-face {
font-family: "DM Sans";
src: url("/assets/fonts/dm-bold-italic.woff2") format("woff2");
font-weight: 700;
font-style: italic; font-style: italic;
font-display: optional; font-display: optional;
} }

View file

@ -3,9 +3,8 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<link rel="preload" href="/assets/fonts/sg.woff2" as="font" type="font/woff2" crossorigin="anonymous" /> <link rel="preload" href="/assets/fonts/sg.woff2" as="font" type="font/woff2" crossorigin="anonymous" />
<link rel="preload" href="/assets/fonts/dm.woff2" as="font" type="font/woff2" crossorigin="anonymous" /> <link rel="preload" href="/assets/fonts/dm-regular.woff2" as="font" type="font/woff2" crossorigin="anonymous" />
<link rel="preload" href="/assets/fonts/dmi.woff2" as="font" type="font/woff2" crossorigin="anonymous" /> <link rel="preload" href="/assets/fonts/dm-bold.woff2" as="font" type="font/woff2" crossorigin="anonymous" />
<link rel="preload" href="/assets/fonts/ml.woff2" as="font" type="font/woff2" crossorigin="anonymous" />
<noscript> <noscript>
<link rel="stylesheet" href="/assets/styles/noscript.css?v={% appVersion %}" type="text/css" /> <link rel="stylesheet" href="/assets/styles/noscript.css?v={% appVersion %}" type="text/css" />
</noscript> </noscript>