trying to port web app starter from PHP

This commit is contained in:
udo
2026-04-19 09:38:23 +00:00
parent 46d98a092f
commit be514d63d6
546 changed files with 76910 additions and 2807 deletions
+24
View File
@@ -0,0 +1,24 @@
RENDER(Request& context)
{
<>
<section style="border:1px solid #ccc;padding:1em;margin:1em 0;">
<? render_component("card:TITLE", context.call, context); ?>
<? render_component("card:BODY", context.call, context); ?>
</section>
</>
}
RENDER:TITLE(Request& context)
{
<>
<h3><?= first(context.call["title"].to_string(), "Component Title") ?></h3>
</>
}
RENDER:BODY(Request& context)
{
<>
<p><?= first(context.call["body"].to_string(), "Component Body") ?></p>
</>
}
@@ -0,0 +1,10 @@
RENDER(Request& context)
{
String lang = first(context.call["lang"].to_string(), "plain");
<>
<section>
<p><strong>Code block:</strong> <?= lang ?></p>
<div><?: context.call["default_html"].to_string() ?></div>
</section>
</>
}
+15
View File
@@ -0,0 +1,15 @@
RENDER(Request& context)
{
String title = first(
context.call["node"]["attrs"]["title"].to_string(),
context.call["argument"].to_string(),
"Notice"
);
<>
<aside>
<p><strong><?= title ?></strong></p>
<div><?: context.call["children_html"].to_string() ?></div>
</aside>
</>
}