aboutsummaryrefslogtreecommitdiff
path: root/htdocs/public/archive
diff options
context:
space:
mode:
authorMinteck <minteck@phoenixnet.tech>2021-11-03 19:12:27 +0100
committerMinteck <minteck@phoenixnet.tech>2021-11-03 19:12:27 +0100
commit89cf52a10dfe7cfeb02c3f7f4b6842892eb04300 (patch)
treec8873cf4908491893c880d92aabbc8fb414bb7a7 /htdocs/public/archive
parent6a0056b00deb2bda815567635b7a554bdc5e74de (diff)
downloadwolfeye-js-89cf52a10dfe7cfeb02c3f7f4b6842892eb04300.tar.gz
wolfeye-js-89cf52a10dfe7cfeb02c3f7f4b6842892eb04300.tar.bz2
wolfeye-js-89cf52a10dfe7cfeb02c3f7f4b6842892eb04300.zip
Reverse proxy support
Diffstat (limited to 'htdocs/public/archive')
-rw-r--r--htdocs/public/archive/index.ejs58
1 files changed, 58 insertions, 0 deletions
diff --git a/htdocs/public/archive/index.ejs b/htdocs/public/archive/index.ejs
new file mode 100644
index 0000000..b8bd4df
--- /dev/null
+++ b/htdocs/public/archive/index.ejs
@@ -0,0 +1,58 @@
+<% global.title = "Archives"; %>
+<%- include(`${private}/header.ejs`) %>
+
+<a href="/">← Go back home</a>
+
+<hr class="rnbwsquare-separator rnbwsquare-outer">
+
+<h1>Archives</h1>
+<!--<p>This is the page where all my active projects are, it is regularly updated from the projects I created on <a-->
+<!-- href="https://source.minteck.org" target="_blank">source.minteck.org</a>. For projects I don't maintain-->
+<!-- anymore, refer to the <a href="/archive">Archives</a> page.</p>-->
+
+<div class="grid-3 projects">
+ <%
+ const monthNames = ["January", "February", "March", "April", "May", "June",
+ "July", "August", "September", "October", "November", "December"
+ ];
+ archives = [];
+ for (let archive of fs.readdirSync(serverRoot + "/archives")) {
+ data = {};
+ if (archive.endsWith(".json")) {
+ json = JSON.parse(fs.readFileSync(serverRoot + "/archives/" + archive).toString())
+
+ data.id = archive.substr(0, archive.length - 5);
+ data.name = json.title;
+ data.description = json.description.en;
+ data.date = (json.date.substr(3) + json.date.substr(0, 2)) - 1 + 1;
+
+ if (json.unreleased) {
+ date = new Date(json.date.substr(3) + "-" + json.date.substr(0, 2) + "-01");
+ data.info = "<span style='color:gold;'>Never released</span> · " + monthNames[date.getMonth()] + " " + date.getFullYear();
+ } else {
+ data.info = "Officially 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">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