Add header information to preload web fonts

This commit is contained in:
Alex Cabal 2021-03-30 16:53:08 -05:00
parent 08592a6a02
commit 7e155b600c

View file

@ -30,6 +30,11 @@ print("\n");
<title><? if($title != ''){ ?><?= Formatter::ToPlainText($title) ?> - <? } ?>Standard Ebooks: Free and liberated ebooks, carefully produced for the true book lover.</title>
<? if($description != ''){ ?><meta content="<?= Formatter::ToPlainText($description) ?>" name="description"/><? } ?>
<meta content="width=device-width, initial-scale=1" name="viewport"/>
<link rel="preload" as="font" href="/fonts/league-spartan-bold.woff2" type="font/woff2"/>
<link rel="preload" as="font" href="/fonts/crimson-pro.woff2" type="font/woff2"/>
<link rel="preload" as="font" href="/fonts/crimson-pro-bold.woff2" type="font/woff2"/>
<link rel="preload" as="font" href="/fonts/crimson-pro-italic.woff2" type="font/woff2"/>
<link rel="preload" as="font" href="/fonts/crimson-pro-bold-italic.woff2" type="font/woff2"/>
<link href="/css/core.css?version=<?= crc32(file_get_contents(WEB_ROOT . '/css/core.css')) ?>" media="screen" rel="stylesheet" type="text/css"/>
<? if($colorScheme == 'auto' || $colorScheme == 'dark'){ ?>
<link href="/css/dark.css?version=<?= crc32(file_get_contents(WEB_ROOT . '/css/dark.css')) ?>" media="screen<? if($colorScheme == 'auto'){ ?> and (prefers-color-scheme: dark)<? } ?>" rel="stylesheet" type="text/css"/>