diff options
Diffstat (limited to '')
| -rw-r--r-- | src/web/_views/bucket/main.php | 18 | ||||
| -rw-r--r-- | src/web/_views/footer.php | 18 | ||||
| -rw-r--r-- | src/web/_views/head.php | 31 | ||||
| -rw-r--r-- | src/web/_views/header.php | 15 |
4 files changed, 52 insertions, 30 deletions
diff --git a/src/web/_views/bucket/main.php b/src/web/_views/bucket/main.php index aeb6cf3..b85c773 100644 --- a/src/web/_views/bucket/main.php +++ b/src/web/_views/bucket/main.php @@ -1,13 +1,13 @@ <?php /* Copyright (c) 2024 Freya Murphy */ ?> - <?php - $root='https://webring.bucketfish.me/redirect.html?to=%s&name=' . $name; - $this->view('head', $data); - if ($lightmode === 'true') { - echo $this->link_css('css/bucket_light.css'); - } else { - echo $this->link_css('css/bucket.css'); - } - ?> +<?php + $root='https://webring.bucketfish.me/redirect.html?to=%s&name=' . $name; + $this->view('head', $data); + if ($lightmode === 'true') { + echo embed_css_ext('css/bucket_light.css'); + } else { + echo embed_css_ext('css/bucket.css'); + } +?> <base target="_parent" /> </head> <body> diff --git a/src/web/_views/footer.php b/src/web/_views/footer.php index a22959e..8807160 100644 --- a/src/web/_views/footer.php +++ b/src/web/_views/footer.php @@ -7,16 +7,16 @@ $footer_text = ''; } ?> - <div id="ad" class="section ad-slot" role="region"> - <span class="ad-slot"> - <?=lang('adblock_notice')?> - </span> - </div> + <div id="ad" class="section ad-slot" role="region"> + <span class="ad-slot"> + <?=lang('adblock_notice')?> + </span> </div> </div> - <div id="footer" role="contentinfo" aria-label="footer"> - <?=lang('license_pre')?> - <a href="https://opensource.org/license/mit/">MIT License</a> + </div> + <div id="footer" role="contentinfo" aria-label="footer"> + <div class="container"><div class="section"> + <?=lang('license')?> <br> <?=lang('copyright')?> <?=lang('first_name')?> <?=lang('last_name')?> <?=date('Y')?> <br> @@ -50,7 +50,7 @@ title="<?=lang('bucket_title')?>" src="<?=$this->get_url('bucket?name=freya')?>" ></iframe> - </div> + </div></div> </div> <?=ie('</center>')?> </body> diff --git a/src/web/_views/head.php b/src/web/_views/head.php index 1ca6954..73bd3f6 100644 --- a/src/web/_views/head.php +++ b/src/web/_views/head.php @@ -1,4 +1,19 @@ <?php /* Copyright (c) 2024 Freya Murphy */ ?> +<?php + /* Html cache headers */ + $current_app = ROUTER->req['app']; + $non_cached_apps = ['blog']; + + if (ENVIRONMENT == 'production' && !in_array($current_app, $non_cached_apps)) { + $cache_seconds = 300; + if ($current_app == 'bucket') { + $cache_seconds = 3600; + } + header("Cache-Control: public, max-age=$cache_seconds"); + header("Expires: " . gmdate('D, d M Y H:i:s', time() + $cache_seconds) . " UTC"); + header("Pragma: cache"); + } +?> <!DOCTYPE html> <html lang="<?=lang('lang_short')?>"> <head> @@ -21,19 +36,23 @@ <link rel="icon" type="image/png" sizes="512x512" href="<?=$this->get_url("public/icons/logo512.png", TRUE)?>"> <link rel="icon" type="image/png" sizes="640x640" href="<?=$this->get_url("public/icons/logo640.png", TRUE)?>"> <link rel="manifest" href="/manifest.json"> + <?php if ($current_app != 'bucket'): ?> + <link rel="preload" href="<?=$this->get_url("public/font/FontStuck-Extended.woff2")?>" as="font" type="font/woff2" crossorigin> + <link rel="preload" href="<?=$this->get_url("public/font/CourierNew.woff2")?>" as="font" type="font/woff2" crossorigin> + <link rel="preconnect" href="https://john.citrons.xyz"> + <?php else: ?> + <link rel="preload" href="<?=$this->get_url("public/font/Merriweather.woff2")?>" as="font" type="font/woff2" crossorigin> + <?php endif ?> <?php /* Main CSS */ - if (ROUTER->req['app'] != 'bucket') - echo $this->link_css('css/main.css'); + if (ROUTER->req['app'] != 'bucket') { + echo embed_css_ext('css/main.css'); + } /* IE 4-7 Styles */ echo ie($this->embed_css('css/ie/ie.css')); /* IE 4 Styles */ echo ie_ua($this->embed_css('css/ie/ie4.css'), 4); - /* IE 6-7 Styles */ - echo '<!--[if (gt IE 5)&(lt IE 8) ]>'; - echo $this->embed_css('css/ie/ie6.css'); - echo '<![endif]-->'; /* CSS Files */ foreach($css as $file) diff --git a/src/web/_views/header.php b/src/web/_views/header.php index 5eb528a..d4966a9 100644 --- a/src/web/_views/header.php +++ b/src/web/_views/header.php @@ -5,9 +5,11 @@ </head> <body> <?=ie('<center>')?> -<div class="center"> - <div id="header" role="banner" aria-label="banner"> - <?=image('img/headerLogo', 'alt_website_logo', 'title_website_logo', size: '200')?> +<div id="header" role="banner" aria-label="banner"> + <div class="container"><div class="section"> + <a href="<?=$this->get_url('')?>"> + <?=image('img/headerLogo', 'alt_website_logo', 'title_website_logo', size: '200')?> + </a> <div class="content"> <h1 class="logo-text"> <?=lang('first_name')?> @@ -30,6 +32,7 @@ </ul> </div> </div> - </div> - <div id="main" role="main" aria-label="main"> - <div id="container"> + </div></div> +</div> +<div id="main" role="main" aria-label="main"> + <div class="container"> |