From 6dd58a9c679cd2161c313a50ffd6143a3799449a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dandelion=20Man=C3=A9?= Date: Fri, 19 Apr 2019 17:10:38 +0300 Subject: [PATCH] Use aphrodite for HomePage.js styling (#1127) This is a minor refactor so that we use Aphrodite for styling on HomePage.js. It's not super consequential, but I want to switch to using Aphrodite more consistently in the codebase, so why not start here. Test plan: `yarn test` reveals no errors. `yarn start` launches a correctly styled frontend. I also used `build_static_site.sh` and the resultant site is also correctly styled. --- src/homepage/HomePage.js | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/homepage/HomePage.js b/src/homepage/HomePage.js index 6686f11..dd68f3c 100644 --- a/src/homepage/HomePage.js +++ b/src/homepage/HomePage.js @@ -4,6 +4,7 @@ import React from "react"; import type {Assets} from "../webutil/assets"; import Link from "../webutil/Link"; +import {StyleSheet, css} from "aphrodite/no-important"; export default class HomePage extends React.Component<{|+assets: Assets|}> { render() { @@ -23,16 +24,7 @@ export default class HomePage extends React.Component<{|+assets: Assets|}> { readme: "https://github.com/sourcecred/sourcecred/blob/master/README.md", }; return ( -
+

SourceCred vision

The open-source movement is amazing. @@ -203,3 +195,14 @@ function Dt(props) { function Dd(props) { return

{props.children}
; } + +const styles = StyleSheet.create({ + container: { + maxWidth: 900, + margin: "0 auto", + marginBottom: 200, + padding: "0 10px", + lineHeight: 1.5, + fontSize: 20, + }, +});