Skip to content

Commit 66f2931

Browse files
committed
Merge changes from original repo
Merge branch 'master' of github.com:ssolmonson/advocacy-maps into master
2 parents 9b30d86 + d0137fd commit 66f2931

25 files changed

+429
-1093
lines changed

components/Layout/Layout.js

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ import Head from "next/head";
22
import { NavBar } from "../index";
33
import styles from "./Layout.module.css";
44

5-
export default function Layout({
5+
// Outer HTML for single- or multi-column layouts
6+
export const LayoutWrapper = function({
67
pageTitle,
78
children,
8-
title = "Easy To Do Good",
9+
title
910
}) {
1011
return (
1112
<div className={styles.container}>
@@ -17,10 +18,27 @@ export default function Layout({
1718
</Head>
1819
<NavBar pageTitle={pageTitle}></NavBar>
1920
<div className={styles["content-container"]}>
20-
<section className={styles.content}>{children}</section>
21+
{children}
2122
</div>
2223

2324
<footer className={styles.footer}>Powered by Democracy</footer>
2425
</div>
2526
);
2627
}
28+
29+
// The default layout is single-column and its content
30+
// gets wrapped in a <section> which has a white background
31+
export default function Layout({
32+
pageTitle,
33+
children,
34+
title = "Easy To Do Good",
35+
}) {
36+
return (
37+
<LayoutWrapper
38+
pageTitle={pageTitle}
39+
title={title}
40+
>
41+
<section className={styles["content-article"]}>{children}</section>
42+
</LayoutWrapper>
43+
);
44+
}

components/Layout/Layout.module.css

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,21 @@
3030
justify-content: center;
3131
background-color: #e2e1d2;
3232
min-height: 50vh;
33+
padding: 2rem;
3334
}
3435

3536
.content {
3637
margin: 20px;
3738
padding: 20px;
38-
width: 50vw;
39-
background-color: #FFFFFF;
40-
border-radius: 5px;
39+
width: 90vw;
40+
background-color: transparent;
41+
}
42+
43+
.content-article {
44+
background-color: #FFFFFF;
45+
border-radius: 5px;
4146
box-shadow: 0 8px 6px -6px grey;
47+
margin: 0;
48+
padding: 1rem;
4249
}
50+

0 commit comments

Comments
 (0)