getting closer to full port of web app starter
This commit is contained in:
@@ -1 +0,0 @@
|
||||
<?= URL::$fragments['main'] ?>
|
||||
@@ -0,0 +1,7 @@
|
||||
#load "../../lib/app.uce"
|
||||
|
||||
COMPONENT(Request& context)
|
||||
{
|
||||
starter_boot(context);
|
||||
print(starter_page_main_html(context));
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
<?php
|
||||
|
||||
header('Content-Type: application/json');
|
||||
header('Cache-Control: no-cache, no-store, must-revalidate');
|
||||
if(URL::$fragments['json'])
|
||||
{
|
||||
print(json_encode(URL::$fragments['json']));
|
||||
}
|
||||
else
|
||||
{
|
||||
print(URL::$fragments['main']);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#load "../../lib/app.uce"
|
||||
|
||||
COMPONENT(Request& context)
|
||||
{
|
||||
starter_boot(context);
|
||||
context.header["Content-Type"] = "application/json";
|
||||
context.header["Cache-Control"] = "no-cache, no-store, must-revalidate";
|
||||
if(context.call["json"].get_type_name() == "array")
|
||||
print(json_encode(context.call["json"]));
|
||||
else if(context.var["starter"]["json"].get_type_name() == "array")
|
||||
print(json_encode(context.var["starter"]["json"]));
|
||||
else
|
||||
print(starter_page_main_html(context));
|
||||
}
|
||||
@@ -1,21 +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,
|
||||
'account_wrapper_class' => 'nav-account nav-menu',
|
||||
)); ?>
|
||||
<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,31 @@
|
||||
#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 nav_props;
|
||||
nav_props["account_wrapper_class"] = "nav-account nav-menu";
|
||||
|
||||
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", nav_props, context) ?>
|
||||
<div id="content"<?: embed_mode ? " class=\"embed-content\"" : "" ?>>
|
||||
<?: main_html ?>
|
||||
</div>
|
||||
<?: component("../../components/theme/footer", footer_props, context) ?>
|
||||
</body>
|
||||
</html>
|
||||
</>
|
||||
}
|
||||
@@ -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>
|
||||
</>
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
<?php
|
||||
Profiler::log('page template: start', 1);
|
||||
$embed_mode = !empty($_GET['embed']);
|
||||
$currentPath = URL::$route['l-path'] ?? '';
|
||||
?><!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 class="admin-page localfirst-theme dark-theme<?= $embed_mode ? ' embed-mode' : '' ?>">
|
||||
<?php theme_render_global_controls($embed_mode, array('cookie_consent' => false)); ?>
|
||||
<div class="admin-shell">
|
||||
<nav class="admin-nav">
|
||||
<div class="admin-nav-header">
|
||||
<a class="admin-nav-title" href="<?= URL::Link('') ?>">
|
||||
<img class="admin-nav-logo-img" src="<?= url_root().ltrim((string)cfg('theme/path'), '/') ?>img/local_first_logo.png" alt="<?= safe(cfg('site/name')) ?>" />
|
||||
</a>
|
||||
</div>
|
||||
<?php foreach((array)cfg('menu') as $menu_key => $menu_item) if(empty($menu_item['hidden'])) { ?>
|
||||
<a class="admin-nav-item<?= ($menu_key !== '' && ($currentPath === $menu_key || strpos($currentPath, $menu_key.'/') === 0)) ? ' active' : '' ?>" href="<?= theme_menu_href($menu_key, $menu_item) ?>"><?= safe($menu_item['title']) ?></a>
|
||||
<?php } ?>
|
||||
</nav>
|
||||
<div class="admin-main">
|
||||
<?php if(!$embed_mode): ?><div class="admin-toolbar">
|
||||
<?php theme_render_account_links(array(
|
||||
'wrapper_class' => 'admin-account-card',
|
||||
'links_wrapper_class' => 'admin-account-links',
|
||||
'name_class' => 'admin-account-name',
|
||||
)); ?>
|
||||
</div><?php endif; ?>
|
||||
<div id="content" class="admin-content">
|
||||
<?= URL::$fragments['main'] ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<?php Profiler::log('page template: end', -1); ?>
|
||||
</html>
|
||||
@@ -0,0 +1,54 @@
|
||||
#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);
|
||||
String current_path = context.var["starter"]["route"]["l_path"].to_string();
|
||||
|
||||
DTree global_props;
|
||||
global_props["cookie_consent"].set_bool(false);
|
||||
|
||||
DTree account_props;
|
||||
account_props["wrapper_class"] = "admin-account-card";
|
||||
account_props["links_wrapper_class"] = "admin-account-links";
|
||||
account_props["name_class"] = "admin-account-name";
|
||||
|
||||
<>
|
||||
<!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 class="admin-page localfirst-theme dark-theme<?= embed_mode ? " embed-mode" : "" ?>">
|
||||
<?: component("../../components/theme/global_controls", global_props, context) ?>
|
||||
<div class="admin-shell">
|
||||
<nav class="admin-nav">
|
||||
<div class="admin-nav-header">
|
||||
<a class="admin-nav-title" href="<?= starter_link("", context) ?>">
|
||||
<img class="admin-nav-logo-img" src="<?= starter_asset_url("themes/localfirst/img/local_first_logo.png", context) ?>" alt="<?= context.cfg.get_by_path("site/name").to_string() ?>" />
|
||||
</a>
|
||||
</div>
|
||||
<? context.cfg.get_by_path("menu").each([&](DTree menu_item, String menu_key) {
|
||||
if(menu_item["hidden"].to_string() == "1")
|
||||
return;
|
||||
bool active = menu_key != "" && (current_path == menu_key || current_path.rfind(menu_key + "/", 0) == 0);
|
||||
?><a class="admin-nav-item<?= active ? " active" : "" ?>" href="<?= starter_menu_href(menu_key, menu_item, context) ?>"><?= menu_item["title"].to_string() ?></a><?
|
||||
}); ?>
|
||||
</nav>
|
||||
<div class="admin-main">
|
||||
<? if(!embed_mode) { ?>
|
||||
<div class="admin-toolbar">
|
||||
<?: component("../../components/theme/account_links", account_props, context) ?>
|
||||
</div>
|
||||
<? } ?>
|
||||
<div id="content" class="admin-content">
|
||||
<?: main_html ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</>
|
||||
}
|
||||
@@ -1,18 +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 class="portal-theme portal-dark-theme dark-theme<?= $embed_mode ? ' embed-mode' : '' ?>">
|
||||
<?php theme_render_global_controls($embed_mode); ?>
|
||||
<?php theme_render_standard_nav(array('account_wrapper_class' => 'nav-account nav-menu')); ?>
|
||||
<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,31 @@
|
||||
#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 nav_props;
|
||||
nav_props["account_wrapper_class"] = "nav-account nav-menu";
|
||||
|
||||
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 class="portal-theme portal-dark-theme dark-theme<?= embed_mode ? " embed-mode" : "" ?>">
|
||||
<?: component("../../components/theme/global_controls", context) ?>
|
||||
<?: component("../../components/theme/standard_nav", nav_props, context) ?>
|
||||
<div id="content"<?: embed_mode ? " class=\"embed-content\"" : "" ?>>
|
||||
<?: main_html ?>
|
||||
</div>
|
||||
<?: component("../../components/theme/footer", footer_props, context) ?>
|
||||
</body>
|
||||
</html>
|
||||
</>
|
||||
}
|
||||
@@ -1,18 +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 class="portal-theme portal-light-theme<?= $embed_mode ? ' embed-mode' : '' ?>">
|
||||
<?php theme_render_global_controls($embed_mode); ?>
|
||||
<?php theme_render_standard_nav(); ?>
|
||||
<div id="content"<?= $embed_mode ? ' class="embed-content"' : '' ?>>
|
||||
<?= URL::$fragments['main'] ?>
|
||||
</div>
|
||||
<?php theme_render_footer(null, array('embed_mode' => $embed_mode, 'inner_class' => 'footer-inner')); ?>
|
||||
</body>
|
||||
<?php Profiler::log('page template: end', -1); ?>
|
||||
</html>
|
||||
@@ -0,0 +1,29 @@
|
||||
#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);
|
||||
footer_props["inner_class"] = "footer-inner";
|
||||
|
||||
<>
|
||||
<!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 class="portal-theme portal-light-theme<?= embed_mode ? " 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>
|
||||
</>
|
||||
}
|
||||
@@ -1,22 +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"' : '' ?>>
|
||||
<div class="retro-stars"></div>
|
||||
<?php theme_render_global_controls($embed_mode); ?>
|
||||
<?php theme_render_standard_nav(array(
|
||||
'show_avatar' => false,
|
||||
'account_wrapper_class' => 'nav-account nav-menu',
|
||||
)); ?>
|
||||
<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,32 @@
|
||||
#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 nav_props;
|
||||
nav_props["account_wrapper_class"] = "nav-account nav-menu";
|
||||
|
||||
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\"" : "" ?>>
|
||||
<div class="retro-stars"></div>
|
||||
<?: component("../../components/theme/global_controls", context) ?>
|
||||
<?: component("../../components/theme/standard_nav", nav_props, 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