diff --git a/.storybook/preview-head.html b/.storybook/preview-head.html new file mode 100644 index 00000000..29fc9518 --- /dev/null +++ b/.storybook/preview-head.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/common/sanityIo/Types.ts b/src/common/sanityIo/Types.ts index 5a93f1b7..9e1a4679 100644 --- a/src/common/sanityIo/Types.ts +++ b/src/common/sanityIo/Types.ts @@ -32,6 +32,8 @@ export type SanityGroupSchedule = { } export type SanityBusinessContact = { + "_type"?: "BusinessContact" + title?:string email?: string address?: string phone?: string @@ -91,6 +93,7 @@ export type SanityUnderConstructionPageType = { } export type SanityMuiTheme = { + _type?: "MuiTheme" title?: string slug?: SanitySlug appBarHeight?: number @@ -109,27 +112,30 @@ export type SanityMuiBreakpoints = { export type SanityMuiFontFace = { - name: string - fontSize: string - fontStyle: string - fontWeight: string - lineHeight: string - letterSpacing: string + name?: string + fontSize?: string + fontStyle?: string + fontWeight?: string + lineHeight?: string + letterSpacing?: string textTransform?: any [key:string]: any - mediaQueries: SanityMuiMediaQuery[] + mediaQueries?: SanityMuiMediaQuery[] } export type SanityMuiMediaQuery = { - breakpoint: string + "_type"?: "MuiMediaQuery" + breakpoint: string[] typography: SanityMuiFontFace } export type SanityMuiTypography = { + "_type"?: "MuiTypography", fontFamily: string[] fontFaces?: SanityMuiFontFace[] } export type SanityMuiColorPalette = { + "_type"?: "MuiColorPalette", defaultBackground: string defaultPaperBackgroundColor: string primaryColor: string @@ -211,7 +217,7 @@ export type SanityModalType = { } export type SanityMenuItem = { - _type: string + _type:string, title?: string, displayText?: string, url?: string, @@ -222,7 +228,7 @@ export type SanityMenuItem = { } export type SanityMenuGroup = { - _type: string + _type?:string, title?: string, slug?: SanitySlug, menuGroupTitle?: string, @@ -235,7 +241,7 @@ export type SanityMenuContainer = { title?: string, slug?: SanitySlug, displayText?: string, - subMenus?: SanityMenuGroup & SanityMenuItem[] + subMenus?: (SanityMenuGroup & SanityMenuItem)[] logoImageAltText?: string logoText?: string logoAccentText?: string diff --git a/src/components/BlockContentTypes.ts b/src/components/BlockContentTypes.ts index 98dabdbe..aa01b6b7 100644 --- a/src/components/BlockContentTypes.ts +++ b/src/components/BlockContentTypes.ts @@ -17,20 +17,19 @@ export type HeroContentSectionType = { export type HeroAnimatedContentSectionType = { name: string title: string - theme: SanityMuiTheme contentSlides: SanityHeroContentSlide[] } export type SanityHeroContentSlide = { - heroImage: SanityImageAsset - heroBullet: SanityImageAsset - heroImageAltText: string - heroImageBackground: SanityImageAsset - contentTitle: string - contentWelcomeMessage: string - contentText: string - ctaButtonTitle: string - ctaButtonLink: string + heroImage?: SanityImageAsset + heroBullet?: SanityImageAsset + heroImageAltText?: string + heroImageBackground?: SanityImageAsset + contentTitle?: string + contentWelcomeMessage?: string + contentText?: string + ctaButtonTitle?: string + ctaButtonLink?: string } @@ -192,25 +191,25 @@ export type ThwServiceItemNoRefType = { } & SanityDocumentFields export type AnimatedServiceItemNoRefType = { - name: string + name?: string imageSrc?: SanityImageAsset iconImageSrc?: SanityImageAsset backgroundImageSrc?: SanityImageAsset - imageSrcAltText: string - contentTitle: string - contentText: string - ctaButtonText: string - ctaButtonLink: string - learnMoreLink: string - learnMoreText: string - educationPageTitle: string - educationPageSlimHeroImage: SanityImageAsset - extendedDescriptions: string[] - benefitsOfServiceTitle: string - benefitsOfServiceContents: string[] - benefitsOfServiceBullets: string[] - serviceAmenities: ServiceAmenityType[] - slug: SanitySlug + imageSrcAltText?: string + contentTitle?: string + contentText?: string + ctaButtonText?: string + ctaButtonLink?: string + learnMoreLink?: string + learnMoreText?: string + educationPageTitle?: string + educationPageSlimHeroImage?: SanityImageAsset + extendedDescriptions?: string[] + benefitsOfServiceTitle?: string + benefitsOfServiceContents?: string[] + benefitsOfServiceBullets?: string[] + serviceAmenities?: ServiceAmenityType[] | undefined + slug?: SanitySlug } & SanityDocumentFields export type AnimatedAboutUsSectionType = { @@ -221,13 +220,13 @@ export type AnimatedAboutUsSectionType = { contentPreTitle: string contentText: string contentTexts: string[] - servicesList: AnimatedServiceItemNoRefType[] + servicesList: AnimatedServiceItemNoRefType[] | undefined highlightedAmenities?: ServiceAmenityType[] highlightedAmenitiesTitle?: string highlightedAmenitiesTexts?: string[] highlightedAmenitiesBullets?: string[] - servicesImageSrcArr: SanityImageAsset[] - servicesMasonryAccentImageSrc: SanityImageAsset + servicesImageSrcArr: (SanityImageAsset| undefined)[] + servicesMasonryAccentImageSrc?: SanityImageAsset } export type AnimatedServicesSectionType = { @@ -241,9 +240,9 @@ export type AnimatedServicesSectionType = { contentSummaryTexts: string[] ctaButtonText: string ctaButtonLink: string - videoPreviewImageSrc:SanityImageAsset - videoPreviewSectionBackgroundImageSrc: SanityImageAsset - videoUrl:string + videoPreviewImageSrc?:SanityImageAsset + videoPreviewSectionBackgroundImageSrc?: SanityImageAsset + videoUrl?:string videoPreviewText:string } @@ -601,21 +600,23 @@ export type DevelopmentHeaderSectionType = { headerMenuRef: SanityMenuContainer } export type HeaderSectionType = { - name: string - isSearch: boolean - isEnhanced: boolean - backgroundColor: string - ctaButtonText: string - ctaButtonLink: string - logoImgSrc: SanityImageAsset - highlightedDetails: ServiceAmenityType[] - headerMenuRef: SanityMenuContainer + title?: string + name?: string + isSearch?: boolean + isEnhanced?: boolean + backgroundColor?: string + ctaButtonText?: string + ctaButtonLink?: string + logoImgSrc?: SanityImageAsset + highlightedDetails?: ServiceAmenityType[] + headerMenuRef?: SanityMenuContainer } export type DevelopmentFooterSectionType = { name: string footerMenuRef: SanityMenuContainer } export type FooterSectionType = { + _type:string name: string backgroundImgSrc?: SanityImageAsset backgroundColor?: string diff --git a/src/components/animated/AnimatedAboutUsItem.tsx b/src/components/animated/AnimatedAboutUsItem.tsx index f055071b..9eff2288 100644 --- a/src/components/animated/AnimatedAboutUsItem.tsx +++ b/src/components/animated/AnimatedAboutUsItem.tsx @@ -1,11 +1,12 @@ import React, {FunctionComponent, useContext} from 'react' -import {Card, Grid, ThemeProvider, Typography, useMediaQuery} from '@mui/material' +import {Card, Grid, ThemeProvider, Typography, useMediaQuery, useTheme} from '@mui/material' import {v4 as uuidv4} from 'uuid' import {AnimatedServiceItemNoRefType} from "../BlockContentTypes"; import ImageWIthButtonOverlay from "../image-with-button-overlay/ImageWithButtonOverlay"; import CustomizedThemeContext from "../customized-theme-provider/CustomizedThemeContext"; import {urlFor} from "../block-content-ui/static-pages/cmsStaticPagesClient"; import {motion, useAnimationControls} from "framer-motion"; +import imagePlaceholderClient from "../../utils/imagePlaceholderClient"; interface IProps { @@ -18,28 +19,29 @@ interface IProps { const AnimatedAboutUsItem: FunctionComponent = (props: IProps) => { - const customizedTheme = useContext(CustomizedThemeContext) + // const customizedTheme = useContext(CustomizedThemeContext) const controls = useAnimationControls() const textColorControls = useAnimationControls() const overlayControl = useAnimationControls() + const theme = useTheme() + const animateServiceHover = async () => { overlayControl.start({opacity: 1}, {duration: .5}) controls.start({scale: 1}, {duration: .5}) - textColorControls.start({color: customizedTheme.customizedTheme.palette.primary.main}) + textColorControls.start({color: theme.palette.primary.main}) } const animateServiceNoHover = async () => { controls.start({scale: 1.1}, {duration: .25}) overlayControl.start({opacity: 0}, {duration: .5}) - textColorControls.start({color: customizedTheme.customizedTheme.palette.text.primary}) + textColorControls.start({color: theme.palette.text.primary}) } - const smDown = useMediaQuery(customizedTheme.customizedTheme.breakpoints.down('sm')) + const smDown = useMediaQuery(theme.breakpoints.down('sm')) return ( - - { + { animateServiceHover() }} onHoverEnd={async () => { animateServiceNoHover() @@ -79,12 +81,12 @@ const AnimatedAboutUsItem: FunctionComponent = (props: IProps) => { alignContent='center' style={{height: "100%"}}> + src={urlFor(props.service.iconImageSrc ?? "").url() ?? imagePlaceholderClient.placeholderOrImage(props.service.iconImageSrc, 64, 64)}/> = (props: IProps) => { = (props: IProps) => { - ) } diff --git a/src/components/animated/AnimatedAboutUsSection.tsx b/src/components/animated/AnimatedAboutUsSection.tsx index 753b0312..3fde580b 100644 --- a/src/components/animated/AnimatedAboutUsSection.tsx +++ b/src/components/animated/AnimatedAboutUsSection.tsx @@ -9,6 +9,7 @@ import {Circle} from "@mui/icons-material"; import {motion} from "framer-motion" import BulletedHeader from "./BulletedHeader"; import HorizontalAmenity from "./HorizontalAmenity"; +import imagePlaceholderClient from "../../utils/imagePlaceholderClient"; export const useStyles = makeStyles((theme: Theme) => ({ root: { @@ -47,7 +48,7 @@ const AnimatedAboutUsSection: FunctionComponent = (props) => { } @@ -56,8 +57,8 @@ const AnimatedAboutUsSection: FunctionComponent = (props) => { })} - + spacing={2} > + @@ -100,7 +101,7 @@ const AnimatedAboutUsSection: FunctionComponent = (props) => { variant='body1' gutterBottom>{segment} ))} - + @@ -132,7 +133,7 @@ const AnimatedAboutUsSection: FunctionComponent = (props) => { @@ -141,10 +142,10 @@ const AnimatedAboutUsSection: FunctionComponent = (props) => { } { props.sectionData?.servicesImageSrcArr && - + + src={urlFor(props.sectionData?.servicesImageSrcArr[0] ?? "").url() ?? imagePlaceholderClient.placeholderOrImage(props.sectionData?.servicesImageSrcArr[0], 485, 356)}/> } @@ -153,13 +154,13 @@ const AnimatedAboutUsSection: FunctionComponent = (props) => { + src={urlFor(props.sectionData?.servicesImageSrcArr[1] ?? "").url() ?? imagePlaceholderClient.placeholderOrImage(props.sectionData?.servicesImageSrcArr[1], 230, 265)}/> + src={urlFor(props.sectionData?.servicesImageSrcArr[2] ?? "").url() ?? imagePlaceholderClient.placeholderOrImage(props.sectionData?.servicesImageSrcArr[2], 260, 305)}/> } diff --git a/src/components/animated/AnimatedPortfolioItem.tsx b/src/components/animated/AnimatedPortfolioItem.tsx index ab09941f..732366cc 100644 --- a/src/components/animated/AnimatedPortfolioItem.tsx +++ b/src/components/animated/AnimatedPortfolioItem.tsx @@ -6,6 +6,7 @@ import makeStyles from "@mui/styles/makeStyles"; import {Theme} from "@mui/material/styles"; import {AnimatedPortfolioItemType} from "../BlockContentTypes"; import {motion, useAnimationControls} from 'framer-motion'; +import imagePlaceholderClient from "../../utils/imagePlaceholderClient"; export const useStyles = makeStyles((theme: Theme) => ({ root: { @@ -42,7 +43,7 @@ const AnimatedPortfolioItem: FunctionComponent = (props:IProps) => { console.log("not hovering") animateServiceNoHover() }}> + href={props.pageHeader?.ctaButtonLink}>{props.pageHeader?.ctaButtonText} { - props.pageHeader.highlightedDetails.map((detail, index)=> - + props.pageHeader.highlightedDetails?.map((detail, index) => + = (props) => { backgroundColor: "#e3e3e3", borderRadius: "50%" }}> - - + + {/* = (props) => { - {detail.name} + {detail.name} - {detail.description} + {detail.description} @@ -83,7 +88,7 @@ const EnhancedHeader: FunctionComponent = (props) => { {/*enhanced*/} = (props) => { borderRadius: 4, backgroundColor: "black" }}> -
+
: <> diff --git a/src/components/templates/my-digital-resume/resume-bio-section/ResumeBioSection.tsx b/src/components/templates/my-digital-resume/resume-bio-section/ResumeBioSection.tsx index c5b626ac..96aa1a53 100644 --- a/src/components/templates/my-digital-resume/resume-bio-section/ResumeBioSection.tsx +++ b/src/components/templates/my-digital-resume/resume-bio-section/ResumeBioSection.tsx @@ -1,4 +1,4 @@ -import React, {FunctionComponent} from 'react' +import React, {FunctionComponent, useContext} from 'react' import {Button, ButtonGroup, Grid, Typography, useMediaQuery, useTheme,} from '@mui/material'; import {ResumeBioSectionType} from "../../../BlockContentTypes"; import {urlFor} from "../../../block-content-ui/static-pages/cmsStaticPagesClient"; @@ -6,6 +6,8 @@ import {SanityTransformHwHomePage} from "../../../../common/sanityIo/Types"; import useThwCommonStyles from "../../../../common/sanityIo/ThwCommonStyles"; import SocialMediaBlock from "../social-media-block/SocialMediaBlock"; import BusinessCardSubmitEmail from "../../transform-hw/pages/BusinessCardSubmitEmail"; +import CustomizedThemeProvider from "../../../customized-theme-provider/CustomizedThemeProvider"; +import CustomizedThemeContext from "../../../customized-theme-provider/CustomizedThemeContext"; interface IProps { @@ -20,6 +22,7 @@ const ResumeBioSection: FunctionComponent = (props: IProps) => { const smDown = useMediaQuery(theme.breakpoints.down('sm')) + const customizedthemeContext = useContext(CustomizedThemeContext) return ( diff --git a/src/components/templates/web-dev-site/WebDevHeroContentSection.tsx b/src/components/templates/web-dev-site/WebDevHeroContentSection.tsx index 4b8a94eb..021953c6 100644 --- a/src/components/templates/web-dev-site/WebDevHeroContentSection.tsx +++ b/src/components/templates/web-dev-site/WebDevHeroContentSection.tsx @@ -8,7 +8,7 @@ import PageContext from "../../page-context/PageContext"; import WebDevSiteTheme from "../../../theme/WebDevSiteTheme"; import makeStyles from "@mui/styles/makeStyles"; import {Theme, ThemeProvider} from "@mui/material/styles"; -import {Button, Grid, Typography} from "@mui/material"; +import {Button, Grid, Typography, useTheme} from "@mui/material"; // import FontFaces from "../../theme/common/FontFaces"; interface IProps { @@ -44,7 +44,7 @@ const WebDevHeroContentSection: FunctionComponent = (props) => { } const pageContext = useContext(PageContext) - +const theme= useTheme() const classes = useStyles(classParameters) const globalClasses = useCustomStyles({}) return ( @@ -58,13 +58,13 @@ const WebDevHeroContentSection: FunctionComponent = (props) => { {props.sectionData.contentTitle} + color={'textPrimary'}>{props.sectionData.contentTitle} {props.sectionData.contentText} + >{props.sectionData.contentText}