From b3bb0b898d3178963fefb9c0b16a00a76cf2a034 Mon Sep 17 00:00:00 2001 From: Hannah Isopod Date: Wed, 11 Jun 2025 03:25:00 -0600 Subject: total guestbook overhaul + new blog post + etc - Added /about/pronouns/ in leiu of something like a pronouns.cc profile - New blog post about my new and improved AI opinions - Moved Stop Using Chromium to an actual blog post page - Blog posts now have previous and next buttons - New /blog/ background - Moved status.cafe widget from /blog/ to landing page - Total overhaul of guestbook: - Merged guestbook and blog comment section code - Beefed up bot protection - Added a word filter - Added a property to entries to facilitate holding comments for review and approving or denying them manually (The interface for this is somewhere else) - IP address from which a post originates is now tracked in order to IP ban malicious actors - Various new buttons - Updated /greenhouse/ - The site is now a member of the No AI Webring - a couple minor CSS fixes --- blog/comment/comments.css | 92 ----------------------------------------------- blog/comment/feed.php | 29 --------------- blog/comment/index.php | 40 --------------------- blog/comment/submit.php | 81 ----------------------------------------- 4 files changed, 242 deletions(-) delete mode 100644 blog/comment/comments.css delete mode 100644 blog/comment/feed.php delete mode 100644 blog/comment/index.php delete mode 100644 blog/comment/submit.php (limited to 'blog/comment') diff --git a/blog/comment/comments.css b/blog/comment/comments.css deleted file mode 100644 index 7f97c4c..0000000 --- a/blog/comment/comments.css +++ /dev/null @@ -1,92 +0,0 @@ -table { - border-collapse: collapse; - table-layout: fixed; -} -td { - padding: 0.3rem; -} - -form > table { - width: 100%; - margin: auto; - margin-bottom: 1.5rem; -} - -article { - width: 100%; - margin: 2rem auto; - display: grid; - gap: 1rem; -} - -input, textarea { - border: none; - font-family: var(--stdfont); -} -input[type="text"], input[type="email"], textarea { - width: 100%; - background: none; - border-bottom: 2px solid #444444; - color: gainsboro; - padding: 0.35rem; - box-sizing: border-box; - font-size: .9em; -} -input[type="submit"], input[type="reset"] { - padding: 0.35rem 0.5rem; - box-shadow: 2px 2px 6px black; - margin: 0.3rem; - display: inline-block; -} -input[type="submit"]:active, input[type="reset"]:active { - transform: translate(1px, 1px); box-shadow: 0 0 2px black; -} -input[type="submit"]:hover, input[type="reset"]:hover { - cursor: pointer; -} -.error { - color: red; - font-size: 0.85em; -} -.success { - color: #00ff00; - font-size: 0.85em; -} -.reply { - border-left: 3px solid gainsboro; - padding-left: 1rem; -} -.message { - padding-top: 1.5rem; -} -@media only screen and (hover: none) { - form td:first-child { - text-align: left; - } - form td:nth-child(2) { - padding-left: 0; - padding-right: 0; - } - input[type="text"], input[type="email"], textarea { - background: none; - border: 2px solid #00000033; - border-bottom: 2px solid #888888; - } - article { - margin: 2rem auto; - } -} -@media (prefers-contrast: more) { - input[type="text"], input[type="email"], textarea { - outline: 1px solid white; - color: white; - } - input:focus, textarea:focus { - outline: 3px solid white; - } - input[type="submit"] { - background: none; - color: white; - outline: 1px solid white; - } -} \ No newline at end of file diff --git a/blog/comment/feed.php b/blog/comment/feed.php deleted file mode 100644 index 889514f..0000000 --- a/blog/comment/feed.php +++ /dev/null @@ -1,29 +0,0 @@ -setSafeMode(true); - -header('Content-Type: text/xml'); - -echo ''; -echo 'isopod.cool blog comments'; -echo 'Every comment posted on my blog in chronological order.'; -echo 'en-us'; -echo 'https://isopod.cool/blog/comment/'; -echo 'My crappy PHP code'; - -$postlist = json_decode(file_get_contents("posts.json")); -$totaloutput = ""; -foreach($postlist as $post) { - $output = ""; - $date = date("D, d M Y H:m:s", $post->date) . " GMT"; - $name = $post->name; - $message = $Parsedown->text(html_entity_decode($post->message)); - $entry = $post->entry; - - $output = $output."Comment from ".$name." on ".$entry.":

".$message."

"; - $totaloutput = "Comment on " . $entry . " from " . $name . "https://isopod.cool/blog/posts/" . $entry . "/" . $date . "".htmlentities($output)."" . $entry . $post->date . $name . "".$totaloutput; -} - -echo $totaloutput; -echo "
"; \ No newline at end of file diff --git a/blog/comment/index.php b/blog/comment/index.php deleted file mode 100644 index 2d5f6a6..0000000 --- a/blog/comment/index.php +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - blog comments - - - - - - - -

blog

-

every comment

- - setSafeMode(true); - - $totaloutput = ""; - $postlist = json_decode(file_get_contents("posts.json")); - foreach($postlist as $post) { - $output = ""; - $date = date("Y-m-d h:iA", $post->date); - $name = $post->name; - $message = $Parsedown->text(html_entity_decode($post->message)); - $entry = $post->entry; - - $output = $output."
".$name." on ".$entry."".$date."
".$message."
"; - $totaloutput = $output.$totaloutput; - } - echo $totaloutput; ?> - - diff --git a/blog/comment/submit.php b/blog/comment/submit.php deleted file mode 100644 index 26e5647..0000000 --- a/blog/comment/submit.php +++ /dev/null @@ -1,81 +0,0 @@ - time(), - "name" => htmlentities($_POST["name"]), - "message" => htmlentities($_POST["message"]), - "entry" => $_POST["entry"] - ); - - $filename = "posts.json"; - - $handle = @fopen($filename, 'r+'); - - // create the file if needed - if ($handle === null) - { - $handle = fopen($filename, 'w+'); - } - - if ($handle) - { - // seek to the end - fseek($handle, 0, SEEK_END); - - // are we at the end of is the file empty - if (ftell($handle) > 0) - { - // move back a byte - fseek($handle, -2, SEEK_END); - - // add the trailing comma - fwrite($handle, ",\n", 2); - - // add the new json string - fwrite($handle, json_encode($currentPost) . "]\n"); - } - else - { - // write the first event inside an array - fwrite($handle, json_encode(array($currentPost))); - } - - // close the handle on the file - fclose($handle); - } - } - } - header("Location: ../posts/$returnLocation/?return=$returnCode"); -?> - - - - - Guestbook - - - - - -

Your post has been submitted! It's weird that you're seeing this page though. Maybe your browser can't process location headers? At any rate, click here"; ?> to get where you're supposed to be right now.

- - \ No newline at end of file -- cgit v1.2.3