summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/index.php b/index.php
new file mode 100644
index 0000000..e94c87a
--- /dev/null
+++ b/index.php
@@ -0,0 +1,31 @@
+<?php
+include('./includes/head.php');
+?>
+
+<header>
+ <noscript>
+ JavaScript? Where we're going we don't need JavaScript.
+ </noscript>
+</header>
+
+<article>
+ <h1 style="text-align: center">
+ The World Wide Web pages of Adam Carpenter (53hornet)
+ </h1>
+ <ul>
+ <?php
+ if ($posts = glob('./posts/*.php')) {
+ $early = true;
+
+ foreach (array_reverse($posts) as $post) {
+ if (!empty($post) && $post != '.' && $post != '..') {
+ $post_name = explode('/', $post)[2];
+ $date = implode('-', array_slice(explode('-', $post_name), 0, 3));
+ include($post);
+ printf('<li><a href="/%s">%s</a> <code>%s</code></li>', $post, $title, $date);
+ }
+ }
+ }
+ ?>
+ </ul>
+</article>