diff --git a/components/Newsletter.tsx b/components/Newsletter.tsx new file mode 100644 index 000000000..f306f0d39 --- /dev/null +++ b/components/Newsletter.tsx @@ -0,0 +1,90 @@ +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/index.page.tsx b/pages/index.page.tsx index 7cc29673b..4dcc5991c 100644 --- a/pages/index.page.tsx +++ b/pages/index.page.tsx @@ -10,7 +10,6 @@ import TextTruncate from 'react-text-truncate'; import { Headline4 } from '~/components/Headlines'; import { GetStaticProps } from 'next'; - /* eslint-disable */ import axios from 'axios'; import ical from 'node-ical'; @@ -484,9 +483,8 @@ const Home = (props: any) => { {/* News & Blogs */} - -
-
+
+

Start contributing to JSON Schema

diff --git a/pages/newsletter/index.page.tsx b/pages/newsletter/index.page.tsx new file mode 100644 index 000000000..a5b8ca6e8 --- /dev/null +++ b/pages/newsletter/index.page.tsx @@ -0,0 +1,18 @@ +import React from 'react'; +import NewsletterForm from '~/components/Newsletter'; +import Layout from '~/components/Layout'; + +const index = () => { + return ( + <> + + + + + ); +}; + +export default index;