Skip to content

Commit

Permalink
Merge develop into main (#127)
Browse files Browse the repository at this point in the history
* Merge main into develop (#122)

Co-authored-by: Victor Chanil Park <[email protected]>

* fix: eslint config

* chore: add proposals link

* fix: remove class from proposals link

* feat: SEO (#125)

* links

* Temporary Unavailability of Web Editor Support (#130)

* fix: add error handling for platform detection in download page

* feat: add web editor support flag

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Victor Chanil Park <[email protected]>
Co-authored-by: reflexguru <[email protected]>
Co-authored-by: Arjan Dikhoff <[email protected]>
Co-authored-by: Charlotte <[email protected]>
  • Loading branch information
5 people authored Oct 19, 2024
1 parent 502def8 commit 0c1146d
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 31 deletions.
4 changes: 4 additions & 0 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ useHead({
name: "description",
content: "Open source game engine for everyone. No strings attached.",
},
{
name: "google-site-verification",
content: "Gsmu73HojIdCvaz-xl2dv8faF4tzOrti6gZMNqigOyM",
},
],
htmlAttrs: {
lang: "en",
Expand Down
2 changes: 1 addition & 1 deletion components/DownloadPage/DownloadPageHero.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</div>
<span class="download-hero__description">
Download Redot Engine, the powerful platform for building 2D and 3D
cross-platform games and interactive <br />
cross-platform games and interactive <br>
experiences.
</span>
<div class="download-hero__buttons">
Expand Down
8 changes: 4 additions & 4 deletions components/DownloadPage/DownloadPageSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
alt="Requirements"
class="download-section__image"
src="/img/download/requirements.avif"
/>
>
</div>

<div class="download-section__requirements__container-text">
Expand All @@ -21,7 +21,7 @@
<p class="download-section__description">
Recommended: Vulkan 1.0 compatible hardware Minimal: OpenGL 3.3 /
OpenGL ES 3.0 compatible hardware Additional requirements for the
.NET version: <br />
.NET version: <br>
<NuxtLink
aria-label=".net download"
class="download-section__link"
Expand All @@ -39,7 +39,7 @@
alt="Requirements"
class="download-section__image"
src="/img/seo/banner.avif"
/>
>
</div>
<div class="download-section__redot__container-text">
<div class="download-section__text">
Expand All @@ -52,7 +52,7 @@
</p>
</div>
<div class="download-section__button">
<LinkButton href="https://docs-latest.redotengine.org/about/introduction#about-redot-engine" type="outline" aria-label="learn more"> Learn More &rarr; </LinkButton>
<LinkButton aria-label="learn more" href="https://docs-latest.redotengine.org/about/introduction#about-redot-engine" type="outline"> Learn More &rarr; </LinkButton>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions components/DownloadPage/DownloadPageSupportedPlatforms.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
label="Android"
/>
<DownloadPageSupportedPlatformsItem
v-if="useFeatureFlags().webEditorSupport"
class="download-supported-platforms__web-editor"
href="https://download.redotengine.org/release/4.4/android-editor.zip"
icon="/img/download/web-editor.svg"
Expand Down
4 changes: 2 additions & 2 deletions components/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const links = useLinks();
</div>

<div class="footer-column">
<SectionTitle variant="h2" small>Project</SectionTitle>
<SectionTitle variant="h2" small>Project</SectionTitle>

<NuxtLink aria-label="news" class="footer-link" href="/news">News</NuxtLink>
<NuxtLink :href="links.contribute" aria-label="contribution guidelines" class="footer-link">Contribution Guidelines</NuxtLink>
Expand All @@ -42,7 +42,7 @@ const links = useLinks();
</div>

<div class="footer-column">
<SectionTitle variant="h2" small>Resources</SectionTitle>
<SectionTitle variant="h2" small>Resources</SectionTitle>

<NuxtLink v-if="!featureFlags.minimal" class="footer-link" href="#">Assets</NuxtLink>
<NuxtLink :href="links.pressKit" aria-label="press kit" class="footer-link">Press Kit</NuxtLink>
Expand Down
8 changes: 7 additions & 1 deletion components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ onMounted(() => {
class="header-link"
href="/news"
>News</NuxtLink>
<NuxtLink
key="proposals"
:href="links.proposals"
aria-label="proposals-link"
class="header-link"
>Proposals</NuxtLink>
<NuxtLink
v-if="!featureFlags.minimal"
key="assets"
Expand All @@ -101,7 +107,7 @@ onMounted(() => {
Donate
<Icon name="heart" />
</LinkButton>
<LinkButton href="/download" aria-label="download" type="red">
<LinkButton aria-label="download" href="/download" type="red">
Download
<Icon name="arrow" />
</LinkButton>
Expand Down
24 changes: 11 additions & 13 deletions components/MainPage/MainPageHero.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,16 @@ onUnmounted(() => {
class="hero-center-logo"
fetchpriority="high"
src="~/assets/images/redot-logo-white.svg"
/>

<SectionTitle small
>Open‑source game engine for&nbsp;everyone.</SectionTitle
>

<SectionTitle small>Open‑source game engine for&nbsp;everyone.</SectionTitle>

<SectionDescription>No strings attached.</SectionDescription>

<LinkButton
href="/download"
aria-label="download"
class="hero-center-button"
href="/download"
type="red"
>
Download
Expand All @@ -54,30 +52,30 @@ onUnmounted(() => {
<div class="hero-center hero-center--socials">
<NuxtLink :href="links.githubUrl" aria-label="github-url" class="social-info">
<div class="social-icon">
<img alt="GitHub" src="~/assets/images/social-github.svg" />
<img alt="GitHub" src="~/assets/images/social-github.svg">
</div>
4.2k<br v-if="isMobile" />
4.2k<br v-if="isMobile">
stars
</NuxtLink>
<NuxtLink :href="links.discordUrl" aria-label="discord-url" class="social-info">
<div class="social-icon">
<img alt="Discord" src="~/assets/images/social-discord.svg" />
<img alt="Discord" src="~/assets/images/social-discord.svg">
</div>
9.1k<br v-if="isMobile" />
9.1k<br v-if="isMobile">
members
</NuxtLink>
<NuxtLink :href="links.twitterUrl" aria-label="twitter-url" class="social-info">
<div class="social-icon">
<img alt="Twitter" src="~/assets/images/social-twitter.svg" />
<img alt="Twitter" src="~/assets/images/social-twitter.svg">
</div>
20.6k<br v-if="isMobile" />
20.6k<br v-if="isMobile">
followers
</NuxtLink>
<NuxtLink :href="links.redditUrl" aria-label="reddit-url" class="social-info">
<div class="social-icon">
<img alt="Reddit" src="~/assets/images/social-reddit.svg" />
<img alt="Reddit" src="~/assets/images/social-reddit.svg">
</div>
771<br v-if="isMobile" />
771<br v-if="isMobile">
members
</NuxtLink>
</div>
Expand Down
1 change: 1 addition & 0 deletions composables/useFeatureFlags.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const flags = {
minimal: true,
macSupport: false,
webEditorSupport: false,
};

export function useFeatureFlags() {
Expand Down
3 changes: 2 additions & 1 deletion composables/useLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ export const useLinks = () => ({
discordUrl: "https://discord.gg/redot",
twitterUrl: "https://x.com/redotengine",
redditUrl: "https://www.reddit.com/r/RedotGameEngineMain/",
pressKit: "https://download.redotengine.org/web/Redot%20Engine%20-%20Brand%20Kit%20(v.1FINAL).zip",
pressKit: "https://download.redotengine.org/web/Redot%20Engine%20-%20Brand%20Kit%20(v.1.1).zip",
documentation: "https://docs.redotengine.org/",
proposals: "https://proposals.redotengine.org/",
contribute: "https://docs.redotengine.org/contributing/how_to_contribute",
websiteGithubUrl: "https://github.com/Redot-Engine/redot-landing-page",
});
3 changes: 3 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,7 @@ export default [
"comma-dangle": ["error", "always-multiline"], // Enforce trailing commas in arrays, objects, etc.
},
},
{
ignores: [".nuxt/*", ".output/*"],
},
];
27 changes: 18 additions & 9 deletions pages/download/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,32 @@ const router = useRouter();
const platform = ref("");
const platformMapping = {
"windows": "windows",
"macos": "mac",
"ios": "mac",
"linux": "linux",
"androidos": "android",
windows: "windows",
macos: "mac",
ios: "mac",
linux: "linux",
androidos: "android",
};
const redirectToPlatform = () => {
const browser = detect();
const rawPlatform = browser.os.toLowerCase().replace(/\d+/g, "").trim().replace(/\s+/g, "");
if (!browser) {
console.error("Unable to detect browser");
return;
}
const rawPlatform =
browser.os?.toLowerCase().replace(/\d+/g, "").trim().replace(/\s+/g, "") ||
"";
platform.value = platformMapping[rawPlatform] || rawPlatform;
router.push(`/download/${platform.value}`);
if (platform.value) {
router.push(`/download/${platform.value}`);
} else {
console.error("Unable to determine platform");
}
};
onMounted(redirectToPlatform);
</script>
Expand Down

0 comments on commit 0c1146d

Please sign in to comment.