aboutsummaryrefslogtreecommitdiff
path: root/boilerplate.php
diff options
context:
space:
mode:
authorAda Isopods <me@bathynomus.xyz>2026-10-14 03:38:44 -0600
committerAda Isopods <me@bathynomus.xyz>2026-10-14 03:38:44 -0600
commit40bbd9b5480c69e2c95bd9f20cc428ce992e7b15 (patch)
treea11ed9987aa2ce676074d40ad33227b8875f2b01 /boilerplate.php
parentaa7f342d12005e51924ce1e39770c709dcf96566 (diff)
Font selector and other little things
Added a font selector CSS is now inlined server-side because it makes Lighthouse happy A few other little accessibility and general housekeeping adjustments
Diffstat (limited to 'boilerplate.php')
-rw-r--r--boilerplate.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/boilerplate.php b/boilerplate.php
index 4fbb869..686d682 100644
--- a/boilerplate.php
+++ b/boilerplate.php
@@ -1,5 +1,23 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
+<!--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>");
+}
+if($_COOKIE["bugwomen_font_choice"]) {
+ fontcode("/stuff/fonts/".$_COOKIE["bugwomen_font_choice"].".css");
+} else {
+ fontcode("/stuff/fonts/b612mono.css");
+}
+// fontcode("/stuff/fonts/opendyslexic.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>");
+?>
+
+
+
<!-- This script sends some basic, anonymous data about your session to an instance of the analytics program Umami that I host myself. None of this data leaves my server, and as far as I know I can't track you with it, nor would I want to. This is purely for my own curiosity. If you're uncomfortable with this, it can be disabled by either enabling the "do not track" header in your browser or disabling Javascript for my site. Neither will break anything. If you'd like to see these analytics for yourself, here it is: https://analytics.bathynomus.xyz/share/sByyVQFsohefUT9l For what it's worth, most of this information is either directly present in or can be derived from the logs left by any reverse proxy anyway.-->
<script defer src="https://analytics.bathynomus.xyz/script.js" data-website-id="1c028a86-402f-466e-b7a0-b982ad37ce62" data-do-not-track="true"></script>
+