From 0305c874bbc10c549ba719491c42c97225b19eeb Mon Sep 17 00:00:00 2001 From: Rosa Date: Mon, 15 Jun 2026 15:42:25 -0400 Subject: remove /join for the time being --- build.zig | 18 ++---------- src/cgi/submit.zig | 40 -------------------------- src/pages/index.html | 4 +-- src/pages/join/index.html | 73 ----------------------------------------------- src/templates/page.html | 1 - 5 files changed, 3 insertions(+), 133 deletions(-) delete mode 100644 src/cgi/submit.zig delete mode 100644 src/pages/join/index.html diff --git a/build.zig b/build.zig index 5148a6c..bff42c4 100644 --- a/build.zig +++ b/build.zig @@ -2,24 +2,10 @@ const std = @import("std"); const webgen = @import("webgen"); pub fn build(b: *std.Build) void { - const optimize = b.standardOptimizeOption(.{}); - const target = b.standardTargetOptions(.{}); - const run_webgen = webgen.installHtmlStep(b); run_webgen.addDirectoryArg(b.path("src")); - const cgi_app = b.addExecutable(.{ - .name = "submit.cgi", - .root_module = b.createModule(.{ - .optimize = optimize, - .root_source_file = b.path("src/cgi/submit.zig"), - .target = target, - }), - }); - b.installArtifact(cgi_app); - const run_cgi = b.step("run_cgi", "Run the CGI application"); - run_cgi.dependOn(&b.addRunArtifact(cgi_app).step); - const bundle_html = b.addSystemCommand(&.{ "tar", "--exclude=pages.tar.gz", "-czvf", "html-out/pages.tar.gz", "html-out", "zig-out" }); + const bundle_html = b.addSystemCommand(&.{ "tar", "--exclude=pages.tar.gz", "-czvf", "html-out/pages.tar.gz", "html-out" }); bundle_html.step.dependOn(&run_webgen.step); b.getInstallStep().dependOn(&bundle_html.step); @@ -39,7 +25,7 @@ pub fn build(b: *std.Build) void { unpack_bundle.step.dependOn(©_bundle.step); publish_to_prod.dependOn(&unpack_bundle.step); - const clean_html = b.addSystemCommand(&.{"rm", "-r"}); + const clean_html = b.addSystemCommand(&.{"rm", "-rf"}); clean_html.addFileArg(b.path("html-out")); clean_html.addFileArg(b.path("zig-out")); b.getUninstallStep().dependOn(&clean_html.step); diff --git a/src/cgi/submit.zig b/src/cgi/submit.zig deleted file mode 100644 index b94c546..0000000 --- a/src/cgi/submit.zig +++ /dev/null @@ -1,40 +0,0 @@ -const std = @import("std"); - -pub fn main(init: std.process.Init) !void { - const query_string = init.environ_map.get("QUERY_STRING").?; - var decoded = try init.gpa.alloc(u8, query_string.len); - @memcpy(decoded, query_string); - decoded = std.Uri.percentDecodeInPlace(decoded); - std.mem.replaceScalar(u8, decoded, '+', ' '); - - // Parse the query string. - var args_map = std.StringHashMap([]const u8).init(init.gpa); - defer args_map.deinit(); - var args = std.mem.splitScalar(u8, decoded, '&'); - while (args.next()) |arg| { - const arg_and_value = std.mem.cutScalar(u8, arg, '=').?; - try args_map.put(arg_and_value[0], arg_and_value[1]); - } - - const out_path = init.environ_map.get("OUT_PATH").?; - const out_file = try std.Io.Dir.createFileAbsolute(init.io, out_path, .{ .truncate = false }); - defer out_file.close(init.io); - const current_size = (try out_file.stat(init.io)).size; - var buf: [128]u8 = undefined; - var writer = out_file.writer(init.io, &buf); - if (current_size == 0) { - try writer.interface.print("name,email,website,about\r\n", .{}); - } else { - try writer.seekTo(current_size); - } - try writer.interface.print("{s},{s},{s},{s}\r\n", .{ - args_map.get("name").?, - args_map.get("email").?, - args_map.get("website").?, - args_map.get("about").?, - }); - try writer.interface.flush(); - - // redirect back to the homepage - try std.Io.File.stdout().writeStreamingAll(init.io, "HTTP/1.0 302 Found\r\nLocation: https://eviltransgenders.club/join\r\n\r\n"); -} diff --git a/src/pages/index.html b/src/pages/index.html index 231cc02..3d160b4 100644 --- a/src/pages/index.html +++ b/src/pages/index.html @@ -16,9 +16,7 @@ home is welcome! :)

- If you'd like to chat about tech or video games or being queer, or if you're - perhaps interested in accessing our services, you - can ask to join. + There currently isn't a system in place for accepting new members :(

diff --git a/src/pages/join/index.html b/src/pages/join/index.html deleted file mode 100644 index 9f5b08a..0000000 --- a/src/pages/join/index.html +++ /dev/null @@ -1,73 +0,0 @@ - - -join - - - - - - - -
-
-
-

Join the club.

-

Required fields are marked with an asterisk.

-
- - - - - - -
-
- diff --git a/src/templates/page.html b/src/templates/page.html index 40024c9..099a391 100644 --- a/src/templates/page.html +++ b/src/templates/page.html @@ -6,7 +6,6 @@
  • home
  • members
  • services
  • -
  • join!
  • -- cgit v1.3.1