Add page sections to front page

This commit is contained in:
Jan Tuomi
2018-11-16 20:18:40 +02:00
parent 64151cec83
commit ee86bb2427
3 changed files with 18 additions and 10 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ body {
}
body {
padding: 0 1rem;
padding: 0;
margin: auto !important;
}
+1 -1
View File
@@ -1,5 +1,5 @@
.front-page {
display: flex;
flex-flow: row wrap;
flex-flow: column wrap;
justify-content: flex-start;
}
+16 -8
View File
@@ -7,6 +7,8 @@ import { StaticContext } from "../../server/StaticContext";
// @ts-ignore
import * as BeerImage from "../../assets/img/beer.jpeg";
import PageSection from "../../components/PageSection";
import { BackgroundColor as PageSectionColor } from "../../components/PageSection/PageSection";
interface FrontPageProps {
staticContext: StaticContext;
@@ -60,14 +62,20 @@ class FrontPage extends React.Component<FrontPageProps, FrontPageState> {
const { events } = this.state;
return (
<div className="front-page">
{ events.map(event => (
<Card
title={event.title}
text={event.description}
key={event.id}
image={BeerImage}
/>
))}
<PageSection backgroundColor={PageSectionColor.DarkBlue}>
{events.map(event => (
<Card
title={event.title}
text={event.description}
key={event.id}
image={BeerImage}
/>
))}
</PageSection>
<PageSection backgroundColor={PageSectionColor.White}>
Huumori huiskaus
</PageSection>
</div>
);
}