From 90c33e662b18b19f5ecb8a4c7d86fd6a57bf6888 Mon Sep 17 00:00:00 2001 From: Eduard Itrich Date: Mon, 18 Dec 2023 10:47:35 +0100 Subject: [PATCH] Center hero image on blog posts Signed-off-by: Eduard Itrich on-behalf-of: @porscheofficial --- content/blog/porsche-digital-campus.mdx | 2 +- src/app/blog/[...slug]/page.tsx | 3 ++- src/components/03_organisms/heroSection/HeroSection.tsx | 3 +++ .../03_organisms/heroSection/heroSection.module.scss | 6 ++++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/content/blog/porsche-digital-campus.mdx b/content/blog/porsche-digital-campus.mdx index 80ec7b4..5458ecd 100644 --- a/content/blog/porsche-digital-campus.mdx +++ b/content/blog/porsche-digital-campus.mdx @@ -8,7 +8,7 @@ author: description: The Porsche Digital Campus is an innovative initiative with the goal of bringing together research and real-world application in the fields of AI, machine learning, and data science. image: https://uploads-ssl.webflow.com/6419a4c2c9609e21b02a47e8/6454e539d4ea54c08e42aedb_Frame%2010683.png slug: https://campus.porsche.digital/ -readTime: 5min +readTime: 3min --- = ({ params }: PageProps) => { description={description} subtitle="FOSS@Porsche" imageSrc={blog.image} - imageAlt="" + imageAlt="Hero Image" + position="center center" />
diff --git a/src/components/03_organisms/heroSection/HeroSection.tsx b/src/components/03_organisms/heroSection/HeroSection.tsx index 3e21b0a..326d22f 100644 --- a/src/components/03_organisms/heroSection/HeroSection.tsx +++ b/src/components/03_organisms/heroSection/HeroSection.tsx @@ -13,6 +13,7 @@ interface HeroSectionProps { description?: string; imageSrc: string | StaticImageData; imageAlt: string; + position?: string; } export const HeroSection: React.FC = ({ @@ -21,12 +22,14 @@ export const HeroSection: React.FC = ({ description, imageSrc, imageAlt, + position = "right center", }) => { return (