Compare commits

...

2 Commits

Author SHA1 Message Date
sky
cbdf039eab begin work on redesign for user pages 2025-07-08 00:23:29 -04:00
sky
fa52034fb7 fix stuff after moving to resources 2025-06-30 03:19:11 -04:00
13 changed files with 85 additions and 119 deletions

View File

@ -37,8 +37,8 @@ let rawProfileHTML = fs.readFileSync("./html/profile.html").toString();
let rawEditProfileHTML = fs.readFileSync("./html/profile_edit.html").toString();
let profile404 = fs.readFileSync("./html/profile_404.html").toString();
let profileBan = fs.readFileSync("./html/profile_ban.html").toString();
let gamesJSON = JSON.parse(fs.readFileSync("./selenite/data/games.json").toString());
let appsJSON = JSON.parse(fs.readFileSync("./selenite/data/apps.json").toString());
let gamesJSON = JSON.parse(fs.readFileSync("./public/resources/games.json").toString());
let appsJSON = JSON.parse(fs.readFileSync("./public/resources/apps.json").toString());
let profileReadyJSON = {};
for (let i = 0; i < gamesJSON.length; i++) {
profileReadyJSON[gamesJSON[i].directory] = { name: gamesJSON[i].name, image: gamesJSON[i].image };

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class="sl-theme-dark" lang="en">
<html lang="en">
<head>
<!-- initialize theme vars
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class="sl-theme-dark" lang="en">
<html lang="en">
<head>
<!-- initialize theme vars
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class="sl-theme-dark" lang="en">
<html lang="en">
<head>
<!-- initialize theme vars
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->
@ -14,7 +14,8 @@
<script src="https://js.hcaptcha.com/1/api.js" async defer></script>
<link rel="stylesheet" href="/style.css" />
<link rel="stylesheet" href="/css/main.css" />
<link rel="stylesheet" href="/css/pages.css" />
<!-- seo + other things -->
<title>Login | Selenite</title>
@ -60,27 +61,17 @@
</script>
</head>
<alerts> </alerts>
<body id="noscroll">
<header>
<a href="/index.html">Home</a>
<a href="/bookmarklets.html">Bookmarklets</a>
<a href="/projects.html">Games</a>
<a href="/apps.html">Apps</a>
<a href="/settings.html">Settings</a>
<a id="blank" href="#">Open Blank</a>
<a href="/u/" class="usericon"><img src="/img/user.svg" /></a>
</header>
<main id="main" class="noscroll">
<h2>Login to your account</h2>
<body>
<h2>login..</h2>
<form onsubmit="return false;" id="login">
<input type="text" id="username" placeholder="username" />
<input type="password" id="password" placeholder="password" />
<br />
<a href="/reset">Forgot password?</a> or <a href="/register">Create a free account</a><br />
<div class="h-captcha" id="hcaptcha" data-sitekey="1774ec96-39be-4fb0-9e82-f4c62354b8fa"></div>
<button type="submit" value="Submit">Login</button>
<a href="/reset">forgot password?</a><br />
<a href="/register">create a free account</a><br />
<button type="submit" value="Submit">login</button>
</form>
</main>
<popups>
<div id="popup" style="display: none">
<h1 id="title"></h1>
@ -88,13 +79,5 @@
<button id="close">X</button>
</div>
</popups>
<footer class="noscroll">
<a href="https://gitlab.com/skysthelimit.dev/selenite">Source</a>
<a href="https://discord.gg/7jyufnwJNf">Discord</a>
<a href="/suggest.html">Suggestions & Bugs</a>
<a href="/contact.html">Contact</a>
<a href="/support.html">Donate</a>
<a href="/about.html">About</a>
</footer>
</body>
</html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class="sl-theme-dark" lang="en">
<html lang="en">
<head>
<!-- initialize theme vars
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class="sl-theme-dark" lang="en">
<html lang="en">
<head>
<!-- initialize theme vars
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class="sl-theme-dark" lang="en">
<html lang="en">
<head>
<!-- initialize theme vars
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class="sl-theme-dark" lang="en">
<html lang="en">
<head>
<!-- initialize theme vars
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class="sl-theme-dark" lang="en">
<html lang="en">
<head>
<!-- initialize theme vars
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->
@ -14,10 +14,11 @@
<script src="https://js.hcaptcha.com/1/api.js" async defer></script>
<link rel="stylesheet" href="/style.css" />
<link rel="stylesheet" href="/css/main.css" />
<link rel="stylesheet" href="/css/pages.css" />
<!-- seo + other things -->
<title>Register | Selenite</title>
<title>Login | Selenite</title>
<link rel="icon" href="/favicon.ico" />
<script>
document.addEventListener("DOMContentLoaded", () => {
@ -50,7 +51,6 @@
document.getElementById("popup").style.display = "flex";
return;
}
let data = await (
await fetch("/register", {
method: "POST",
@ -79,26 +79,17 @@
</script>
</head>
<alerts> </alerts>
<body id="noscroll">
<header>
<a href="/index.html">Home</a>
<a href="/bookmarklets.html">Bookmarklets</a>
<a href="/projects.html">Games</a>
<a href="/apps.html">Apps</a>
<a href="/settings.html">Settings</a>
<a id="blank" href="#">Open Blank</a>
<a href="/u/" class="usericon"><img src="/img/user.svg" /></a>
</header>
<main id="main" class="noscroll">
<h2>Register a new account</h2>
<body>
<h2>register..</h2>
<div>
<input type="text" id="username" placeholder="username" />
<p>3-16 characters<br />capital, lowercase, numbers, dash, underscore, and dots allowed</p>
<input type="password" id="password" placeholder="password" />
<p>6+ characters<br />one uppercase, lowercase, and number at least</p>
<div class="h-captcha" id="hcaptcha" data-sitekey="1774ec96-39be-4fb0-9e82-f4c62354b8fa"></div>
<p><a href="/login">Or login</a></p>
<button type="submit" value="Submit" id="register">Register</button>
</main>
<p><a href="/login">already have an account? login here.</a></p>
<button type="submit" value="Submit" id="register">create an account</button>
</div>
<popups>
<div id="popup" style="display: none">
<h1 id="title"></h1>
@ -106,13 +97,5 @@
<button id="close">X</button>
</div>
</popups>
<footer class="noscroll">
<a href="https://gitlab.com/skysthelimit.dev/selenite">Source</a>
<a href="https://discord.gg/7jyufnwJNf">Discord</a>
<a href="/suggest.html">Suggestions & Bugs</a>
<a href="/contact.html">Contact</a>
<a href="/support.html">Donate</a>
<a href="/about.html">About</a>
</footer>
</body>
</html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class="sl-theme-dark" lang="en">
<html lang="en">
<head>
<!-- initialize theme vars
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class="sl-theme-dark" lang="en">
<html lang="en">
<head>
<!-- initialize theme vars
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class="sl-theme-dark" lang="en">
<html lang="en">
<head>
<!-- initialize theme vars
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->

View File

@ -387,7 +387,7 @@ app.use("/ai", async (req, res, next) => {
next();
}
});
app.use("/", express.static("./selenite", { extensions: ["html"] }));
app.use("/", express.static("./public", { extensions: ["html"] }));
app.use("/data/:id/:file", async (req, res) => {
const id = path.basename(req.params.id);
const file = path.basename(req.params.file);
@ -490,6 +490,6 @@ server.on("upgrade", (request, socket, head) => {
app.use(async (req, res) => {
res
.type("text/html")
.send(await fs.readFile(`./selenite/404.html`))
.send(await fs.readFile(`./public/404.html`))
.status(404);
});