Merge branch 'main' into main

This commit is contained in:
Korbs 2023-11-24 02:02:56 +00:00
commit 1ff7b82cde
2 changed files with 68 additions and 3 deletions

View file

@ -44,12 +44,37 @@
font-family:"Ginto Nord" !important;
}
</style> <% } %>
<style>
.subtitle {
text-align: center;
color: #FFFF00;
text-shadow: 1px 1px 0px #000;
position: relative;
left: 68px;
top: -35px;
bottom: 50px;
animation: subtitle .25s;
animation-direction: alternate;
animation-iteration-count: infinite;
}
@-webkit-keyframes subtitle {
0% {
transform: scale(0.875) rotate(-20deg)
}
100% {
transform: scale(1) rotate(-20deg)
}
}
</style>
</head>
<body>
<div class="header">
<div class="header-content">
<div class="header-content-start">
<a href="/"><img style="width: 130px;" src="/css/logo-poke.svg?v=?v=<%=btoa(Date.now())%>"/></a>
<a href="/" style="text-decoration:none;"><img style="width: 130px;" src="/css/logo-poke.svg?v=?v=<%=btoa(Date.now())%>"/><p class="subtitle"> <%- random %></p></a>
</div>
<div class="header-content-center" style="margin-left: -30px;">
<form action=/search><input class=search-bar autocomplete="on" id=fname name=query><button class="btn btn-success" type=submit><i class="fa-light fa-search"></i></button></form>

View file

@ -23,6 +23,44 @@ var ping = require("ping");
const sha384 = modules.hash;
const splash = [
"Woke!",
"Gay gay homosexaul gay!",
"free Palestine!",
"free software!",
"im... stuff!",
"frick capitalism!",
"still calling it twitter btw!",
"boop!",
"no way!",
"traaaa rightssss!",
"XD!",
"nya!",
"say gex!",
"also try invidious!",
"rms <3!",
"du hast",
"can u belive no one bought this?",
"reee",
"1.000.000€!",
"pika!",
"fsf.org",
"ssfffssfssfffaassssfsdf!",
"100+ stars on gh!",
"now even gayer!",
"poketube!!!",
"rvlt.gg/poke!",
"women are pretty!",
"men are handsome!",
"enbys are cute!",
"you are cute :3",
"stallmansupport.org!!!"
]
function getJson(str) {
try {
return JSON.parse(str);
@ -75,6 +113,7 @@ module.exports = function (app, config, renderTemplate) {
app.get("/:v*?", async function (req, res) {
const uaos = req.useragent.os;
const random = splash[Math.floor(Math.random() * splash.length)];
const browser = req.useragent.browser;
const isOldWindows = (uaos === "Windows 7" || uaos === "Windows 8") && browser === "Firefox";
@ -85,6 +124,7 @@ module.exports = function (app, config, renderTemplate) {
return renderTemplate(res, req, "landing.ejs", {
isOldWindows,
random
});
};