diff --git a/src/StarDustAdventures_frontend/src/components/landing-mobile/gameplayMechanics/Card/index.css b/src/StarDustAdventures_frontend/src/components/landing-mobile/gameplayMechanics/Card/index.css new file mode 100644 index 0000000..bbaf704 --- /dev/null +++ b/src/StarDustAdventures_frontend/src/components/landing-mobile/gameplayMechanics/Card/index.css @@ -0,0 +1,3 @@ +.mob-gameplay-card{ + @apply w-screen flex flex-col justify-start items-center gap-8 +} \ No newline at end of file diff --git a/src/StarDustAdventures_frontend/src/components/landing-mobile/gameplayMechanics/Card/index.tsx b/src/StarDustAdventures_frontend/src/components/landing-mobile/gameplayMechanics/Card/index.tsx new file mode 100644 index 0000000..e88613b --- /dev/null +++ b/src/StarDustAdventures_frontend/src/components/landing-mobile/gameplayMechanics/Card/index.tsx @@ -0,0 +1,22 @@ +import { CardProps } from "../../../landing/gamePlayMechanics/Cards"; +import './index.css'; + +/** + * A Card component that displays a gameplay mechanic. + * It includes an image, title, and description. + * + * @param {CardProps} props - The card properties. + * @param {string} props.title - The title of the card. + * @param {string} props.description - The description of the gameplay mechanic. + * @param {string} props.image - The image URL representing the gameplay mechanic. + * @returns {JSX.Element} A styled card with an image, title, and description. + */ +export default function Card({ title, description, image }: CardProps): JSX.Element { + return ( +
{description}
+Explore the engaging system of Star Dust Adventures
+{description}
diff --git a/src/StarDustAdventures_frontend/src/components/landing/gamePlayMechanics/index.css b/src/StarDustAdventures_frontend/src/components/landing/gamePlayMechanics/index.css index 0a93721..ef6a55e 100644 --- a/src/StarDustAdventures_frontend/src/components/landing/gamePlayMechanics/index.css +++ b/src/StarDustAdventures_frontend/src/components/landing/gamePlayMechanics/index.css @@ -1,6 +1,5 @@ .gameplay-mechanics { - @apply w-full bg-transparent lg:mt-24 mt-12 text-white flex flex-col items-center justify-center py-3 md:min-h-min min-h-screen md:max-h-screen h-auto relative - + @apply w-full bg-transparent lg:mt-24 mt-12 text-white flex flex-col items-center justify-center py-3 max-h-screen h-auto relative ; } @@ -9,7 +8,7 @@ } .gameplay-mechanics-cards { - @apply flex md:flex-1 flex-row md:justify-between justify-center md:items-center items-center gap-6 relative mt-2 md:w-full w-[300vw] md:h-auto h-screen + @apply flex md:flex-1 flex-row md:justify-between justify-center md:items-center items-center gap-6 relative mt-2 w-full h-auto overflow-x-hidden px-2 ; } diff --git a/src/StarDustAdventures_frontend/src/components/landing/gamePlayMechanics/index.tsx b/src/StarDustAdventures_frontend/src/components/landing/gamePlayMechanics/index.tsx index 18d199e..067e9ed 100644 --- a/src/StarDustAdventures_frontend/src/components/landing/gamePlayMechanics/index.tsx +++ b/src/StarDustAdventures_frontend/src/components/landing/gamePlayMechanics/index.tsx @@ -1,4 +1,4 @@ -import { useRef, useEffect, useState } from 'react'; +import { useRef, useEffect} from 'react'; import GameplayMechanic, { CardProps } from './Cards'; import gsap from 'gsap'; import { ScrollTrigger } from 'gsap/ScrollTrigger'; @@ -8,126 +8,112 @@ import React from 'react'; gsap.registerPlugin(ScrollTrigger); // Card Static Data -const CARDS = [ - { - title: "Core Gameplay Loop", - description: 'Players tap to mine StarDust, with oxygen consumption renewed every 8 hours.', - image: '/assets/images/mars.svg' - }, - { - title: "Progression Opportunities", - description: "Upgrade astronaut's oxygen tank, mining tool, & storage to unlock richer resources.", - image: '/assets/images/moon.svg' - }, - { - title: "Play-to-Earn System", - description: "Accumulate StarDust, converting it to a future token tradable on exchanges for financial rewards.", - image: '/assets/images/earth.svg' - } -] as CardProps[]; +export const CARDS: CardProps[] = [ + { + title: "Core Gameplay Loop", + description: 'Players tap to mine StarDust, with oxygen consumption renewed every 8 hours.', + image: '/assets/images/mars.svg', + }, + { + title: "Progression Opportunities", + description: "Upgrade astronaut's oxygen tank, mining tool, & storage to unlock richer resources.", + image: '/assets/images/moon.svg', + }, + { + title: "Play-to-Earn System", + description: "Accumulate StarDust, converting it to a future token tradable on exchanges for financial rewards.", + image: '/assets/images/earth.svg', + }, +]; -const Header = ({titleRef}:{titleRef : React.RefObjectExplore the engaging system of Star Dust Adventures
-Explore the engaging system of Star Dust Adventures
+