From cbb53b788bf71f2ef2062d7b48498aeda45a9f2b Mon Sep 17 00:00:00 2001 From: Phuoc Nguyen Date: Fri, 15 Nov 2019 19:20:47 +0700 Subject: [PATCH 1/2] Add footer --- client/DetailsLayout.jsx | 16 ++++---- client/Home.jsx | 46 +++++++++++++++------- client/Layout.jsx | 84 ++++++++++++++++++++++++++++++++++++++-- 3 files changed, 121 insertions(+), 25 deletions(-) diff --git a/client/DetailsLayout.jsx b/client/DetailsLayout.jsx index 2f6e1b8..953912e 100644 --- a/client/DetailsLayout.jsx +++ b/client/DetailsLayout.jsx @@ -6,14 +6,16 @@ import Layout from './Layout'; const DetailsLayout = ({ name, children }) => { return ( -
- Home -
/
-
{name}
-
+
+
+ Home +
/
+
{name}
+
-
- {children} +
+ {children} +
); diff --git a/client/Home.jsx b/client/Home.jsx index 7de1170..f01beaa 100644 --- a/client/Home.jsx +++ b/client/Home.jsx @@ -11,25 +11,41 @@ const Home = () => { return ( -

Layouts

- -
-
- - -

Sticky footer

- +
+
+ { + 'CSS LAYOUT'.split('').map((c, index) => { + return ( + c === ' ' + ?
+ :
{c}
+ ); + }) + }
+

a collection of popular layouts and patterns made with CSS

+
+

Layouts

-

Patterns

+
+
+ + +

Sticky footer

+ +
+
-
-
- - -

Centering

- +

Patterns

+ +
+
+ + +

Centering

+ +
diff --git a/client/Layout.jsx b/client/Layout.jsx index d8d4432..67c38b0 100644 --- a/client/Layout.jsx +++ b/client/Layout.jsx @@ -6,9 +6,87 @@ const Layout = ({ children }) => { }, []); return ( -
- {children} -
+ <> +
+ {children} +
+
+
+
+
Other cool things
+ +
+
+
© 2019 Nguyen Huu Phuoc and contributors
+ +
+
+
+ ); }; From cf2f8d61532772811cf2661c5c032ccc7ac84981 Mon Sep 17 00:00:00 2001 From: Phuoc Nguyen Date: Fri, 15 Nov 2019 20:10:31 +0700 Subject: [PATCH 2/2] Tweak header --- client/DetailsLayout.jsx | 8 +++----- client/Home.jsx | 2 +- client/layouts/StickyFooter.jsx | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/client/DetailsLayout.jsx b/client/DetailsLayout.jsx index 953912e..2c34b60 100644 --- a/client/DetailsLayout.jsx +++ b/client/DetailsLayout.jsx @@ -7,12 +7,10 @@ const DetailsLayout = ({ name, children }) => { return (
-
- Home -
/
-
{name}
+
+ CSS Layout
- +

{name}

{children}
diff --git a/client/Home.jsx b/client/Home.jsx index f01beaa..d2c7434 100644 --- a/client/Home.jsx +++ b/client/Home.jsx @@ -18,7 +18,7 @@ const Home = () => { return ( c === ' ' ?
- :
{c}
+ :
{c}
); }) } diff --git a/client/layouts/StickyFooter.jsx b/client/layouts/StickyFooter.jsx index c26ed41..8126a5f 100644 --- a/client/layouts/StickyFooter.jsx +++ b/client/layouts/StickyFooter.jsx @@ -11,7 +11,7 @@ const StickyFooter = () => { return (
- The footer is always sticky at the bottom if the main content is short. + The footer always sticks to the bottom if the main content is short.