diff --git a/src/components/layout/PageHeader/index.tsx b/src/components/layout/PageHeader/index.tsx index 0bb9afa786..b772724d72 100644 --- a/src/components/layout/PageHeader/index.tsx +++ b/src/components/layout/PageHeader/index.tsx @@ -1,8 +1,9 @@ -import React, { PropsWithChildren } from 'react'; +import React from 'react'; import { Icon } from '@iconify/react'; import WaveBorder from '@site/src/components/shapes/WaveBorder'; import Markdown from '@site/src/components/utilities/Markdown'; import BasicResourcesBox from '@site/src/components/content/BasicResourcesBox'; + type ImageSectionProps = LayoutProps & { image?: Image; }; @@ -14,22 +15,22 @@ type PageHeaderProps = LayoutProps & darkColor?: string; lightColor?: string; basicResources?: boolean; - instructions?: { [key:string]: any }; + instructions?: { [key: string]: any }; }; type PageHeaderSupplementalInfoProps = PageHeaderProps & { image?: Image; basicResources?: boolean; -} +}; type InstructionsProps = PageHeaderProps & { - instructions?: { [key:string]: any }; -} + instructions?: { [key: string]: any }; +}; const TextBox = ({ grid, display, layout, title, description }: PageHeaderProps): JSX.Element => { return (
-

{title}

+

{title}

); @@ -38,64 +39,74 @@ const TextBox = ({ grid, display, layout, title, description }: PageHeaderProps) const Image = ({ grid, display, - layout,// if array then {[key:string]: any}[]; + layout, image = { path: 'images/optimized/podman-2-196w-172h.webp', alt: 'Podman Logo' }, }: ImageSectionProps) => { return ( -
- {image.alt} -
+ {image.alt} ); }; function PageHeaderSupplementalInfo({ image, basicResources }: PageHeaderSupplementalInfoProps) { if (basicResources) { - return ( - - ); - } - return ( - - ); + return ; + } + return ; } function Instructions({ instructions }: InstructionsProps) { if (instructions) { return (
-

{instructions.title}

+

{instructions.title}

{instructions.subtitle}

-
- ) + ); } return null; } -function PageHeader({ title, description, image, lightColor = 'white', darkColor = 'gray-900', basicResources, instructions }: PageHeaderProps) { +function PageHeader({ + title, + description, + image, + lightColor = 'white', + darkColor = 'gray-900', + basicResources, + instructions, +}: PageHeaderProps) { return (
-
+
-
-
- +
+
+
-
- +
+
-
); diff --git a/src/pages/features.tsx b/src/pages/features.tsx index e392ad1c4b..5adbccfd12 100644 --- a/src/pages/features.tsx +++ b/src/pages/features.tsx @@ -9,7 +9,7 @@ import ColoringBookSection from '@site/src/components/content/ColoringBookSectio import FeaturesCarousel from '@site/src/components/content/FeaturesCarousel'; import BlogArticlesList from '@site/src/components/content/BlogArticlesList'; /* PAGE DATA */ -import { header, knowPodman, learnMore } from '@site/static/data/features'; +import { header, knowPodman, podmanDesktop, learnMore } from '@site/static/data/features'; import PlayOnScroll from '@site/src/components/utilities/PlayOnScroll'; import BasicResourcesBox from '@site/src/components/content/BasicResourcesBox'; @@ -18,15 +18,19 @@ function GetToKnowPodmanSection() { return (
-
+
{knowPodman.cards.map((card, index) => { return ( -
-
-

{card.title}

- -
- {card.image.alt} +
+ {card.image.alt} +

{card.title}

+
); })} @@ -37,24 +41,22 @@ function GetToKnowPodmanSection() { const PodmanDesktopSection = () => { return ( -
-
-
-

- Podman Desktop -

-
-
-
-
- -
-
-

- Podman Desktop is Podman's graphical application that makes it easy to install and work with Podman (and - other container engines) on Windows, MacOS, and Linux. -

-
+
+ +
+ {podmanDesktop.image.alt} +

+ + {podmanDesktop.title} + {' '} + {podmanDesktop.description} +

); @@ -195,7 +197,7 @@ const LearnMoreSection = () => { function Features() { return ( - + diff --git a/static/data/features.ts b/static/data/features.ts index 06633d7eb0..ca43ae4544 100644 --- a/static/data/features.ts +++ b/static/data/features.ts @@ -41,6 +41,16 @@ const knowPodman = { ], }; +const podmanDesktop = { + title: 'Podman Desktop', + description: + 'is Podman\'s graphical application that makes it easy to install and work with Podman (and other container engines) on Windows, MacOS, and Linux.', + image: { + path: 'logos/optimized/podman-desktop-logo-200w-198h.webp', + alt: 'Podman Desktop logo', + }, +}; + const carouselContent = [ { title: 'Find', @@ -113,4 +123,4 @@ const learnMore = { }, }; -export { header, knowPodman, carouselContent, learnMore }; +export { header, knowPodman, podmanDesktop, carouselContent, learnMore };