summaryrefslogtreecommitdiff
path: root/skin/base.skin.php
diff options
context:
space:
mode:
Diffstat (limited to 'skin/base.skin.php')
-rw-r--r--skin/base.skin.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/skin/base.skin.php b/skin/base.skin.php
index d39a0a8..d583ffe 100644
--- a/skin/base.skin.php
+++ b/skin/base.skin.php
@@ -2,9 +2,6 @@
namespace skin\base;
-use admin;
-use RequestDispatcher;
-
function layout($ctx, $title, $unsafe_body, $static, $meta, $js, $opts, $exec_time, $unsafe_lang, $theme) {
global $config;
$app_config = json_encode([
@@ -15,9 +12,13 @@ $app_config = json_encode([
$body_class = [];
if ($opts['full_width'])
- $body_class = 'full-width';
+ $body_class[] = 'full-width';
else if ($opts['wide'])
- $body_class = 'wide';
+ $body_class[] = 'wide';
+if (!empty($body_class))
+ $body_class = implode(' ', $body_class);
+else
+ $body_class = '';
return <<<HTML
<!doctype html>
@@ -196,7 +197,7 @@ $items = [
['url' => '/misc/', 'label' => 'misc'],
['url' => '/contacts/', 'label' => 'contacts'],
];
-if (\admin::isAdmin())
+if (\is_admin())
$items[] = ['url' => '/admin/', 'label' => 'admin'];
// here, items are rendered using for_each, so that there are no gaps (whitespaces) between tags
@@ -226,9 +227,9 @@ HTML;
// TODO rewrite this fcking crap
function renderLogo($ctx, array $path_map = [], array $link_map = []): string {
- $uri = RequestDispatcher::path();
+ $uri = request_path();
- if (!admin::isAdmin()) {
+ if (!is_admin()) {
$prompt_sign = '<span class="head-logo-dolsign">$</span>';
} else {
$prompt_sign = '<span class="head-logo-dolsign is_root">#</span>';