aboutsummaryrefslogtreecommitdiff
path: root/boilerplate.php
diff options
context:
space:
mode:
Diffstat (limited to 'boilerplate.php')
-rw-r--r--boilerplate.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/boilerplate.php b/boilerplate.php
index 7d0723c..58f322a 100644
--- a/boilerplate.php
+++ b/boilerplate.php
@@ -3,12 +3,14 @@
<!--link href="/style.css" rel="stylesheet" type="text/css" media="all"-->
<?php
+
+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>");
+
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);