commit e64d63c4d18a191c8b20ccdd7988e83045c91ba6
parent bfd35fcb6827175c27ca5ab4d4e92e2d7bd3dba9
Author: Pollux <pollux@pollux.codes>
Date: Sun, 1 Jun 2025 22:20:05 -0500
feat: add guestbook
Signed-off-by: Pollux <pollux@pollux.codes>
Diffstat:
5 files changed, 35 insertions(+), 0 deletions(-)
diff --git a/content/_index.md b/content/_index.md
@@ -24,3 +24,5 @@ This site is also available as a Tor hidden service. To access it, use
[this](http://pollux2xkmgashgobmlroqhpscqncjqatef5slitv3d3jjdeo2ji7oqd.onion)
link. (Requires a tor-enabled browser. I recommend the official [Tor
Browser](https://www.torproject.org/download/).)
+
+Don't forget to sign the [guestbook](/guestbook)!
diff --git a/content/guestbook/index.md b/content/guestbook/index.md
@@ -0,0 +1,17 @@
++++
+title = 'Guestbook'
+date = 2025-06-01T22:00:57-05:00
++++
+
+# My Guestbook
+
+This is my guestbook. I wrote the backend software myself in Go. The source can
+be found [here](/git/guestbook).
+
+## Sign the Guestbook Yourself!
+
+{{< guestbook_form >}}
+
+## Messages
+
+{{< guestbook >}}
diff --git a/layouts/shortcodes/guestbook.html b/layouts/shortcodes/guestbook.html
@@ -0,0 +1 @@
+<iframe src="/guestbook/contents" style="width:100%;height:30rem;display: block"></iframe>
diff --git a/layouts/shortcodes/guestbook_form.html b/layouts/shortcodes/guestbook_form.html
@@ -0,0 +1,7 @@
+<form action="/guestbook/post" method="post" target="indicator">
+ Name (or Pseudonym): <input type="text" name="name"><br>
+ Your website (optional): <input type="url" name="website"><br>
+ Message: <textarea name="message" rows="5" cols="45"></textarea><br>
+ <input type="submit"> (Gives no feedback, refresh page before resubmitting.)
+</form>
+<iframe name="indicator" hidden></iframe>
diff --git a/static/style.css b/static/style.css
@@ -8,3 +8,11 @@ body {
}
img{vertical-align: bottom}
a{color:skyblue}
+iframe {border: 1px dashed white}
+input, textarea {
+ font: 1.2em/1.62 monospace;
+ color: white;
+ background-color: black;
+ width: 100%;
+ border: 1px dashed white;
+}