Add simple example

This commit is contained in:
RunasSudo 2025-05-15 17:07:19 +10:00
parent c92d0c9635
commit 9111bbad61
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

20
examples/helloworld.html Normal file
View File

@ -0,0 +1,20 @@
{! char *page_title = "Hello World!"; !}
{! char *our_names = "Alice & Bob"; !}
{% page main %}{# void main(void) { ... } #}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{{ page_title }}</title>
</head>
<body>
<p>Hello world, we are {{ our_names }}.</p>
<p>Counting to 10:</p>
<p>
{% for int i = 1; i <= 10; i++ %}
{{ i|%d }}{% if i != 10 %},{% endif %}
{% endfor %}
</p>
</body>
</html>
{% endpage %}