diff --git a/components/Newsletter.tsx b/components/Newsletter.tsx new file mode 100644 index 000000000..a8b34c207 --- /dev/null +++ b/components/Newsletter.tsx @@ -0,0 +1,92 @@ +import React, { useState } from 'react'; +import classnames from 'classnames'; + +interface NewsletterFormProps { + wrapperClassName?: string; + className?: string; + background?: 'white' | 'black'; +} + +const NewsletterForm: React.FC = ({ + wrapperClassName = '', + className = '', + background = 'white', +}) => { + const [email, setEmail] = useState(''); + const [username, setUsername] = useState(''); + const formAction = + 'https://json-schema.us8.list-manage.com/subscribe/post?u=ef8789d5789a6aff8113a701d&id=11103c248b&f_id=00822be0f0'; + + return ( +
+
+

+ Subscribe to our newsletter to receive news about Json Schema. +

+

+ We respect your inbox. No spam, promise ✌️ +

+
+ setUsername(e.target.value)} + /> + setEmail(e.target.value)} + /> + +
+ +
+
+
+
+ ); +}; + +export default NewsletterForm; diff --git a/pages/newsletter/index.page.tsx b/pages/newsletter/index.page.tsx new file mode 100644 index 000000000..c1f28b844 --- /dev/null +++ b/pages/newsletter/index.page.tsx @@ -0,0 +1,25 @@ +import React from 'react'; +import Head from 'next/head'; +import { getLayout } from '~/components/SiteLayout'; +import NewsletterForm from '~/components/Newsletter'; +import { SectionContext } from '~/context'; + +export default function StaticMarkdownPage() { + const newTitle = 'JSON Schema Newsletter'; + return ( + + + {newTitle} + +
+
+ +
+
+
+ ); +} +StaticMarkdownPage.getLayout = getLayout;