aboutsummaryrefslogtreecommitdiff
path: root/_site/home
diff options
context:
space:
mode:
authorMinteck <46352972+Minteck@users.noreply.github.com>2021-06-29 20:00:07 +0200
committerMinteck <46352972+Minteck@users.noreply.github.com>2021-06-29 20:00:07 +0200
commitd2733aa17b7932dfb78e97639e7d568ac41b9ee1 (patch)
tree1e77dbe51e192c42f993e79e53532d3558d36bcb /_site/home
parent9f3bd84cb82a7f57a49701018a7fb43eb77c65aa (diff)
downloadunchainedtech-d2733aa17b7932dfb78e97639e7d568ac41b9ee1.tar.gz
unchainedtech-d2733aa17b7932dfb78e97639e7d568ac41b9ee1.tar.bz2
unchainedtech-d2733aa17b7932dfb78e97639e7d568ac41b9ee1.zip
Let's finally commit stuff!
Diffstat (limited to '_site/home')
-rw-r--r--_site/home/index.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/_site/home/index.php b/_site/home/index.php
new file mode 100644
index 0000000..c8a64db
--- /dev/null
+++ b/_site/home/index.php
@@ -0,0 +1,41 @@
+<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/dom/header.php"; ?>
+
+<div class="container" style="margin-top:30px;text-align: center;">
+ <h2>Welcome to Blogchain!</h2>
+ <p>If you want a blog that talks about unknown technology and whose authors do weird experiments with tech stuff, you've come to the right place!</p>
+</div>
+<?php $list = getArticlesList() ?>
+<div class="container">
+ <div class="card-deck">
+ <?php $index = 0;foreach ($list as $id => $item): ?>
+ <?php if ($index < 3): ?>
+ <div class="card">
+ <div class="card-body">
+ <h2><?= $item["title"] ?></h2>
+ <p><?= $item["content"]["mini"] ?></p>
+ <a class="btn btn-primary" href="/article/<?= $id ?>">Read more</a>
+ <span style="margin-top: 10px;display:block;"><small><?php
+
+ $dt = DateTime::createFromFormat('Ymd', $item["date"]);
+ echo($dt->format("M jS, Y"));
+
+ ?> ยท by <?= implode(" and ", $item["author"]) ?></small></span>
+ </div>
+ </div>
+ <?php endif; ?>
+ <?php $index++;endforeach; ?>
+ </div>
+
+ <?php if (count($list) > 3): ?>
+ <h3 style="margin-top:20px;">Also check out our older articles:</h3>
+ <div class="list-group">
+ <?php $index = 0;foreach ($list as $id => $item): ?>
+ <?php if ($index > 3): ?>
+ <a href="/article/<?= $id ?>" class="list-group-item list-group-item-action"><?= $item["title"] ?></a>
+ <?php endif; ?>
+ <?php $index++;endforeach; ?>
+ </div>
+ <?php endif; ?>
+</div>
+
+<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/dom/footer.php"; ?> \ No newline at end of file