diff --git a/src/app.css b/src/app.css index 05a3598..3d1a42c 100644 --- a/src/app.css +++ b/src/app.css @@ -37,13 +37,14 @@ body { :root { --white: #fff; --accent-color: #8bc3f4; + --accent-color-two: hsl(207, 65%, 90%); --bg-color: #1a1c1e; --grey-one: #252b31; --grey-two: #28313b; - --grey-three: #3c4759c3; + --grey-three: #373E4D; --grey-four: #1b1e29; --grey-five: hsl(208, 30%, 75%); - --grey-six: #23282da7; + --grey-six: hsla(223, 17%, 16%, 0.655); --grey-seven: #535563; --bezier-one: cubic-bezier(0.25, 0.46, 0.45, 0.94); } diff --git a/src/data/ContributorsStore.ts b/src/data/ContributorsStore.ts new file mode 100644 index 0000000..cf1c083 --- /dev/null +++ b/src/data/ContributorsStore.ts @@ -0,0 +1,14 @@ +import { readable } from 'svelte/store'; +import type { Repository } from '$lib/types'; + +export type ContribData = { repositories: Repository[] }; + +const fetchContributors = async (): Promise => { + const response = await fetch('https://releases.rvcd.win/contributors'); + const data = await response.json(); + return data; +}; + +export const ContributorsStore = readable(fetchContributors()); + + diff --git a/src/data/PatchesStore.ts b/src/data/PatchesStore.ts new file mode 100644 index 0000000..0d83c99 --- /dev/null +++ b/src/data/PatchesStore.ts @@ -0,0 +1,23 @@ +import { readable } from 'svelte/store'; +import type { Patch } from '$lib/types'; + +export type PatchesData = { patches: Patch[]; packages: string[] }; + +const fetchPatches = async (): Promise => { + const response = await fetch('https://releases.rvcd.win/patches'); + const patches = await response.json(); + let packages: string[] = []; + + // gets packages + for (let i = 0; i < patches.length; i++) { + patches[i].compatiblePackages.forEach((pkg: Patch) => { + let index = packages.findIndex((x) => x == pkg.name); + if (index === -1) { + packages.push(pkg.name); + } + }); + } + return { patches, packages }; +}; + +export const PatchesStore = readable(fetchPatches()); diff --git a/src/lib/components/atoms/ContributorPerson.svelte b/src/lib/components/atoms/ContributorPerson.svelte index d187148..fd06b58 100644 --- a/src/lib/components/atoms/ContributorPerson.svelte +++ b/src/lib/components/atoms/ContributorPerson.svelte @@ -5,7 +5,7 @@ let alt = `${name}'s profile picture`; - + diff --git a/src/lib/components/atoms/NavButton.svelte b/src/lib/components/atoms/NavButton.svelte index 4739def..3f144c4 100644 --- a/src/lib/components/atoms/NavButton.svelte +++ b/src/lib/components/atoms/NavButton.svelte @@ -41,7 +41,7 @@ } li.selected { - background-color: var(--grey-three); + background-color: var(--grey-two); color: var(--accent-color); } diff --git a/src/lib/components/atoms/Patch.svelte b/src/lib/components/atoms/Patch.svelte deleted file mode 100644 index 61f627e..0000000 --- a/src/lib/components/atoms/Patch.svelte +++ /dev/null @@ -1,79 +0,0 @@ - - -
-
-
-

{name}

-

{ver}

-
- - {#if hasPatchOptions} - dropdown - {/if} -
- -

{desc}

-
- - diff --git a/src/lib/components/atoms/PatchCell.svelte b/src/lib/components/atoms/PatchCell.svelte new file mode 100644 index 0000000..a44302e --- /dev/null +++ b/src/lib/components/atoms/PatchCell.svelte @@ -0,0 +1,165 @@ + + + +
(expanded = !expanded)} +> +
+
+

+ {name + // im sorry + .replace(/-/g, ' ') + .replace(/(?:^|\s)\S/g, (x) => x.toUpperCase()) + .replace(/Microg/g, 'MicroG') + .replace(/Hdr/g, 'HDR') + .replace(/Sponsorblock/g, 'SponsorBlock') + .replace(/Tiktok/g, 'TikTok')} +

+
+ + {#if hasPatchOptions} + dropdown + {/if} +
+ +
+ {#each compatiblePackages as pkg, i} + {#if current === false} +

{pkg.name}

+ {/if} + + {#if i < pkg.versions.length - 1} +

+ Target Package Version: {pkg.versions.slice(-1)[0] || 'Any'} +

+ {/if} + {/each} +

Patch Version: {version}

+
+

{description}

+ + {#if expanded && hasPatchOptions} + +
+ {#each options as option} +
+

{option.title}

+

{option.description}

+
+ {/each} +
+
+ {/if} +
+ + diff --git a/src/lib/components/atoms/SocialButton.svelte b/src/lib/components/atoms/SocialButton.svelte index 44ee655..f63356f 100644 --- a/src/lib/components/atoms/SocialButton.svelte +++ b/src/lib/components/atoms/SocialButton.svelte @@ -3,7 +3,7 @@ export let href = '#'; -
+
{src}
diff --git a/src/lib/components/atoms/TreeMenuButton.svelte b/src/lib/components/atoms/TreeMenuButton.svelte new file mode 100644 index 0000000..da8b42f --- /dev/null +++ b/src/lib/components/atoms/TreeMenuButton.svelte @@ -0,0 +1,67 @@ + + + +
(current = (current === name) ? false : name) && window.scrollTo({ top: 0, behavior: 'smooth' })} +> +

{name}

+
+ + + \ No newline at end of file diff --git a/src/lib/components/molecules/ContributorHost.svelte b/src/lib/components/molecules/ContributorHost.svelte index 19cac70..53f9bef 100644 --- a/src/lib/components/molecules/ContributorHost.svelte +++ b/src/lib/components/molecules/ContributorHost.svelte @@ -1,5 +1,5 @@
@@ -17,31 +29,39 @@
@@ -74,6 +94,10 @@ height: 3rem; } + a { + text-decoration: none; + } + .links-container { display: flex; gap: 5rem; diff --git a/src/lib/components/molecules/Navigation.svelte b/src/lib/components/molecules/NavHost.svelte similarity index 100% rename from src/lib/components/molecules/Navigation.svelte rename to src/lib/components/molecules/NavHost.svelte diff --git a/src/lib/components/molecules/TreeMenu.svelte b/src/lib/components/molecules/TreeMenu.svelte new file mode 100644 index 0000000..eded319 --- /dev/null +++ b/src/lib/components/molecules/TreeMenu.svelte @@ -0,0 +1,48 @@ + + + + + diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 8f3ec40..f9bc569 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,5 +1,5 @@ diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts deleted file mode 100644 index dca1b46..0000000 --- a/src/routes/+layout.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { Repository } from '$lib/types'; - -export type APIOutput = { repositories: Repository[] }; - -export async function load({ - fetch -}): APIOutput { - const response = await fetch('https://releases.rvcd.win/contributors'); - return await response.json(); -} diff --git a/src/routes/credits/+page.svelte b/src/routes/credits/+page.svelte index 7ee2608..2ae30a9 100644 --- a/src/routes/credits/+page.svelte +++ b/src/routes/credits/+page.svelte @@ -1,20 +1,33 @@
+ {#if data} {#each data.repositories as { contributors, name }}
{/each} + {/if}
diff --git a/src/routes/patches/+page.ts b/src/routes/patches/+page.ts deleted file mode 100644 index 3633395..0000000 --- a/src/routes/patches/+page.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { Patch } from '$lib/types'; - -export type Output = { patches: Patch[], packages: string[] }; - -export async function load({ - fetch -}): Output { - const response = await fetch('https://releases.rvcd.win/patches'); - const json = await response.json(); - - let pkg_list = []; - - // yes - for (let i = 0; i < json.length; i++) { - json[i].compatiblePackages.forEach(pkg => { - let index = pkg_list.findIndex(x => x == pkg.name); - if (index === -1) { - pkg_list.push(pkg.name); - }; - }); - }; - - return { patches: json, packages: pkg_list }; -}