diff --git a/client/components/Product.tsx b/client/components/Product.tsx new file mode 100644 index 0000000..b20e53d --- /dev/null +++ b/client/components/Product.tsx @@ -0,0 +1,27 @@ +/** + * A collection of popular layouts and patterns made with CSS (https://csslayout.io) + * (c) 2019 - 2020 Nguyen Huu Phuoc + */ + +import * as React from 'react'; + +import './product.css'; +import ProductModel from '../constants/ProductModel'; +import slug from '../helpers/slug'; + +interface ProductProps { + product: ProductModel; +} + +const Product: React.FC = ({ product }) => { + return ( +
+ + {`${product.name} +
{product.description}
+
+
+ ); +}; + +export default Product; diff --git a/client/components/product.css b/client/components/product.css new file mode 100644 index 0000000..cfa8ca5 --- /dev/null +++ b/client/components/product.css @@ -0,0 +1,22 @@ +/** + * A collection of popular layouts and patterns made with CSS (https://csslayout.io) + * (c) 2019 - 2020 Nguyen Huu Phuoc + */ + +.product { + border: 1px solid rgba(0, 0, 0, .3); + border-radius: 0.5rem; + margin: 1rem 0; + overflow: hidden; +} +.product a { + text-decoration: none; +} +.product__logo { + height: auto; + width: 100%; +} +.product__desc { + padding: 0.5rem; + text-align: center; +} \ No newline at end of file diff --git a/client/constants/ProductList.ts b/client/constants/ProductList.ts new file mode 100644 index 0000000..f30fe90 --- /dev/null +++ b/client/constants/ProductList.ts @@ -0,0 +1,60 @@ +import ProductModel from './ProductModel'; + +const ProductList: ProductModel[] = [ + { + name: 'Blur Page', + url: 'https://blur.page', + description: 'A browser extension to hide sensitive information on a web page', + themeColor: '#4e7fb8', + }, + { + name: 'Form Validation', + url: 'https://formvalidation.io', + description: 'The best validation library for JavaScript', + themeColor: '#014ba6', + }, + { + name: 'React PDF Viewer', + url: 'https://react-pdf-viewer.dev', + description: 'A React component to view a PDF document', + themeColor: '#fb6303', + }, + { + name: '1 LOC', + url: 'https://1loc.dev', + description: 'Favorite JavaScript utilities in single line of code', + themeColor: '#000200', + }, + { + name: 'CSS Layout', + url: 'https://csslayout.io', + description: 'A collection of popular layouts and patterns made with CSS', + themeColor: '#e7d900', + }, + { + name: 'Front-end Tips', + url: 'https://getfrontend.tips', + description: 'Super tiny, quick tips, tricks and best practices of front-end development', + themeColor: '#2e2c74', + }, + { + name: 'HTML DOM', + url: 'https://htmldom.dev', + description: 'How to manage HTML DOM with vanilla JavaScript', + themeColor: '#5b5d8a', + }, + { + name: 'Responsive Design Patterns', + url: 'https://responsive.page', + description: 'A collection of patterns to create a responsive web page', + themeColor: '#43246d', + }, + { + name: 'this VS that', + url: 'https://thisthat.dev', + description: 'The differences between _ and _ in the front-end development', + themeColor: '#414293', + }, +]; + +export { ProductList }; diff --git a/client/constants/ProductModel.ts b/client/constants/ProductModel.ts new file mode 100644 index 0000000..1087385 --- /dev/null +++ b/client/constants/ProductModel.ts @@ -0,0 +1,6 @@ +export default interface ProductModel { + name: string; + url: string; + description: string; + themeColor: string; +} diff --git a/client/index.css b/client/index.css index 0b4c020..47f2f2d 100644 --- a/client/index.css +++ b/client/index.css @@ -28,10 +28,24 @@ code { max-width: 64rem; padding: 0 1rem; } +.content { + display: flex; +} .main { - margin: 4rem 0; + flex: 1; + overflow: auto; +} +.sidebar { + display: none; } +/* Sidebar */ +.sidebar__inner { + position: sticky; + top: 1rem; +} + +/* Hero */ .hero { background: var(--background-color); display: flex; @@ -58,4 +72,24 @@ code { font-size: 2rem; margin: 2rem 0; text-align: center; +} + +/* Responsive */ +@media (min-width: 640px) { + .sidebar { + display: block; + flex: 0 0 10rem; + margin-left: 0.5rem; + } +} +@media (min-width: 768px) { + .sidebar { + flex-basis: 12rem; + } +} +@media (min-width: 1024px) { + .sidebar { + flex-basis: 16rem; + margin-left: 1rem; + } } \ No newline at end of file diff --git a/client/pages/ExplorePage.tsx b/client/pages/ExplorePage.tsx index bd0440c..d84296a 100644 --- a/client/pages/ExplorePage.tsx +++ b/client/pages/ExplorePage.tsx @@ -9,7 +9,9 @@ import { Helmet } from 'react-helmet'; import Ad from '../components/Ad'; import CoverCard from '../components/CoverCard'; import Heading from '../components/Heading'; +import Product from '../components/Product'; import Pattern from '../constants/Pattern'; +import { ProductList } from '../constants/ProductList'; import useDocumentTitle from '../hooks/useDocumentTitle'; import Layout from '../layouts/Layout'; import './explorePage.css'; @@ -32,133 +34,144 @@ const ExplorePage = () => {
- +
+
+
+ -
- +
+ + + + + + + + + +
+
-
- - - - - - - - - +
+ + +
+ + + + + + + + + + + + + + +
+
+ +
+ + +
+ + + + + + + + + + + + + + + + +
+
+ +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ + +
+ + + + + + + + + +
+
+
+ +
+
+ + { + ProductList.map(product => ) + } +
- - -
- - -
- - - - - - - - - - - - - - -
-
- -
- - -
- - - - - - - - - - - - - - - - -
-
- -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
- - -
- - - - - - - - - -
-
+
); diff --git a/public/assets/1-loc.png b/public/assets/1-loc.png new file mode 100644 index 0000000..9ef27e3 Binary files /dev/null and b/public/assets/1-loc.png differ diff --git a/public/assets/blur-page.png b/public/assets/blur-page.png new file mode 100644 index 0000000..351f1da Binary files /dev/null and b/public/assets/blur-page.png differ diff --git a/public/assets/css-layout.png b/public/assets/css-layout.png new file mode 100644 index 0000000..db55d23 Binary files /dev/null and b/public/assets/css-layout.png differ diff --git a/public/assets/form-validation.png b/public/assets/form-validation.png new file mode 100644 index 0000000..43d5551 Binary files /dev/null and b/public/assets/form-validation.png differ diff --git a/public/assets/front-end-tips.png b/public/assets/front-end-tips.png new file mode 100644 index 0000000..3868cca Binary files /dev/null and b/public/assets/front-end-tips.png differ diff --git a/public/assets/html-dom.png b/public/assets/html-dom.png new file mode 100644 index 0000000..e275755 Binary files /dev/null and b/public/assets/html-dom.png differ diff --git a/public/assets/react-pdf-viewer.png b/public/assets/react-pdf-viewer.png new file mode 100644 index 0000000..678c006 Binary files /dev/null and b/public/assets/react-pdf-viewer.png differ diff --git a/public/assets/responsive-design-patterns.png b/public/assets/responsive-design-patterns.png new file mode 100644 index 0000000..c69dc3f Binary files /dev/null and b/public/assets/responsive-design-patterns.png differ diff --git a/public/assets/this-vs-that.png b/public/assets/this-vs-that.png new file mode 100644 index 0000000..6aecd2d Binary files /dev/null and b/public/assets/this-vs-that.png differ