aboutsummaryrefslogtreecommitdiff
path: root/_site/home/index.php
diff options
context:
space:
mode:
authorMinteck <46352972+Minteck@users.noreply.github.com>2021-07-01 00:54:32 +0200
committerMinteck <46352972+Minteck@users.noreply.github.com>2021-07-01 00:54:32 +0200
commit1d62401c897a5ba82d0def92d97d09195a6d676f (patch)
treed26f11765a4eee20ac4867d5b77794fcdcaac641 /_site/home/index.php
parent1f23d65f32e37d0c6d703951d6735c9926f8521c (diff)
downloadunchainedtech-1d62401c897a5ba82d0def92d97d09195a6d676f.tar.gz
unchainedtech-1d62401c897a5ba82d0def92d97d09195a6d676f.tar.bz2
unchainedtech-1d62401c897a5ba82d0def92d97d09195a6d676f.zip
Fixed stuff + official logo
Diffstat (limited to '_site/home/index.php')
-rw-r--r--_site/home/index.php20
1 files changed, 13 insertions, 7 deletions
diff --git a/_site/home/index.php b/_site/home/index.php
index 62a076d..51f4197 100644
--- a/_site/home/index.php
+++ b/_site/home/index.php
@@ -8,32 +8,38 @@
<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">
+ <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="/article/<?= $item["id"] ?>">Read more</a>
+ <a class="btn btn-primary" href="<?= $item["admin"] ? "/admin" : "" ?>/article/<?= $item["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"));
+ 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++;endforeach; ?>
+ <?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="/article/<?= $item["id"] ?>" class="list-group-item list-group-item-action"><?= $item["title"] ?></a>
+ <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++;endforeach; ?>
+ <?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>