aboutsummaryrefslogtreecommitdiff
path: root/src/z/app/root.zig
blob: 03760c4d903df58f1194d5e6d5c85fd46cfe134e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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();
}