Skip to content

Commit

Permalink
Merge pull request #17 from theHandsomestNerd/bio-options
Browse files Browse the repository at this point in the history
add options to bio to turn off ui elements for display in search resu…
  • Loading branch information
tmanundercover committed Dec 14, 2023
2 parents c086415 + 52b3fa7 commit 21c6761
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ const FullTextSearch: FunctionComponent<IProps> = (props: IProps) => {
<Grid item sx={{paddingLeft: "16px"}} container>
{/*<Grid container item><Typography color='textSecondary'*/}
{/* fontWeight={'bold'}>{convertedResumeSkill.title}</Typography></Grid>*/}
{convertedAnimatedHeroSection.contentSlides.map((slide: SanityHeroContentSlide) => {
return <Grid container item sx={{
{convertedAnimatedHeroSection.contentSlides.map((slide: SanityHeroContentSlide, slideIdx) => {
return <Grid key={slideIdx} container item sx={{
borderLeft: "1px solid whitesmoke",
marginBottom: "8px",
paddingLeft: "8px"
Expand Down Expand Up @@ -176,7 +176,6 @@ const FullTextSearch: FunctionComponent<IProps> = (props: IProps) => {
case "ResumeExperience":
const convertedResumeExperience: ResumeExperience = theResult;

console.log(convertedResumeExperience)
return <Grid container sx={{
marginBottom: "16px",
backgroundColor: COLORS.LIGHTGRAY,
Expand All @@ -189,7 +188,6 @@ const FullTextSearch: FunctionComponent<IProps> = (props: IProps) => {
</Grid>
case "ResumeSkill":
const convertedResumeSkill: ResumeSkill = theResult;

return <Grid container sx={{
marginBottom: "16px",
backgroundColor: COLORS.LIGHTGRAY,
Expand All @@ -212,7 +210,7 @@ const FullTextSearch: FunctionComponent<IProps> = (props: IProps) => {
<Typography variant='h6' gutterBottom color='primary'>My Bio
- {resumeBioSectionObj.title}</Typography>
</Grid>
<ResumeBioSection sectionData={resumeBioSectionObj} homePage={pageContext.page}/>
<ResumeBioSection isHideButtons={true} isHideEmail={true} sectionData={resumeBioSectionObj} homePage={pageContext.page}/>
</Grid>
default:
return <Grid container sx={{marginBottom: "16px"}}><Typography
Expand Down
41 changes: 22 additions & 19 deletions src/components/templates/mackenzies-mind/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ import {Theme} from "@mui/material/styles";
import PageContext from "../../../page-context/PageContext";

export const useStyles = makeStyles((theme: Theme) => ({
hover:{
hover: {
"&:hover": {
backgroundColor: "lightgray !important",
color: "#383838"
}
},
hoverSearch:{
hoverSearch: {
"&:hover": {
color: theme.palette.primary.main
}
Expand All @@ -34,7 +34,7 @@ export type HeaderProps = {
isSearch?: boolean
updateIsLoading?: (value: boolean) => void
isEnhanced?: boolean
backgroundColor?:string
backgroundColor?: string
}

const Header: FunctionComponent<HeaderProps> = (props) => {
Expand All @@ -45,7 +45,8 @@ const Header: FunctionComponent<HeaderProps> = (props) => {
const mdDown = useMediaQuery(customizedTheme.breakpoints.down('md'))
const [isSearchOpen, setIsSearchOpen] = React.useState<boolean>(false)

return (<AppBarWrapper backgroundColor={props.backgroundColor} isAppBar={props.isAppBar} isEnhanced={props.isEnhanced}>
return (
<AppBarWrapper backgroundColor={props.backgroundColor} isAppBar={props.isAppBar} isEnhanced={props.isEnhanced}>
{props.pageHeader?.title ?
<Grid item container
alignContent='center' alignItems='center' style={{height: "100%", paddingLeft: "8px"}}>
Expand Down Expand Up @@ -86,15 +87,15 @@ const Header: FunctionComponent<HeaderProps> = (props) => {
paddingRight: mdDown ? "16px" : "8px",
borderLeft: `1px solid ${customizedTheme.palette.primary.main}`
}}>
<IconButton color='secondary' sx={{
<IconButton onClick={() => {
setIsSearchOpen((state) => !state)
}} color='secondary' sx={{
// marginLeft: "32px",
// marginRight: "32px",
color: customizedTheme.palette.text.secondary,
backgroundColor: customizedTheme.palette.primary.main
}} className={classes.hoverSearch}>
<Search color='inherit' fontSize='large' onClick={() => {
setIsSearchOpen((state) => !state)
}}/>
<Search color='inherit' fontSize='large'/>
</IconButton></Box></Grid>
</Grid>}
</Grid>
Expand All @@ -104,18 +105,20 @@ const Header: FunctionComponent<HeaderProps> = (props) => {
<Modal open={isSearchOpen}>
<Grid container style={{height: "100%"}}>
<Grid container item justifyContent='flex-end'>
<IconButton sx={{
marginTop: "4px",
marginRight: "4px",
width: "64px",
height: "64px",
backgroundColor: COLORS.WHITESMOKE
}} onClick={() => {
setIsSearchOpen(false)
}} className={classes.hover}>
<IconButton
sx={{
marginTop: "4px",
marginRight: "4px",
width: "64px",
height: "64px",
backgroundColor: COLORS.WHITESMOKE
}}
onClick={() => {
setIsSearchOpen(false)
}}
className={classes.hover}>

<Close sx={{marginX: "16px", marginY: "16px"}} fontSize={"large"} color={'secondary'}
/>
<Close sx={{marginX: "16px", marginY: "16px"}} fontSize={"large"} color={'secondary'}/>
</IconButton>
</Grid>
<Grid container item justifyContent='center' paddingX={'8px'} alignContent='flex-start'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import BusinessCardSubmitEmail from "../../transform-hw/pages/BusinessCardSubmit
interface IProps {
sectionData: ResumeBioSectionType
homePage?: SanityTransformHwHomePage
isHideEmail?: boolean
isHideButtons?:boolean
}

const ResumeBioSection: FunctionComponent<IProps> = (props: IProps) => {
Expand All @@ -23,13 +25,13 @@ const ResumeBioSection: FunctionComponent<IProps> = (props: IProps) => {
return (
<Grid container item style={{padding: theme.spacing(4,smDown?1:4)}} justifyContent='center'
className={classes.resumeSection} spacing={3}>
<Grid item xs={12} style={{paddingTop: "64px"}}>
{!props.isHideEmail && <Grid item xs={12} style={{paddingTop: "64px"}}>
<BusinessCardSubmitEmail
source={"Bio Section"}
emailFieldText={'Email Address'}
emailButtonText={'Submit'}
subscribeText={'Want a copy of my resume emailed to you?'}/>
</Grid>
</Grid>}
<Grid item md={6} justifyContent='center'>
<Grid item container>
<Typography component='div' display='inline' variant='h5' gutterBottom>{props.sectionData.title}
Expand Down Expand Up @@ -81,7 +83,7 @@ const ResumeBioSection: FunctionComponent<IProps> = (props: IProps) => {
}}>
</Grid>
</Grid>
<Grid container item xs={12} sm={10} spacing={1} style={{marginTop: theme.spacing(2)}}>
{!props.isHideButtons && <Grid container item xs={12} sm={10} spacing={1} style={{marginTop: theme.spacing(2)}}>
<Grid item container>
<ButtonGroup fullWidth orientation={smDown ? 'vertical' : "horizontal"}>
<Button name={'appointment'} variant='contained' fullWidth color='primary'
Expand All @@ -103,7 +105,7 @@ const ResumeBioSection: FunctionComponent<IProps> = (props: IProps) => {
{/* CV</Typography></Button>}*/}
</ButtonGroup>
</Grid>
</Grid>
</Grid>}
</Grid>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const ResumeExperienceSection: FunctionComponent<IProps> = (props: IProps) => {
<Grid item container md={8} spacing={2} justifyContent={xsOnly ? 'center' : 'flex-start'}>
{
props.sectionData.experiences?.map((experience: ResumeExperience, index2: number) => {
return <ResumeExperienceItem experience={experience} />
return <ResumeExperienceItem experience={experience} key={index2}/>
})
}
</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const ResumePortfolioSection: FunctionComponent<IProps> = (props: IProps) => {
<Grid item container justifyContent={'center'} xs={11} justifySelf={'center'} spacing={1}>
{
props.sectionData.portfolioEntries?.map((portfolioItem: ResumePortfolioItem, index2: number) => {
return <Grid item xs={12} sm={6} lg={4} xl={4}><ResumePortfolioEntry portfolioItem={portfolioItem} key={index2}/></Grid>
return <Grid key={index2} item xs={12} sm={6} lg={4} xl={4}><ResumePortfolioEntry portfolioItem={portfolioItem} /></Grid>
})
}
</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const ResumeSkillsSection: FunctionComponent<IProps> = (props: IProps) => {
<Grid item container md={8} spacing={2} justifyContent='space-between'>
{
props.sectionData?.skillsets?.map((skillset: ResumeSkillSet, index2: number) => {
return <ResumeSkillSetItem skillset={skillset} />
return <ResumeSkillSetItem skillset={skillset} key={index2}/>
})
}
</Grid>
Expand Down

0 comments on commit 21c6761

Please sign in to comment.