aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-06-16 18:00:23 +0200
committerMinteck <contact@minteck.org>2022-06-16 18:00:23 +0200
commit5cf2e2ac2ee0ea4c12b3aa7e84ebd0a20698846f (patch)
tree6fecace82280be1d0eb82d113cf267f7f4b8eb64
parentde4c247ba4fd7410da4d8e3d06a29985f2485950 (diff)
downloadvaportrail-5cf2e2ac2ee0ea4c12b3aa7e84ebd0a20698846f.tar.gz
vaportrail-5cf2e2ac2ee0ea4c12b3aa7e84ebd0a20698846f.tar.bz2
vaportrail-5cf2e2ac2ee0ea4c12b3aa7e84ebd0a20698846f.zip
Other pages
-rw-r--r--index.js18
-rw-r--r--views/about.ejs26
-rw-r--r--views/index.ejs2
-rw-r--r--views/partials/footer.ejs4
-rw-r--r--views/projects.ejs26
5 files changed, 72 insertions, 4 deletions
diff --git a/index.js b/index.js
index 0ae145f..ef033bc 100644
--- a/index.js
+++ b/index.js
@@ -30,6 +30,10 @@ const express = require('express');
const fs = require('fs');
const app = express();
+// Get version and build numbers
+const version = (fs.existsSync("./.git/refs/heads/mane") ? fs.readFileSync("./.git/refs/heads/mane").toString().trim().substring(0, 8) : (fs.existsSync("../.git/refs/heads/mane") ? fs.readFileSync("../.git/refs/heads/mane").toString().trim().substring(0, 8) : (fs.existsSync("./version.txt") ? fs.readFileSync("./version.txt").toString().trim() : (fs.existsSync("../version.txt") ? fs.readFileSync("../version.txt").toString().trim() : "live"))));
+const build = (fs.existsSync("./build.txt") ? fs.readFileSync("./build.txt").toString().trim() : (fs.existsSync("../build.txt") ? fs.readFileSync("../build.txt").toString().trim() : "dev"));
+
// Restart manager
async function restartManager() {
if (fs.existsSync("./RESTART")) {
@@ -42,15 +46,23 @@ setInterval(restartManager, 500)
// Public pages
app.get('/', (req, res) => {
- res.render("index");
+ res.render("index", { version, build });
});
app.get('/servers', (req, res) => {
- res.render("servers", { serverCache });
+ res.render("servers", { serverCache, version, build });
});
app.get("/plurality", (req, res) => {
- res.render("plurality");
+ res.render("plurality", { version, build });
+});
+
+app.get("/about", (req, res) => {
+ res.render("about", { version, build });
+});
+
+app.get("/projects", (req, res) => {
+ res.render("projects", { version, build });
});
// API
diff --git a/views/about.ejs b/views/about.ejs
new file mode 100644
index 0000000..bb01120
--- /dev/null
+++ b/views/about.ejs
@@ -0,0 +1,26 @@
+<!--
+ ~ MIT License
+ ~
+ ~ Copyright (c) 2022- Equestria.dev Developers
+ ~
+ ~ Permission is hereby granted, free of charge, to any person obtaining a copy
+ ~ of this software and associated documentation files (the "Software"), to deal
+ ~ in the Software without restriction, including without limitation the rights
+ ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ ~ copies of the Software, and to permit persons to whom the Software is
+ ~ furnished to do so, subject to the following conditions:
+ ~
+ ~ The above copyright notice and this permission notice shall be included in all
+ ~ copies or substantial portions of the Software.
+ ~
+ ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ ~ SOFTWARE.
+ ~
+ -->
+<%- include("./partials/header.ejs", {title: "About Us"}) %>
+<%- include("./partials/footer.ejs") %> \ No newline at end of file
diff --git a/views/index.ejs b/views/index.ejs
index 1f1661e..5a62ac5 100644
--- a/views/index.ejs
+++ b/views/index.ejs
@@ -27,7 +27,7 @@
<div id="hero-inner">
<div>
<div id="hero-title-1">We are The Cuties!</div>
- <div id="hero-title-2">The two pegasi making stuff with their wings</div>
+ <div id="hero-title-2">The two fluffy birb horses making stuff with their wings</div>
</div>
</div>
</div>
diff --git a/views/partials/footer.ejs b/views/partials/footer.ejs
index 168dc25..33fb1a4 100644
--- a/views/partials/footer.ejs
+++ b/views/partials/footer.ejs
@@ -22,5 +22,9 @@
~ SOFTWARE.
~
-->
+<span style="position:fixed;right:0;top:0;z-index:999999999999;background:black;font-family:monospace;">version <%= version %> (build <%= build %>)</span>
+<span style="position:fixed;left:0;top:0;z-index:999999999999;background:black;font-family:monospace;">Project Vapor Trail</span>
+<span style="position:fixed;right:0;bottom:0;z-index:999999999999;background:black;font-family:monospace;">Not for production use.</span>
+<span style="position:fixed;left:0;bottom:0;z-index:999999999999;background:black;font-family:monospace;">Not for production use.</span>
</body>
</html> \ No newline at end of file
diff --git a/views/projects.ejs b/views/projects.ejs
new file mode 100644
index 0000000..b6d3dd1
--- /dev/null
+++ b/views/projects.ejs
@@ -0,0 +1,26 @@
+<!--
+ ~ MIT License
+ ~
+ ~ Copyright (c) 2022- Equestria.dev Developers
+ ~
+ ~ Permission is hereby granted, free of charge, to any person obtaining a copy
+ ~ of this software and associated documentation files (the "Software"), to deal
+ ~ in the Software without restriction, including without limitation the rights
+ ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ ~ copies of the Software, and to permit persons to whom the Software is
+ ~ furnished to do so, subject to the following conditions:
+ ~
+ ~ The above copyright notice and this permission notice shall be included in all
+ ~ copies or substantial portions of the Software.
+ ~
+ ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ ~ SOFTWARE.
+ ~
+ -->
+<%- include("./partials/header.ejs", {title: "Projects"}) %>
+<%- include("./partials/footer.ejs") %> \ No newline at end of file