Skip to content

Commit 2f4160f

Browse files
authored
Merge pull request #257 from Web-Dev-Path/refactor/to-scss-Member
Refactor/to scss member
2 parents 5d8accb + 116007f commit 2f4160f

5 files changed

Lines changed: 109 additions & 122 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,5 +167,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
167167
- SearchBar
168168
- BlogPostsContainer
169169
- RevealContentContainer
170+
- Member
171+
170172
- Updated ContactUsForm's checkbox wrapper from div to label to enhance its accessibility
171173
- Updated SearchInput width to 100% for better styling
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
@use '@/styles/mixins' as *;
2+
3+
.card {
4+
margin: 1rem 1rem 0 0.5rem;
5+
padding: 1rem;
6+
border-radius: 1.5rem;
7+
min-height: 35rem;
8+
background-color: var(--color-transparent);
9+
display: flex;
10+
justify-content: left;
11+
flex-direction: column;
12+
width: 100%;
13+
14+
@include tablet {
15+
height: 30rem;
16+
width: 40%;
17+
}
18+
19+
@include medium-desktop {
20+
min-width: 20%;
21+
max-width: 20%;
22+
margin: 1.5rem;
23+
}
24+
}
25+
26+
.name {
27+
font-style: italic;
28+
font-family: var(--font-heading);
29+
font-size: 1.5rem;
30+
color: var(--color-primary-content);
31+
margin-bottom: 0px;
32+
line-height: unset;
33+
}
34+
35+
%headingStyle {
36+
font-family: var(--font-heading);
37+
font-size: 1rem;
38+
color: var(--color-primary-content);
39+
text-align: left;
40+
line-height: normal;
41+
margin: 0px;
42+
}
43+
44+
.title {
45+
@extend %headingStyle;
46+
}
47+
48+
.position {
49+
@extend %headingStyle;
50+
}
51+
52+
.content {
53+
align-items: center;
54+
margin: auto;
55+
}
56+
57+
.paragraph {
58+
font-size: 1rem;
59+
text-align: left;
60+
line-height: normal;
61+
}
62+
63+
.linkWrapper {
64+
font-size: 1rem;
65+
display: flex;
66+
flex-direction: row;
67+
justify-content: left;
68+
margin-bottom: 1rem;
69+
70+
a {
71+
padding-left: 1rem;
72+
text-decoration: underline;
73+
text-underline-offset: 2px;
74+
&:hover {
75+
opacity: 0.6;
76+
text-decoration: none;
77+
}
78+
}
79+
}
80+
81+
.imageWrapper {
82+
min-width: 10rem;
83+
min-height: 10rem;
84+
position: relative;
85+
margin: 0.5rem auto;
86+
87+
img {
88+
border-radius: 50%;
89+
object-fit: cover;
90+
}
91+
}

components/containers/Member/index.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Image from 'next/image';
2-
import S from './styles';
2+
import styles from './Member.module.scss';
33

44
export default function Member({
55
image,
@@ -11,19 +11,19 @@ export default function Member({
1111
portfolio,
1212
}) {
1313
return (
14-
<S.Card>
14+
<div className={styles.card}>
1515
{image && (
16-
<S.ImageWrapper>
16+
<div className={styles.imageWrapper}>
1717
<Image src={image} alt={name} fill />
18-
</S.ImageWrapper>
18+
</div>
1919
)}
2020

21-
<S.Name>{name}</S.Name>
22-
<S.Title>{title}</S.Title>
23-
<S.Position>{position}</S.Position>
24-
<S.Content>
21+
<h2 className={styles.name}>{name}</h2>
22+
<h3 className={styles.title}>{title}</h3>
23+
<h3 className={styles.position}>{position}</h3>
24+
<div className={styles.content}>
2525
{linkedIn && (
26-
<S.LinkWrapper>
26+
<div className={styles.linkWrapper}>
2727
<Image
2828
src='/images/svg/linkedin-portfolio.svg'
2929
alt='LinkedIn'
@@ -37,10 +37,10 @@ export default function Member({
3737
>
3838
{linkedIn}
3939
</a>
40-
</S.LinkWrapper>
40+
</div>
4141
)}
4242
{portfolio && (
43-
<S.LinkWrapper>
43+
<div className={styles.linkWrapper}>
4444
<Image
4545
src='/images/svg/globe.svg'
4646
alt='Web Site'
@@ -54,11 +54,11 @@ export default function Member({
5454
>
5555
{portfolio}
5656
</a>
57-
</S.LinkWrapper>
57+
</div>
5858
)}
5959

60-
<S.Paragraph>{about}</S.Paragraph>
61-
</S.Content>
62-
</S.Card>
60+
<p className={styles.paragraph}>{about}</p>
61+
</div>
62+
</div>
6363
);
6464
}

components/containers/Member/styles.js

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

styles/themes.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
--color-box-shadow: rgba(0, 0, 0, 0.08);
1212
--dark-bg: #023047;
1313
--error: #be1313;
14+
--font-heading: 'Open Sans';
1415
}
1516

1617
// placeholder colors

0 commit comments

Comments
 (0)