Merge pull request #25 from 3kho/main

Fix 404 Page
This commit is contained in:
wearr 2024-09-30 22:28:12 -05:00 committed by GitHub
commit 7be231fa31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 2371 additions and 2542 deletions

View file

@ -11,10 +11,10 @@ const site = prodBuild ? "https://aluu.xyz" : "http://localhost:3000";
export default defineConfig({
site: site,
integrations: [
sitemap({
includeByDefault: true,
sitemap({
includeByDefault: true,
lastmod: new Date(),
}),
}),
],
output: "server",
adapter: node({

View file

@ -12,7 +12,7 @@ import dotenv from "dotenv-flow";
import wisp from "wisp-server-node";
import router from "./middleware/ProxyExt/index.js";
import { handler as astroSSR } from "./dist/server/entry.mjs";
import cookies from "cookie-parser"
import cookies from "cookie-parser";
dotenv.config();
@ -33,7 +33,7 @@ const rh = rammerhead.createRammerhead({
const app = express();
app.use(astroSSR);
app.use(cookies())
app.use(cookies());
// Set process.env.MASQR_ENABLED to "true" to enable masqr protection.
if (MASQR_ENABLED == "true") {
@ -112,7 +112,7 @@ app.get("/search", async (req, res) => {
}
});
app.get("*", (req, res) => {
res.sendFile(path.join(process.cwd(), "dist/client/404.html"));
res.redirect(302, "/404");
});
const server = createServer();

View file

@ -12,7 +12,7 @@ export async function masqrCheck(config, htmlFile) {
if (!req.cookies) {
// Send an error
res.send("Request failed!")
res.send("Request failed!");
}
if (req.cookies.authcheck) {

View file

@ -13,30 +13,30 @@
"lint:fix": "eslint --fix ."
},
"dependencies": {
"@astrojs/node": "^8.3.2",
"@astrojs/node": "^8.3.4",
"@inox-tools/sitemap-ext": "^0.3.3",
"@mercuryworkshop/bare-as-module3": "^2.2.2",
"@mercuryworkshop/bare-mux": "^2.0.9",
"@mercuryworkshop/epoxy-transport": "^2.1.11",
"@mercuryworkshop/libcurl-transport": "^1.3.10",
"@rubynetwork/rammerhead": "^1.3.2",
"@titaniumnetwork-dev/ultraviolet": "^3.2.6",
"@titaniumnetwork-dev/ultraviolet": "^3.2.7",
"@tomphttp/bare-server-node": "^2.0.4",
"@types/node": "^20.14.12",
"astro": "^4.12.2",
"@types/node": "^20.16.9",
"astro": "^4.15.9",
"chalk": "^5.3.0",
"cookie-parser": "^1.4.6",
"dotenv-flow": "^4.1.0",
"express": "^4.19.2",
"express": "^4.21.0",
"notyf": "^3.10.0",
"sequelize": "^6.37.3",
"sqlite3": "^5.1.7",
"wisp-server-node": "^1.1.4"
"wisp-server-node": "^1.1.7"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"eslint": "^8.57.0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"eslint": "^8.57.1",
"eslint-plugin-astro": "^0.31.4",
"prettier": "3.2.5",
"prettier-plugin-astro": "^0.13.0"

4754
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -7,7 +7,6 @@ const { large } = Astro.props;
const classlist = "faq-card" + (large ? " faq-large" : "");
---
<div class={classlist}>
<slot />
</div>
@ -28,4 +27,4 @@ const classlist = "faq-card" + (large ? " faq-large" : "");
.faq-large {
grid-column: span 2;
}
</style>
</style>

View file

@ -9,4 +9,4 @@
"description": "Alu is a sleek web proxy supporting multiple standards of communication, and wide levels of customization. Similar to other proxies such as Holy Unblocker, Alu allows you to access blocked content while maintaining your privacy.",
"keywords": "web proxy, unblocker, alu, alu proxy, privacy, customization, wisp protocol, holy unblocker, titanium network, definitely science, kazwire, radon games, nebula, nebula proxy, censorship, bypass censorship, anura"
}
</script>
</script>

1
src/env.d.ts vendored
View file

@ -1,3 +1,4 @@
/// <reference path="../.astro/types.d.ts" />
/// <reference types="astro/client" />
// ###> astro-i18n/type-generation ###

View file

@ -13,7 +13,8 @@ interface Props {
const { title, optionalStylesheets } = Astro.props;
const DESCRIPTION = "Alu is a sleek web proxy supporting multiple standards of communication, and wide levels of customization. Similar to other proxies such as Holy Unblocker, Alu allows you to access blocked content while maintaining your privacy.";
const DESCRIPTION =
"Alu is a sleek web proxy supporting multiple standards of communication, and wide levels of customization. Similar to other proxies such as Holy Unblocker, Alu allows you to access blocked content while maintaining your privacy.";
---
<!doctype html>
@ -25,8 +26,8 @@ const DESCRIPTION = "Alu is a sleek web proxy supporting multiple standards of c
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<meta name="title" content="Alu" />
<meta name="author" content="Titanium Network">
<meta name="description" content={DESCRIPTION}/>
<meta name="author" content="Titanium Network" />
<meta name="description" content={DESCRIPTION} />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://aluu.xyz" />
<meta property="og:title" content="Alu" />
@ -59,7 +60,7 @@ const DESCRIPTION = "Alu is a sleek web proxy supporting multiple standards of c
import IDBManager from "@components/ts/IDBManager";
instantiateAlu();
if (!window.idb) {
const db = IDBManager.loadIDB("AluDB", 1);
db.onupgradeneeded = () => {
@ -87,67 +88,63 @@ const DESCRIPTION = "Alu is a sleek web proxy supporting multiple standards of c
<WelcomeLogging />
<Footer />
<style is:global>
:root {
--background-color: #191724;
--background-highlight: #1f1d2e;
--accent-color: #26233a;
--accent-color-brighter: #2e2b4a;
--text-color: #e0def4;
--text-color-accent: #c7c5e0;
--dropdown-background-color: #1f1d2e;
}
[data-theme="alu"] {
--background-color: #191724;
--background-highlight: #1f1d2e;
--accent-color: #26233a;
--accent-color-brighter: #2e2b4a;
--text-color: #e0def4;
--text-color-accent: #c7c5e0;
--dropdown-background-color: #1f1d2e;
}
[data-theme="mocha"] {
/* Catppucin Mocha theme */
--background-color: #1e1e2e;
--background-highlight: #45475a;
--accent-color: #32324e;
--accent-color-brighter: #242539;
--text-color: #cdd6f4;
--text-color-accent: #bac2de;
--dropdown-background-color: #181825;
}
:root {
--background-color: #191724;
--background-highlight: #1f1d2e;
--accent-color: #26233a;
--accent-color-brighter: #2e2b4a;
--text-color: #e0def4;
--text-color-accent: #c7c5e0;
--dropdown-background-color: #1f1d2e;
}
[data-theme="alu"] {
--background-color: #191724;
--background-highlight: #1f1d2e;
--accent-color: #26233a;
--accent-color-brighter: #2e2b4a;
--text-color: #e0def4;
--text-color-accent: #c7c5e0;
--dropdown-background-color: #1f1d2e;
}
[data-theme="mocha"] {
/* Catppucin Mocha theme */
--background-color: #1e1e2e;
--background-highlight: #45475a;
--accent-color: #32324e;
--accent-color-brighter: #242539;
--text-color: #cdd6f4;
--text-color-accent: #bac2de;
--dropdown-background-color: #181825;
}
[data-theme="macchiato"] {
/* Catppuccin Macchiato Theme */
--background-color: #24273a;
--background-highlight: #494d64;
--accent-color: #323550;
--accent-color-brighter: #2a2d42;
--text-color: #cad3f5;
--text-color-accent: #b8c0e0;
--dropdown-background-color: #1e2030;
}
[data-theme="macchiato"] {
/* Catppuccin Macchiato Theme */
--background-color: #24273a;
--background-highlight: #494d64;
--accent-color: #323550;
--accent-color-brighter: #2a2d42;
--text-color: #cad3f5;
--text-color-accent: #b8c0e0;
--dropdown-background-color: #1e2030;
}
</style>
<style is:global lang="scss">
* {
box-sizing: border-box;
}
html {
--s: 50px; /* control the size*/
--darken: 30%;
--c1: color-mix(in srgb, var(--background-color), black var(--darken));
--c2: color-mix(in srgb, var(--accent-color), black var(--darken));
--c3: color-mix(in srgb, var(--dropdown-background-color), black var(--darken));
--_g: var(--c3) 0 120deg,#0000 0;
background:
conic-gradient(from -60deg at 50% calc(100%/3),var(--_g)),
conic-gradient(from 120deg at 50% calc(200%/3),var(--_g)),
conic-gradient(from 60deg at calc(200%/3),var(--c3) 60deg,var(--c2) 0 120deg,#0000 0),
conic-gradient(from 180deg at calc(100%/3),var(--c1) 60deg,var(--_g)),
linear-gradient(90deg,var(--c1) calc(100%/6),var(--c2) 0 50%, var(--c1) 0 calc(500%/6),var(--c2) 0);
background-size: calc(1.732*var(--s)) var(--s);
--_g: var(--c3) 0 120deg, #0000 0;
background: conic-gradient(from -60deg at 50% calc(100% / 3), var(--_g)), conic-gradient(from 120deg at 50% calc(200% / 3), var(--_g)),
conic-gradient(from 60deg at calc(200% / 3), var(--c3) 60deg, var(--c2) 0 120deg, #0000 0), conic-gradient(from 180deg at calc(100% / 3), var(--c1) 60deg, var(--_g)),
linear-gradient(90deg, var(--c1) calc(100% / 6), var(--c2) 0 50%, var(--c1) 0 calc(500% / 6), var(--c2) 0);
background-size: calc(1.732 * var(--s)) var(--s);
}
body {
@ -162,7 +159,7 @@ const DESCRIPTION = "Alu is a sleek web proxy supporting multiple standards of c
color: var(--text-color);
opacity: 1;
}
// button, input {
// font-family: "Varela Round", sans-serif;
// }

View file

@ -1,5 +1,5 @@
---
import Layout from "../layouts/Layout.astro";
import Layout from "src/layouts/Layout.astro";
---
<Layout title="404 | Alu">

View file

@ -59,7 +59,7 @@ export function getStaticPaths() {
</main>
<script src="@components/ts/settings.ts"></script>
<style is:global lang="scss">
.content-hidden{
.content-hidden {
display: none;
}
#current-content {

View file

@ -3,23 +3,21 @@ export const prerender = false;
import Layout from "../../layouts/Layout.astro";
import games from "../../json/games.json";
import sitemap from 'sitemap-ext:config';
import sitemap from "sitemap-ext:config";
const gamesList = games as GameList;
sitemap(async ({ setSitemap}) => {
sitemap(async ({ setSitemap }) => {
const gamesList = games as GameList;
const urls = Object.keys(gamesList);
setSitemap(
setSitemap(
urls.map((game) => ({
sitemap: true,
params: {
game: game,
},
}),
)
);
}))
);
});
// get the current game based on the information in the url
@ -63,7 +61,7 @@ classList = classList.trim();
<div class="game-info">
<div class="game-info-top">
<div class="game-info-left">
<img class="game-img" src={gameData.image} alt="">
<img class="game-img" src={gameData.image} alt="" />
<p class="game-title">{gameData.name}</p>
</div>
<img src="/img/games/fullscreen.svg" alt="Fullscreen" id="game-fullscreen" class="icn" />