praiadeseselle/wire/modules/AdminTheme/AdminThemeUikit/_main.php

80 lines
2 KiB
PHP
Raw Normal View History

2022-03-08 15:55:41 +01:00
<?php namespace ProcessWire;
/**
* _main.php: Main markup template file for AdminThemeUikit
*
* FileCompiler=0
*
*/
2022-11-05 18:32:48 +01:00
if(!defined("PROCESSWIRE")) die();
2022-03-08 15:55:41 +01:00
/** @var Config $config */
/** @var AdminThemeUikit $adminTheme */
/** @var User $user */
/** @var Modules $modules */
/** @var Notices $notices */
/** @var Page $page */
2022-11-05 18:32:48 +01:00
/** @var Process $process */
2022-03-08 15:55:41 +01:00
/** @var Sanitizer $sanitizer */
/** @var WireInput $input */
/** @var Paths $urls */
/** @var string $layout */
/** @var Process $process */
$adminTheme->renderExtraMarkup('x'); // forces it to cache
if(!isset($content)) $content = '';
?><!DOCTYPE html>
<html class="pw" lang="<?php echo $adminTheme->_('en');
/* this intentionally on a separate line */ ?>">
<head>
<?php
2022-11-05 18:32:48 +01:00
$adminTheme->includeFile('_head.php', array('layout' => $layout));
2022-03-08 15:55:41 +01:00
echo $adminTheme->renderExtraMarkup('head');
?>
</head>
<body class='<?php echo $adminTheme->getBodyClass(); ?>'>
<?php
if($layout == 'sidenav') {
2022-11-05 18:32:48 +01:00
$adminTheme->includeFile('_sidenav-masthead.php');
2022-03-08 15:55:41 +01:00
} else if($layout == 'sidenav-tree' || $layout == 'sidenav-tree-alt') {
// masthead not rendered in this frame
echo $adminTheme->renderNotices($notices);
echo "<div class='uk-margin-small'></div>";
} else if($layout == 'modal') {
// no masthead
echo $adminTheme->renderNotices($notices);
} else {
2022-11-05 18:32:48 +01:00
$adminTheme->includeFile('_masthead.php');
2022-03-08 15:55:41 +01:00
}
2022-11-05 18:32:48 +01:00
$headline = $adminTheme->getHeadline();
$headlinePos = strpos($content, "$headline</h1>");
if($headlinePos && $headlinePos > 500) $headline = '';
$adminTheme->includeFile('_content.php', array(
'headline' => $headline,
'content' => &$content,
'layout' => $layout
));
2022-03-08 15:55:41 +01:00
if(!$adminTheme->isModal) {
2022-11-05 18:32:48 +01:00
$adminTheme->includeFile('_footer.php');
if($adminTheme->isLoggedIn && strpos($layout, 'sidenav') !== 0) {
$adminTheme->includeFile('_offcanvas.php');
}
2022-03-08 15:55:41 +01:00
}
2022-11-05 18:32:48 +01:00
2022-03-08 15:55:41 +01:00
echo $adminTheme->renderExtraMarkup('body');
2022-11-05 18:32:48 +01:00
$adminTheme->includeFile('_body-scripts.php', array('layout' => $layout));
2022-03-08 15:55:41 +01:00
?>
</body>
2022-11-05 18:32:48 +01:00
</html><?php