From 2f18e84964e9b847fe570c88e8c9a121b1118f16 Mon Sep 17 00:00:00 2001 From: Phuoc Nguyen Date: Fri, 10 Jan 2020 13:30:40 +0700 Subject: [PATCH] Add fading long section pattern --- client/constants/Pattern.ts | 1 + client/pages/ExplorePage.tsx | 1 + client/patterns/fading-long-section/Cover.tsx | 58 +++++++++++ .../patterns/fading-long-section/Details.tsx | 97 +++++++++++++++++++ public/sitemap.xml | 1 + 5 files changed, 158 insertions(+) create mode 100644 client/patterns/fading-long-section/Cover.tsx create mode 100644 client/patterns/fading-long-section/Details.tsx diff --git a/client/constants/Pattern.ts b/client/constants/Pattern.ts index 8b82b66..cbb701a 100644 --- a/client/constants/Pattern.ts +++ b/client/constants/Pattern.ts @@ -28,6 +28,7 @@ enum Pattern { DropArea = 'Drop area', DropCap = 'Drop cap', Dropdown = 'Dropdown', + FadingLongSection = 'Fading long section', FeatureComparison = 'Feature comparison', FeatureList = 'Feature list', FixedAtCorner = 'Fixed at corner', diff --git a/client/pages/ExplorePage.tsx b/client/pages/ExplorePage.tsx index 6967188..b1cd495 100644 --- a/client/pages/ExplorePage.tsx +++ b/client/pages/ExplorePage.tsx @@ -160,6 +160,7 @@ const ExplorePage = () => { + diff --git a/client/patterns/fading-long-section/Cover.tsx b/client/patterns/fading-long-section/Cover.tsx new file mode 100644 index 0000000..c310ab0 --- /dev/null +++ b/client/patterns/fading-long-section/Cover.tsx @@ -0,0 +1,58 @@ +/** + * A collection of popular layouts and patterns made with CSS (https://csslayout.io) + * (c) 2019 - 2020 Nguyen Huu Phuoc + */ + +import React from 'react'; + +import random from '../../helpers/random'; +import Frame from '../../placeholders/Frame'; +import Line from '../../placeholders/Line'; + +const Cover: React.FC<{}> = () => { + return ( + +
+
+ { + Array(20).fill(0).map((_, index) => { + return ( +
+ +
+ ); + }) + } +
+
+
+ + ); +}; + +export default Cover; diff --git a/client/patterns/fading-long-section/Details.tsx b/client/patterns/fading-long-section/Details.tsx new file mode 100644 index 0000000..e16e9be --- /dev/null +++ b/client/patterns/fading-long-section/Details.tsx @@ -0,0 +1,97 @@ +/** + * A collection of popular layouts and patterns made with CSS (https://csslayout.io) + * (c) 2019 - 2020 Nguyen Huu Phuoc + */ + +import React from 'react'; +import { Helmet } from 'react-helmet'; + +import DetailsLayout from '../../layouts/DetailsLayout'; +import Block from '../../placeholders/Block'; +import BrowserFrame from '../../placeholders/BrowserFrame'; + +const Details: React.FC<{}> = () => { + return ( + + + + + +
+
+ Fading a long section to indicate there is more content. +
+ +
+
+ +
+ +
+
+
+ )} + source={` +
+ +
+ ... +
+ + +
+
+`} + /> +
+ + ); +}; + +export default Details; diff --git a/public/sitemap.xml b/public/sitemap.xml index 9d0caff..f2d9488 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -24,6 +24,7 @@ https://csslayout.io/patterns/drop-area https://csslayout.io/patterns/drop-cap https://csslayout.io/patterns/dropdown + https://csslayout.io/patterns/fading-long-section https://csslayout.io/patterns/feature-comparison https://csslayout.io/patterns/feature-list https://csslayout.io/patterns/fixed-at-corner