web-site-public-php/sys/default_template.php

105 lines
4.5 KiB
PHP
Raw Normal View History

2024-05-04 19:04:02 +00:00
<?php
require_once $_SERVER["DOCUMENT_ROOT"]."/sys/site.php";
require_once $_SERVER["DOCUMENT_ROOT"]."/sys/templating.php";
require_once $_SERVER["DOCUMENT_ROOT"]."/sys/navbar.php";
require_once $_SERVER["DOCUMENT_ROOT"]."/sys/footer.php";
require_once $_SERVER["DOCUMENT_ROOT"]."/sys/infobox.php";
function is_chrome($user_agent) {
// Some engines/browsers falsely report a Chrome agent
if (preg_match('/\\b(QtWebEngine|QupZilla|Midori)/i', $user_agent))
return false;
return preg_match('/\\b(Chrome|CrOS|CriOS|Chromium|Brave)/i', $user_agent);
}
function render_outline($outline) {
?>
<ul>
<?php
foreach ($outline as $key => $value) {
if ($key == "_")
continue;
$text = $key;
if (array_key_exists("_", $value))
$text = $value["_"];
?>
<li>
<a class="nav-link" href="#<?=$key?>"><?=$text?></a>
<?php
if (!empty($value) && array_key_last($value) != "_")
render_outline($value);
?>
</li>
<?php
}
?>
</ul>
<?php
}
function default_template($page) {
template_begin();
?>
<!DOCTYPE html>
<html lang="en">
<?php new PageHead($page); ?>
<body>
<header>
<button class="mobile-menu" onclick="navToggle()">Menu</button>
<span class="site-title"><?=Site::$sitename?></span>
<h1 class="page-title"><?=$page->title;?></h1>
</header>
<div id="page-sidebar">
<?php if (is_chrome($_SERVER['HTTP_USER_AGENT'])): ?>
<div class="info-box warning-box" style="padding-bottom: 0px;"><b>Warning:</b>
You are using a harmful browser.
<p>
Chrome and Chrome-based browsers threaten the open Web, as they give Google an effective monopoly over browser technology. Currently, Google is using this power to push "Web Environment Integrity", an API that will <b>prevent you from accessing Web sites if your browser is not approved by Google, or has been modified in any way</b>. This is <i>incredibly</i> dangerous. (Read more on the <a href="https://www.fsf.org/blogs/community/web-environment-integrity-is-an-all-out-attack-on-the-free-internet">FSF</a> and <a href="https://vivaldi.com/blog/googles-new-dangerous-web-environment-integrity-spec/">Vivaldi</a> blogs.)
</p>
<p>
Please don't contribute to Google's market share. <b>Switch to a non-Chrome browser</b> like <a href="https://firefox.com/">Firefox</a>, <a href="https://librewolf.net/">LibreWolf</a>, <a href="https://falkon.org/">Falkon</a>, or <a href="https://apple.com/safari">Safari</a>.
</p>
</div>
<?php
endif;
new Navbar($page);
if (!empty($page->outline)):
?>
<details class="outliner">
<summary><h1>Page contents</h1></summary>
<?php render_outline($page->outline); ?>
</details>
<?php endif; ?>
</div>
<?php
bake_slot("main");
new Footer($page);
?>
<aside id="page-side-footer">
<div class="toolbar">
<a class="button" href="https://keithhacks.cyou/furryring.php?prev=keithhacks.cyou">&larr; Prev</a>
<a class="button" href="https://keithhacks.cyou/furryring.php">Furryring</a>
<a class="button" href="https://keithhacks.cyou/furryring.php?next=keithhacks.cyou">Next &rarr;</a>
</div>
<a class="patch" href="http://web3.14159.annwfn.net/"><img src="/assets/p_web_pi.png" alt="Web 3.14159..." /></a>
<a class="patch" href="https://bunnyhearted.com/"><img src="/assets/p_bunnyhearted.gif" alt="BunnyHearted.com" /></a>
<a class="patch" href="https://cyber.dabamos.de/88x31/"><img src="/assets/p_anarchy.gif" alt="Anarchy Now!" /></a>
<a class="patch" href="https://blos.sm/"><img src="/assets/p_cel.png" alt="cel" /></a>
<a class="patch" href="https://webb.spiderden.org/"><img src="/assets/p_webb.png" alt="webb" /></a>
<a class="patch" href="https://loose-files.keithhacks.cyou/vid/putin_gay.webm"><img src="/assets/p_cocksuckingfaggot.gif" alt="Cock sucking faggot" /></a>
<!-- For anyone poking around in this: there's a p_pride.xcf file you can grab if you want it -->
<a class="patch" href="https://en.wikipedia.org/wiki/Animal_roleplay#Puppy_play"><img src="/assets/p_pride_pup.gif" alt="Puppy pride" /></a>
<a class="patch" href="https://en.wikipedia.org/wiki/Polyamory"><img src="/assets/p_pride_polyam.gif" alt="Polyamory pride" /></a>
<a class="patch" href="https://stimpunks.org/glossary/genderpunk/"><img src="/assets/p_pride_punk2.gif" alt="Genderpunk pride" /></a>
<a class="patch" href="https://en.wikipedia.org/wiki/Therianthropy#Modern_therianthropy"><img src="/assets/p_pride_transspecies_anim.gif" alt="Transspecies/transgender pride" /></a>
</aside>
</body>
</html>
<?php
template_end();
}
?>