UNCLASSIFIED

Commit 58dbdc47 authored by Anne Demey's avatar Anne Demey
Browse files

Adjusting spacing for service category list

Removing black background at mobile size for service hero
Fixing scroll for service category hero icon
parent d5f15141
...@@ -16,8 +16,8 @@ const ServiceCatHero = ({ title, description, imageFluid, iconName }) => { ...@@ -16,8 +16,8 @@ const ServiceCatHero = ({ title, description, imageFluid, iconName }) => {
return ( return (
<Container <Container
background="black" background="black"
style={{ position: 'relative' }} style={{ position: 'relative', overflow: 'hidden' }}
pad={{ margin={{
top: isMobile top: isMobile
? theme.custom.header.stickyHeight ? theme.custom.header.stickyHeight
: theme.custom.header.height, : theme.custom.header.height,
...@@ -71,20 +71,20 @@ const ServiceCatHero = ({ title, description, imageFluid, iconName }) => { ...@@ -71,20 +71,20 @@ const ServiceCatHero = ({ title, description, imageFluid, iconName }) => {
</Box> </Box>
)} )}
</Box> </Box>
{isMobile && (
<IconComponent
size="300"
color="dark-4"
style={{
position: 'fixed',
right: '-150px',
top: '100px',
zIndex: 2,
}}
/>
)}
</Column> </Column>
{isMobile && (
<IconComponent
size="250"
color="dark-4"
style={{
position: 'absolute',
right: '0',
top: '50%',
zIndex: 2,
transform: 'translate(50%, -50%)',
}}
/>
)}
<DownHex /> <DownHex />
</Container> </Container>
); );
......
...@@ -16,24 +16,26 @@ const ServiceHero = ({ title, subtitle, pretitle, categories, imageFluid }) => { ...@@ -16,24 +16,26 @@ const ServiceHero = ({ title, subtitle, pretitle, categories, imageFluid }) => {
<Container <Container
background="black" background="black"
style={{ position: 'relative' }} style={{ position: 'relative' }}
pad={{ top: theme.custom.header.height }} pad={{
top: isMobile
? theme.custom.header.stickyHeight
: theme.custom.header.height,
}}
> >
{!isMobile && ( <Img
<Img fluid={imageFluid}
fluid={imageFluid} alt="Hero"
alt="Hero" style={{
style={{ position: 'absolute',
position: 'absolute', top: '0',
top: '0', left: '0',
left: '0', right: '0',
right: '0', bottom: '0',
bottom: '0', }}
}} />
/>
)}
<Column <Column
direction="row" direction="row"
pad={{ bottom: 'large' }} pad={{ bottom: 'xlarge' }}
style={{ position: 'relative' }} style={{ position: 'relative' }}
> >
<Box pad="large"> <Box pad="large">
......
...@@ -28,15 +28,15 @@ const listQuery = graphql` ...@@ -28,15 +28,15 @@ const listQuery = graphql`
} }
`; `;
const ServiceItem = ({ node, pad }) => ( const ServiceItem = ({ node, isMobile }) => (
<Box basis="1/2" pad="medium"> <Box basis="1/2" pad={isMobile ? '0' : 'medium'}>
<Heading level={4}>{node.frontmatter.title}</Heading> <Heading level={4}>{node.frontmatter.title}</Heading>
<Classification <Classification
levels={node.frontmatter.levels} levels={node.frontmatter.levels}
serviceName={node.frontmatter.title} serviceName={node.frontmatter.title}
/> />
{/* Undo this "flex" if we don't want learn more to line up */} {/* Undo this "flex" if we don't want learn more to line up */}
<Box flex="grow" pad={{ vertical: pad }}> <Box flex="grow" pad={{ vertical: isMobile ? '0' : 'small' }}>
<Paragraph fill>{node.frontmatter.excerpt || node.excerpt}</Paragraph> <Paragraph fill>{node.frontmatter.excerpt || node.excerpt}</Paragraph>
</Box> </Box>
...@@ -49,14 +49,6 @@ const ServiceItem = ({ node, pad }) => ( ...@@ -49,14 +49,6 @@ const ServiceItem = ({ node, pad }) => (
</Box> </Box>
); );
const rowPad = {
xsmall: '0',
small: '0',
medium: 'medium',
large: 'medium',
xlarge: 'medium',
};
const ServiceList = ({ categories }) => { const ServiceList = ({ categories }) => {
const { const {
allMarkdownRemark: { nodes }, allMarkdownRemark: { nodes },
...@@ -71,12 +63,7 @@ const ServiceList = ({ categories }) => { ...@@ -71,12 +63,7 @@ const ServiceList = ({ categories }) => {
const isMobile = ['xsmall', 'small'].includes(size); const isMobile = ['xsmall', 'small'].includes(size);
return ( return (
<Box <Box pad={{ vertical: 'large' }} id="main-content">
pad={{ vertical: 'large' }}
background="white"
style={{ zIndex: 5 }}
id="main-content"
>
{catGroup.map((group, i) => ( {catGroup.map((group, i) => (
<Box key={categories[i]} gap="small"> <Box key={categories[i]} gap="small">
{categories.length > 1 && ( {categories.length > 1 && (
...@@ -107,8 +94,12 @@ const ServiceList = ({ categories }) => { ...@@ -107,8 +94,12 @@ const ServiceList = ({ categories }) => {
gap="large" gap="large"
key={item1.id} key={item1.id}
> >
{item1 && <ServiceItem node={item1} pad={rowPad[size]} />} {item1 && (
{item2 && <ServiceItem node={item2} pad={rowPad[size]} />} <ServiceItem node={item1} isMobile={isMobile} />
)}
{item2 && (
<ServiceItem node={item2} isMobile={isMobile} />
)}
</Box> </Box>
); );
})} })}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment