From f305dd9ac162d9185f249a842f7813fa098ff188 Mon Sep 17 00:00:00 2001 From: Phuoc Nguyen Date: Sun, 1 Dec 2019 14:00:09 +0700 Subject: [PATCH] Add subscribe form --- client/components/RelatedPatterns.tsx | 2 +- client/layouts/Footer.tsx | 23 +++++---- client/layouts/Layout.tsx | 65 ------------------------- client/layouts/SubscribeForm.tsx | 49 +++++++++++++++++++ client/pages/HomePage.tsx | 7 ++- client/pages/MadeOf.tsx | 69 +++++++++++++++++++++++++++ client/pages/home.css | 4 +- 7 files changed, 139 insertions(+), 80 deletions(-) create mode 100644 client/layouts/SubscribeForm.tsx create mode 100644 client/pages/MadeOf.tsx diff --git a/client/components/RelatedPatterns.tsx b/client/components/RelatedPatterns.tsx index 718f6f4..9dd4a0c 100644 --- a/client/components/RelatedPatterns.tsx +++ b/client/components/RelatedPatterns.tsx @@ -13,7 +13,7 @@ const RelatedPatterns: React.FC = ({ patterns }) => {
-
+
{ patterns.map((pattern) => ) } diff --git a/client/layouts/Footer.tsx b/client/layouts/Footer.tsx index e9caff6..a170007 100644 --- a/client/layouts/Footer.tsx +++ b/client/layouts/Footer.tsx @@ -1,24 +1,23 @@ import React from 'react'; +import SubscribeForm from './SubscribeForm'; + const Footer: React.FC<{}> = () => { return (
    = () => { { -
      +
      • css-layout, @@ -86,12 +85,10 @@ const Footer: React.FC<{}> = () => {
); diff --git a/client/layouts/Layout.tsx b/client/layouts/Layout.tsx index 5370ac1..af02791 100644 --- a/client/layouts/Layout.tsx +++ b/client/layouts/Layout.tsx @@ -1,6 +1,5 @@ import React, { useEffect } from 'react'; -import SampleCode from '../components/SampleCode'; import Footer from './Footer'; const Layout: React.FC<{}> = ({ children }) => { @@ -12,70 +11,6 @@ const Layout: React.FC<{}> = ({ children }) => { ); }; diff --git a/client/layouts/SubscribeForm.tsx b/client/layouts/SubscribeForm.tsx new file mode 100644 index 0000000..5ea6280 --- /dev/null +++ b/client/layouts/SubscribeForm.tsx @@ -0,0 +1,49 @@ +import React from 'react'; + +const SubscribeForm: React.FC<{}> = () => { + return ( +
+ + + +
+ ); +}; + +export default SubscribeForm; diff --git a/client/pages/HomePage.tsx b/client/pages/HomePage.tsx index 5aa37b7..486f0a7 100644 --- a/client/pages/HomePage.tsx +++ b/client/pages/HomePage.tsx @@ -7,6 +7,7 @@ import CoverCard from '../components/CoverCard'; import Pattern from '../constants/Pattern'; import useDocumentTitle from '../hooks/useDocumentTitle'; import Layout from '../layouts/Layout'; +import MadeOf from './MadeOf'; const HomePage = () => { useDocumentTitle('CSS Layout'); @@ -16,7 +17,7 @@ const HomePage = () => {
@@ -142,7 +143,7 @@ const HomePage = () => {
-
+
{
+ +
); diff --git a/client/pages/MadeOf.tsx b/client/pages/MadeOf.tsx new file mode 100644 index 0000000..3ddb837 --- /dev/null +++ b/client/pages/MadeOf.tsx @@ -0,0 +1,69 @@ +import React from 'react'; + +import SampleCode from '../components/SampleCode'; + +const MadeOf: React.FC<{}> = () => { + return ( +
+
+ How it's made +
+
+ lint(r)) /* tslint */ + .then((r) => lazyLoad(r)) /* @loadable/component */ + .then((r) => optimizeAndBundle(r)) /* webpack */ + .then((r) => exportHtml(r)) /* react-snap */ + .then((r) => deploy(r)) /* Netlify */ + .then((r) => { + expect(r).is(scalableCode); + expect(r).is(superFastWebsite); + expect(r).is(seoFriendly); + }) +`} + /> +
+ .finally( + () => + { + + + /* Give me 1 Github star here */ + + + }) 🎉 +
+
+
+ ); +}; + +export default MadeOf; diff --git a/client/pages/home.css b/client/pages/home.css index 9f0f776..1e64bcc 100644 --- a/client/pages/home.css +++ b/client/pages/home.css @@ -1,5 +1,5 @@ .home-cards { - animation: slide 60s linear infinite; + animation: slide 40s linear infinite; } @keyframes slide{ @@ -7,6 +7,6 @@ transform: translate3d(0, 0, 0); } 100% { - transform: translate3d(0, -600px, 0); + transform: translate3d(0, -500px, 0); } }