From 45557cdd61850abc30959c39054d29b45fefb8c2 Mon Sep 17 00:00:00 2001 From: Minteck Date: Thu, 16 Dec 2021 23:06:28 +0100 Subject: It's finally done! --- htdocs/public/archive/index.ejs | 54 ----------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 htdocs/public/archive/index.ejs (limited to 'htdocs/public/archive/index.ejs') 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`) %> - -← <%- lang.global.back %> - -
- -

<%- lang.archives.title %>

- -
- <% - 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 = "" + lang.archives.never + " · " + 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) { %> -
- "> -

<%- archive.name %>

-

<%- archive.description %>

-

- <%- lang.archives.download %> -

-

<%- archive.info %>

-
- <% } %> -
- -<%- include(`${private}/footer.ejs`) %> \ No newline at end of file -- cgit