diff --git a/.gitignore b/.gitignore index bc9f1d3..9718006 100644 --- a/.gitignore +++ b/.gitignore @@ -69,6 +69,8 @@ pub/globster/ctl.html pub/globster/daemon.html pub/globster/feed.atom pub/globster/launch.html +pub/guestbook.html +pub/guestbook/thanks.html pub/index.html pub/ncdc.html pub/ncdc/changes.html diff --git a/Makefile b/Makefile index 22e9253..60e7140 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,8 @@ PAGES=\ "dump/grenamr.md"\ "dump/insbench.md"\ "dump/nccolour.md"\ + "guestbook.md"\ + "guestbook/thanks.md"\ "globster.md"\ "globster/api.pod https://g.blicky.net/globster.git/plain/doc/api.pod The Globster D-Bus API"\ "globster/ctl.pod https://g.blicky.net/globster.git/plain/doc/globsterctl.pod The globsterctl(1) Man Page"\ diff --git a/dat/guestbook.md b/dat/guestbook.md new file mode 100644 index 0000000..8402cf6 --- /dev/null +++ b/dat/guestbook.md @@ -0,0 +1,20 @@ +% Guestbook + +It's 2022 and I figured this little site could use a guestbook. Want to leave a +message? Fill out the form below. Messages are added manually, so it may take a +day or two for yours to show up. Markdown is supported. + +This guestbook exists just for sillyness; if you have a question or want to +report feedback for a particular project, better open an issue at the +respective issue tracker or send a mail to +[projects@yorhel.nl](mailto:projects@yorhel.nl) instead. + +
+ + + +
+ +# Entries + +The guestbook is empty, be the first to post! diff --git a/dat/guestbook/thanks.md b/dat/guestbook/thanks.md new file mode 100644 index 0000000..c78a650 --- /dev/null +++ b/dat/guestbook/thanks.md @@ -0,0 +1,3 @@ +% Message submitted! + +Thanks for posting to my guestbook! It may take a day or two for your message to show up. diff --git a/dat/ncdu.md b/dat/ncdu.md index b2733cd..c170619 100644 --- a/dat/ncdu.md +++ b/dat/ncdu.md @@ -13,15 +13,16 @@ Zig version (stable) See the [beta release announcement](/doc/ncdu2) for information about the motivation for the rewrite and some of the differences with the C version. - Contrary to popular belief, version 2.x does **not** yet implement parallel - scanning, so don't expect any order-of-magnitude performance - improvements... yet. Note that the [Zig language](https://ziglang.org/) and compiler are still very much unstable. This version of ncdu will *only* work with the version of the Zig compiler noted above. Use the ncdu 1.x branch if this does not work for you or if you need a more stable compilation environment. + **Linux users/distros** may want to apply [this patch to + Zig](https://github.com/ziglang/zig/pull/11295) to fix a [possible + crash](https://code.blicky.net/yorhel/ncdu/issues/192). + Convenient static binaries for Linux: [i486](/download/ncdu-2.1.1-linux-i386.tar.gz), [x86_64](/download/ncdu-2.1.1-linux-x86_64.tar.gz), diff --git a/pub/cgi-bin/guestbook.cgi b/pub/cgi-bin/guestbook.cgi new file mode 100755 index 0000000..6701f63 --- /dev/null +++ b/pub/cgi-bin/guestbook.cgi @@ -0,0 +1,32 @@ +#!/usr/bin/perl + +use v5.26; +use CGI::Minimal; + +die if !$ENV{CONTENT_LENGTH}; +CGI::Minimal::max_read_size(128*1024); +my $cgi = CGI::Minimal->new; +die if $cgi->truncated; + +open my $S, '|-', qw'/usr/sbin/sendmail -t -f dev@yorhel.nl' or die $!; +printf $S <<'_', $cgi->param('name'), $cgi->param('message'); +To: dev@yorhel.nl +From: dev@yorhel.nl +Subject: Guestbook post +Content-Type: text/plain; charset='UTF-8' + +Name: %s + +Message: + +%s +_ +close $S or die; + +print <<'_'; +Status: 303 +Content-Type: text/plain +Location: https://dev.yorhel.nl/guestbook/thanks + +Redirecting... +_ diff --git a/pub/style.css b/pub/style.css index 4bb14f4..634734c 100644 --- a/pub/style.css +++ b/pub/style.css @@ -54,7 +54,7 @@ main h3 { font-size: 120%; color: #000; margin: 1em 0 .3em 0; text-decoration: n main code { font-family: monospace } main pre { font-family: monospace; font-size: 80%; margin: 0 0 10px 18px; display: block; padding: 0 0 0 15px; border-left: 1px dotted #999; overflow-x: auto } main pre * { font-size: inherit; font-family: inherit } -main p, main figure, main ul, main ol, main dl, main pre, main figure, main table { margin-bottom: 0.7em; margin-left: 1em } +main p, main figure, main ul, main ol, main dl, main pre, main figure, main table, main form { margin-bottom: 0.7em; margin-left: 1em } main ul ul { margin-bottom: 0.5em } main ul, main ol { margin-left: 2.5em } main li { margin-bottom: .1em } @@ -66,6 +66,8 @@ main figcaption { display: none } main table th, main table td { font-size: 12.8px; padding: 1px 7px } main td em { font-style: normal; text-decoration: underline } main table th { font-weight: bold } +main textarea { width: 95% } +main input[type="submit"] { padding: 1px 5px } main section.footnotes hr { display: none } main section.footnotes { margin: 40px 10px 10px 10px } diff --git a/template.html b/template.html index dc78f5a..358765f 100644 --- a/template.html +++ b/template.html @@ -127,7 +127,8 @@ $endif$