#load "../../lib/app.uce" RENDER(Request& context) { starter_boot(context); String page_type = first(context.var["starter"]["page_type"].to_string(), "html"); if(context.flags.status >= 300 && context.flags.status < 400) return; if(page_type == "blank") { print(context.call["main_html"].to_string()); return; } if(page_type == "json") { context.header["Content-Type"] = "application/json"; context.header["Cache-Control"] = "no-cache, no-store, must-revalidate"; if(context.var["starter"]["json"].get_type_name() == "array") { print(json_encode(context.var["starter"]["json"])); } else { print(context.call["main_html"].to_string()); } return; } String theme_key = starter_theme_value("key", context); bool embed_mode = context.var["starter"]["embed_mode"].to_string() == "1"; String body_class = embed_mode ? "embed-mode" : ""; if(theme_key == "portal-dark") body_class = "portal-theme portal-dark-theme dark-theme" + String(embed_mode ? " embed-mode" : ""); else if(theme_key == "portal-light") body_class = "portal-theme portal-light-theme" + String(embed_mode ? " embed-mode" : ""); else if(theme_key == "localfirst") body_class = "admin-page localfirst-theme dark-theme" + String(embed_mode ? " embed-mode" : ""); else if(theme_key == "retro-gaming") body_class = embed_mode ? "embed-mode" : ""; <> "> >
>
} RENDER:HEAD(Request& context) { starter_boot(context); String title = first(context.var["starter"]["page_title"].to_string(), starter_cfg_string("site/default_page_title", context)); String description = first(starter_theme_value("meta_description", context), "UCE starter example"); String theme_color = first(starter_theme_value("theme_color", context), "#0f172a"); String icon = starter_asset_url(starter_theme_value("path", context) + "icon.png", context); <> <?= title + " | " + starter_cfg_string("site/name", context) ?> }