iocaine/templates/main.hbs
Gergely Nagy ae8b06a4d5
Make templating actually useful
This rebuilds the templating so that the *content* is no longer
pre-generated, only the parameters. It is up to the template (and some
newly implemented helper functions) to construct the output from those.

Signed-off-by: Gergely Nagy <me@gergo.csillger.hu>
2025-01-29 00:20:21 +01:00

23 lines
487 B
Handlebars

<!doctype html>
<html>
<head>
<title>{{ request_uri }}</title>
</head>
<body>
{{#unless (is-root)}}
<a href="../">Back</a>
{{/unless}}
{{#each paragraphs}}
<p>{{ markov-gen "garbage" this.index this.value }}</p>
{{/each}}
<ul>
{{#each links}}
<li>
<a href="{{ href-gen "links" this.index this.value.href_words }}/">
{{ markov-gen "titles" this.index this.value.title_words }}
</a>
</li>
{{/each}}
</ul>
</body>
</html>