some cleanup

This commit is contained in:
udo
2026-04-28 12:10:07 +00:00
parent 223cf4c6e1
commit cd445f3c9b
224 changed files with 1558 additions and 38907 deletions
@@ -7,9 +7,9 @@ COMPONENT(Request& context)
DTree user = users.current();
bool signed_in = user["email"].to_string() != "";
String theme_key = context.cfg.get_by_path("theme/key").to_string();
String wrapper_class = first(context.call["wrapper_class"].to_string(), theme_key == "localfirst" ? "admin-account-card" : "nav-account nav-menu");
String links_class = first(context.call["links_wrapper_class"].to_string(), theme_key == "localfirst" ? "admin-account-links" : "");
String name_class = first(context.call["name_class"].to_string(), theme_key == "localfirst" ? "admin-account-name" : "account-name");
String wrapper_class = first(context.props["wrapper_class"].to_string(), theme_key == "localfirst" ? "admin-account-card" : "nav-account nav-menu");
String links_class = first(context.props["links_wrapper_class"].to_string(), theme_key == "localfirst" ? "admin-account-links" : "");
String name_class = first(context.props["name_class"].to_string(), theme_key == "localfirst" ? "admin-account-name" : "account-name");
<>
<div class="<?= wrapper_class ?>">
@@ -8,7 +8,7 @@ COMPONENT(Request& context)
return;
String text = first(context.cfg.get_by_path("theme/footer_text").to_string(), context.cfg.get_by_path("site/name").to_string());
String inner_class = first(context.call["inner_class"].to_string(), context.cfg.get_by_path("theme/key").to_string() == "portal-light" ? "footer-inner" : "");
String inner_class = first(context.props["inner_class"].to_string(), context.cfg.get_by_path("theme/key").to_string() == "portal-light" ? "footer-inner" : "");
<>
<footer>
@@ -6,7 +6,7 @@ COMPONENT(Request& context)
if(starter_page_embed_mode(context))
return;
String cookie_value = context.call["cookie_consent"].to_string();
String cookie_value = context.props["cookie_consent"].to_string();
bool cookie_consent = !(cookie_value == "0" || cookie_value == "false" || cookie_value == "FALSE" || cookie_value == "no" || cookie_value == "NO");
<>
@@ -3,18 +3,18 @@
COMPONENT(Request& context)
{
starter_boot(context);
if(context.call["main_html"].to_string() != "")
context.var["starter"]["fragments"]["main"] = context.call["main_html"];
if(context.call["json"].get_type_name() == "array")
context.var["starter"]["json"] = context.call["json"];
if(context.call["page_type"].to_string() != "")
context.var["starter"]["page_type"] = context.call["page_type"];
if(context.call["embed_mode"].to_string() != "")
context.var["starter"]["embed_mode"] = context.call["embed_mode"];
if(context.props["main_html"].to_string() != "")
context.var["starter"]["fragments"]["main"] = context.props["main_html"];
if(context.props["json"].get_type_name() == "array")
context.var["starter"]["json"] = context.props["json"];
if(context.props["page_type"].to_string() != "")
context.var["starter"]["page_type"] = context.props["page_type"];
if(context.props["embed_mode"].to_string() != "")
context.var["starter"]["embed_mode"] = context.props["embed_mode"];
starter_render_page(context);
}
COMPONENT:HEAD(Request& context)
{
print(component("head", context.call, context));
print(component("head", context.props, context));
}
@@ -3,17 +3,17 @@
COMPONENT(Request& context)
{
starter_boot(context);
String nav_class = context.call["nav_class"].to_string();
String nav_class = context.props["nav_class"].to_string();
if(nav_class == "" && (context.cfg.get_by_path("theme/key").to_string() == "portal-dark" || context.cfg.get_by_path("theme/key").to_string() == "dark" || context.cfg.get_by_path("theme/key").to_string() == "retro-gaming"))
nav_class = "nav-shell";
DTree account_props;
if(context.call["account_wrapper_class"].to_string() != "")
account_props["wrapper_class"] = context.call["account_wrapper_class"];
if(context.call["links_wrapper_class"].to_string() != "")
account_props["links_wrapper_class"] = context.call["links_wrapper_class"];
if(context.call["name_class"].to_string() != "")
account_props["name_class"] = context.call["name_class"];
if(context.props["account_wrapper_class"].to_string() != "")
account_props["wrapper_class"] = context.props["account_wrapper_class"];
if(context.props["links_wrapper_class"].to_string() != "")
account_props["links_wrapper_class"] = context.props["links_wrapper_class"];
if(context.props["name_class"].to_string() != "")
account_props["name_class"] = context.props["name_class"];
<>
<nav<?: nav_class != "" ? " class=\"" + html_escape(nav_class) + "\"" : "" ?>>