Skip to content

Commit 10b418a

Browse files
committed
WoA download support + make the buttons nicer
Added a color gitlab logo to top nav
1 parent 07d1526 commit 10b418a

7 files changed

Lines changed: 51 additions & 14 deletions

File tree

src/components/cta.astro

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ export const PLATFORM_LINKS = {
88
windows: {
99
href: Consts.WINDOWS_URL,
1010
},
11+
windowsarm: {
12+
href: Consts.WINDOWSARM_URL,
13+
},
1114
macOS: {
1215
href: Consts.MACOS_URL,
1316
},
@@ -25,7 +28,10 @@ type PlaformLinksType = Record<string, { store?: string; href: string }>
2528
2629
let os: string
2730
if (uaString.includes("Windows")) {
28-
os = "windows"
31+
if (uaString.includes("ARM"))
32+
os = "windowsarm"
33+
else
34+
os = "windows"
2935
} else if (uaString.includes("Macintosh")) {
3036
os = "macOS"
3137
} else if (uaString.includes("ARM")) {
@@ -50,7 +56,7 @@ const { isDownloadPage = false } = Astro.props
5056
// as it only leads to the download page
5157
!(isDownloadPage && os === "unknown") && (
5258
<div class="dl-button">
53-
<CtaButton label="Download" href={href} primary />
59+
<CtaButton label="Download" primary />
5460
</div>
5561
)
5662
}
@@ -74,8 +80,14 @@ const { isDownloadPage = false } = Astro.props
7480

7581
.dl-button {
7682
display: flex;
83+
cursor: pointer;
7784
flex-direction: column;
7885
gap: 1rem;
7986
}
8087

8188
</style>
89+
90+
<script is:inline define:vars={{ href }}>
91+
document.querySelector("div.dl-button")
92+
.addEventListener('click', () => window.open(href, '_blank'))
93+
</script>

src/components/downloadbutton.astro

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
---
2+
23
interface Props {
34
href: string
45
primary: boolean
6+
dl: string
57
}
68
7-
const { href, primary } = Astro.props
9+
const { href, primary, dl } = Astro.props
10+
811
---
912

10-
<a href={href} class:list={["dl-button", primary && "primary"]}>
13+
<a class:list={["dl-button", primary && "primary", dl]}>
1114
<slot />
1215
</a>
1316

@@ -49,4 +52,9 @@ const { href, primary } = Astro.props
4952
}
5053
}
5154
}
52-
</style>
55+
</style>
56+
57+
<script is:inline define:vars={{ href, dl }}>
58+
document.querySelector("a." + dl)
59+
.addEventListener('click', () => window.open(href, '_blank'))
60+
</script>

src/components/downloadtile.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const { name, stores } = Astro.props
1717
<div class="cta">
1818
{
1919
stores.map((store) => (
20-
<DownloadButton href={store.url} primary={store.primary}>
20+
<DownloadButton href={store.url} primary={store.primary} dl={store.tag}>
2121
{store.name}
2222
</DownloadButton>
2323
))

src/components/layout/footer.astro

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,15 @@ import "./styleconstants.astro"
1212
<div class="links">
1313
<span>Get Started</span>
1414
<a href="/download">Download</a>
15-
</div>
16-
<div class="links">
17-
<span>Wiki</span>
1815
<a href="https://git.ryujinx.app/ryubing/ryujinx/-/wikis/Setup-&-Configuration-Guide" target="_blank">Setup Guide</a>
1916
</div>
2017
<div class="links socials">
2118
<span>Socials</span>
2219
<a href="https://discord.gg/ryujinx">
2320
Discord
2421
</a>
25-
<a href="https://bsky.app/profile/ryujinx.app">
26-
Bluesky
27-
</a>
2822
<a href="https://git.ryujinx.app/ryubing/ryujinx">
29-
Gitlab
23+
GitLab
3024
</a>
3125
</div>
3226
</div>

src/components/layout/navbar.astro

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import NavLinks from "./navlinks.astro"
33
import wordmark from "../../assets/wordmark.svg"
44
import MenuIcon from "../../assets/menu.svg"
5+
56
import "./styleconstants.astro"
67
---
78

@@ -42,7 +43,18 @@ import "./styleconstants.astro"
4243
margin: 0 auto;
4344
}
4445

46+
.gitlab-logo {
47+
display: flex;
48+
width: 32px;
49+
height: 32px;
50+
transform: translateY(-5px);
51+
gap: 1.5rem;
52+
z-index: -1;
53+
animation: slide-down 0.3s cubic-bezier(0.22, 1, 0.36, 1);
54+
}
55+
4556
.links {
57+
transform: translateX(-35px);
4658
display: flex;
4759
gap: 1.5rem;
4860

@@ -62,6 +74,7 @@ import "./styleconstants.astro"
6274
.wordmark {
6375
width: 140px;
6476
max-width: 250px;
77+
transform: translateY(-5px);
6578
height: auto;
6679
display: block;
6780
}

src/components/layout/navlinks.astro

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
---
2-
2+
import GitLabIcon from "../../assets/gitlab.svg"
33
---
44

5+
<a href="https://git.ryujinx.app">
6+
<img class="gitlab-logo" src={GitLabIcon.src} alt="GitLab" />
7+
</a>
58
<a href="/download">Download</a>
69
<a href="/donate">Donate</a>
710
<a href="https://ldn.ryujinx.app/">LDN</a>

src/pages/download/index.astro

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,13 @@ backgroundColor="#150E2A"
4545
stores={[
4646
{
4747
name: "Download x64",
48+
tag: "winx64",
4849
url: Consts.WINDOWS_URL,
4950
primary: true,
5051
},
5152
{
5253
name: "Download ARM",
54+
tag: "winarm64",
5355
url: Consts.WINDOWSARM_URL,
5456
primary: true,
5557
}
@@ -65,6 +67,7 @@ backgroundColor="#150E2A"
6567
stores={[
6668
{
6769
name: "Download",
70+
tag: "macos",
6871
url: Consts.MACOS_URL,
6972
primary: true,
7073
},
@@ -79,11 +82,13 @@ backgroundColor="#150E2A"
7982
stores={[
8083
{
8184
name: "Download x64",
85+
tag: "linuxx64",
8286
url: Consts.LINUX_URL,
8387
primary: true,
8488
},
8589
{
8690
name: "Download ARM",
91+
tag: "linuxarm64",
8792
url: Consts.LINUXARM_URL,
8893
primary: true,
8994
},
@@ -98,11 +103,13 @@ backgroundColor="#150E2A"
98103
stores={[
99104
{
100105
name: "Download x64",
106+
tag: "aix64",
101107
url: Consts.APPIMAGE_URL,
102108
primary: true,
103109
},
104110
{
105111
name: "Download ARM",
112+
tag: "aiarm64",
106113
url: Consts.APPIMAGEARM_URL,
107114
primary: true,
108115
},

0 commit comments

Comments
 (0)