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
+4 -4
View File
@@ -3,8 +3,8 @@ COMPONENT(Request& context)
{
<>
<section style="border:1px solid #ccc;padding:1em;margin:1em 0;">
<? component_render(":TITLE", context.call, context); ?>
<? component_render(":BODY", context.call, context); ?>
<? component_render(":TITLE", context.props, context); ?>
<? component_render(":BODY", context.props, context); ?>
</section>
</>
}
@@ -12,13 +12,13 @@ COMPONENT(Request& context)
COMPONENT:TITLE(Request& context)
{
<>
<h3><?= first(context.call["title"].to_string(), "Component Title") ?></h3>
<h3><?= first(context.props["title"].to_string(), "Component Title") ?></h3>
</>
}
COMPONENT:BODY(Request& context)
{
<>
<p><?= first(context.call["body"].to_string(), "Component Body") ?></p>
<p><?= first(context.props["body"].to_string(), "Component Body") ?></p>
</>
}
+2 -2
View File
@@ -1,10 +1,10 @@
COMPONENT(Request& context)
{
String lang = first(context.call["lang"].to_string(), "plain");
String lang = first(context.props["lang"].to_string(), "plain");
<>
<section>
<p><strong>Code block:</strong> <?= lang ?></p>
<div><?: context.call["default_html"].to_string() ?></div>
<div><?: context.props["default_html"].to_string() ?></div>
</section>
</>
}
+3 -3
View File
@@ -1,15 +1,15 @@
COMPONENT(Request& context)
{
String title = first(
context.call["node"]["attrs"]["title"].to_string(),
context.call["argument"].to_string(),
context.props["node"]["attrs"]["title"].to_string(),
context.props["argument"].to_string(),
"Notice"
);
<>
<aside>
<p><strong><?= title ?></strong></p>
<div><?: context.call["children_html"].to_string() ?></div>
<div><?: context.props["children_html"].to_string() ?></div>
</aside>
</>
}