diff options
author | Minteck <contact@minteck.org> | 2021-12-04 10:58:59 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2021-12-04 10:58:59 +0100 |
commit | e618c3f52c1c4ae161650679cda24eecbba579bb (patch) | |
tree | a160a9f18847be1be73fb1c2ac2bc25b1e756e27 /htdocs/public/archive/index.ejs | |
parent | bce13ee94deb2a4914784bb4268dc1d7bc0f11ed (diff) | |
download | rainbow-e618c3f52c1c4ae161650679cda24eecbba579bb.tar.gz rainbow-e618c3f52c1c4ae161650679cda24eecbba579bb.tar.bz2 rainbow-e618c3f52c1c4ae161650679cda24eecbba579bb.zip |
Code is now more cute!
Diffstat (limited to 'htdocs/public/archive/index.ejs')
-rw-r--r-- | htdocs/public/archive/index.ejs | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/htdocs/public/archive/index.ejs b/htdocs/public/archive/index.ejs index 3fdda40..24af393 100644 --- a/htdocs/public/archive/index.ejs +++ b/htdocs/public/archive/index.ejs @@ -1,37 +1,32 @@ -<% global.title = "Archives"; %> +<% global.title = lang.archives.title; %> <%- 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>--> +<h1><%- lang.archives.title %></h1> <div class="grid-3 projects"> <% - const monthNames = ["January", "February", "March", "April", "May", "June", - "July", "August", "September", "October", "November", "December" - ]; + const monthNames = lang.archives.months; archives = []; - for (let archive of fs.readdirSync(serverRoot + "/archives")) { + for (let archive of fs.readdirSync(serverRoot + "/data/archives")) { data = {}; if (archive.endsWith(".json")) { - json = JSON.parse(fs.readFileSync(serverRoot + "/archives/" + archive).toString()) + 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.en; + 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;'>Never released</span> · " + monthNames[date.getMonth()] + " " + date.getFullYear(); + 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 = "Officially released · " + monthNames[date.getMonth()] + " " + date.getFullYear(); + data.info = lang.archives.released + " · " + monthNames[date.getMonth()] + " " + date.getFullYear(); } archives.push(data); @@ -49,7 +44,7 @@ <a href="https://archive.cdn.minteck.org/<%- archive.id %>.zip" target="_blank" - class="big-button big-button-bg3">Download</a> + class="big-button big-button-bg3"><%- lang.archives.download %></a> </p> <p style="text-align: center;"><small><%- archive.info %></small></p> </div> |