Skip to content

Commit 64b3a11

Browse files
Simplifying CSS, adjusting component custom classes, changing SVG files
1 parent 9b96a42 commit 64b3a11

File tree

7 files changed

+48
-110
lines changed

7 files changed

+48
-110
lines changed

components/containers/Container.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
import containerStyles from '@/styles/Container.module.scss';
22

3-
export default function Container({ className, children, styles }) {
3+
export default function Container({ customClass, children, styles }) {
44
return (
55
<div
6-
className={`${containerStyles.container} ${className ? className : ''}`}
6+
className={
7+
customClass
8+
? `${containerStyles.container} ${customClass}`
9+
: containerStyles.container
10+
}
711
style={styles}
812
>
913
{children}

components/containers/RevealContentContainer.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@ const RevealContentContainer = ({ children }) => {
1515
}, [entry.isIntersecting]);
1616

1717
return (
18-
<div ref={ref} className={`${styles.wrapper} ${styles[hiddenStyle]}`}>
18+
<div
19+
ref={ref}
20+
className={
21+
hiddenStyle
22+
? `${styles.wrapper} ${styles[hiddenStyle]}`
23+
: styles.wrapper
24+
}
25+
>
1926
{children}
2027
</div>
2128
);

components/containers/TwoColumn.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ export default function TwoColumn({
2828
return (
2929
<section className={styles.wrapper} style={styleProps.wrapper}>
3030
<Container
31-
className={`${styles.inner} ${styles[customInnerClass]}`}
31+
customClass={
32+
customInnerClass
33+
? `${styles.inner} ${styles[customInnerClass]}`
34+
: styles.inner
35+
}
3236
styles={{ flexDirection: rowOrder }}
3337
>
3438
<div className={styles.inner__content}>

pages/about.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,6 @@ export default function AboutUs() {
8888
customInnerClass='about-content'
8989
/>
9090
</RevealContentContainer>
91-
92-
{/* <RevealContentContainer>
93-
<Container>
94-
<Title title="Our goals" />
95-
</Container>
96-
</RevealContentContainer> */}
9791
</div>
9892
);
9993
}
Lines changed: 2 additions & 16 deletions
Loading
Lines changed: 2 additions & 17 deletions
Loading

styles/TwoColumn.module.scss

Lines changed: 25 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -2,59 +2,17 @@
22
@use './mixins' as *;
33

44
.wrapper {
5-
65
.inner {
76
padding: 5rem 0;
87
margin: 0 auto;
98
width: 90%;
109
max-width: $large-desktop-breakpoint;
1110

12-
&.get-involved {
13-
@include desktop-breakpoint-minus {
14-
padding-bottom: 0;
15-
}
16-
}
17-
18-
&.non-profit {
19-
@include desktop-breakpoint-minus {
20-
.inner__content {
21-
margin-bottom: 0;
22-
}
23-
}
24-
}
25-
26-
&.about-content {
27-
padding-bottom: 0;
28-
29-
.inner__content {
30-
31-
@include desktop-breakpoint-minus {
32-
margin-bottom: 0;
33-
}
34-
.content {
35-
max-width: fit-content;
36-
}
37-
flex-basis: calc(100% - 34rem);
38-
}
39-
.inner__image {
40-
flex-basis: 24rem;
41-
height: 24rem;
42-
transform: translateY(-15%);
43-
.img {
44-
max-width: 24rem;
45-
object-fit: contain;
46-
transform: scale(0.5);
47-
}
48-
@include tablet {
49-
transform: translateY(15%);
50-
}
51-
}
52-
}
53-
5411
.inner__content {
55-
12+
margin-bottom: 5rem;
5613
@include desktop {
5714
flex-basis: 50%;
15+
margin-bottom: 0;
5816
}
5917

6018
.title {
@@ -72,7 +30,7 @@
7230
a {
7331
text-decoration: underline;
7432
text-underline-offset: 2px;
75-
33+
7634
&:hover {
7735
opacity: 0.6;
7836
text-decoration: none;
@@ -96,45 +54,45 @@
9654
}
9755
}
9856

99-
&.our-background {
100-
padding-bottom: 0;
101-
102-
@include tablet {
103-
.title {
104-
font-size: 56px;
105-
}
57+
// Homepage
58+
&.get-involved {
59+
@include desktop-breakpoint-minus {
60+
padding-bottom: 0;
10661
}
62+
}
10763

108-
.inner__content {
109-
@include desktop-breakpoint-minus {
64+
&.non-profit {
65+
@include desktop-breakpoint-minus {
66+
.inner__content {
11067
margin-bottom: 0;
11168
}
112-
.content {
113-
max-width: fit-content;
114-
}
115-
flex-basis: calc(100% - 34rem);
11669
}
70+
}
11771

72+
//About us
73+
&.our-background {
11874
.inner__image {
119-
flex-basis: 30rem;
120-
// height: 24rem;
75+
height: 18rem;
12176

12277
.img {
123-
max-width: 50rem;
12478
object-fit: contain;
125-
transform: scale(0.3);
79+
}
80+
}
81+
}
12682

127-
@include tablet {
128-
transform: scale(0.5) translateY(-17%);
129-
height: 24rem;
130-
}
83+
&.about-content {
84+
.inner__image {
85+
height: 15rem;
86+
.img {
87+
max-width: 14rem;
88+
object-fit: contain;
13189
}
13290
}
133-
13491
}
13592

13693
@include desktop {
13794
display: flex;
95+
align-items: center;
13896
justify-content: space-between;
13997
flex-wrap: wrap;
14098
}

0 commit comments

Comments
 (0)