aboutsummaryrefslogtreecommitdiff
path: root/src/web/root.zig
blob: c9c1b08c62c26c123c058607032f863a11ca1ccf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const z = @import("z");
const html = @import("html");
const http = @import("http");
const Static = http.handler.Static;

const components = @import("component/root.zig").components;

const document: html.Element = .native(.html, .{}, .children(&.{
    .native(.head, .{}, .children(&.{
        .native(.title, .{}, .content("Memora")),
        .native(.meta, .{
            .name = "viewport",
            .content = "width=device-width, initial-scale=1.0",
        }, .void),
        z.script.load(@embedFile("pinch.js")),
        z.style.load(@embedFile("index.css")),
        z.env(components),
    })),
    .native(.body, .{}, .children(&.{
        z.html.load(@embedFile("index.html")),
    })),
}));

pub const interfaces: []const http.handler.Interface = &.{
    Static(.index, document.toDocument()).interface(),
};