aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--build.zig16
-rw-r--r--build.zig.zon4
-rw-r--r--src/pages/index.html17
-rw-r--r--src/static/hello.txt1
-rw-r--r--src/templates/base.html49
5 files changed, 65 insertions, 22 deletions
diff --git a/build.zig b/build.zig
index 5db4634..efbfafd 100644
--- a/build.zig
+++ b/build.zig
@@ -2,18 +2,10 @@ const std = @import("std");
const webgen = @import("webgen");
pub fn build(b: *std.Build) void {
- const generate_html = b.addExecutable(.{
- .name = "generate_html",
- .root_module = b.createModule(.{
- .root_source_file = b.path("util/generate_html.zig"),
- .target = b.graph.host,
- }),
- });
-
- const run_generate_html = b.addRunArtifact(generate_html);
- run_generate_html.setCwd(b.path("")); // make sure we always run from buildroot
+ const run_webgen = webgen.installHtmlStep(b);
+ run_webgen.addDirectoryArg(b.path("src"));
const bundle_html = b.addSystemCommand(&[_][]const u8{ "tar", "--exclude=pages.tar.gz", "-czvf", "html-out/pages.tar.gz", "html-out" });
- bundle_html.step.dependOn(&run_generate_html.step);
+ bundle_html.step.dependOn(&run_webgen.step);
b.getInstallStep().dependOn(&bundle_html.step);
const serve = b.addSystemCommand(&[_][]const u8{ "lighttpd", "-Df", "util/lighttpd.conf" });
@@ -23,6 +15,4 @@ pub fn build(b: *std.Build) void {
const publish_to_prod = b.step("publish", "Publish the website to production");
publish_to_prod.dependOn(b.getInstallStep());
-
- b.getInstallStep().dependOn(&webgen.installHtmlStep(b).step);
}
diff --git a/build.zig.zon b/build.zig.zon
index 7e1ce7b..b3ce213 100644
--- a/build.zig.zon
+++ b/build.zig.zon
@@ -3,8 +3,8 @@
.version = "0.16.0",
.dependencies = .{
.webgen = .{
- .url = "/home/rosa/src/web/webgen",
- .hash = "webgen-0.1.0-XDIIqScA-xKBcPSejmazf-afVXygLblU9anFQtVljBQd",
+ .url = "git+https://git.eviltransgenders.club/~rosa/webgen.git#2746eb6e87255cb74ed879e644e9138895b10bfc",
+ .hash = "webgen-0.1.0-XDIIqV0jAACSsoysHFwdiJ57B-CaWUMki_SuTa_BO9Af",
},
},
.paths = .{""},
diff --git a/src/pages/index.html b/src/pages/index.html
index 4cb32f3..fd24512 100644
--- a/src/pages/index.html
+++ b/src/pages/index.html
@@ -1,4 +1,17 @@
+<!--: extends base.html -->
+<!--: replace title -->
+home
+<!--: endreplace -->
+
+<!--: replace body -->
<main>
- <h1>wowowowow</h1>
- <p>aaaaa</p>
+ <section>
+ <h2>So, what is this?</h2>
+ <p>
+ The Evil Transgenders Club is intended to be a silly little internet
+ community for queer people and allies, primarily those interested in tech -
+ though all are welcome.
+ </p>
+ </section>
</main>
+<!--: endreplace -->
diff --git a/src/static/hello.txt b/src/static/hello.txt
deleted file mode 100644
index 4effa19..0000000
--- a/src/static/hello.txt
+++ /dev/null
@@ -1 +0,0 @@
-hello!
diff --git a/src/templates/base.html b/src/templates/base.html
index 4f6b0ef..9f72526 100644
--- a/src/templates/base.html
+++ b/src/templates/base.html
@@ -12,6 +12,8 @@
background: black;
color: white;
font-family: monospace;
+ margin-left: 15%;
+ margin-right: 15%;
}
header h1 {
@@ -34,15 +36,43 @@
}
main {
- border: 2px solid #fff;
- margin-left: 15%;
- margin-right: 15%;
+ /*border: 2px solid #fff;*/
+ margin-top: 5px;
}
#main-navigation {
text-align: center;
}
+ #main-navigation ul {
+ list-style: none;
+ }
+
+ #main-navigation ul li {
+ display: inline-block;
+ }
+
+ #main-navigation ul li::before {
+ content: " /* ";
+ }
+
+ #main-navigation ul li::after {
+ content: " */ ";
+ }
+
+ footer {
+ text-align: center;
+ }
+
+ footer, footer a {
+ color: #333;
+ }
+
+ footer a:hover {
+ background-color: #333;
+ color: #000;
+ }
+
.trans-shadow {
text-shadow: 1px 1px var(--trans-pink), 2px 2px white, 3px 3px var(--trans-pink), 4px 4px var(--trans-blue);
}
@@ -50,6 +80,11 @@
.subtitle {
text-align: center;
}
+
+ .heart {
+ color: #ff5555;
+ font-style: normal;
+ }
</style>
</head>
@@ -57,9 +92,15 @@
<header>
<h1 class="trans-shadow">the evil transgenders club</h1>
<nav id="main-navigation">
- <a href="/">home</a>
+ <ul>
+ <li><a href="/">home</a></li>
+ <li><a rel="external" href="https://git.eviltransgenders.club">git</a></li>
+ </ul>
</nav>
</header>
{{body}}
+ <footer>
+ <p>made with <em class="heart">&lt;3</em> // <a rel="external" href="https://git.eviltransgenders.club/www.eviltransgenders.club">view the source</a>.</p>
+ </footer>
</body>
</html>