aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAda Isopods <me@bathynomus.xyz>2026-11-09 20:49:51 -0600
committerAda Isopods <me@bathynomus.xyz>2026-11-09 20:49:51 -0600
commit4450724be12b4dd4937c6536453a3436b6dff3d8 (patch)
tree0b8180caab2148c3d4b904624cddf562044a87be
parentbbc6124c6fdd9a23140c288cc6fee991051631e2 (diff)
optimizations
-rw-r--r--boilerplate.php9
-rw-r--r--fonts/B612_Mono/b612mono..css29
-rwxr-xr-xstyle.css6
3 files changed, 40 insertions, 4 deletions
diff --git a/boilerplate.php b/boilerplate.php
index dc3c2df..7d0723c 100644
--- a/boilerplate.php
+++ b/boilerplate.php
@@ -1,8 +1,15 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<link href="/style.css" rel="stylesheet" type="text/css" media="all">
+<!--link href="/style.css" rel="stylesheet" type="text/css" media="all"-->
<?php
+function fontcode($fontfile) {
+ echo("<!-- apparently, this is the best way to load fonts for optimal performance --><link rel='preload' as='style' href='$fontfile' /><link rel='stylesheet' href='$fontfile' media='print' onload=\"this.media='all'\" /><noscript><link rel='stylesheet' href='$fontfile' /></noscript>");
+}
+fontcode("/fonts/b612mono.css");
+
+echo("<!-- Ridiculously, inlining your main stylesheet makes Lighthouse's performance scorer happy, so it's done server-side here. --><style>".file_get_contents($_SERVER['DOCUMENT_ROOT']."/style.css")."</style>");
+
$fun = rand(0,8192);
$favicon_filename = "/favicon.ico";
diff --git a/fonts/B612_Mono/b612mono..css b/fonts/B612_Mono/b612mono..css
new file mode 100644
index 0000000..accc294
--- /dev/null
+++ b/fonts/B612_Mono/b612mono..css
@@ -0,0 +1,29 @@
+@font-face {
+ font-family: b612_mono;
+ src: url(https://arthroplura.observer/fonts/B612_Mono/B612Mono-Regular.ttf);
+ font-display: swap;
+}
+@font-face {
+ font-family: b612_mono;
+ src: url(https://arthroplura.observer/fonts/B612_Mono/B612Mono-Bold.ttf);
+ font-weight: bold;
+ font-display: swap;
+}
+@font-face {
+ font-family: b612_mono;
+ src: url(https://arthroplura.observer/fonts/B612_Mono/B612Mono-Italic.ttf);
+ font-style: italic;
+ font-display: swap;
+}
+@font-face {
+ font-family: b612_mono;
+ src: url(https://arthroplura.observer/fonts/B612_Mono/B612Mono-BoldItalic.ttf);
+ font-weight: bold;
+ font-style: italic;
+ font-display: swap;
+}
+
+:root {
+ --bodyfont: b612_mono, monospace;
+ --monofont: b612_mono, monospace;
+} \ No newline at end of file
diff --git a/style.css b/style.css
index 665afc9..24e730d 100755
--- a/style.css
+++ b/style.css
@@ -1,4 +1,4 @@
-@font-face {
+/* @font-face {
font-family: b612_mono;
src: url(/fonts/B612_Mono/B612Mono-Regular.ttf);
}
@@ -17,7 +17,7 @@
src: url(/fonts/B612_Mono/B612Mono-BoldItalic.ttf);
font-weight: bold;
font-style: italic;
-}
+} */
:root {
/* --blue: #2e1ae0;
@@ -36,7 +36,7 @@ img {
}
body {
- font-family: b612_mono, monospace;
+ font-family: var(--bodyfont);
margin: 5rem;
color: white;
background: black;