diff options
| author | Hannah Isopod <me@bathynomus.xyz> | 2025-05-10 03:03:58 -0600 |
|---|---|---|
| committer | Hannah Isopod <me@bathynomus.xyz> | 2025-05-10 03:03:58 -0600 |
| commit | eb61c1bae2ffad114e17393d91d86fb00d7ac8cd (patch) | |
| tree | 4f997d73e0843dab760e5d988679a1a86b76f5da /blog/comment/index.php | |
| parent | 4b9500ddeedbea21f80f41dfe4149cf3bf9be4c3 (diff) | |
Initialer commit
Just remade the repo because I don't *need* need a comprehensive source history for my personal website and this is easier than getting filter-repo to work good
Diffstat (limited to 'blog/comment/index.php')
| -rw-r--r-- | blog/comment/index.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/blog/comment/index.php b/blog/comment/index.php new file mode 100644 index 0000000..2d5f6a6 --- /dev/null +++ b/blog/comment/index.php @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>blog comments</title> + <link href="/style.css" rel="stylesheet" type="text/css" media="all"> + <link href="comments.css" rel="stylesheet" type="text/css" media="all"> + <style> + + </style> + <?php include($_SERVER['DOCUMENT_ROOT'] . '/seasonal.php'); ?> + </head> + <body> + <?php include($_SERVER['DOCUMENT_ROOT'] . '/nav.php'); ?> + <h1>blog</h1> + <h2 id="caption">every comment</h2> + <nav> + <a href="feed.php">RSS</a> + </nav> + <?php + include("../../Parsedown.php"); + $Parsedown = new Parsedown(); + $Parsedown->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."<hr><article><table><tr><td style='text-align: left;'>".$name." <i>on</i> <a href='/blog/posts/".$entry."/'>".$entry."</a></td><td style='text-align: right;'>".$date."</td></tr><tr><td colspan='2'>".$message."</td></tr></table></article>"; + $totaloutput = $output.$totaloutput; + } + echo $totaloutput; ?> + </body> +</html> |
