AzuraCast/templates/minimal.phtml

70 lines
1.8 KiB
PHTML

<!DOCTYPE html>
<?php
/**
* @var League\Plates\Template\Template $this
* @var App\Auth $auth
* @var App\Acl $acl
* @var App\Http\Router $router
* @var App\Session\Flash $flash
* @var App\Customization $customization
* @var App\Assets $assets
* @var App\Version $version
* @var App\Http\ServerRequest $request
* @var App\Environment $environment
*/
$page_class ??= '';
$page_class .= ' theme-' . $customization->getPublicTheme();
?>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?=$customization->getPageTitle($title)?></title>
<?=$this->fetch('partials/icons')?>
<?php
$assets
->load('minimal')
->load('theme_' . $customization->getPublicTheme())
->addInlineCss($customization->getCustomPublicCss())
->addInlineJs($customization->getCustomPublicJs());
echo $assets->css();
echo $assets->js();
?>
</head>
<body class="page-minimal <?=$page_class?>">
<?=$assets->inlineJs()?>
<?=$this->section('content')?>
<?php
if (!$customization->hideProductName() && !$hide_footer): ?>
<footer id="footer" class="footer-alt" role="contentinfo">
<?=sprintf(
__('Powered by %s'),
'<a href="https://azuracast.com/" target="_blank">' . $environment->getAppName() . '</a>' . ' '
)?>
</footer>
<?php
endif; ?>
<?php
if (null !== $flash && $flash->hasMessages()): ?>
<script type="text/javascript" nonce="<?=$assets->getCspNonce()?>">
$(function () {
<?php foreach($flash->getMessages() as $message): ?>
notify("<?=str_replace(['"', "\n"], ['\'', '<br>'], $message['text']) ?>", '<?=$message['color'] ?>', true);
<?php endforeach; ?>
});
</script>
<?php
endif; ?>
</body>
</html>