aowow/template/bricks/head.tpl.php
Sarjuuk 226f521439 Template/Endpoints (Base)
* redo page render following the logic of:
      Response ─┬─> TextResponse ─> TextResponseImpl
                └─> TemplateResponse ─> TemplateResponseImpl
    * split up giant files, one per response path
    * caching becomes a trait, implemented where necessary
        * TextResponses (Ajax) can now be cached
    * make use of previously defined php classes for js objects
        * Tabs, Listview, Tooltip, Announcement, Markup, Book, ...
    * \Aowow\Template\PageTemplate is the new class to be cached
    * do not discard error messages generated after vars have been sent to template
      and store in session for display at a later time
    * implement tracking consent management
    * move logic out of template into their respective endpoints
2025-09-25 15:32:18 +02:00

49 lines
1.6 KiB
PHP

<?php
namespace Aowow\Template;
use \Aowow\Lang;
?>
<title><?=$this->concat('title', ' - '); ?></title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="SHORTCUT ICON" href="<?=$this->gStaticUrl; ?>/images/logos/favicon.ico" />
<link rel="search" type="application/opensearchdescription+xml" href="<?=$this->gStaticUrl; ?>/download/searchplugins/aowow.xml" title="<?=Lang::main('search');?>" />
<?=$this->renderArray('css', 4); ?>
<script type="text/javascript">
var g_serverTime = <?=$this->gServerTime; ?>;
var g_staticUrl = "<?=$this->gStaticUrl; ?>";
var g_host = "<?=$this->gHost; ?>";
<?php
if ($this->gDataKey):
echo " var g_dataKey = '".$_SESSION['dataKey']."'\n";
endif;
?>
</script>
<?=$this->renderArray('js', 4); ?>
<script type="text/javascript">
var g_user = <?=$this->json($this->user::getUserGlobal()); ?>;
<?php
if ($fav = $this->user::getFavorites()):
echo " g_favorites = ".$this->json($fav).";\n";
endif;
?>
</script>
<?php if ($this->analyticsTag): ?>
<script async src="https://www.googletagmanager.com/gtag/js?id=<?=$this->analyticsTag; ?>"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '<?=$this->analyticsTag; ?>');
</script>
<?php
endif;
if ($this->rss):
?>
<link rel="alternate" type="application/rss+xml" title="<?=$this->concat('title', ' - '); ?>" href="<?=$this->rss; ?>"/>
<?php
endif;
?>