diff --git a/README.md b/README.md index 5ce6766..8fa768b 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,14 @@ -# create-svelte +# Suyu website -Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte). +This project contains the source code for the Suyu website, found at [suyu.dev](https://suyu.dev) -## Creating a project - -If you're seeing this, you've probably already done this step. Congrats! - -```bash -# create a new project in the current directory -npm create svelte@latest - -# create a new project in my-app -npm create svelte@latest my-app -``` ## Developing +If you are deeloping, please take note of the `.env.example` & the secrets config (found at src/lib/server/secrets/secrets.example.json). +At minimum, please make sure to clone the `secrets.example.json` file and rename it to `secrets.json`. Otherwise, the project will not run or build (you don't have to edit the values to get it running, but you can if you'd like). -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: + +Once you've installed dependencies with `npm install` (or `pnpm install` or `yarn`), you can start a development server by running: ```bash npm run dev @@ -27,12 +19,9 @@ npm run dev -- --open ## Building -To create a production version of your app: +To create a production version of our app, you can run: ```bash npm run build ``` -You can preview the production build with `npm run preview`. - -> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index ffc066e..5bee5a2 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -142,15 +142,15 @@ }, { name: "FAQ", - href: "/coming-soon", + href: "/faq", }, { name: "Discord", href: "https://discord.gg/suyu", }, { - name: "GitLab", - href: "https://gitlab.com/suyu-emu/suyu", + name: "Git", + href: "https://git.suyu.dev/suyu/suyu", }, // { // name: $token || data.tokenCookie ? "Account" : "Sign up", @@ -290,13 +290,13 @@ > Blog Docs - FAQ + FAQ
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 1ff929f..a87813e 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -71,7 +71,7 @@

-

GitLab

+

Git

- GitLab is where all the magic of suyu happens. We're always looking for new contributors + Our Git instance is where all the magic of suyu happens. We're always looking for new contributors to help us out, so feel free to check out our code.

+ import { onMount } from "svelte"; + // Note: This is an absolutely terrible and unoptimized way to do this. Feel free to change it xd + onMount(async () => { + const UA = navigator.userAgent; + const url = `https://gitlab.com/api/v4/projects/55558123/releases`; // 55558123 = Suyu repo ID + async function getTag() { + try { + const response = await fetch(url, { + headers: { + "Content-Type": "application/json", + }, + }); + // Convert to JSON + const releases = await response.json(); + + // Release found + if (releases && releases.length > 0) { + console.log("Latest release tag:", releases[0].tag_name); + return releases[0].tag_name; // Assuming the first result is the latest + } else { + console.log("No releases found."); + return null; + } + } catch (error) { + console.error("Error fetching latest release tag:", error); + return null; + } + } + const latestRelease = await getTag(); + // give it time so the user can see the message + setTimeout(() => { + if (UA.includes("Windows")) { + window.location.href = `https://gitlab.com/suyu-emu/suyu-releases/-/raw/master/${latestRelease}/Suyu-Windows_x64.7z`; + } else if (UA.includes("Linux")) { + window.location.href = `https://gitlab.com/suyu-emu/suyu-releases/-/raw/master/${latestRelease}/suyu-mainline--.AppImage`; + } else if (UA.includes("Macintosh;")) { + window.location.href = `https://gitlab.com/suyu-emu/suyu-releases/-/raw/master/${latestRelease}/suyu-macOS-arm64.dmg?inline=false`; + } else { + window.location.href = `https://gitlab.com/suyu-emu/suyu-releases/-/blob/master/${latestRelease}/`; + } + }, 3000); + }) + + + + + Downloading Suyu + + +
diff --git a/src/routes/faq/+page.svelte b/src/routes/faq/+page.svelte new file mode 100644 index 0000000..eda49bb --- /dev/null +++ b/src/routes/faq/+page.svelte @@ -0,0 +1,43 @@ + + FAQ + + +
+ + + + + +

+ FAQ +

+

+ Got some questions? We got answers! +

+

Q: How is this project different from Yuzu? How do we know you won't have the same fate as Yuzu?

+

A: Unlike Yuzu, Suyu does not include many of the core "requirements" to run it. You need to legally dump your Nintendo Switch to obtain a title.keys file, which Yuzu did not do. Additionally, you must dump your own firmware.

+

Q: What is the purpose of Suyu?

+

A: The purpose of this project is to provide a free, open-source alternative to the now-dead Yuzu emulator. We believe that the community should be able to emulate their Switch device (legally) and be able to enjoy their favorite game titles.

+

Q: How can I contribute to Suyu?

+

A: You can contribute to this project by submitting a pull request on our Git page. We are always looking for new contributors to help us improve the project!

+

Q: Where can I download Suyu?

+

A: You can download the latest build of Suyu from our Git. Please make sure you are using the right URL!

+

Q: What is the current progress for Suyu?

+

A: As of 3/20/2024, we have released our first Windows binary 🎉! You can find it here. We are always trying to make more and more progress, so please feel free to join the Discord!

+