summaryrefslogtreecommitdiff
path: root/projects
diff options
context:
space:
mode:
authorRaindropsSys <raindrops@equestria.dev>2024-06-21 00:04:16 +0200
committerRaindropsSys <raindrops@equestria.dev>2024-06-21 00:04:16 +0200
commitdcc9fbef1e959e8391269da4cbdfdaaaddd47276 (patch)
tree19faf663d8b3da3842f0089a917e913615eca28b /projects
parent8fc58b6b9df57ef61e6d0d9d10fac1ae3b99d56d (diff)
downloadstarshine-dcc9fbef1e959e8391269da4cbdfdaaaddd47276.tar.gz
starshine-dcc9fbef1e959e8391269da4cbdfdaaaddd47276.tar.bz2
starshine-dcc9fbef1e959e8391269da4cbdfdaaaddd47276.zip
Fix archives page
Diffstat (limited to 'projects')
-rwxr-xr-xprojects/archive/index.php46
1 files changed, 3 insertions, 43 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();