Skip to content

Commit

Permalink
last batch of major fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-pr-p committed Jul 10, 2018
1 parent 5521da9 commit 1d789da
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 10 deletions.
7 changes: 6 additions & 1 deletion src/pages/candidates.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@ const alphabeticalSort = (a, b) => {
: a.toLowerCase() > b.toLowerCase() ? 1 : 0;
};

const lastWord = string => {
const list = string.split(" ");
return list[list.length - 1];
};

export const sortFunctions = {
state: candidates => sortBy(candidates, c => `${c.state}${c.district}`),
alphabetical: candidates => sortBy(candidates, c => c.lastName),
alphabetical: candidates => sortBy(candidates, c => lastWord(c.lastName)),
electionDate: candidates =>
sortBy(
sortBy(
Expand Down
12 changes: 8 additions & 4 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,16 +177,18 @@ const IndexPage = ({ data }) => {
fontSize: "42px"
}}
>
<div
<Link
to="/candidates"
style={{
lineHeight: "42px",
width: "100%",
marginBottom: 10,
textTransform: "uppercase"
textTransform: "uppercase",
display: "block"
}}
>
Our Candidates
</div>
</Link>
<Link
style={{ overflowX: "scroll", display: "block" }}
to="/candidates"
Expand All @@ -213,7 +215,9 @@ const IndexPage = ({ data }) => {
<div className="highlight-header extra-bold-m">
{jdHighlightHeader}
</div>
<div className="highlight-text medium-m">{jdHighlightText}</div>
<div className="highlight-text medium-m" style={{ fontSize: 15 }}>
{jdHighlightText}
</div>
</div>
</div>
</div>
Expand Down
11 changes: 11 additions & 0 deletions src/pages/issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ import Banner from "../components/Banner";
import Plank from "../components/Plank";
import "../style/issues.scss";

const lastWord = string => {
const list = string.split(" ");
return list[list.length - 1];
};

const IssuePageTemplate = ({
html: body,
frontmatter: {
Expand Down Expand Up @@ -48,6 +53,12 @@ const IssuePageTemplate = ({

{sections.map(({ title, icon, intro, planks }) => (
<div>
<div
id={lastWord(title).toLowerCase()}
name={lastWord(title).toLowerCase()}
style={{ marginTop: -100, display: "inline-block" }}
/>

<Divider />
<div className="policy-section-title-container">
<div className="icon-container">
Expand Down
2 changes: 1 addition & 1 deletion src/style/banner.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import "includes/includes";

.banner-container {
height: 550px;
height: 400px;
background-size: cover;
display: flex;
align-items: center;
Expand Down
6 changes: 4 additions & 2 deletions src/style/home-block.scss
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,12 @@
.highlight-container {
background-color: $jd-dark-blue;
max-width: 1040px;
width: 100%;
color: white;
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px;
justify-content: space-around;
padding: 30px;

.highlight-icon {
max-width: 150px;
Expand All @@ -236,6 +237,7 @@

.highlight-contents {
max-width: calc(100% - 180px);
width: calc(100% - 180px);

.highlight-header {
text-transform: uppercase;
Expand Down
4 changes: 2 additions & 2 deletions src/style/navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
display: block;
color: white;
text-transform: uppercase;
padding-left: 50px;
padding-right: 50px;
padding-left: 25px;
padding-right: 25px;
height: 100%;
display: flex;
justify-content: center;
Expand Down

0 comments on commit 1d789da

Please sign in to comment.