diff options
Diffstat (limited to 'boilerplate.php')
| -rw-r--r-- | boilerplate.php | 9 |
1 files changed, 8 insertions, 1 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"; |
