From 7ef669f8527df75e51048a464aba6cee30ca3ebb Mon Sep 17 00:00:00 2001 From: Craig Date: Wed, 16 Apr 2025 10:49:25 +0100 Subject: [PATCH] Remove ExpertiseSection component and styles; add FeatureCards component and associated styles to enhance the homepage with a new expertise showcase. --- .../ExpertiseSection.module.css | 3 - .../ExpertiseSection/ExpertiseSection.tsx | 61 ---------------- .../FeatureCards/FeatureCards.module.css | 39 ++++++++++ .../components/FeatureCards/FeatureCards.tsx | 72 +++++++++++++++++++ .../src/pages/Home.page.tsx | 19 +---- 5 files changed, 113 insertions(+), 81 deletions(-) delete mode 100644 frontend/vite-template-master/src/components/ExpertiseSection/ExpertiseSection.module.css delete mode 100644 frontend/vite-template-master/src/components/ExpertiseSection/ExpertiseSection.tsx create mode 100644 frontend/vite-template-master/src/components/FeatureCards/FeatureCards.module.css create mode 100644 frontend/vite-template-master/src/components/FeatureCards/FeatureCards.tsx diff --git a/frontend/vite-template-master/src/components/ExpertiseSection/ExpertiseSection.module.css b/frontend/vite-template-master/src/components/ExpertiseSection/ExpertiseSection.module.css deleted file mode 100644 index 93fdc63..0000000 --- a/frontend/vite-template-master/src/components/ExpertiseSection/ExpertiseSection.module.css +++ /dev/null @@ -1,3 +0,0 @@ -.section { - margin-top: 80px; -} \ No newline at end of file diff --git a/frontend/vite-template-master/src/components/ExpertiseSection/ExpertiseSection.tsx b/frontend/vite-template-master/src/components/ExpertiseSection/ExpertiseSection.tsx deleted file mode 100644 index 7a8a4eb..0000000 --- a/frontend/vite-template-master/src/components/ExpertiseSection/ExpertiseSection.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import React from 'react'; -import { Carousel } from '@mantine/carousel'; -import { Container, Grid, Image, Stack, Text, Title } from '@mantine/core'; -import classes from './ExpertiseSection.module.css'; - -interface ExpertiseSectionProps { - title: string; - content: string; - images: { url: string; alt: string }[]; - viewMoreLink: string; - imageOnLeft?: boolean; -} - -const ExpertiseSection: React.FC = ({ - title, - content, - images, - viewMoreLink: _viewMoreLink, - imageOnLeft = false, -}) => { - const slides = images.map((image) => ( - - {image.alt} - - )); - - return ( - - - - - {title} - {content} - {/* */} - - - - - {slides} - - - - - ); -}; - -export default ExpertiseSection; diff --git a/frontend/vite-template-master/src/components/FeatureCards/FeatureCards.module.css b/frontend/vite-template-master/src/components/FeatureCards/FeatureCards.module.css new file mode 100644 index 0000000..bd38917 --- /dev/null +++ b/frontend/vite-template-master/src/components/FeatureCards/FeatureCards.module.css @@ -0,0 +1,39 @@ +.title { + font-size: 34px; + font-weight: 900; + + @media (max-width: $mantine-breakpoint-sm) { + font-size: 24px; + } + } + + .description { + max-width: 600px; + margin: auto; + + &::after { + content: ''; + display: block; + background-color: var(--mantine-color-blue-filled); + width: 45px; + height: 2px; + margin-top: var(--mantine-spacing-sm); + margin-left: auto; + margin-right: auto; + } + } + + .card { + border: 1px solid light-dark(var(--mantine-color-gray-1), var(--mantine-color-dark-5)); + } + + .cardTitle { + &::after { + content: ''; + display: block; + background-color: var(--mantine-color-blue-filled); + width: 45px; + height: 2px; + margin-top: var(--mantine-spacing-sm); + } + } \ No newline at end of file diff --git a/frontend/vite-template-master/src/components/FeatureCards/FeatureCards.tsx b/frontend/vite-template-master/src/components/FeatureCards/FeatureCards.tsx new file mode 100644 index 0000000..3c25c1b --- /dev/null +++ b/frontend/vite-template-master/src/components/FeatureCards/FeatureCards.tsx @@ -0,0 +1,72 @@ +import { FaCookieBite, FaGaugeHigh, FaUser } from 'react-icons/fa6'; +import { + Badge, + Card, + Container, + Group, + SimpleGrid, + Text, + Title, + useMantineTheme, +} from '@mantine/core'; +import classes from "./FeatureCards.module.css"; + +const mockdata = [ + { + title: 'Computer Vision', + description: + 'I have experience in building computer vision models for a range of applications, from object detection to image segmentation.', + icon: FaGaugeHigh, + }, + { + title: 'Natural Language Processing', + description: + 'I have experience in building natural language processing models for a range of applications, from sentiment analysis to text classification.', + icon: FaUser, + }, + { + title: 'Data Science', + description: + "Sometimes you just need a simple model and some nice graphs. I can help you understand your data and build a model that works for you.", + icon: FaCookieBite, + }, +]; + +export function FeaturesCards() { + const theme = useMantineTheme(); + const features = mockdata.map((feature) => ( + + + + {feature.title} + + + {feature.description} + + + )); + + return ( + + + + My Expertise + + + + + What can I bring to your business? + + + + I've worked with a range of businesses, from startups to established companies, and I've + learned a lot about what works and what doesn't. I work across the full Machine Learning stack, from + data collection to model deployment. + + + + {features} + + + ); +} \ No newline at end of file diff --git a/frontend/vite-template-master/src/pages/Home.page.tsx b/frontend/vite-template-master/src/pages/Home.page.tsx index a7f84da..bb3d66e 100644 --- a/frontend/vite-template-master/src/pages/Home.page.tsx +++ b/frontend/vite-template-master/src/pages/Home.page.tsx @@ -1,31 +1,16 @@ import { Container } from '@mantine/core'; -import openWebUIGif from '@/assets/open-webui.gif'; -import outputGif from '@/assets/output.gif'; import { Contact } from '@/components/ContactUs/Contact'; -import ExpertiseSection from '@/components/ExpertiseSection/ExpertiseSection'; import { HeaderSimple } from '@/components/HeaderSimple/HeaderSimple'; import { HeroTitle } from '@/components/HeroTitle/HeroTitle'; import Testimonial from '@/components/Testimonial/Testimonial'; +import { FeaturesCards } from '@/components/FeatureCards/FeatureCards'; export function HomePage() { return ( <> - - +