diff --git a/README.md b/README.md index 23c0a08..4b85acd 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ A collection of popular layouts and patterns made with CSS: * Good practices (coming soon) * Accessibility (coming soon) -![CSS Layout](/public/images/screenshot.png) +![CSS Layout](/public/assets/screenshot.png) ## Why diff --git a/client/constants/Pattern.ts b/client/constants/Pattern.ts index 5d06f3e..a0df96b 100644 --- a/client/constants/Pattern.ts +++ b/client/constants/Pattern.ts @@ -66,6 +66,7 @@ enum Pattern { TogglePasswordVisibility = 'Toggle password visibility', UploadButton = 'Upload button', ValidationIcon = 'Validation icon', + VideoBackground = 'Video background', Wizard = 'Wizard', } diff --git a/client/pages/ExplorePage.tsx b/client/pages/ExplorePage.tsx index cc4fe83..8b6a175 100644 --- a/client/pages/ExplorePage.tsx +++ b/client/pages/ExplorePage.tsx @@ -158,6 +158,7 @@ const ExplorePage = () => { + diff --git a/client/patterns/overlay-play-button/Details.tsx b/client/patterns/overlay-play-button/Details.tsx index 1539eae..9dad788 100644 --- a/client/patterns/overlay-play-button/Details.tsx +++ b/client/patterns/overlay-play-button/Details.tsx @@ -1,5 +1,7 @@ import React from 'react'; +import RelatedPatterns from '../../components/RelatedPatterns'; +import Pattern from '../../constants/Pattern'; import DetailsLayout from '../../layouts/DetailsLayout'; import BrowserFrame from '../../placeholders/BrowserFrame'; import Triangle from '../../placeholders/Triangle'; @@ -91,6 +93,7 @@ const Details: React.FC<{}> = () => { `} /> + ); }; diff --git a/client/patterns/video-background/Cover.tsx b/client/patterns/video-background/Cover.tsx new file mode 100644 index 0000000..6d3eb40 --- /dev/null +++ b/client/patterns/video-background/Cover.tsx @@ -0,0 +1,34 @@ +import React from 'react'; + +import Frame from '../../placeholders/Frame'; +import Line from '../../placeholders/Line'; + +const Cover: React.FC<{}> = () => { + return ( + +
+
+ +
+
+ +
+
+ +
+
+ + ); +}; + +export default Cover; diff --git a/client/patterns/video-background/Details.tsx b/client/patterns/video-background/Details.tsx new file mode 100644 index 0000000..aa080ed --- /dev/null +++ b/client/patterns/video-background/Details.tsx @@ -0,0 +1,141 @@ +import React from 'react'; + +import RelatedPatterns from '../../components/RelatedPatterns'; +import Pattern from '../../constants/Pattern'; +import DetailsLayout from '../../layouts/DetailsLayout'; +import Block from '../../placeholders/Block'; +import BrowserFrame from '../../placeholders/BrowserFrame'; + +const Details: React.FC<{}> = () => { + return ( + +
+
+ In this pattern, the video is displayed in the background. +
+ +
+
+
+ +
+
+ +
+
+
+
+ )} + source={` +
+ +
+
+ + +
+ ... +
+
+`} + /> + + +
+ ); +}; + +export default Details; diff --git a/client/placeholders/Block.tsx b/client/placeholders/Block.tsx index d153322..508a7af 100644 --- a/client/placeholders/Block.tsx +++ b/client/placeholders/Block.tsx @@ -3,12 +3,18 @@ import React from 'react'; import random from '../helpers/random'; interface BlockProps { + backgroundColor?: string; blockHeight?: number; justify?: string; numberOfBlocks?: number; } -const Block: React.FC = ({ justify = 'start', numberOfBlocks = 1, blockHeight = 4 }) => { +const Block: React.FC = ({ + backgroundColor = 'rgba(0, 0, 0, 0.3)', + blockHeight = 4, + justify = 'start', + numberOfBlocks = 1, +}) => { return (
= ({ justify = 'start', numberOfBlocks = 1, bl >
= () => { +interface LineProps { + backgroundColor?: string; +} + +const Line: React.FC = ({ + backgroundColor = 'rgba(0, 0, 0, 0.3)', +}) => { return (
https://csslayout.io/patterns/toggle-password-visibility https://csslayout.io/patterns/upload-button https://csslayout.io/patterns/validation-icon + https://csslayout.io/patterns/video-background https://csslayout.io/patterns/wizard \ No newline at end of file