diff options
author | RaindropsSys <raindrops@equestria.dev> | 2024-06-21 00:04:16 +0200 |
---|---|---|
committer | RaindropsSys <raindrops@equestria.dev> | 2024-06-21 00:04:16 +0200 |
commit | dcc9fbef1e959e8391269da4cbdfdaaaddd47276 (patch) | |
tree | 19faf663d8b3da3842f0089a917e913615eca28b | |
parent | 8fc58b6b9df57ef61e6d0d9d10fac1ae3b99d56d (diff) | |
download | starshine-dcc9fbef1e959e8391269da4cbdfdaaaddd47276.tar.gz starshine-dcc9fbef1e959e8391269da4cbdfdaaaddd47276.tar.bz2 starshine-dcc9fbef1e959e8391269da4cbdfdaaaddd47276.zip |
Fix archives page
-rwxr-xr-x | projects/archive/index.php | 46 | ||||
-rwxr-xr-x | version | 2 |
2 files changed, 4 insertions, 44 deletions
diff --git a/projects/archive/index.php b/projects/archive/index.php index b6929b7..9763348 100755 --- a/projects/archive/index.php +++ b/projects/archive/index.php @@ -1,44 +1,4 @@ -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/lang.php"; $title = l("lang.archive.title"); require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/header.php"; ?> +<?php -<div id="archive-decoration"></div> - -<div class="container" id="archive-container"> - <h1><?= l("lang.archive.title") ?></h1> - <table id="archive-table"> - <?php $lastYear = null; $lastMonth = null; $projects = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/projects.json"), true); uasort($projects, function ($a, $b) { - return $b["commit"] - $a["commit"]; - }); foreach ($projects as $project): if ($project["archive"]): ?> - <tr> - <td class="archive-table-year"><?php - - $year = date('Y', $project["commit"]); - - if ($year !== $lastYear) { - $lastYear = $year; - $lastMonth = null; - echo("<b>$year</b>"); - } - - ?></td> - <td class="archive-table-month"><?php - - $month = month((int)date('n', $project["commit"])); - - if ($month !== $lastMonth) { - $lastMonth = $month; - echo("<b>$month</b>"); - } - - ?></td> - <td> - <a class="archive-table-link" href="/projects/<?= $project["name"] ?? $project["id"] ?>"> - <?php if (isset($project["icon"])): ?><img class="archive-table-icon" src="/assets/projects/<?= $project["id"] ?>.png" alt="Project icon"><?php else: ?><i class="archive-table-icon bi bi-journal-code"></i><?php endif; ?> - <span class="archive-table-title"><?= $project["display_name"] ?? $project["name"] ?></span> - </a> - </td> - </tr> - <?php endif; endforeach; ?> - </table> -</div> - -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/footer.php"; ?> +header("Location: https://archives.equestria.dev"); +die(); @@ -1 +1 @@ -13.5.5 +13.5.6 |