diff --git a/index.js b/index.js index c9f7e06..5988670 100644 --- a/index.js +++ b/index.js @@ -9,6 +9,7 @@ import { build } from "astro"; import chalk from "chalk"; import { existsSync } from "fs"; import dotenv from "dotenv"; +import helmet from "helmet"; dotenv.config(); if (!existsSync("./dist")) build(); @@ -47,6 +48,13 @@ app.use( extended: true, }) ); +app.use(function (req, res, next) { + if (req.originalUrl.includes("/games")) { + res.header("Cross-Origin-Embedder-Policy", "require-corp"); + res.header("Cross-Origin-Opener-Policy", "same-origin"); + } + next(); +}); app.use("/", express.static("dist/client/")); app.get("/search", async (req, res) => { try { diff --git a/package-lock.json b/package-lock.json index 578bd5d..de05d44 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "compression": "^1.7.4", "dotenv": "^16.3.1", "express": "^4.18.2", + "helmet": "^7.1.0", "npm": "^10.2.5", "path": "^0.12.7", "rammerhead": "https://github.com/NebulaServices/rammerhead/releases/download/rammerhead-1.2.41-nebula.8/rammerhead-1.2.41-nebula.7.tgz", @@ -3465,6 +3466,14 @@ "resolved": "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-3.3.0.tgz", "integrity": "sha512-5e57etwBpNcDc0b6KCVWEh/Ro063OxPvzVimUdM0/tsYM/T7Hfy3kknIGj78SFTOhNd8AZY41U8mOHoO4LzmIQ==" }, + "node_modules/helmet": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/helmet/-/helmet-7.1.0.tgz", + "integrity": "sha512-g+HZqgfbpXdCkme/Cd/mZkV0aV3BZZZSugecH03kl38m/Kmdx8jKjBikpDj2cr+Iynv4KpYEviojNdTJActJAg==", + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/html-escaper": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-3.0.3.tgz", diff --git a/package.json b/package.json index c3c7017..605926f 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "compression": "^1.7.4", "dotenv": "^16.3.1", "express": "^4.18.2", + "helmet": "^7.1.0", "npm": "^10.2.5", "path": "^0.12.7", "rammerhead": "https://github.com/NebulaServices/rammerhead/releases/download/rammerhead-1.2.41-nebula.8/rammerhead-1.2.41-nebula.7.tgz", diff --git a/public/games b/public/games index 11287d0..8793db1 160000 --- a/public/games +++ b/public/games @@ -1 +1 @@ -Subproject commit 11287d0a834c672a55d10164dbfefe9ee1922d3d +Subproject commit 8793db1e2fe64cae8936c00bcd4f333f158f6ebd diff --git a/src/components/ProxyRegistrar.astro b/src/components/ProxyRegistrar.astro index 08989a8..51feb2b 100644 --- a/src/components/ProxyRegistrar.astro +++ b/src/components/ProxyRegistrar.astro @@ -63,12 +63,14 @@ iframe.style.opacity = 1; topbar.style.opacity = 1; topbar.style.pointerEvents = "auto"; + document.body.style.overflow = "hidden"; closeButton.onclick = () => { iframe.style.opacity = 0; topbar.style.opacity = 0; iframe.style.pointerEvents = "none"; topbar.style.pointerEvents = "none"; + document.body.style.overflow = "auto"; iframe.removeEventListener("load", boundIFrameLoad); setTimeout(() => { diff --git a/src/components/SettingsTablist.astro b/src/components/SettingsTablist.astro index fe72117..e1eb309 100644 --- a/src/components/SettingsTablist.astro +++ b/src/components/SettingsTablist.astro @@ -385,6 +385,7 @@ const t = useTranslations(lang); gap: 20px; position: relative; z-index: 2; + flex-wrap: wrap; } .content-setting-header { color: var(--text-color); @@ -460,6 +461,38 @@ const t = useTranslations(lang); position: relative; gap: 25px; } + @media (max-width: 880px) { + .popup { + flex-direction: column; + min-height: 80%; + max-height: 80%; + } + .tabs { + flex-direction: row; + max-width: 100%; + max-height: 70px; + min-height: 70px; + gap: 0; + align-items: center; + } + label { + width: auto; + margin-left: 0; + } + } + @media (max-width: 500px) { + label { + font-size: 20px; + } + } + @media (max-width: 375px) { + label { + font-size: 18px; + } + } + .setting { + width: 140px; + } .marker { position: absolute; width: 100%; @@ -484,16 +517,18 @@ const t = useTranslations(lang); height: calc(50% - 72px); border-radius: 0 32px 0 0; } - #setting-tab-proxy:checked ~ .marker { - transform: translateY(0%); - } - #setting-tab-customization:checked ~ .marker { - transform: translateY(13.5%); - } - #setting-tab-cloaking:checked ~ .marker { - transform: translateY(27%); - } - #setting-tab-credits:checked ~ .marker { - transform: translateY(41%); + @media (min-width: 880px) { + #setting-tab-proxy:checked ~ .marker { + transform: translateY(0%); + } + #setting-tab-customization:checked ~ .marker { + transform: translateY(13.5%); + } + #setting-tab-cloaking:checked ~ .marker { + transform: translateY(27%); + } + #setting-tab-credits:checked ~ .marker { + transform: translateY(41%); + } } diff --git a/src/i18n/en.json b/src/i18n/en.json index 88edbf6..0b5c433 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -17,6 +17,12 @@ "faq.whyIsAluSoSlow": "Why is Alu so slow?", "faq.whyIsAluSoSlow.answer": "This could be for a number of reasons, but it is most likely due to the proxy you are using. If you are far away from where Alu is hosted, it will take longer for the request to be sent and received. If the proxy you are using is congested with traffic, it will also be slower.", + + "faq.contributeToAlu": "How can I contribute to Alu?", + "faq.contributeToAlu.answer.segment1": "Spreading the word of Alu is a great start, but if you really enjoy Alu, and want private links, consider supporting me through Patreon!", + "faq.contributeToAlu.answer.patreonLinkText": "You can support me here!", + "faq.contributeToAlu.answer.segment2": "Thank you for helping to make Alu great!", + "footer.brand": "Alu", "footer.madeWithLove": "Made with ❤️ by wearr", "footer.poweredBy": "Powered by Ultraviolet", diff --git a/src/i18n/jp.json b/src/i18n/jp.json index c156819..5dd1811 100644 --- a/src/i18n/jp.json +++ b/src/i18n/jp.json @@ -18,6 +18,11 @@ "faq.whyIsAluSoSlow": "なぜアルーは遅いのですか?", "faq.whyIsAluSoSlow.answer": "アルーは、プロキシを使用してウェブサイトにアクセスするため、ウェブサイトの読み込みに時間がかかることがあります。また、アルーはまだ開発中のため、パフォーマンスが低いことがあります。", + "faq.contributeToAlu": "アルーの発展にどのように貢献できますか?", + "faq.contributeToAlu.answer.segment1": "アルーの言葉を広めることは素晴らしいスタートですが、Alu が本当に好きで、プライベート リンクが必要な場合は、Patreon を通じて私をサポートすることを検討してください。", + "faq.contributeToAlu.answer.patreonLinkText": "ここで私をサポートできます", + "faq.contributeToAlu.answer.segment2": "アルーを素晴らしいものにするのにご協力いただき、ありがとうございます。", + "footer.brand": "アルー", "footer.madeWithLove": "wearrによる❤️で作られました", "footer.poweredBy": "「ウルトラバイオレット」による駆動", diff --git a/src/json/games.json b/src/json/games.json index c501e13..5a13ec1 100644 --- a/src/json/games.json +++ b/src/json/games.json @@ -214,6 +214,11 @@ "image": "/games/sort-the-court/logo.jpg", "slug": "sort-the-court" }, + "suika-combination": { + "name": "Suika Combination", + "image": "/games/suika-combination/logo.webp", + "slug": "suika-combination" + }, "superhot": { "name": "Superhot", "image": "/games/superhot/logo.png", diff --git a/src/pages/[lang]/index.astro b/src/pages/[lang]/index.astro index be17956..867acc7 100644 --- a/src/pages/[lang]/index.astro +++ b/src/pages/[lang]/index.astro @@ -43,12 +43,15 @@ export function getStaticPaths() {

{t("faq.whyIsAluSoSlow.answer")}

-

How can I contribute to the development of Alu?

+

{t("faq.contributeToAlu")}

- Spreading the word of Alu is a great start, but if you really enjoy Alu, and want private - links, consider supporting me through Patreon! You can support me - , thank you - for helping to make Alu great! + {t("faq.contributeToAlu.answer.segment1")} + + {t("faq.contributeToAlu.answer.segment2")}