diff --git a/client/components/Heading.tsx b/client/components/Heading.tsx index f267470..7df36a5 100644 --- a/client/components/Heading.tsx +++ b/client/components/Heading.tsx @@ -3,7 +3,9 @@ * (c) 2019 - 2020 Nguyen Huu Phuoc */ -import React from 'react'; +import * as React from 'react'; + +import './heading.css'; interface HeadingProps { title: string; @@ -11,25 +13,7 @@ interface HeadingProps { const Heading: React.FC = ({ title }) => { return ( -
-

- {title} -

-
+

{title}

); }; diff --git a/client/components/heading.css b/client/components/heading.css new file mode 100644 index 0000000..0cd9a45 --- /dev/null +++ b/client/components/heading.css @@ -0,0 +1,18 @@ +/** + * A collection of popular layouts and patterns made with CSS (https://csslayout.io) + * (c) 2019 - 2020 Nguyen Huu Phuoc + */ + +.heading { + display: grid; + font-size: 2rem; + grid-template-columns: 1fr auto 1fr; + grid-gap: 1rem; + text-align: center; +} +.heading::before, +.heading::after { + align-self: center; + border-top: 0.25rem double var(--text-color); + content: ''; +} diff --git a/client/index.css b/client/index.css index 87bbabd..0b4c020 100644 --- a/client/index.css +++ b/client/index.css @@ -18,6 +18,10 @@ a { text-decoration: none; } +code { + font-family: 'Source Code Pro', monospace; +} + /* Layout */ .container { margin: 0 auto; @@ -28,16 +32,30 @@ a { margin: 4rem 0; } -.hljs, code { - font-family: 'Source Code Pro', monospace; - font-size: 14px; +.hero { + background: var(--background-color); + display: flex; + justify-content: center; + padding-bottom: 2rem; } -.drop-cap:first-letter { - border: 2px solid; - float: left; - font-size: 64px; - font-weight: 700; - line-height: 1; - margin: 0 8px 0 0; - padding: 0 8px; +.hero__logo { + text-align: center; +} +.hero__logo img { + height: 16rem; + object-fit: cover; + width: 24rem; +} +.hreo__heading { + color: var(--text-color); + font-size: 3rem; + margin: 2rem 0; + text-align: center; + text-transform: capitalize; +} +.hero__subheading { + color: var(--text-color); + font-size: 2rem; + margin: 2rem 0; + text-align: center; } \ No newline at end of file diff --git a/client/pages/ExplorePage.tsx b/client/pages/ExplorePage.tsx index d021017..bd0440c 100644 --- a/client/pages/ExplorePage.tsx +++ b/client/pages/ExplorePage.tsx @@ -5,7 +5,6 @@ import React from 'react'; import { Helmet } from 'react-helmet'; -import { Link } from 'react-router-dom'; import Ad from '../components/Ad'; import CoverCard from '../components/CoverCard'; @@ -13,6 +12,7 @@ import Heading from '../components/Heading'; import Pattern from '../constants/Pattern'; import useDocumentTitle from '../hooks/useDocumentTitle'; import Layout from '../layouts/Layout'; +import './explorePage.css'; const ExplorePage = () => { useDocumentTitle('CSS Layout ∙ Explore'); @@ -24,42 +24,20 @@ const ExplorePage = () => { -
- - Home - - / - Explore -
-
-
-

- Here is the collection of {numPatterns} patterns -

-
- All covers you see in this page are made with CSS only. Inspect them! 🎉 -
- - +
+
+

Collection of {numPatterns} patterns

+

Covers are made with CSS only. Inspect them!

+
+ +
+
-
+
@@ -75,7 +53,7 @@ const ExplorePage = () => {
-
+
@@ -96,7 +74,7 @@ const ExplorePage = () => {
-
+
@@ -119,7 +97,7 @@ const ExplorePage = () => {
-
+
@@ -169,7 +147,7 @@ const ExplorePage = () => {
-
+
diff --git a/client/pages/HomePage.tsx b/client/pages/HomePage.tsx index c6f8028..5dccc8c 100644 --- a/client/pages/HomePage.tsx +++ b/client/pages/HomePage.tsx @@ -7,7 +7,7 @@ import * as React from 'react'; import { Helmet } from 'react-helmet'; import { Link } from 'react-router-dom'; -import './home.css'; +import './homePage.css'; import Ad from '../components/Ad'; import CoverCard from '../components/CoverCard'; @@ -31,10 +31,10 @@ const HomePage = () => { -
+
-
CSS Layout
-

Popular Layouts & patterns made with CSS

+
CSS Layout
+

Popular Layouts & patterns made with CSS

diff --git a/client/pages/explorePage.css b/client/pages/explorePage.css new file mode 100644 index 0000000..1f9901c --- /dev/null +++ b/client/pages/explorePage.css @@ -0,0 +1,9 @@ +/** + * A collection of popular layouts and patterns made with CSS (https://csslayout.io) + * (c) 2019 - 2020 Nguyen Huu Phuoc + */ + +.explore__collection { + display: flex; + flex-wrap: wrap; +} \ No newline at end of file diff --git a/client/pages/home.css b/client/pages/homePage.css similarity index 80% rename from client/pages/home.css rename to client/pages/homePage.css index 8e65c1a..edc4381 100644 --- a/client/pages/home.css +++ b/client/pages/homePage.css @@ -3,28 +3,6 @@ * (c) 2019 - 2020 Nguyen Huu Phuoc */ -.home__hero { - background: var(--background-color); - display: flex; - justify-content: center; - padding-bottom: 4rem; -} -.home__logo { - text-align: center; -} -.home__logo img { - height: 16rem; - object-fit: cover; - width: 24rem; -} -.home__heading { - color: var(--text-color); - font-size: 3rem; - margin: 0; - text-align: center; - text-transform: capitalize; -} - .home__features { display: flex; flex-wrap: wrap; @@ -52,6 +30,7 @@ overflow: hidden; position: relative; } + .home__overlay { align-items: center; display: flex;