Skip to content

Commit

Permalink
Storybook pull request (#16)
Browse files Browse the repository at this point in the history
* added some colors and elaine sans

Fix for logo

* storybook stories for web consulting template
  • Loading branch information
tmanundercover authored Dec 12, 2023
1 parent be1147f commit b4b5da1
Show file tree
Hide file tree
Showing 70 changed files with 5,229 additions and 502 deletions.
1 change: 1 addition & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<link href="https://fonts.googleapis.com/css2?family=Prompt:wght@700&family=Inter:wght@400;500;700&family=Orbitron:wght@400;500&family=Oswald:wght@400;500&family=Raleway:wght@400;500&display=swap" rel="stylesheet"/>
2 changes: 1 addition & 1 deletion functions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "functions",
"version": "0.5.0",
"version": "0.6.0",
"scripts": {
"lint": "eslint --ext .js,.ts .",
"build": "tsc",
Expand Down
1 change: 1 addition & 0 deletions functions/src/groqQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ const HOMEPAGE = `_type,
}
},
headerContent {
...,
"content": content[]->{
...,
headerMenuRef->{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chowworks-website",
"version": "0.5.0",
"version": "0.6.0",
"license": "GPL-3.0-or-later",
"private": true,
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions sanityIo/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "chow-works-sanity",
"name": "the-handsomest-nerd-sanity",
"private": true,
"version": "0.5.0",
"version": "0.6.0",
"description": "Sanity CMS for React Website Builder",
"main": "package.json",
"author": "theHandsomestNerd <hello@thehandsomestnerd.com>",
Expand Down
5 changes: 4 additions & 1 deletion sanityIo/schemas/mui/ColorListing.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@ export const ColorListing = [
{value: "ALMOSTWHITE", title: "Almost White"},
{value: "DARKERGRAY", title: "Darker Gray"},
{value: "DARK_GRAY", title: "Dark Gray"},
{value: "LIGHTER_GRAY", title: "Lighter Gray"},
{value: "ALMOST_BLACK", title: "Almost Black"},
{value: "PURPLE", title: "Purple"},
{value: "LIGHT_WHITE", title: "Light White"},
{value: "DISABLED_GRAY", title: "Disabled Gray"},
]
3 changes: 2 additions & 1 deletion sanityIo/schemas/mui/MuiTypography.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export default {
{value: "Prompt", title: "Prompt"},
{value: "Raleway", title: "Raleway"},
{value: "Poppins", title: "Poppins"},
{value: "Monteserrat", title: "Monteserrat"}
{value: "Monteserrat", title: "Monteserrat"},
{value: "Elaine Sans", title: "Elaine Sans"}
]
}}],

Expand Down
2 changes: 1 addition & 1 deletion sanityIo/schemas/portfolio/PortfolioSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default {
of: [
{type: "reference",
to:
[{type: "portfolioItem"}],
[{type: "PortfolioItem"}],
}
]
},
Expand Down
3 changes: 2 additions & 1 deletion sanityIo/schemas/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ import AnimatedPortfolioItem from "./sections/animated/AnimatedPortfolioItem";
import AnimatedPortfolioSection from "./sections/animated/AnimatedPortfolioSection";
import HeadlineCTASection from "./HeadlineCTASection";
import MapSection from "./sections/MapSection";
import PortfolioItem from "./portfolio/PortfolioItem";

// Then we give our schema to the builder and provide the result to Sanity
export default [
Expand Down Expand Up @@ -165,7 +166,7 @@ export default [
TestimonialsSection,
Testimonials,
PortfolioSection,
portfolioItem,
PortfolioItem,
headerContentContainer,
footerContentContainer,
HeaderSection,
Expand Down
13 changes: 13 additions & 0 deletions sanityIo/schemas/sections/HeaderSection.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {ColorListing} from "../mui/ColorListing";

export default {
name: 'HeaderSection',
title: 'Header Section',
Expand All @@ -18,6 +20,17 @@ export default {
title: 'CTA Button Text',
type: 'string'
},
{
name: 'logoImgSrc',
title: 'Logo Image',
type: 'image'
},
{
name: 'backgroundColor',
title: 'Background Color',
type: 'string',
options: {list: ColorListing}
},
{
name: 'isSearch',
title: 'Is Search included in header',
Expand Down
28 changes: 17 additions & 11 deletions src/common/sanityIo/Types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export type SanityGroupSchedule = {
}

export type SanityBusinessContact = {
"_type"?: "BusinessContact"
title?:string
email?: string
address?: string
phone?: string
Expand Down Expand Up @@ -91,6 +93,7 @@ export type SanityUnderConstructionPageType = {
}

export type SanityMuiTheme = {
_type?: "MuiTheme"
title?: string
slug?: SanitySlug
appBarHeight?: number
Expand All @@ -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
Expand Down Expand Up @@ -211,7 +217,7 @@ export type SanityModalType = {
}

export type SanityMenuItem = {
_type: string
_type?:string,
title?: string,
displayText?: string,
url?: string,
Expand All @@ -222,7 +228,7 @@ export type SanityMenuItem = {
}

export type SanityMenuGroup = {
_type: string
_type?:string,
title?: string,
slug?: SanitySlug,
menuGroupTitle?: string,
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/common/sanityIo/groqQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ const HOMEPAGE = `_type,
metaImage,
theme->,
headerContent {
...,
"content": content[]->{
...,
headerMenuRef->{
Expand Down
81 changes: 42 additions & 39 deletions src/components/BlockContentTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}


Expand Down Expand Up @@ -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 = {
Expand All @@ -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 = {
Expand All @@ -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
}

Expand Down Expand Up @@ -601,19 +600,23 @@ export type DevelopmentHeaderSectionType = {
headerMenuRef: SanityMenuContainer
}
export type HeaderSectionType = {
name: string
isSearch: boolean
isEnhanced: boolean
ctaButtonText: string
ctaButtonLink: string
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
Expand Down
14 changes: 0 additions & 14 deletions src/components/FooterBlockContentLayoutContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,6 @@ const FooterBlockContentLayoutContainer: FunctionComponent<FooterBlockContentLay
</Grid>
</Card></Grid>
</Grid>
case 'DevelopmentFooterSection':
const developmentFooter: DevelopmentFooterSectionType = columnLayoutContainer

return (
<ThemeProvider key={'BOTTOM_OF_PAGE_DEV'} theme={WebDevSiteTheme}><Grid container item
xs={12}
>
<Link id={"BOTTOM_OF_PAGE"} underline="hover"><></>
</Link>
<WebDevFooter
pageFooter={developmentFooter.footerMenuRef}
/>
</Grid></ThemeProvider>
);
case 'FooterSection':
const footer: FooterSectionType = columnLayoutContainer

Expand Down
20 changes: 2 additions & 18 deletions src/components/HeaderBlockContentLayoutContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Header from "./templates/mackenzies-mind/header/Header";
import WebDevSiteTheme from "../theme/WebDevSiteTheme";
import EnhancedHeader from "./templates/mackenzies-mind/header/EnhancedHeader";
import CustomizedThemeContext from "./customized-theme-provider/CustomizedThemeContext";
import {convertToHexCode} from "../theme/common/ColorPalette";

export type HeaderBlockContentLayoutContainerProps = {
content?: any,
Expand Down Expand Up @@ -88,23 +89,6 @@ const HeaderBlockContentLayoutContainer: FunctionComponent<HeaderBlockContentLay
</Grid>
</Card></Grid>
</Grid>
case 'DevelopmentHeaderSection':
const developmentHeader: DevelopmentHeaderSectionType = columnLayoutContainer

return (
<ThemeProvider theme={WebDevSiteTheme} key={'TOP_OF_PAGE_DEV'}>
<Grid container item xs={12}
style={{height: WebDevSiteTheme.mixins.toolbar.height}}
alignContent='center'
alignItems='center'>
<Link id={"TOP_OF_PAGE"} underline="hover"><></>
</Link>
<DevelopmentHeader
pageHeader={developmentHeader.headerMenuRef}
/>
</Grid>
</ThemeProvider>
);
case 'HeaderSection':
const header: HeaderSectionType = columnLayoutContainer

Expand All @@ -114,7 +98,7 @@ const HeaderBlockContentLayoutContainer: FunctionComponent<HeaderBlockContentLay
</Link>
{
showBasicHeader || !header.isEnhanced ?
<Header isSearch={header.isSearch} isAppBar={true}
<Header backgroundColor={header.backgroundColor} isSearch={header.isSearch} isAppBar={true}
pageHeader={header.headerMenuRef}/>
: <EnhancedHeader pageHeader={header}/>
}
Expand Down
Loading

0 comments on commit b4b5da1

Please sign in to comment.