decided in favor of dedicated COMPONENT() macro, updates to documentation

This commit is contained in:
udo
2026-04-19 11:34:03 +00:00
parent be514d63d6
commit 2b5586d7df
56 changed files with 926 additions and 401 deletions
+5 -5
View File
@@ -1,22 +1,22 @@
RENDER(Request& context)
COMPONENT(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); ?>
<? render_component(":TITLE", context.call, context); ?>
<? render_component(":BODY", context.call, context); ?>
</section>
</>
}
RENDER:TITLE(Request& context)
COMPONENT:TITLE(Request& context)
{
<>
<h3><?= first(context.call["title"].to_string(), "Component Title") ?></h3>
</>
}
RENDER:BODY(Request& context)
COMPONENT:BODY(Request& context)
{
<>
<p><?= first(context.call["body"].to_string(), "Component Body") ?></p>
+1 -1
View File
@@ -1,4 +1,4 @@
RENDER(Request& context)
COMPONENT(Request& context)
{
String lang = first(context.call["lang"].to_string(), "plain");
<>
+1 -1
View File
@@ -1,4 +1,4 @@
RENDER(Request& context)
COMPONENT(Request& context)
{
String title = first(
context.call["node"]["attrs"]["title"].to_string(),