trying to port web app starter from PHP
This commit is contained in:
@@ -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>
|
||||
</>
|
||||
}
|
||||
Reference in New Issue
Block a user