Skip to content
This repository was archived by the owner on Jun 10, 2019. It is now read-only.

Commit e2e3958

Browse files
authored
Merge pull request #993 from charlessipe/display-scholarship-data
Display scholarship data
2 parents c831a87 + 86a5573 commit e2e3958

File tree

2 files changed

+10
-27
lines changed

2 files changed

+10
-27
lines changed
Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
.scholarshipPreviewLink {
2-
text-decoration: none;
3-
font-family: "Noto Serif", sans-serif;
4-
color: rgb(71, 86, 107);
5-
}
6-
71
.preview {
82
position: relative;
93
background: rgb(255, 255, 255);
@@ -14,15 +8,6 @@
148
border: 1px solid rgba(34,36,38,.15);
159
}
1610

17-
.preview:hover {
18-
-webkit-box-shadow: 0 14px 28px rgba(0,0,0,0.25);
19-
box-shadow: 0 14px 28px rgba(0,0,0,0.25);
20-
}
21-
22-
.preview:hover > h6::after {
23-
background-color: rgb(65, 164, 192);
24-
}
25-
2611
.previewHeader6 {
2712
display: flex;
2813
letter-spacing: .05em;
@@ -32,7 +17,11 @@
3217
flex-grow: 1;
3318
height: 3px;
3419
content: '\a0';
35-
background-color: rgba(0, 0, 0, 0.25);
20+
background-color: rgb(65, 164, 192);
3621
align-self: center;
3722
margin: 0 10px 5px 10px;
3823
}
24+
25+
.buttonContainer {
26+
text-align: center;
27+
}

src/scenes/home/scholarship/preview/preview.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
11
import React, { Component } from 'react';
2+
import LinkButton from 'shared/components/linkButton/linkButton';
23
import PropTypes from 'prop-types';
34
import styles from './preview.css';
45

56
class Preview extends Component {
6-
snip = (description) => {
7-
const str = `${description.substr(0, 300)}...`;
8-
return str;
9-
}
10-
117
render() {
128
const { scholarship } = this.props;
139
return (
14-
<a className={styles.scholarshipPreviewLink} href={`scholarships/${scholarship.id}/apply`}>
15-
<div className={styles.preview}>
16-
<h6 className={styles.previewHeader6}>{scholarship.name}</h6>
17-
<span> {this.snip(scholarship.description)} </span>
18-
</div>
19-
</a>
10+
<div className={styles.preview}>
11+
<h6 className={styles.previewHeader6}>{scholarship.name}</h6>
12+
<div className={styles.buttonContainer}><LinkButton link={`scholarships/${scholarship.id}/apply`} text="Read More" theme="blue" scrollLink /></div>
13+
</div>
2014
);
2115
}
2216
}

0 commit comments

Comments
 (0)