diff options
| author | Ada Isopods <me@bathynomus.xyz> | 2023-01-09 21:57:46 -0700 |
|---|---|---|
| committer | Ada Isopods <me@bathynomus.xyz> | 2026-10-21 23:30:16 -0600 |
| commit | e7d593cf078eaac4f1af82fc39d9fdf0ae8a37f8 (patch) | |
| tree | 6cfb29a0938c48c18c4e8c832c723cce78b40b09 /posts/index.php | |
| parent | d646ae0d9abb61030677a1a27945b9f5540c89f5 (diff) | |
Initial commit of website contents
Diffstat (limited to 'posts/index.php')
| -rw-r--r-- | posts/index.php | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/posts/index.php b/posts/index.php new file mode 100644 index 0000000..1fe640e --- /dev/null +++ b/posts/index.php @@ -0,0 +1,51 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <link rel="icon" type="image/x-icon" href="../favicon.ico"> + <title>deep twisty - posts</title> + <link href="../style.css" rel="stylesheet" type="text/css" media="all"> + <link href="../subpage.css" rel="stylesheet" type="text/css" media="all"> + <style> + article.post { + padding: 1rem; + max-width: 25rem; + margin: auto; + } + h2.datemarker { + margin-bottom: 0; + font-size: small; + } + .post p { + margin-top: 0.1rem; + } + </style> + </head> + <body> + + <main> + <h1 id="header"><span id="headerblue">po</span><span id="headergreen">st</span><span id="headeryellow">s</span></h1> + <p><a class="white-color" style="text-decoration: none; font-size: 1.4em; font-family: var(--hfont);" href="../">home</a><span style="display: inline-block; margin: 0 0.3rem; font-size: 0;"></span><a class="white-color" style="text-decoration: none; font-size: 1.4em; font-family: var(--hfont);" href="https://journal.miso.town/atom?url=https://deeptwisty.com/posts/">feed</a></p><hr> + <div id="posts"> + <?php + $infile = fopen("posts.txt", "r") or die("file read error -_-"); + $content = fread($infile,filesize("posts.txt")); + fclose($infile); + $post_arr = explode("\n",$content); + $posts_out = ""; + foreach($post_arr as $p) { + if(strlen($p) > 3) { + $date = substr($p, 0, strpos($p, " ")); + $pcont = substr($p, strpos($p, " ") + 1); + $posts_out = "<article class='post'><h2 class='datemarker'>$date</h2><p>$pcont</p></article>$posts_out"; + } + } + echo $posts_out; + ?> + </div> + </main> + + </body> + +</html> |
