Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html>
- <body>
- <h1><?= .title ?></h1>
- <ol>
- <?[] .chapters?>
- <li><?= [].heading ?>
- <?/>
- </ol>
- <?[] .chapters?>
- <h2><?= [].heading ?></h2>
- <?[] [].paragraphs?>
- <p><?= [] ?>
- <?/>
- <?/>
- </body>
- </html>
- <!--
- // zig input / usage:
- const document = .{
- .title = "A small document about Zig",
- .chapters = .{
- .{
- .heading = "Introduction",
- .paragraphs = .{
- "This is the first paragraph.",
- "This is the second paragraph.",
- }
- },
- .{
- .heading = "Finishing Words",
- .paragraphs = .{
- "And that's all, folks!",
- }
- }
- },
- };
- HTML.renderDoc(outStream, templateCode, document);
- -->
Add Comment
Please, Sign In to add comment