Skip to content

Commit 7d67eb4

Browse files
author
Maxwell Lang
committed
Complete certification module
1 parent 41f92f0 commit 7d67eb4

File tree

2 files changed

+55
-14
lines changed

2 files changed

+55
-14
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
.column {
2+
display: flex;
3+
justify-content: center;
4+
}
5+
6+
.image {
7+
padding-top: 1.25rem;
8+
width: 80%;
9+
margin: auto;
10+
}
11+
12+
.verifyButton {
13+
width: 100%;
14+
margin-top: auto;
15+
}
16+
17+
.card {
18+
width: 15rem;
19+
}
20+
21+
.cardBody {
22+
display: flex;
23+
flex-direction: column;
24+
}
25+
26+
.buttonContainer {
27+
display: flex;
28+
margin-top: .5rem;
29+
}

components/Portfolio/Certification/index.js

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import { Component } from 'react';
22

33
import Col from 'react-bootstrap/Col';
44
import Card from 'react-bootstrap/Card';
5+
import Button from 'react-bootstrap/Button';
56

6-
// import styles from './Certification.module.scss';
7+
import styles from './Certification.module.scss';
78

89
export default class Certification extends Component {
910
constructor(props) {
@@ -13,27 +14,38 @@ export default class Certification extends Component {
1314

1415
render() {
1516
return (
16-
<Col xs={12} sm={6} lg={4}>
17-
<Card>
18-
<Card.Body>
19-
{this.props.title ?
20-
<Card.Title>{this.props.title}</Card.Title>
17+
<Col xs={12} sm={3} className={styles.column}>
18+
<Card className={styles.card}>
19+
{this.props.image ?
20+
<Card.Img variant="top" className={styles.image} src={this.props.image.src} />
21+
: null}
22+
<Card.Body className={styles.cardBody}>
23+
{this.props.name ?
24+
<Card.Title className="text-center">{this.props.name}</Card.Title>
2125
: null}
2226

2327
{this.props.subtitle ?
24-
<Card.Subtitle className="mb-2 text-muted">{this.props.subtitle}</Card.Subtitle>
28+
<Card.Subtitle className="mb-2 text-muted text-center">{this.props.subtitle}</Card.Subtitle>
2529
: null}
2630

27-
<Card.Text>
28-
{this.props.children}
29-
</Card.Text>
30-
31-
{this.props.links ?
32-
this.props.links.map((linkObj, i) => <Card.Link key={i} target="_blank" rel="noreferrer" href={linkObj.href}>{linkObj.title}</Card.Link>)
31+
{this.props.tests ?
32+
<ul type="dash">
33+
{this.props.tests.map((test, i) => <li key={i}>{test}</li>)}
34+
</ul>
3335
: null}
36+
37+
38+
<Button
39+
target="_blank"
40+
rel="noreferrer"
41+
className={styles.verifyButton}
42+
disabled={!('link' in this.props)}
43+
href={this.props.link ? this.props.link : '#'}>
44+
{this.props.link ? 'Verify' : 'Coming Soon'}
45+
</Button>
3446
</Card.Body>
3547
</Card>
3648
</Col>
3749
)
3850
}
39-
};
51+
};

0 commit comments

Comments
 (0)