Skip to content

Commit bf25028

Browse files
authored
Checks on Education Page (#197)
1 parent e9d4f8e commit bf25028

2 files changed

Lines changed: 37 additions & 31 deletions

File tree

src/components/degreeCard/DegreeCard.css

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
max-width: inherit;
6060
/* width: 100%; */
6161
border-radius: 0px 0px 7px 7px;
62-
padding: 5px;
62+
padding: 10px;
6363
justify-content: center;
6464
align-items: center;
6565
/* box-shadow: 5px 5px 5px #d3d3d3; */
@@ -77,7 +77,6 @@
7777
border-left: 1px solid #d9dbdf;
7878
border-right: 1px solid #d9dbdf;
7979
border-radius: 7px;
80-
width: 90%;
8180
margin: 10px;
8281
box-shadow: 5px 5px 5px #d9dbdf;
8382
}
@@ -136,7 +135,7 @@
136135
}
137136

138137
.card-body {
139-
width: 100%;
138+
width: 100% !important;
140139
}
141140

142141
.card-title {

src/components/degreeCard/DegreeCard.js

Lines changed: 35 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,26 @@ class DegreeCard extends Component {
88
const theme = this.props.theme;
99
return (
1010
<div className="degree-card">
11-
<Flip left duration={2000}>
12-
<div className="card-img">
13-
<img
14-
style={{
15-
maxWidth: "100%",
16-
maxHeight: "100%",
17-
transform: "scale(0.9)",
18-
}}
19-
src={require(`../../assests/images/${degree.logo_path}`)}
20-
alt={degree.alt_name}
21-
/>
22-
</div>
23-
</Flip>
11+
{degree.logo_path && (
12+
<Flip left duration={2000}>
13+
<div className="card-img">
14+
<img
15+
style={{
16+
maxWidth: "100%",
17+
maxHeight: "100%",
18+
transform: "scale(0.9)",
19+
}}
20+
src={require(`../../assests/images/${degree.logo_path}`)}
21+
alt={degree.alt_name}
22+
/>
23+
</div>
24+
</Flip>
25+
)}
2426
<Fade right duration={2000} distance="40px">
25-
<div className="card-body">
27+
<div
28+
className="card-body"
29+
style={{ width: degree.logo_path ? "90%" : "100%" }}
30+
>
2631
<div
2732
className="body-header"
2833
style={{ backgroundColor: theme.headerColor }}
@@ -41,28 +46,30 @@ class DegreeCard extends Component {
4146
</h3>
4247
</div>
4348
</div>
44-
<div classname="body-content">
49+
<div className="body-content">
4550
{degree.descriptions.map((sentence) => {
4651
return (
4752
<p className="content-list" style={{ color: theme.text }}>
4853
{sentence}
4954
</p>
5055
);
5156
})}
52-
<a
53-
href={degree.website_link}
54-
target="_blank"
55-
rel="noopener noreferrer"
56-
>
57-
<div
58-
className="visit-btn"
59-
style={{ backgroundColor: theme.headerColor }}
57+
{degree.website_link && (
58+
<a
59+
href={degree.website_link}
60+
target="_blank"
61+
rel="noopener noreferrer"
6062
>
61-
<p className="btn" style={{ color: theme.text }}>
62-
Visit Website
63-
</p>
64-
</div>
65-
</a>
63+
<div
64+
className="visit-btn"
65+
style={{ backgroundColor: theme.headerColor }}
66+
>
67+
<p className="btn" style={{ color: theme.text }}>
68+
Visit Website
69+
</p>
70+
</div>
71+
</a>
72+
)}
6673
</div>
6774
</div>
6875
</Fade>

0 commit comments

Comments
 (0)