Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

Merge develop into main #104

Merged
merged 23 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
74b33e6
Merge pull request #65 from Redot-Engine/main
adikhoff Oct 15, 2024
91322f7
feat: sitemap generation (#70)
opdev1004 Oct 15, 2024
47e4f08
feature: sorting and news tag filter (#79)
opdev1004 Oct 15, 2024
6b14fc8
71 automated nightly builds using gha (#81)
chrisrabe Oct 16, 2024
15ca41c
fix: fixed inputs to create PR
chrisrabe Oct 16, 2024
c57c119
Substitute pic
adikhoff Oct 16, 2024
28fa20c
Merge pull request #85 from Redot-Engine/84-pic-substitution
adikhoff Oct 16, 2024
b0d937b
Merge pull request #82 from Redot-Engine/fix-create-pr
opdev1004 Oct 16, 2024
9c393e8
Fix nightly builds (#89)
chrisrabe Oct 16, 2024
6511883
Merge branch 'main' into develop
chrisrabe Oct 16, 2024
115b871
Merge develop into main (#91) (#92)
github-actions[bot] Oct 16, 2024
ae3a8d0
Fix hero not occupying a fixed amount of space when loading the site …
kelo221 Oct 16, 2024
2e73745
New stats for our socials.
adikhoff Oct 16, 2024
b8345f9
Merge pull request #99 from Redot-Engine/98-new-stats-for-hero-footer
adikhoff Oct 16, 2024
7076cd5
Add build instructions
adikhoff Oct 16, 2024
a10421e
Better links
adikhoff Oct 16, 2024
04858c6
Layout
adikhoff Oct 16, 2024
744e994
Shorter
adikhoff Oct 17, 2024
00ac868
Merge branch 'main' into develop
adikhoff Oct 17, 2024
7800268
Merge branch 'develop' of github.com:Redot-Engine/redot-landing-page …
adikhoff Oct 17, 2024
6cb05de
Merge pull request #101 from Redot-Engine/93-build-and-run-instructio…
opdev1004 Oct 17, 2024
7e2f105
fix: clickable social link
opdev1004 Oct 17, 2024
7d88c7f
Merge pull request #103 from Redot-Engine/opdev1004
opdev1004 Oct 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ Welcome to the Redot Game Engine Website project! This repository is the front-e
- 🌍 **Community Hub**: Engage with other Redot users through discord, FAQs, and community events.
- 💻 **Responsive Design**: A fully responsive site that looks great on any device.

## Running locally

### Prerequisites
Make sure [nodejs](https://nodejs.org/en/download/) is installed.

### To build and run
```
npm install
npm run dev
```

## 🛠️ Technologies Used

Expand Down
45 changes: 36 additions & 9 deletions components/MainPage/HeroSlideshow.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<template>
<div :style="{ backgroundImage: `url(${currentImage})` }" class="hero-background">
<slot></slot>
<div ref="heroBackground" :style="backgroundStyle" class="hero-background">
<slot />
</div>
</template>

<script setup lang="ts">
import { ref, onMounted } from "vue";
import { ref, onMounted, computed } from "vue";

import gamePreview01 from "@/assets/images/game_preview/game_preview_01.avif";
import gamePreview02 from "@/assets/images/game_preview/game_preview_02.avif";
Expand All @@ -23,12 +23,23 @@ const images = [
gamePreview07,
];

const heroBackground = ref(null);
const isImageLoaded = ref(false);
const currentImage = ref(images[0]);
let currentIndex = 0;

const backgroundStyle = computed(() => ({
backgroundImage: isImageLoaded.value ? `url(${currentImage.value})` : "none",
backgroundColor: "#000", // Fallback color while image is loading
height: "100vh", // Ensure the background takes up the full viewport height
}));

const preloadImages = () => {
images.forEach((src) => {
const img = new Image();
img.onload = () => {
isImageLoaded.value = true;
};
img.src = src;
});
};
Expand All @@ -38,23 +49,38 @@ const changeBackground = () => {
currentImage.value = images[currentIndex];
};

const updateHeight = () => {
if (heroBackground.value) {
heroBackground.value.style.height = `${window.innerHeight}px`;
}
};

onMounted(() => {
preloadImages();
setInterval(changeBackground, 5000); // Change image every 5 seconds
setInterval(changeBackground, 5000);
updateHeight();
window.addEventListener("resize", updateHeight);
});

onUnmounted(() => {
window.removeEventListener("resize", updateHeight);
});
</script>

<style scoped lang="scss">
.hero-background {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
position: relative;
width: 100%;
background-size: cover;
background-position: center;
transition: background-image 1s ease-in-out;

@media only screen and (max-width: 600px) {
&::before {
backdrop-filter: blur(10px);
}
}

&::before {
content: "";
position: absolute;
Expand All @@ -68,6 +94,7 @@ onMounted(() => {
#0000 calc(100% - 100px),
#000f 100%
);
pointer-events: none;
}
}
</style>
12 changes: 9 additions & 3 deletions components/MainPage/MainPageGetInvolvedItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ const { buttonText = "Join" } = defineProps<{

<template>
<div class="get-involved-item">
<img :src="image" alt="" class="get-involved-item-image">
<SectionTitle class="get-involved-item-title" small>{{ title }}</SectionTitle>
<SectionDescription class="get-involved-item-description">{{ description }}</SectionDescription>
<a :href="link">
<img :src="image" alt="" class="get-involved-item-image" />
</a>
<SectionTitle class="get-involved-item-title" small>
{{ title }}
</SectionTitle>
<SectionDescription class="get-involved-item-description">
{{ description }}
</SectionDescription>
<LinkButton :href="link" :type="buttonType">
{{ buttonText }}
<Icon name="arrow" />
Expand Down
145 changes: 77 additions & 68 deletions components/MainPage/MainPageHero.vue
Original file line number Diff line number Diff line change
@@ -1,90 +1,94 @@
<script setup lang="ts">
import { ref, onMounted, onUnmounted } from "vue";
import HeroSlideshow from "~/components/MainPage/HeroSlideshow.vue";

const links = useLinks();
const isMobile = useIsMobile();
</script>

<template>
<HeroSlideshow class="hero">
<Header/>
const heroHeight = ref("100vh");

<div class="hero-center">
<img alt="" class="hero-center-logo" src="~/assets/images/redot-logo-white.svg">
const updateHeroHeight = () => {
heroHeight.value = `${window.innerHeight}px`;
};

<SectionTitle small>Open‑source game engine for&nbsp;everyone.</SectionTitle>
onMounted(() => {
updateHeroHeight();
window.addEventListener("resize", updateHeroHeight);
});

<SectionDescription>No strings attached.</SectionDescription>
onUnmounted(() => {
window.removeEventListener("resize", updateHeroHeight);
});
</script>

<LinkButton :href="links.releasePage" class="hero-center-button" type="red">
Download
<Icon name="arrow"/>
</LinkButton>
</div>
<template>
<HeroSlideshow :style="{ height: heroHeight }" class="hero">
<Header/>

<div class="hero-center hero-center--socials">
<NuxtLink :href="links.githubUrl" class="social-info">
<div class="social-icon">
<img alt="GitHub" src="~/assets/images/social-github.svg">
</div>
4.1k<br v-if="isMobile"> stars
</NuxtLink>
<NuxtLink :href="links.discordUrl" class="social-info">
<div class="social-icon">
<img alt="Discord" src="~/assets/images/social-discord.svg">
</div>
8.5k<br v-if="isMobile"> members
</NuxtLink>
<NuxtLink :href="links.twitterUrl" class="social-info">
<div class="social-icon">
<img alt="Twitter" src="~/assets/images/social-twitter.svg">
</div>
20.4k<br v-if="isMobile"> followers
</NuxtLink>
<NuxtLink :href="links.redditUrl" class="social-info">
<div class="social-icon">
<img alt="Reddit" src="~/assets/images/social-reddit.svg">
</div>
680<br v-if="isMobile"> members
</NuxtLink>
<div class="hero-content">
<div class="hero-center">
<img alt="" class="hero-center-logo" src="~/assets/images/redot-logo-white.svg">

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

<SectionDescription>No strings attached.</SectionDescription>

<LinkButton :href="links.releasePage" class="hero-center-button" type="red">
Download
<Icon name="arrow"/>
</LinkButton>
</div>

<div class="hero-center hero-center--socials">
<NuxtLink :href="links.githubUrl" class="social-info">
<div class="social-icon">
<img alt="GitHub" src="~/assets/images/social-github.svg">
</div>
4.2k<br v-if="isMobile"> stars
</NuxtLink>
<NuxtLink :href="links.discordUrl" class="social-info">
<div class="social-icon">
<img alt="Discord" src="~/assets/images/social-discord.svg">
</div>
9.1k<br v-if="isMobile"> members
</NuxtLink>
<NuxtLink :href="links.twitterUrl" class="social-info">
<div class="social-icon">
<img alt="Twitter" src="~/assets/images/social-twitter.svg">
</div>
20.6k<br v-if="isMobile"> followers
</NuxtLink>
<NuxtLink :href="links.redditUrl" class="social-info">
<div class="social-icon">
<img alt="Reddit" src="~/assets/images/social-reddit.svg">
</div>
771<br v-if="isMobile"> members
</NuxtLink>
</div>

<div class="hero-game-name">Game name</div>
</div>

<div class="hero-game-name">Game name</div>
</HeroSlideshow>
</template>


<style scoped lang="scss">
@use "@/assets/styles/mixins";

.hero {
position: relative;
height: 100dvh;
display: flex;
flex-direction: column;
gap: 20px;
align-items: center;
justify-content: center;


&::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(to bottom,
#000f 0%,
#0000 100px,
#0000 calc(100% - 100px),
#000f 100%
);
}

}

@media (max-width: 410px) {
padding: 0 10px;
}
.hero-content {
flex-grow: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 20px;
padding: 20px;
position: relative;
}

.hero-center {
Expand Down Expand Up @@ -116,7 +120,7 @@ const isMobile = useIsMobile();
}

.social-info {
font-size: clamp(12px, calc(20px + (36–20) * (100vw - 768px)/(1920–768)), 48px);
font-size: clamp(12px, calc(20px + (36–20) * (100vw - 768px) / (1920–768)), 48px);
margin: auto;
display: flex;
flex-direction: row;
Expand All @@ -136,7 +140,6 @@ const isMobile = useIsMobile();
@include mixins.mobile-and-smaller {
flex-direction: column;
}

}

.hero-center-logo {
Expand All @@ -159,4 +162,10 @@ const isMobile = useIsMobile();
bottom: 10px;
right: 10px;
}
</style>

@media (max-width: 410px) {
.hero-content {
padding: 10px;
}
}
</style>