getting closer to full port of web app starter
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
<?php
|
||||
Profiler::log('page template: start', 1);
|
||||
$embed_mode = !empty($_GET['embed']);
|
||||
?><!doctype html>
|
||||
<html class="<?= asafe(theme_html_class()) ?>" lang="en" data-theme-key="<?= asafe((string)cfg('theme/key')) ?>">
|
||||
<head>
|
||||
<?php theme_render_head(); ?>
|
||||
</head>
|
||||
<body<?= $embed_mode ? ' class="embed-mode"' : '' ?>>
|
||||
<?php theme_render_global_controls($embed_mode); ?>
|
||||
<?php theme_render_standard_nav(array('show_avatar' => false)); ?>
|
||||
<div id="content"<?= $embed_mode ? ' class="embed-content"' : '' ?>>
|
||||
<?= URL::$fragments['main'] ?>
|
||||
</div>
|
||||
<?php theme_render_footer(null, array('embed_mode' => $embed_mode)); ?>
|
||||
</body>
|
||||
<?php Profiler::log('page template: end', -1); ?>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
#load "../../lib/app.uce"
|
||||
|
||||
COMPONENT(Request& context)
|
||||
{
|
||||
starter_boot(context);
|
||||
bool embed_mode = starter_page_embed_mode(context);
|
||||
String main_html = starter_page_main_html(context);
|
||||
|
||||
DTree footer_props;
|
||||
footer_props["embed_mode"].set_bool(embed_mode);
|
||||
|
||||
<>
|
||||
<!doctype html>
|
||||
<html class="<?= starter_html_class(context) ?>" lang="en" data-theme-key="<?= context.cfg.get_by_path("theme/key").to_string() ?>">
|
||||
<head>
|
||||
<?: component("../../components/theme/head", context) ?>
|
||||
</head>
|
||||
<body<?: embed_mode ? " class=\"embed-mode\"" : "" ?>>
|
||||
<?: component("../../components/theme/global_controls", context) ?>
|
||||
<?: component("../../components/theme/standard_nav", context) ?>
|
||||
<div id="content"<?: embed_mode ? " class=\"embed-content\"" : "" ?>>
|
||||
<?: main_html ?>
|
||||
</div>
|
||||
<?: component("../../components/theme/footer", footer_props, context) ?>
|
||||
</body>
|
||||
</html>
|
||||
</>
|
||||
}
|
||||
Reference in New Issue
Block a user