aboutsummaryrefslogtreecommitdiff
path: root/src/z/app/root.zig
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2026-10-05 15:33:46 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2026-10-05 15:33:46 +0200
commit02582cc490fc0d753dd153211cc172eb28fbee5d (patch)
tree4add149d5e1ecf28cf20ecb497626fef85cdbd75 /src/z/app/root.zig
parent2f3199622d9e7a97da4b5c31a2d81b170b7cdaa6 (diff)
first sketch of wasm environment
Diffstat (limited to 'src/z/app/root.zig')
-rw-r--r--src/z/app/root.zig20
1 files changed, 20 insertions, 0 deletions
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();
+}