mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-10 10:58:25 +01:00
Superinit!!!
This commit is contained in:
parent
510a2fa0b9
commit
ae2ae8f89d
1 changed files with 45 additions and 0 deletions
45
src/libpoketube/init/pages-static.js
Normal file
45
src/libpoketube/init/pages-static.js
Normal file
|
@ -0,0 +1,45 @@
|
|||
const { fetcher,core, wiki,musicInfo, modules, version, initlog, init,} = require("../libpoketube-initsys.js");
|
||||
const {
|
||||
IsJsonString,
|
||||
convert,
|
||||
getFirstLine,
|
||||
capitalizeFirstLetter,
|
||||
turntomins,
|
||||
getRandomInt,
|
||||
getRandomArbitrary,
|
||||
} = require("../ptutils/libpt-coreutils.js");
|
||||
|
||||
const sha384 = modules.hash;
|
||||
|
||||
module.exports = function (app, config, renderTemplate) {
|
||||
var html_location = './css/';
|
||||
|
||||
app.get("/privacy", function (req, res) {
|
||||
renderTemplate(res, req, "priv.ejs");
|
||||
});
|
||||
|
||||
app.get("/143", function (req, res) {
|
||||
var number_easteregg = getRandomArbitrary(0, 150);
|
||||
|
||||
if (number_easteregg == "143") {
|
||||
renderTemplate(res, req, "143.ejs");
|
||||
}
|
||||
if (number_easteregg != "143") {
|
||||
return res.redirect("/");
|
||||
}
|
||||
});
|
||||
|
||||
app.get("/domains", function (req, res) {
|
||||
renderTemplate(res, req, "domains.ejs");
|
||||
});
|
||||
|
||||
app.get("/license", function (req, res) {
|
||||
renderTemplate(res, req, "license.ejs");
|
||||
});
|
||||
|
||||
app.get("/css/:id", (req, res) => {
|
||||
res.sendFile(req.params.id, { root : html_location});
|
||||
});
|
||||
|
||||
|
||||
}
|
Loading…
Reference in a new issue