Skip to content

Commit 7bd2d00

Browse files
Merge pull request #277 from Web-Dev-Path/refactor/to-scss-contactStyle
Refactor/to-scss-contactStyle
2 parents 05fc077 + b807e7e commit 7bd2d00

File tree

7 files changed

+96
-103
lines changed

7 files changed

+96
-103
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
157157
- Updated husky script to avoid warning
158158
- Resolved incorrect meta tag rendering for nested routes
159159
- Prevent horizontal page scroll caused by overflowing long titles
160+
- Fixed hero images' max-height to align with WDP mockup
161+
- Fixed contact us form position to maintain structure on bigger displays
160162

161163
### Changed
162164

@@ -184,6 +186,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
184186
- Layout
185187
- RelatedPosts
186188
- Footer
189+
- contactStyles
187190
- CardsColumns
188191
- Nav
189192
- NewsletterSubscribe

components/ContactUs/ContactUsForm/ContactUsForm.module.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
max-width: 100%;
1111
width: 26rem;
1212
padding: 2rem 0;
13+
margin-right: 6.5625rem;
1314
}
1415
}
1516

components/decorations/Bracket/Bracket.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
}
3737

3838
@include desktop-breakpoint-plus {
39-
top: 45%;
39+
top: 38%;
4040
right: 140%;
4141
}
4242
}

components/layout/Hero/styles.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ const Header = styled.div`
1010
1111
${props => css`
1212
@media (min-width: ${props.theme.breakpoints.desktop}) {
13-
min-height: 100vh;
13+
height: 100vh;
14+
max-height: 56.25rem;
1415
}
1516
`}
1617
`;

pages/contact.js

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,35 @@
11
import { useState } from 'react';
22
import ContactUsFormSubscribe from '@/components/ContactUs';
33
import ContactUsCards from '@/components/ContactUs/ContactUsCards';
4-
import S from '@/styles/pages/contactStyles';
4+
import styles from '@/styles/pages/contact.module.scss';
55
import Bracket from '@/components/decorations/Bracket';
66
import bracketStyles from '@/components/decorations/Bracket/Bracket.module.scss';
77
export default function ContactUs() {
88
const [message, setMessage] = useState([]);
99

1010
return (
1111
<>
12-
<S.ContactUsContainer>
13-
<S.FormAndDecorations>
14-
<Bracket className={bracketStyles.yellowBracket} />
15-
<ContactUsFormSubscribe setMsg={setMessage} />
16-
<S.YellowColon src='/images/svg/yellow-colon.svg' />
17-
<S.ResponseMessage>
18-
{message?.map((m, i) => (
19-
<span key={i}>
20-
{m}
21-
<br />
22-
</span>
23-
))}
24-
</S.ResponseMessage>
25-
</S.FormAndDecorations>
26-
</S.ContactUsContainer>
12+
<div className={styles.contactUsContainer}>
13+
<div className={styles.formWrapper}>
14+
<div className={styles.formAndDecorations}>
15+
<Bracket className={bracketStyles.yellowBracket} />
16+
<ContactUsFormSubscribe setMsg={setMessage} />
17+
<img
18+
className={styles.yellowColon}
19+
src='/images/svg/yellow-colon.svg'
20+
alt=''
21+
/>
22+
<div className={styles.responseMessage}>
23+
{message?.map((m, i) => (
24+
<span key={i}>
25+
{m}
26+
<br />
27+
</span>
28+
))}
29+
</div>
30+
</div>
31+
</div>
32+
</div>
2733
<ContactUsCards />
2834
</>
2935
);

styles/pages/contact.module.scss

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
@use '@/styles/index' as *;
2+
3+
.contactUsContainer {
4+
background-color: var(--color-light-bg);
5+
height: 42rem;
6+
position: relative;
7+
margin-bottom: -10rem;
8+
9+
@include mobile {
10+
height: unset;
11+
padding-bottom: 2rem;
12+
margin-bottom: 3rem;
13+
}
14+
15+
@include desktop {
16+
height: 32rem;
17+
}
18+
}
19+
20+
.formWrapper {
21+
display: flex;
22+
max-width: 98rem;
23+
margin-inline: auto;
24+
}
25+
26+
.formAndDecorations {
27+
position: relative;
28+
width: 100%;
29+
margin: auto;
30+
31+
@include tablet {
32+
width: auto;
33+
margin-top: -19rem;
34+
margin-right: 2rem;
35+
}
36+
37+
@include desktop {
38+
margin: -25rem 5rem 0 auto;
39+
}
40+
}
41+
42+
.yellowColon {
43+
@include desktop-breakpoint-minus {
44+
display: none;
45+
}
46+
47+
@include tablet {
48+
position: absolute;
49+
top: -10%;
50+
right: -5%;
51+
}
52+
53+
@include desktop {
54+
right: -1rem;
55+
}
56+
}
57+
58+
.responseMessage {
59+
position: unset;
60+
bottom: -5%;
61+
padding: 0 2rem;
62+
63+
@include tablet {
64+
position: absolute;
65+
margin-top: 1rem;
66+
}
67+
}

styles/pages/contactStyles.js

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

0 commit comments

Comments
 (0)