Skip to content

Commit ce92ada

Browse files
author
Tiko
committed
small fixes and changes
1 parent 5dedb79 commit ce92ada

31 files changed

+55
-348
lines changed

src/components/DigitalOceanPartnerLogo.jsx

Lines changed: 0 additions & 29 deletions
This file was deleted.

src/components/ReadMoreButton.jsx

Lines changed: 0 additions & 75 deletions
This file was deleted.

src/containers/Service/Service.components.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const ServiceText = styled.div`
4444
flex: 1;
4545
`;
4646

47-
// Below are the components from the new Service Page
47+
// Below are the components for the servicepage
4848
export const ServiceBackgroundImage = styled.img`
4949
overflow: visible;
5050
position: relative;

src/containers/Service/ServiceCard.components.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Container, Col, Row } from '../../lib/Grid';
55
const { mediaQueryMin } = theme;
66

77
export const TextBlockContainer = styled(Container)`
8-
background-color: #262626;
8+
background-color: ${theme.colors.secondary};
99
padding: 10% !important;
1010
z-index: 1;
1111
margin: 40% auto !important;

src/containers/Service/ServiceHeader.components.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const TextCol = styled(Col)`
2222
}
2323
`;
2424

25-
export const Containment = styled(Container)`
25+
export const StyledContainer = styled(Container)`
2626
@media (${mediaQueryMin.sm}) {
2727
margin: 0 !important;
2828
}

src/containers/Service/ServiceHeader.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import {
44
StyledImage,
55
StyledRow,
66
TextCol,
7-
Containment,
7+
StyledContainer,
88
} from './ServiceHeader.components';
99
import { Col } from '../../lib/Grid';
1010
import TextBlock from '../TextBlock/TextBlock';
1111

1212
const ServiceHeader = ({ title, subtitle, text, src }) => {
1313
return (
14-
<Containment>
14+
<StyledContainer>
1515
<StyledRow>
1616
<TextCol xl={6}>
1717
<TextBlock title={title} subtitle={subtitle}>
@@ -22,7 +22,7 @@ const ServiceHeader = ({ title, subtitle, text, src }) => {
2222
<StyledImage src={src} />
2323
</Col>
2424
</StyledRow>
25-
</Containment>
25+
</StyledContainer>
2626
);
2727
};
2828
export default ServiceHeader;

src/containers/Service/ServiceItem.components.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ export const StyledImage = styled.img`
99
height: auto;
1010
width: auto;
1111
float: right;
12-
background-color: #262626;
12+
background-color: ${theme.colors.secondary};
1313
`;
1414

15-
export const Containment = styled(Container)`
15+
export const StyledContainer = styled(Container)`
1616
@media (${mediaQueryMin.sm}) {
1717
margin: ${props =>
1818
props.light || !props.src
@@ -35,7 +35,7 @@ export const Containment = styled(Container)`
3535
`;
3636
export const StyledRow = styled(Row)`
3737
background-color: ${props =>
38-
props.light ? '#262626' : '#1a1a1a'}!important;
38+
props.light ? theme.colors.secondary : theme.colors.background};
3939
flex-direction: column-reverse;
4040
@media (${mediaQueryMin.sm}) {
4141
flex-direction: row;

src/containers/Service/ServiceItem.jsx

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import PropTypes from 'prop-types';
33
import {
44
StyledImage,
5-
Containment,
5+
StyledContainer,
66
StyledCol,
77
StyledRow,
88
ImageCol,
@@ -34,9 +34,30 @@ const ServiceItem = ({
3434
listTitle,
3535
listItems,
3636
}) => {
37-
return (
38-
<Containment src={src} light={light}>
39-
{src && (
37+
const RightCol = () => {
38+
if (src)
39+
return (
40+
<ImageCol xl={7} light={light}>
41+
<StyledImage src={src} />
42+
</ImageCol>
43+
);
44+
45+
return (
46+
<ListCol xl={4}>
47+
<TextBlock subtitle={listTitle}>
48+
{listItems.map(item => (
49+
<>
50+
{item}
51+
<br />
52+
</>
53+
))}
54+
</TextBlock>
55+
</ListCol>
56+
);
57+
};
58+
const Deliverables = () => {
59+
if (src)
60+
return (
4061
<Row>
4162
<Col xl={12}>
4263
<DeliverableList>
@@ -51,8 +72,13 @@ const ServiceItem = ({
5172
</DeliverableList>
5273
</Col>
5374
</Row>
54-
)}
75+
);
76+
return null;
77+
};
5578

79+
return (
80+
<StyledContainer src={src} light={light}>
81+
<Deliverables />
5682
<StyledRow justify="between" light={light}>
5783
<TextCol src={src}>
5884
<StyledTextBlock>
@@ -67,24 +93,9 @@ const ServiceItem = ({
6793
</TextBlock>
6894
</StyledTextBlock>
6995
</TextCol>
70-
{src ? (
71-
<ImageCol xl={7} light={light}>
72-
<StyledImage src={src} />
73-
</ImageCol>
74-
) : (
75-
<ListCol xl={4}>
76-
<TextBlock subtitle={listTitle}>
77-
{listItems.map(item => (
78-
<>
79-
{item}
80-
<br />
81-
</>
82-
))}
83-
</TextBlock>
84-
</ListCol>
85-
)}
96+
<RightCol />
8697
</StyledRow>
87-
</Containment>
98+
</StyledContainer>
8899
);
89100
};
90101

src/containers/TextBlock/TextBlock.components.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const Figure = styled.figure`
2626
`;
2727

2828
export const Subtitle = styled(SubtitleBase)`
29-
margin-bottom: ${props => (props.title ? '2rem' : '1.2em')};
29+
margin-bottom: ${props => (props.hasTitle ? '2rem' : '1.2em')};
3030
`;
3131

3232
export const H1 = styled.h1``;

src/containers/TextBlock/TextBlock.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const TextBlock = props => {
6767
return (
6868
<div>
6969
{getImage(image, alt)}
70-
<Subtitle title={title}>{subtitle}</Subtitle>
70+
<Subtitle hasTitle={title}>{subtitle}</Subtitle>
7171
{getTitle(headingType, title)}
7272
<p>{children}</p>
7373
{getButton(href, button, useGatsbyLink)}

0 commit comments

Comments
 (0)