summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--_shared/build.py13
-rw-r--r--hooks/post-receive2
-rw-r--r--irc.gumx.cc/index.html2
-rw-r--r--wk.fo/body.html2
-rw-r--r--wk.fo/index.html4
-rw-r--r--wk.fo/meta1
6 files changed, 16 insertions, 8 deletions
diff --git a/_shared/build.py b/_shared/build.py
index a12cd73..a3bd09d 100644
--- a/_shared/build.py
+++ b/_shared/build.py
@@ -4,8 +4,12 @@ import json
import os
import sys
-def render(title, breadcrumb, style, extra_css, body, footer):
+def render(title, breadcrumb, style, extra_css, body, footer, standalone=False):
css = style + ("\n" + extra_css if extra_css.strip() else "")
+ if standalone:
+ nav = f"<nav><strong>{breadcrumb}</strong></nav>"
+ else:
+ nav = f'<nav><strong><a href="https://gumx.cc">gumx</a></strong> / {breadcrumb}</nav>'
return f"""<!DOCTYPE html>
<html lang="en">
<head>
@@ -19,7 +23,7 @@ def render(title, breadcrumb, style, extra_css, body, footer):
</head>
<body>
<header>
-<nav><strong><a href="https://gumx.cc">gumx</a></strong> / {breadcrumb}</nav>
+{nav}
</header>
<main>
<h1>{breadcrumb}</h1>
@@ -68,6 +72,7 @@ def build(sites_dir):
title = site
breadcrumb = site
+ standalone = False
meta_file = os.path.join(site_dir, "meta")
if os.path.exists(meta_file):
for line in open(meta_file):
@@ -76,13 +81,15 @@ def build(sites_dir):
title = v.strip('"')
elif k == "BREADCRUMB":
breadcrumb = v.strip('"')
+ elif k == "STANDALONE":
+ standalone = v.strip().strip('"') not in ("0", "false", "")
extra_css = ""
extra_file = os.path.join(site_dir, "extra.css")
if os.path.exists(extra_file):
extra_css = open(extra_file).read()
- out = render(title, breadcrumb, style, extra_css, body, footer)
+ out = render(title, breadcrumb, style, extra_css, body, footer, standalone=standalone)
with open(os.path.join(site_dir, "index.html"), "w") as f:
f.write(out)
print(f"built: {site}")
diff --git a/hooks/post-receive b/hooks/post-receive
index f628a10..f6dc7d1 100644
--- a/hooks/post-receive
+++ b/hooks/post-receive
@@ -22,7 +22,7 @@ for SITE in irc.gumx.cc vpn.gumx.cc mail.gumx.cc pgp.gumx.cc wk.fo twt.gumx.cc f
;;
demo.gumx.cc)
# no-style-please/ is managed by zola-no-style-please repo; demos.json is a source file
- # /ccc/ and /styles/ are managed by ccc repo hook — do not delete
+ # /ccc/ and /styles/ are managed by ccc repo hook: do not delete
rsync -rlptD --delete \
--exclude='/fonts' \
--exclude='/no-style-please/' \
diff --git a/irc.gumx.cc/index.html b/irc.gumx.cc/index.html
index de477f1..670d496 100644
--- a/irc.gumx.cc/index.html
+++ b/irc.gumx.cc/index.html
@@ -38,7 +38,7 @@ a { color: inherit; }
<main>
<p>Personal IRC server running <a href="https://ngircd.barton.de/">ngircd</a>, fronted by a <a href="https://soju.im/">Soju</a> bouncer. Access is by invitation.</p>
<h2>web client</h2>
-<p><a href="/chat">open gamja</a> — no account needed. Connect with any nick.</p>
+<p><a href="/chat">open gamja</a>. no account needed. Connect with any nick.</p>
<h2>connect via IRC client</h2>
<table>
<tr><th>server</th><td>irc.gumx.cc:6697 (TLS)</td></tr>
diff --git a/wk.fo/body.html b/wk.fo/body.html
index 8e8c969..360aae8 100644
--- a/wk.fo/body.html
+++ b/wk.fo/body.html
@@ -10,7 +10,7 @@
<tr><th>auth</th><td>SASL PLAIN (invite only)</td></tr>
</table>
<h2>pgp</h2>
-<p>Curated keyserver — keys added after in-person verification. <a href="/pks/">search or browse</a>.</p>
+<p>Curated keyserver. Keys added after in-person verification. <a href="/pks/">search or browse</a>.</p>
<h2>vpn</h2>
<table>
<tr><th>server</th><td>wk.fo:51820 (UDP)</td></tr>
diff --git a/wk.fo/index.html b/wk.fo/index.html
index af02a48..e65d9b2 100644
--- a/wk.fo/index.html
+++ b/wk.fo/index.html
@@ -42,13 +42,13 @@ a { color: inherit; }
<pre><code>curl -F "file=@photo.jpg" -H "Authorization: YOUR_TOKEN" https://wk.fo/</code></pre>
<p>Files expire after 24 hours by default (max 48h with <code>expires</code> param). Max 256 MB.</p>
<h2>irc</h2>
-<p><a href="/chat">web client</a> — no account needed. Or connect directly:</p>
+<p><a href="/chat">web client</a>. No account needed. Or connect directly:</p>
<table>
<tr><th>server</th><td>wk.fo:6697 (TLS)</td></tr>
<tr><th>auth</th><td>SASL PLAIN (invite only)</td></tr>
</table>
<h2>pgp</h2>
-<p>Curated keyserver — keys added after in-person verification. <a href="/pgp">search or browse</a>.</p>
+<p>Curated keyserver. Keys added after in-person verification. <a href="/pgp">search or browse</a>.</p>
<h2>vpn</h2>
<table>
<tr><th>server</th><td>wk.fo:51820 (UDP)</td></tr>
diff --git a/wk.fo/meta b/wk.fo/meta
index e068cc2..3c4e8f5 100644
--- a/wk.fo/meta
+++ b/wk.fo/meta
@@ -1,2 +1,3 @@
TITLE="wk.fo"
BREADCRUMB="wk.fo"
+STANDALONE=1