aboutsummaryrefslogtreecommitdiff
path: root/_site/home/index.php
diff options
context:
space:
mode:
authorMinteck <nekostarfan@gmail.com>2021-08-04 16:56:12 +0200
committerMinteck <nekostarfan@gmail.com>2021-08-04 16:56:12 +0200
commit896fa7c96856142f844d958b049d5432f511641c (patch)
treed8bbbe327939ade9bd13276c6b4c6105adf95323 /_site/home/index.php
parent7df2fb3f5ee0ac5bd89e127c86ad0c2d6de126d1 (diff)
downloadunchainedtech-896fa7c96856142f844d958b049d5432f511641c.tar.gz
unchainedtech-896fa7c96856142f844d958b049d5432f511641c.tar.bz2
unchainedtech-896fa7c96856142f844d958b049d5432f511641c.zip
v2.0
Diffstat (limited to '_site/home/index.php')
-rw-r--r--_site/home/index.php101
1 files changed, 52 insertions, 49 deletions
diff --git a/_site/home/index.php b/_site/home/index.php
index a17cb4b..6195510 100644
--- a/_site/home/index.php
+++ b/_site/home/index.php
@@ -1,50 +1,53 @@
-<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/dom/header.php"; ?>
-
-<div class="container" style="margin-top:30px;text-align: center;">
- <h2>Welcome to UnchainedTech!</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 (!$item["admin"] || ($admin && $item["admin"])): ?>
- <?php if ($index < 3): ?>
- <div class="card<?= $item["admin"] ? " card-admin" : "" ?>">
- <div class="card-body">
- <h2><?= $item["title"] ?></h2>
- <p><?= $item["content"]["mini"] ?></p>
- <a class="btn btn-primary" href="<?= $item["admin"] ? "/admin" : "" ?>/article/<?= $item["id"] ?>">Read more</a>
- <span style="margin-top: 10px;display:block;"><small><?php
-
- if ($item["admin"]) {
- echo("<b>Unreleased</b>");
- } else {
- $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++;endif;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 (!$item["admin"] || ($admin && $item["admin"])): ?>
- <?php if ($index >= 3 && $index < 100): ?>
- <a href="<?= $item["admin"] ? "/admin" : "" ?>/article/<?= $item["id"] ?>" class="list-group-item list-group-item-action<?= $item["admin"] ? " list-group-item-admin" : "" ?>"><?= $item["title"] ?></a>
- <?php endif; ?>
- <?php $index++;endif;endforeach; ?>
- </div>
- <?php if (count($list) > 100): ?>
- <p>Wait! There's more! Our older articles aren't listed here to save you some bytes of data. You can get to the complete list <a href="/articles" style="text-decoration: underline;">here</a>.</p>
- <?php endif; ?>
- <?php endif; ?>
-</div>
-
+<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/dom/header.php"; ?>
+
+<div class="container" style="margin-top:30px;text-align: center;">
+ <h2>Welcome to UnchainedTech!</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 (!$item["admin"] || ($admin && $item["admin"])): ?>
+ <?php if ($index < 3): ?>
+ <div class="card<?= $item["admin"] ? " card-admin" : "" ?>">
+ <div class="card-body">
+ <p><span class="badge badge-secondary"><?= $item["category"] ?></span></p>
+ <h2><?= $item["title"] ?></h2>
+ <p><?= $item["content"]["mini"] ?></p>
+ <a class="btn btn-primary" href="<?= $item["admin"] ? "/admin" : "" ?>/article/<?= $item["id"] ?>">Read more</a>
+ </div>
+ <div class="card-footer">
+ <small class="text-muted"><?php
+
+ if ($item["admin"]) {
+ echo("<b>Unreleased</b>");
+ } else {
+ $dt = DateTime::createFromFormat('Ymd', $item["date"]);
+ echo($dt->format("M jS, Y"));
+ }
+
+ ?> · by <?= implode(" and ", $item["author"]) ?></small>
+ </div>
+ </div>
+ <?php endif; ?>
+ <?php $index++;endif;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 (!$item["admin"] || ($admin && $item["admin"])): ?>
+ <?php if ($index >= 3 && $index < 100): ?>
+ <a href="<?= $item["admin"] ? "/admin" : "" ?>/article/<?= $item["id"] ?>" class="list-group-item list-group-item-action<?= $item["admin"] ? " list-group-item-admin" : "" ?>"><?= $item["title"] ?></a>
+ <?php endif; ?>
+ <?php $index++;endif;endforeach; ?>
+ </div>
+ <?php if (count($list) > 100): ?>
+ <p>Wait! There's more! Our older articles aren't listed here to save you some bytes of data. You can get to the complete list <a href="/articles" style="text-decoration: underline;">here</a>.</p>
+ <?php endif; ?>
+ <?php endif; ?>
+</div>
+
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/dom/footer.php"; ?> \ No newline at end of file