aboutsummaryrefslogtreecommitdiff
path: root/boilerplate.php
blob: 58f322aa91d056a6e3a01a3b72b82d22ee7edc13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<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"-->

<?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");


$fun = rand(0,8192);

$favicon_filename = "/favicon.ico";
$style = "";
$greeting = "Welcome.";

$month = idate("m");
$day = idate("d");

if($month == 6 || ($month == 3 && $day == 31)) {
  #$favicon_filename = "/favicon_transgender.ico";
  $style = ":root { --gradient: linear-gradient(135deg, #5BCEFA 0%, #5BCEFA 35%, #F5A9B8 65%, #FFFFFF 90%); }";
  $greeting = "Trans rights!";
}

echo("<link rel='icon' type='image/x-icon' href='$favicon_filename'>");
if($style) {
  echo("<style>$style</style>");
}
?>