diff --git a/src/components/SectionHero.js b/src/components/SectionHero.js index c2233f6..6a631df 100644 --- a/src/components/SectionHero.js +++ b/src/components/SectionHero.js @@ -76,7 +76,8 @@ function SectionHero(props) { : page.layout == "policy_action" || page._type == "author" || page.stackbit_url_path == "/contributors" || - page.stackbit_url_path == "/newsletter" + page.stackbit_url_path == "/newsletter" || + page.stackbit_url_path == "/newsletter-new" ? theme.palette["secondary"].main : page.stackbit_url_path == "/donate" || page.stackbit_url_path == "/donate_new" @@ -102,7 +103,8 @@ function SectionHero(props) { : page.layout == "policy_action" || page._type == "author" || page.stackbit_url_path == "/contributors" || - page.stackbit_url_path == "/newsletter" + page.stackbit_url_path == "/newsletter" || + page.stackbit_url_path == "/newsletter-new" ? "#3C6E63" : page.stackbit_url_path == "/donate" || page.stackbit_url_path == "/donate_new" diff --git a/src/components/SectionSignUp.js b/src/components/SectionSignUp.js index 7d002f2..08aa872 100644 --- a/src/components/SectionSignUp.js +++ b/src/components/SectionSignUp.js @@ -3,10 +3,56 @@ import _ from "lodash"; // MUI imports import Box from "@mui/material/Box"; +import { makeStyles } from "@mui/styles"; + +const useStyles = makeStyles((theme) => ({ + header: { + fontFamily: "'Libre Baskerville', serif!important", + fontSize: "32px!important", + }, + grid: { + marginTop: "110px", + display: "grid", + gridGap: "20px", + gridTemplateColumns: "1fr 1fr", + [theme.breakpoints.down("sm")]: { + gridTemplateColumns: "1fr", + }, + marginRight: "-20px", + marginLeft: "-20px", + }, + gridTopic: { + border: "1px solid #DCDCDC", + padding: "20px", + fontFamily: "Lexend", + fontSize: "16px", + fontWeight: "300", + textAlign: "left", + display: "flex", + flexDirection: "column", + justifyContent: "space-between", + height: "325px", + }, + formContainer: { + display: "flex", + gap: "32px", + justifyContent: "center", + [theme.breakpoints.down("sm")]: { + marginRight: "-16px", + marginLeft: "-16px", + gap: "16px", + }, + }, +})); + +//Libre Baskerville export default function SectionSignUp(props) { + const classes = useStyles(); let section = _.get(props, "section", null); + console.log(section); + return (
@@ -18,55 +64,118 @@ export default function SectionSignUp(props) {
-

+

Join our newsletter on issues and ideas at the intersection of tech & democracy.

-

+

Tech Policy Press is a startup nonprofit media & community venture that will provoke debate and discussion at the intersection of technology and democracy.

+

+ We compile all the top stories from our website into a + newsletter format for you to receive directly to your email. + Please check out the preview newsletters within each topic + below and consider subscribing if you enjoy the content. +

-
-
-
- +
+
+
+
+ +
+ +
+ + +
+ +
- -
- - -
- + {section.topics && ( +
+ {section.topics.map((topic) => { + return ( + + ); + })} +
+ )}
Rule.required(), + }, + { + title: 'Description', + type: 'string', + name: 'description', + description: 'The topic description.', + validation: (Rule) => Rule.required(), + }, + { + title: 'Frequency', + type: 'string', + name: 'type', + options: { + list: [ + {title: 'Weekly', value: 'weekly'}, + {title: 'Monthly', value: 'monthly'}, + {title: 'Quarterly', value: 'quarterly'}, + ], + }, + }, + { + title: 'MailerLite ID', + type: 'string', + name: 'mailerlite_id', + description: 'ID of the topic in MailerLite.', + validation: (Rule) => Rule.required(), + }, + ], + preview: { + select: { + title: "name" + } + } + }; + \ No newline at end of file diff --git a/studio/schemas/section_sign_up.js b/studio/schemas/section_sign_up.js index 1f9184f..2a9d31c 100644 --- a/studio/schemas/section_sign_up.js +++ b/studio/schemas/section_sign_up.js @@ -11,6 +11,18 @@ export default { 'A unique identifier that can be used when linking to this section, if any. Must not contain whitespace.', validation: null, }, + { + type: 'array', + name: 'topics', + title: 'Topics', + description: 'Newsletter topics', + validation: null, + of: [ + { + type: 'newsletter_topic', + }, + ], + }, { type: "string", name: "type",