diff --git a/src/components/Home/CardItem.js b/src/components/Home/CardItem.js index 4b0ec25..eb7a322 100644 --- a/src/components/Home/CardItem.js +++ b/src/components/Home/CardItem.js @@ -6,8 +6,8 @@ const CardItem = (props) => { const imageStyle = { objectFit: 'cover', - width: '100%', - height: '100%', + width: '90%', + height: '90%', }; const cardStyle = { diff --git a/src/pages/home/Cards.js b/src/pages/home/Cards.js index a021968..e452b46 100644 --- a/src/pages/home/Cards.js +++ b/src/pages/home/Cards.js @@ -1,93 +1,65 @@ -import React from 'react' -import CardItem from '../../components/Home/CardItem' -import Slider from 'react-slick'; -import "../../styles/pages/Home/Cards.css" -import Wordle from "../../assets/games/Wordle/wordlejpg.png" -import flagGame from "../../assets/games/flag guess/flagger.png" -import magicSquare from "../../assets/numberblocks.png" +import React from "react"; +import Slider from "react-slick"; +import "../../styles/pages/Home/Cards.css"; + +// ✅ this is your central data file +import { activities, games } from "../../data/content"; + +// ✅ your existing card +import CardItem from "../../components/Home/CardItem"; const Cards = () => { - // Slick settings for the carousel - const settings = { - dots: true, - infinite: true, - speed: 500, - slidesToShow: 3, // Number of cards to show at once - slidesToScroll: 1, - responsive: [ - { - breakpoint: 1024, - settings: { - slidesToShow: 2, - slidesToScroll: 1, - infinite: true, - dots: true - } - }, - { - breakpoint: 600, - settings: { - slidesToShow: 1, - slidesToScroll: 1, - } - } - ] - }; + const settings = { + dots: true, + infinite: true, + speed: 500, + slidesToShow: 3, + slidesToScroll: 1, + responsive: [ + { + breakpoint: 1024, + settings: { slidesToShow: 2, slidesToScroll: 1, dots: true }, + }, + { + breakpoint: 600, + settings: { slidesToShow: 1, slidesToScroll: 1 }, + }, + ], + }; + + // ✅ combine all games + activities from your data file + const allItems = [ + ...games.map((g) => ({ + src: g.icon, + text: g.description, + title: g.title, + path: `/games/${g.urlTerm}`, + })), + ...activities.map((a) => ({ + src: a.icon, + text: a.description, + title: a.title, + path: `/activities/${a.urlTerm}`, + })), + ]; - return ( -