diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2023-03-04 01:46:45 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2023-03-04 01:46:45 +0300 |
commit | eeb84c5be16ecca239adae9c851bc0f7db0875a1 (patch) | |
tree | 9aa1056e643212e4c6133d90f38a1966f0fa35ca /skin/base.skin.php | |
parent | 917d2622aa5fe748c1cda914eae94c12be743c42 (diff) |
blog: support ToC
Diffstat (limited to 'skin/base.skin.php')
-rw-r--r-- | skin/base.skin.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/skin/base.skin.php b/skin/base.skin.php index 3374555..d39a0a8 100644 --- a/skin/base.skin.php +++ b/skin/base.skin.php @@ -13,6 +13,12 @@ $app_config = json_encode([ 'cookieHost' => $config['cookie_host'], ]); +$body_class = []; +if ($opts['full_width']) + $body_class = 'full-width'; +else if ($opts['wide']) + $body_class = 'wide'; + return <<<HTML <!doctype html> <html lang="en"> @@ -26,7 +32,7 @@ return <<<HTML {$ctx->renderMeta($meta)} {$ctx->renderStatic($static, $theme)} </head> - <body{$ctx->if_true($opts['full_width'], ' class="full-width"')}> + <body{$ctx->if_true($body_class, ' class="'.$body_class.'"')}> {$ctx->renderHeader($theme, renderLogo($ctx, $opts['logo_path_map'], $opts['logo_link_map']))} <div class="page-content base-width"> <div class="page-content-inner">{$unsafe_body}</div> |