diff --git a/pages/index.tsx b/pages/index.tsx index 55f672e2..a6050e9c 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -13,6 +13,7 @@ import useMobileDetect from 'use-mobile-detect-hook' import { directusClient } from '@src/apollo-client' import { BareModal } from '@src/components/BareModal' import { FooterVariant } from '@src/components/FooterFull' +import { CircleEmbellishment } from '@src/components/layout/CircleEmbellishment' import { GradientBG } from '@src/components/layout/GradientBG' import { HeaderPad } from '@src/components/layout/HeaderPad' import ArticleSection from '@src/components/page-sections/articleSection' @@ -185,9 +186,23 @@ export default function Index({ <> + + + + } > Managing Kubernetes can be a cluster—} @@ -353,3 +368,10 @@ export const getStaticProps = async () => { errors: combineErrors([error, stacksError, reposError]), }) } + +const homepageGradient = ` + radial-gradient(ellipse 50% 100% at 100% 100px, rgba(16, 35, 86, 0.25) 1px, transparent 75% 25%), + radial-gradient(circle, #102356 0%, transparent 70%), + linear-gradient(180deg, rgba(16, 35, 86, 0.1) 0%, rgba(14, 16, 21, 1.00) 71.51%), + linear-gradient(180deg, #0B0C10 5.32%, #0B0C10 100%) +` diff --git a/public/images/gradients/hero-background.jpg b/public/images/gradients/hero-background.jpg deleted file mode 100644 index f1d51fed..00000000 Binary files a/public/images/gradients/hero-background.jpg and /dev/null differ diff --git a/src/components/layout/CircleEmbellishment.tsx b/src/components/layout/CircleEmbellishment.tsx new file mode 100644 index 00000000..36075046 --- /dev/null +++ b/src/components/layout/CircleEmbellishment.tsx @@ -0,0 +1,103 @@ +import styled from 'styled-components' + +export function CircleEmbellishment({ + width, + height, + rotate, + position, +}: { + width?: number | string + height?: number | string + rotate?: number + position?: { + top?: number | string + left?: number | string + right?: number | string + bottom?: number | string + } +}) { + return ( +
+ + + +
+ ) +} + +const EmbellishmentSC = styled.div<{ + $width?: number | string + $height?: number | string + $rotate?: number + $position?: { + top?: number | string + left?: number | string + right?: number | string + bottom?: number | string + } + $showMobile?: boolean +}>(({ $width = 300, $height = 300, $rotate, $position }) => ({ + position: 'absolute', + zIndex: 0, + ...$position, + width: $width, + height: $height, + transform: $rotate ? `rotate(${$rotate}deg)` : 'none', + '& svg': { + width: '100%', + height: '100%', + }, +})) + +function EmbellishmentSVG() { + return ( + + + + + + + + + + + + + ) +} diff --git a/src/components/layout/GradientBG.tsx b/src/components/layout/GradientBG.tsx index e83608d1..cb7ee0d6 100644 --- a/src/components/layout/GradientBG.tsx +++ b/src/components/layout/GradientBG.tsx @@ -7,12 +7,14 @@ const GradientBGSC = styled.div<{ $position?: string $image?: string $size?: string + $imageType?: 'image' | 'custom' }>( ({ theme, $position: position = 'top center', $size = '100%', $image: image = '/images/gradients/gradient-bg-1.jpg', + $imageType: imageType = 'image', }) => ({ position: 'relative', '.bg': { @@ -20,7 +22,7 @@ const GradientBGSC = styled.div<{ transform: `translateZ(-1000px)`, perspective: 'none', }, - '.bg, .bg::after': { + '.bg, .bg::before': { overflow: 'hidden', content: '""', position: 'absolute', @@ -29,8 +31,8 @@ const GradientBGSC = styled.div<{ right: '0', bottom: '0', }, - '.bg::after': { - backgroundImage: `url(${image})`, + '.bg::before': { + backgroundImage: imageType === 'image' ? `url(${image})` : `${image}`, backgroundPosition: position, backgroundSize: $size, backgroundRepeat: 'no-repeat', @@ -44,17 +46,21 @@ const GradientBGSC = styled.div<{ export function GradientBG({ children, + bgChildren, position, image, size, + imageType, ...props }: Merge< ComponentProps, { children: ReactNode + bgChildren?: ReactNode position?: string image?: string size?: string + imageType?: 'image' | 'custom' } >) { return ( @@ -62,9 +68,10 @@ export function GradientBG({ $position={position} $image={image} $size={size} + $imageType={imageType} {...props} > -
+
{bgChildren}
{children}
) diff --git a/src/components/page-sections/ImpactCardSection.tsx b/src/components/page-sections/ImpactCardSection.tsx index 9a89fe70..bd85c14e 100644 --- a/src/components/page-sections/ImpactCardSection.tsx +++ b/src/components/page-sections/ImpactCardSection.tsx @@ -6,6 +6,7 @@ import styled, { useTheme } from 'styled-components' import { useMousePosition } from '@src/hooks/useMousePosition' +import { CircleEmbellishment } from '../layout/CircleEmbellishment' import { ResponsiveText } from '../Typography' const CARD_Z_INDEX = 1 @@ -65,7 +66,12 @@ function ImpactCard({ `} $borderGradientDir={borderGradientDir} > - {embellishment && } + {embellishment && ( + + )} {tooltipText && ( ({ lineHeight: '150%', })) -const EmblishmentSC = styled.div<{ $position: 'top-left' | 'bottom-right' }>( - ({ $position }) => { - const size = 300 - const strokeWidth = 1 - const gradientBorderSVG = encodeURIComponent(` - - - - - - - - - - - - - - `) - - return { - position: 'absolute', - zIndex: CARD_Z_INDEX - 1, - top: $position === 'top-left' ? -size / 2 : 'auto', - left: $position === 'top-left' ? -size / 2 : 'auto', - right: $position === 'bottom-right' ? -size / 2.25 : 'auto', - bottom: $position === 'bottom-right' ? -size / 1.6 : 'auto', - width: `${size}px`, - height: `${size}px`, - backgroundImage: `url("data:image/svg+xml,${gradientBorderSVG}")`, - } - } -) - const TooltipTextSC = styled.p(({ theme }) => ({ ...theme.partials.marketingText.body1, color: theme.colors.grey[750], @@ -240,3 +205,12 @@ const impactCards: ImpactCardProps[] = [ 'Through optimized resource utilization, reduced downtime, and efficient infrastructure management, Plural delivers a significant return on investment, enabling your platform team to build, innovate, and iterate faster without the typical operational bottlenecks.', }, ] + +const getEmbelishmentPosition = ( + embellishment: ImpactCardProps['embellishment'] +) => { + if (embellishment === 'top-left') return { bottom: '17%', left: '-21%' } + if (embellishment === 'bottom-right') return { top: '38%', right: '-18%' } + + return undefined +}