From 02582cc490fc0d753dd153211cc172eb28fbee5d Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Mon, 5 Oct 2026 15:33:46 +0200 Subject: first sketch of wasm environment --- src/z/app/root.zig | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/z/app/root.zig (limited to 'src/z/app/root.zig') diff --git a/src/z/app/root.zig b/src/z/app/root.zig new file mode 100644 index 0000000..03760c4 --- /dev/null +++ b/src/z/app/root.zig @@ -0,0 +1,20 @@ +const html = @import("html"); + +pub const Options = struct { + name: []const u8 +}; + +pub fn create(options: Options) []const u8 { + return html.Element.native(.html, .{}, .children(&.{ + .native(.head, .{}, .children(&.{ + .native(.title, .{}, .content(options.name)), + .native(.meta, .{ + .name = "viewport", + .content = "width=device-width, initial-scale=1.0", + }, .void), + })), + .native(.body, .{}, .children(&.{ + .native(.script, .{}, .content(@embedFile("main.js"))), + })), + })).toDocument(); +} -- cgit v1.2.3-70-g09d2