Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some styling on summary and amend ask endpoint #60

Merged
merged 1 commit into from
Oct 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/Menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const Menu = ({ changeTopic, toggleMenu, cssImg }) => {
</li>
</Link>
<Link
to="/askanon"
to="/ask"
style={{ textDecoration: 'none' }}
onClick={() => {
toggleMenu();
Expand Down
19 changes: 11 additions & 8 deletions src/components/Summary.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,27 @@ const getSnippetTitle = (json, voteId) => {
}

const Summary= ({snippetUpvotes, snippetDownvotes}) => {
const upVotesList = snippetUpvotes.map(voteId => <li className="ma2">{getSnippetTitle(policies, voteId)}</li>)
const downVotesList = snippetDownvotes.map(voteId => <li>{getSnippetTitle(policies, voteId)}</li>)
const upVotesList = snippetUpvotes.map(voteId => <li className="ma3">{getSnippetTitle(policies, voteId)}</li>)
const downVotesList = snippetDownvotes.map(voteId => <li className="ma3">{getSnippetTitle(policies, voteId)}</li>)
return (
<div className="">
<h1 className="tc ma0 mb3">Summary</h1>
<section className="w-50 dib v-top">
<IconSnippet cssImg="megaphone" />
<ul className="list pa0 tc summary__ul ma0 summary--margin"> {upVotesList} </ul>
<ul className="list pa0 tc summary__ul summary--margin"> {upVotesList} </ul>
</section>
<section className="w-50 dib v-top">
<IconSnippet cssImg="bin" />
<ul className="list pa0 tc summary__ul"> {downVotesList} </ul>
<ul className="list pa0 tc summary__ul summary--margin"> {downVotesList} </ul>
</section>
<section className="ba bw1 b--gold br2 bg-white dib pa2 w-100 summary--margin">
<h3 className="ma2">What's next</h3>
<a href="#" className="db ma2">Link to cool meetup</a>
<a href="#" className="db ma2">Link to awesome grassroots movement</a>
<a href="#" className="db ma2">Link to volunteering opportunities</a>
<h3 className="ml3">What's next?</h3>
<ul className="pointer">
<li><a href="#" className="db ma2 black">Link to cool meetup</a></li>
<li><a href="#" className="db ma2 black">Link to awesome grassroots movement</a></li>
<li><a href="#" className="db ma2 black">Link to volunteering opportunities</a></li>
<li><a href="/ask" className="db ma2 black">Ask an MP</a></li>
</ul>
</section>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/css/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ body {

/*summary*/
.summary__ul {
font-size: calc(0.6rem + 0.7vw);
font-size: calc(0.8rem + 0.4vw);
}
.summary--margin {
margin-top: 2vw;
Expand Down