diff --git a/client/constants/Pattern.ts b/client/constants/Pattern.ts index eca63d2..de96fd1 100644 --- a/client/constants/Pattern.ts +++ b/client/constants/Pattern.ts @@ -3,7 +3,7 @@ * (c) 2019 - 2021 Nguyen Huu Phuoc */ -enum Pattern { +enum Pattern { Accordion = 'Accordion', ArrowButtons = 'Arrow buttons', Avatar = 'Avatar', @@ -88,6 +88,7 @@ enum Pattern { Switch = 'Switch', Tab = 'Tab', Teardrop = 'Teardrop', + ThreeDimensionsCard = 'Three dimensions card', Timeline = 'Timeline', TogglePasswordVisibility = 'Toggle password visibility', Tooltip = 'Tooltip', diff --git a/client/pages/ExplorePage.tsx b/client/pages/ExplorePage.tsx index 73153ad..e514611 100644 --- a/client/pages/ExplorePage.tsx +++ b/client/pages/ExplorePage.tsx @@ -141,6 +141,7 @@ const ExplorePage = () => { + diff --git a/client/patterns/card/Details.tsx b/client/patterns/card/Details.tsx index a404daa..4d562eb 100644 --- a/client/patterns/card/Details.tsx +++ b/client/patterns/card/Details.tsx @@ -84,7 +84,7 @@ css={` - + ); }; diff --git a/client/patterns/stacked-cards/Details.tsx b/client/patterns/stacked-cards/Details.tsx index b1cb7a0..1aca6e0 100644 --- a/client/patterns/stacked-cards/Details.tsx +++ b/client/patterns/stacked-cards/Details.tsx @@ -103,7 +103,7 @@ css={` - + ); }; diff --git a/client/patterns/three-dimensions-card/Cover.tsx b/client/patterns/three-dimensions-card/Cover.tsx new file mode 100644 index 0000000..8ebd589 --- /dev/null +++ b/client/patterns/three-dimensions-card/Cover.tsx @@ -0,0 +1,60 @@ +/** + * A collection of popular layouts and patterns made with CSS (https://csslayout.io) + * (c) 2019 - 2021 Nguyen Huu Phuoc + */ + +import * as React from 'react'; + +import Frame from '../../placeholders/Frame'; + +const Cover: React.FC<{}> = () => { + return ( + +
+
+
+
+
+
+ + ); +}; + +export default Cover; diff --git a/client/patterns/three-dimensions-card/Details.tsx b/client/patterns/three-dimensions-card/Details.tsx new file mode 100644 index 0000000..7e9fa59 --- /dev/null +++ b/client/patterns/three-dimensions-card/Details.tsx @@ -0,0 +1,100 @@ +/** + * A collection of popular layouts and patterns made with CSS (https://csslayout.io) + * (c) 2019 - 2021 Nguyen Huu Phuoc + */ + +import * as React from 'react'; +import { Helmet } from 'react-helmet'; + +import RelatedPatterns from '../../components/RelatedPatterns'; +import Pattern from '../../constants/Pattern'; +import DetailsLayout from '../../layouts/DetailsLayout'; +import BrowserFrame from '../../placeholders/BrowserFrame'; +import './styles.css'; + +const Details: React.FC<{}> = () => { + return ( + + + + + +
+ + ... +
+`} +css={` +:root { + --three-dimensions-card-left-side-width: 1rem; +} + +.three-dimensions-card { + position: relative; +} + +/* The left side */ +.three-dimensions-card::before { + background: rgba(0, 0, 0, 0.3); + content: ''; + + /* Position */ + top: var(--three-dimensions-card-left-side-width); + left: 0px; + position: absolute; + transform: translate(-100%, 0) skewY(-45deg); + transform-origin: left top; + + /* Size */ + height: 100%; + width: var(--three-dimensions-card-left-side-width); +} + +/* The bottom side */ +.three-dimensions-card::after { + background: rgba(0, 0, 0, 0.3); + content: ''; + + /* Position */ + bottom: 0px; + left: 0px; + position: absolute; + transform: translate(0, 100%) skewX(-45deg); + transform-origin: left top; + + /* Size */ + height: var(--three-dimensions-card-left-side-width); + width: 100%; +} +`} + > +
+
+
+
+
+ +
+ + +
+ ); +}; + +export default Details; diff --git a/client/patterns/three-dimensions-card/styles.css b/client/patterns/three-dimensions-card/styles.css new file mode 100644 index 0000000..41f9ab6 --- /dev/null +++ b/client/patterns/three-dimensions-card/styles.css @@ -0,0 +1,46 @@ +/** + * A collection of popular layouts and patterns made with CSS (https://csslayout.io) + * (c) 2019 - 2021 Nguyen Huu Phuoc + */ + +:root { + --three-dimensions-card-left-side-width: 1rem; +} + +.three-dimensions-card { + position: relative; +} + +/* The left side */ +.three-dimensions-card::before { + background: rgba(0, 0, 0, 0.3); + content: ''; + + /* Position */ + top: var(--three-dimensions-card-left-side-width); + left: 0px; + position: absolute; + transform: translate(-100%, 0) skewY(-45deg); + transform-origin: left top; + + /* Size */ + height: 100%; + width: var(--three-dimensions-card-left-side-width); +} + +/* The bottom side */ +.three-dimensions-card::after { + background: rgba(0, 0, 0, 0.3); + content: ''; + + /* Position */ + bottom: 0px; + left: 0px; + position: absolute; + transform: translate(0, 100%) skewX(-45deg); + transform-origin: left top; + + /* Size */ + height: var(--three-dimensions-card-left-side-width); + width: 100%; +} diff --git a/public/sitemap.xml b/public/sitemap.xml index 76a5246..ae4d754 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -84,6 +84,7 @@ https://csslayout.io/patterns/switch https://csslayout.io/patterns/tab https://csslayout.io/patterns/teardrop + https://csslayout.io/patterns/three-dimensions-card https://csslayout.io/patterns/timeline https://csslayout.io/patterns/toggle-password-visibility https://csslayout.io/patterns/tooltip