Skip to content

Commit

Permalink
zig- add www/about
Browse files Browse the repository at this point in the history
  • Loading branch information
nektro committed Aug 16, 2021
1 parent 0805e9d commit ae4b44e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/handler/_.zig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pub fn getHandler() http.RequestHandler(void) {
return http.router.Router(void, &.{
http.router.get("/", _index.get),
file_route("/theme.css"),
http.router.get("/about", StaticPek("/about.pek").get),
});
}

Expand All @@ -28,3 +29,14 @@ fn file_route(comptime path: []const u8) http.router.Route {
};
return http.router.get(path, T.f);
}

fn StaticPek(comptime path: []const u8) type {
return struct {
pub fn get(_: void, response: *http.Response, request: http.Request) !void {
try __.writePageResponse(request.arena, response, request, path, .{
.aquila_version = @import("root").version,
.logged_in = false,
});
}
};
}
8 changes: 8 additions & 0 deletions www/about.pek
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
h2("About")
p("Aquila is a federated package index and CI system for the "a[href="https://ziglang.org/"]("Zig programming language")" built about the "a[href="https://github.com/nektro/zigmod"]("Zigmod")" package manager.")
p("It should be known that the Zig project plans on building a package manager into the "code("zig")" command itself, so when that is released this registry will be updated to work with that. Until then, importing projects will fail if the git repo does not have a "code("zig.mod")" file in its root defining its properties.")
p("You can learn more about the zig.mod format "a[href="https://github.com/nektro/zigmod/blob/master/docs/zig.mod.md"]("here")".")
p(a[href="https://indieweb.org/"](img[class="badge" src="https://indieweb.org/img/indieweb-badge.png"]))
)
)
)

0 comments on commit ae4b44e

Please sign in to comment.