From 008f090e1de2773d501a8210bd54acc7d977ebf7 Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Thu, 8 Oct 2026 20:05:11 +0200 Subject: Component: add namespace option --- src/app/components/navbutton/index.css | 9 +++++++++ src/app/components/navbutton/index.html | 2 ++ src/app/components/navbutton/root.zig | 16 ++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 src/app/components/navbutton/index.css create mode 100644 src/app/components/navbutton/index.html create mode 100644 src/app/components/navbutton/root.zig (limited to 'src/app/components/navbutton') diff --git a/src/app/components/navbutton/index.css b/src/app/components/navbutton/index.css new file mode 100644 index 0000000..bf1b4ee --- /dev/null +++ b/src/app/components/navbutton/index.css @@ -0,0 +1,9 @@ +#button { + position: absolute; + bottom: 10px; + right: 10px; + width: 50px; + height: 50px; + background: var(--primary); + border-radius: 100%; +} diff --git a/src/app/components/navbutton/index.html b/src/app/components/navbutton/index.html new file mode 100644 index 0000000..ab23160 --- /dev/null +++ b/src/app/components/navbutton/index.html @@ -0,0 +1,2 @@ +
+
diff --git a/src/app/components/navbutton/root.zig b/src/app/components/navbutton/root.zig new file mode 100644 index 0000000..0040c9d --- /dev/null +++ b/src/app/components/navbutton/root.zig @@ -0,0 +1,16 @@ +const z = @import("z"); + +const Self = @This(); + +pub const component: z.Component = .{ + .name = "navbutton", + .html = .parse(@embedFile("index.html")), + .css = @embedFile("index.css"), + .link = @This(), +}; + +element: *z.Object, + +pub fn init(self: *Self, element: *z.Object) void { + self.element = element; +} -- cgit v1.2.3-70-g09d2