aboutsummaryrefslogtreecommitdiff
path: root/htdocs/public/archive/index.ejs
diff options
context:
space:
mode:
Diffstat (limited to 'htdocs/public/archive/index.ejs')
-rw-r--r--htdocs/public/archive/index.ejs54
1 files changed, 0 insertions, 54 deletions
diff --git a/htdocs/public/archive/index.ejs b/htdocs/public/archive/index.ejs
deleted file mode 100644
index 8d5ca25..0000000
--- a/htdocs/public/archive/index.ejs
+++ /dev/null
@@ -1,54 +0,0 @@
-<% global.title = lang.archives.title; %>
-<%- include(`${private}/header.ejs`) %>
-
-<a href="/<%- slang %>">← <%- lang.global.back %></a>
-
-<hr class="rnbwsquare-separator rnbwsquare-outer">
-
-<h1><%- lang.archives.title %></h1>
-
-<div class="grid-3 projects">
- <%
- const monthNames = lang.archives.months;
- archives = [];
- for (let archive of fs.readdirSync(serverRoot + "/data/archives")) {
- data = {};
- if (archive.endsWith(".json")) {
- json = JSON.parse(fs.readFileSync(serverRoot + "/data/archives/" + archive).toString())
-
- data.id = archive.substr(0, archive.length - 5);
- data.name = json.title;
- data.description = json.description[slang] ?? json.description.en;
- data.date = (json.date.substr(3) + json.date.substr(0, 2)) - 1 + 1;
-
- if (json.unreleased) {
- let date = new Date(json.date.substr(3) + "-" + json.date.substr(0, 2) + "-01");
- data.info = "<span style='color:gold;'>" + lang.archives.never + "</span> · " + monthNames[date.getMonth()] + " " + date.getFullYear();
- } else {
- let date = new Date(json.date.substr(3) + "-" + json.date.substr(0, 2) + "-01");
- data.info = lang.archives.released + " · " + monthNames[date.getMonth()] + " " + date.getFullYear();
- }
-
- archives.push(data);
- }
- }
- archives = archives.sort((a, b) => a.date - b.date).reverse()
- %>
- <% for (let archive of archives) { %>
- <div class="project">
- <img class="project-icon"
- src="<%- fs.existsSync(serverRoot + "/htdocs/public/assets/archive/" + archive.id + ".png") ? "/assets/archive/" + archive.id + ".png" : "/assets/icons/project.svg" %>">
- <h2 class="project-name"><%- archive.name %></h2>
- <p class="project-description"><%- archive.description %></p>
- <p class="project-buttons">
- <a
- href="https://archive.cdn.minteck.org/<%- archive.id %>.zip"
- target="_blank"
- class="big-button big-button-bg3"><%- lang.archives.download %></a>
- </p>
- <p style="text-align: center;"><small><%- archive.info %></small></p>
- </div>
- <% } %>
-</div>
-
-<%- include(`${private}/footer.ejs`) %> \ No newline at end of file