Add simple example
This commit is contained in:
parent
c92d0c9635
commit
9111bbad61
20
examples/helloworld.html
Normal file
20
examples/helloworld.html
Normal 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 %}
|
Loading…
x
Reference in New Issue
Block a user