diff --git a/.babelrc b/.babelrc
index e070296..f9a34ac 100644
--- a/.babelrc
+++ b/.babelrc
@@ -3,7 +3,7 @@
"@loadable/babel-plugin",
["prismjs", {
"languages": ["css", "html", "javascript", "jsx", "tsx"],
- "theme": "twilight",
+ // "theme": "okaidia",
"css": true
}]
],
diff --git a/README.md b/README.md
index 55f6414..7b18808 100644
--- a/README.md
+++ b/README.md
@@ -7,9 +7,9 @@ A collection of popular layouts and patterns made with CSS:
* ๐No CSS hacks
* ๐Real use cases
* Good practices (coming soon)
-* Accessibility (coming soon)
+* Accessibility Support (coming soon)
-[](https://csslayout.io/)
+[](https://csslayout.io)
## Why
@@ -23,44 +23,26 @@ They are powered by modern CSS features such as flexbox and grid.
They are great starting points to be picked and customized easily for each specific need.
By composing them, you can have any possible layout that exists in the real life.
-The entire website is powered by
-
-~~~ javascript
-this
- .madeWith([react,typescript])
- .then(r => lint(tslint))
- .then(r => lazyLoad(@loadable/component))
- .then(r => optimizeAndBundle(webpack))
- .then(r => exportHtml(react-snap))
- .then(r => deploy(Netlify))
- .then(r => {
- expect(r).is(scalableCode);
- expect(r).is(superFastWebsite);
- expect(r).is(seoFriendly);
- })
- .finally(() => {/* Give me 1 star */}) ๐
-~~~
-
## Running it on local
- Clone the project:
-~~~ console
+```console
$ git clone https://github.com/phuoc-ng/csslayout
-~~~
+```
- Install the dependencies:
-~~~ console
+```console
$ cd csslayout
$ npm install
-~~~
+```
- Run it on the local:
-~~~ console
+```console
$ npm run dev-server
-~~~
+```
Visit http://localhost:1234 to see it in action.
@@ -70,9 +52,9 @@ PRs are welcomed. If you thing there are any missing useful layouts or patterns,
It's important to note that you should run the following command to lint the code:
-~~~ console
+```console
$ npm run lint
-~~~
+```
If there is any issue, it will be logged in the `tslint.log` file.
@@ -89,52 +71,17 @@ Be my friend on
You might be interested in my products:
-
+_Products_
+* [Blur Page - A browser extension to hide sensitive information on a web page](https://blur.page)
+* [Check Browsers Support - A browser extension to check browser compatibility without leaving your tab](https://checkbrowsers.support")
+* [Fake Numbers - Generate fake and valid numbers](https://fakenumbers.io)
+* [Form Validation - The best validation library for JavaScript](https://formvalidation.io)
+* [React PDF Viewer - A React component to view a PDF document](https://react-pdf-viewer.dev)
+
+_Resources_
+* [1LOC - Favorite JavaScript utilities in single line of code](https://1loc.dev)
+* [CSS Layout - A collection of popular layouts and patterns made with CSS](https://csslayout.io)
+* [HTML DOM - How to manage HTML DOM with vanilla JavaScript](https://htmldom.dev)
+* [Responsive Design Patterns - A collection of patterns to create a responsive web page](https://responsive.page)
+* [Super tiny, quick tips, tricks and best practices of front-end development](https://getfrontend.tips)
+* [this VS that - The differences between ___ and ___ in the front-end development](https://thisthat.dev)
diff --git a/client/App.tsx b/client/App.tsx
index ac222c5..11765c4 100644
--- a/client/App.tsx
+++ b/client/App.tsx
@@ -1,9 +1,9 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
-import React from 'react';
+import * as React from 'react';
import { BrowserRouter as Router, Route, Switch as RouteSwitch } from 'react-router-dom';
import './index.css';
diff --git a/client/components/Ad.tsx b/client/components/Ad.tsx
index e955ffa..0ba2a5b 100644
--- a/client/components/Ad.tsx
+++ b/client/components/Ad.tsx
@@ -1,17 +1,17 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
-import React, { useEffect, useRef } from 'react';
+import * as React from 'react';
import './ad.css';
const Ad: React.FC<{}> = () => {
- const containerRef = useRef(null);
+ const containerRef = React.useRef(null);
const source = 'https://cdn.carbonads.com/carbon.js?serve=CE7I6KQL&placement=csslayoutio';
- useEffect(() => {
+ React.useEffect(() => {
// Ignore if the code is reached in snapping mode
if (navigator.userAgent === 'ReactSnap') {
return;
diff --git a/client/components/CoverCard.tsx b/client/components/CoverCard.tsx
index 8ff1bbd..350e12d 100644
--- a/client/components/CoverCard.tsx
+++ b/client/components/CoverCard.tsx
@@ -1,6 +1,6 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
import * as React from 'react';
diff --git a/client/components/Heading.tsx b/client/components/Heading.tsx
index 7df36a5..f402640 100644
--- a/client/components/Heading.tsx
+++ b/client/components/Heading.tsx
@@ -1,6 +1,6 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
import * as React from 'react';
diff --git a/client/components/Product.tsx b/client/components/Product.tsx
index b20e53d..b430499 100644
--- a/client/components/Product.tsx
+++ b/client/components/Product.tsx
@@ -1,6 +1,6 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
import * as React from 'react';
diff --git a/client/components/RelatedPatterns.tsx b/client/components/RelatedPatterns.tsx
index 3c441a6..c403b3f 100644
--- a/client/components/RelatedPatterns.tsx
+++ b/client/components/RelatedPatterns.tsx
@@ -1,9 +1,9 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
-import React from 'react';
+import * as React from 'react';
import Pattern from '../constants/Pattern';
import CoverCard from './CoverCard';
diff --git a/client/components/SampleCode.tsx b/client/components/SampleCode.tsx
index 48a2f83..cafb366 100644
--- a/client/components/SampleCode.tsx
+++ b/client/components/SampleCode.tsx
@@ -1,6 +1,6 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
import * as React from 'react';
@@ -19,15 +19,6 @@ const SampleCode: React.FC = ({ code, fullHeight = false, lang
: (
);
diff --git a/client/components/ad.css b/client/components/ad.css
index 56bd52c..89b7ee0 100644
--- a/client/components/ad.css
+++ b/client/components/ad.css
@@ -1,6 +1,6 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
#carbonads {
diff --git a/client/components/coverCard.css b/client/components/coverCard.css
index bdf6c0f..2247ed7 100644
--- a/client/components/coverCard.css
+++ b/client/components/coverCard.css
@@ -1,17 +1,17 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
.cover {
align-items: center;
- color: var(--text-color);
+ color: var(--color-gray-9);
display: flex;
flex-direction: column;
justify-content: flex-start;
padding: 1rem;
text-decoration: none;
- width: 50%;
+ width: 7rem;
}
.cover__name {
font-weight: normal;
@@ -20,18 +20,8 @@
text-align: center;
}
-@media (min-width: 640px) {
- .cover {
- width: 25%;
- }
-}
@media (min-width: 768px) {
.cover {
- width: 20%;
+ width: 8rem;
}
}
-@media (min-width: 1024px) {
- .cover {
- width: 16.666666666666668%;
- }
-}
\ No newline at end of file
diff --git a/client/components/heading.css b/client/components/heading.css
index 0cd9a45..11077a6 100644
--- a/client/components/heading.css
+++ b/client/components/heading.css
@@ -1,9 +1,10 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
.heading {
+ color: var(--color-gray-9);
display: grid;
font-size: 2rem;
grid-template-columns: 1fr auto 1fr;
@@ -13,6 +14,6 @@
.heading::before,
.heading::after {
align-self: center;
- border-top: 0.25rem double var(--text-color);
+ border-top: 0.25rem double var(--color-gray-9);
content: '';
}
diff --git a/client/components/product.css b/client/components/product.css
index cfa8ca5..04bac91 100644
--- a/client/components/product.css
+++ b/client/components/product.css
@@ -1,6 +1,6 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
.product {
diff --git a/client/constants/Pattern.ts b/client/constants/Pattern.ts
index 24e1d8f..4a8484b 100644
--- a/client/constants/Pattern.ts
+++ b/client/constants/Pattern.ts
@@ -1,6 +1,6 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
enum Pattern {
diff --git a/client/constants/ProductList.ts b/client/constants/ProductList.ts
index 351ae48..ef4006a 100644
--- a/client/constants/ProductList.ts
+++ b/client/constants/ProductList.ts
@@ -1,3 +1,8 @@
+/**
+ * A collection of popular layouts and patterns made with CSS (https://csslayout.io)
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
+ */
+
import ProductModel from './ProductModel';
const ProductList: ProductModel[] = [
diff --git a/client/constants/ProductModel.ts b/client/constants/ProductModel.ts
index 1087385..fbb1b99 100644
--- a/client/constants/ProductModel.ts
+++ b/client/constants/ProductModel.ts
@@ -1,3 +1,8 @@
+/**
+ * A collection of popular layouts and patterns made with CSS (https://csslayout.io)
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
+ */
+
export default interface ProductModel {
name: string;
url: string;
diff --git a/client/helpers/chunk.ts b/client/helpers/chunk.ts
index a9fcf68..e90cfd5 100644
--- a/client/helpers/chunk.ts
+++ b/client/helpers/chunk.ts
@@ -1,6 +1,6 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
function chunk(arr: T[], size: number): T[][] {
diff --git a/client/helpers/highlight.ts b/client/helpers/highlight.ts
index 6378ef0..abd0271 100755
--- a/client/helpers/highlight.ts
+++ b/client/helpers/highlight.ts
@@ -1,6 +1,6 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
import Prism from 'prismjs';
diff --git a/client/helpers/random.ts b/client/helpers/random.ts
index 218a852..d1ca7fe 100644
--- a/client/helpers/random.ts
+++ b/client/helpers/random.ts
@@ -1,6 +1,6 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
const random = (min: number, max: number) => min + Math.round(Math.random() * (max - min));
diff --git a/client/helpers/randomFromArray.ts b/client/helpers/randomFromArray.ts
index 97a484e..af9da8c 100644
--- a/client/helpers/randomFromArray.ts
+++ b/client/helpers/randomFromArray.ts
@@ -1,6 +1,6 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
function randomFromArray(array: T[]): T {
diff --git a/client/helpers/randomIterms.ts b/client/helpers/randomIterms.ts
index 72d814a..c0a4813 100644
--- a/client/helpers/randomIterms.ts
+++ b/client/helpers/randomIterms.ts
@@ -1,6 +1,6 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
type Tuple = [number, T[]];
diff --git a/client/helpers/shuffe.ts b/client/helpers/shuffe.ts
index 5fcafe3..eb53299 100644
--- a/client/helpers/shuffe.ts
+++ b/client/helpers/shuffe.ts
@@ -1,6 +1,6 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
const shuffe = (array: number[]) => {
diff --git a/client/helpers/slug.ts b/client/helpers/slug.ts
index 5b71b1e..41fb445 100644
--- a/client/helpers/slug.ts
+++ b/client/helpers/slug.ts
@@ -1,6 +1,6 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
const slug = (item: string) => item.toLowerCase().split(' ').join('-');
diff --git a/client/hooks/useDocumentTitle.ts b/client/hooks/useDocumentTitle.ts
index 6d85055..aa373d6 100644
--- a/client/hooks/useDocumentTitle.ts
+++ b/client/hooks/useDocumentTitle.ts
@@ -1,12 +1,12 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
-import { useEffect } from 'react';
+import * as React from 'react';
const useDocumentTitle = (title: string) => {
- useEffect(() => {
+ React.useEffect(() => {
document.title = title;
}, [title]);
};
diff --git a/client/hooks/useInterval.ts b/client/hooks/useInterval.ts
index 3232a5e..7848f28 100644
--- a/client/hooks/useInterval.ts
+++ b/client/hooks/useInterval.ts
@@ -1,6 +1,6 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
import { useEffect } from 'react';
diff --git a/client/index.css b/client/index.css
index aa22d62..99e0e27 100644
--- a/client/index.css
+++ b/client/index.css
@@ -1,11 +1,15 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
:root {
--background-color: #e7d900;
- --text-color: #1e1d6e;
+ --color-blue-6: #2563EB;
+ --color-gray-2: #E5E7EB;
+ --color-gray-5: #6B7280;
+ --color-gray-8: #27272A;
+ --color-gray-9: #111827;
}
body {
font-family: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
@@ -22,6 +26,7 @@ a {
.container {
margin: 0 auto;
max-width: 64rem;
+ padding: 0 1rem;
}
.content {
display: flex;
@@ -43,34 +48,102 @@ a {
/* Hero */
.hero {
+ --current-background-color: var(--background-color);
background: var(--background-color);
display: flex;
justify-content: center;
- padding-bottom: 2rem;
+ padding-bottom: 1rem;
}
.hero__logo {
display: flex;
justify-content: center;
}
.hero__logo img {
- height: 16rem;
+ height: 12rem;
object-fit: cover;
- width: 24rem;
+ width: 20rem;
}
.hero__heading {
- color: var(--text-color);
- font-size: 3rem;
- margin: 2rem 0;
+ color: var(--color-gray-9);
+ font-size: 2rem;
+ line-height: 1.5;
text-align: center;
text-transform: capitalize;
}
.hero__subheading {
- color: var(--text-color);
- font-size: 2rem;
- margin: 2rem 0;
+ color: var(--color-gray-9);
+ font-size: 1.5rem;
+ line-height: 1.5;
text-align: center;
}
+/*
+Prism theme
+Credit to https://github.com/tailwindlabs/tailwindcss.com/blob/master/src/css/prism.css
+*/
+pre {
+ background: var(--color-gray-8);
+ border: none;
+ border-radius: 0px;
+ box-shadow: none;
+ color: #FFF;
+ font-family: "Source Code Pro", monospace;
+ font-size: 1.25rem;
+ height: 100%;
+ line-height: 1.5;
+ margin: 0px;
+ overflow: auto;
+ padding: 1rem;
+}
+
+.token.tag,
+.token.class-name,
+.token.selector,
+.token.selector .class,
+.token.function {
+ color: #E879F9;
+}
+
+.token.attr-name,
+.token.keyword,
+.token.rule,
+.token.operator,
+.token.pseudo-class,
+.token.important {
+ color: #22D3EE;
+}
+
+.token.attr-value,
+.token.class,
+.token.string,
+.token.number,
+.token.unit,
+.token.color {
+ color: #BEF264;
+}
+
+.token.punctuation,
+.token.module,
+.token.property {
+ color: #BAE6FD;
+}
+
+.token.atapply .token:not(.rule):not(.important) {
+ color: inherit;
+}
+
+.language-shell .token:not(.comment) {
+ color: inherit;
+}
+
+.language-css .token.function {
+ color: inherit;
+}
+
+.token.comment {
+ color: #A1A1AA;
+}
+
/* Responsive */
@media (min-width: 640px) {
.sidebar {
diff --git a/client/index.html b/client/index.html
index 7bc0488..f1ed7da 100644
--- a/client/index.html
+++ b/client/index.html
@@ -4,6 +4,19 @@
CSS layout
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/client/index.tsx b/client/index.tsx
index 8dc57f6..003af80 100644
--- a/client/index.tsx
+++ b/client/index.tsx
@@ -1,9 +1,9 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
-import React from 'react';
+import * as React from 'react';
import { hydrate, render } from 'react-dom';
import App from './App';
diff --git a/client/layouts/DetailsLayout.tsx b/client/layouts/DetailsLayout.tsx
index d7aa50d..78a1e69 100644
--- a/client/layouts/DetailsLayout.tsx
+++ b/client/layouts/DetailsLayout.tsx
@@ -1,6 +1,6 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
import * as React from 'react';
diff --git a/client/layouts/Footer.tsx b/client/layouts/Footer.tsx
index 7994613..caabde2 100644
--- a/client/layouts/Footer.tsx
+++ b/client/layouts/Footer.tsx
@@ -1,6 +1,6 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
import * as React from 'react';
diff --git a/client/layouts/Header.tsx b/client/layouts/Header.tsx
index 49f9379..aa1317c 100644
--- a/client/layouts/Header.tsx
+++ b/client/layouts/Header.tsx
@@ -1,6 +1,6 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
import * as React from 'react';
diff --git a/client/layouts/Layout.tsx b/client/layouts/Layout.tsx
index e028996..0633eb8 100644
--- a/client/layouts/Layout.tsx
+++ b/client/layouts/Layout.tsx
@@ -1,6 +1,6 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
import * as React from 'react';
diff --git a/client/layouts/footer.css b/client/layouts/footer.css
index 279d937..2457bdf 100644
--- a/client/layouts/footer.css
+++ b/client/layouts/footer.css
@@ -1,8 +1,14 @@
+/**
+ * A collection of popular layouts and patterns made with CSS (https://csslayout.io)
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
+ */
+
.footer {
- padding: 2rem 0 4rem 0;
+ padding: 2rem 0;
}
.footer__about {
- border-bottom: 1px solid var(--text-color);
+ border-bottom: 1px solid var(--color-gray-2);
+ color: var(--color-gray-9);
display: flex;
margin-bottom: 1rem;
padding-bottom: 1rem;
@@ -12,10 +18,9 @@
}
.footer__social {
margin-left: 0.5rem;
- color: var(--text-color);
+ color: var(--color-gray-5);
}
.footer__grid {
- display: flex;
margin-left: -1rem;
margin-right: -1rem;
}
@@ -33,5 +38,10 @@
margin: 0.25rem 0;
}
.footer__product a {
- color: var(--text-color);
+ color: var(--color-gray-5);
+}
+@media (min-width: 640px) {
+ .footer__grid {
+ display: flex;
+ }
}
\ No newline at end of file
diff --git a/client/layouts/header.css b/client/layouts/header.css
index d72aa4a..68b06d6 100644
--- a/client/layouts/header.css
+++ b/client/layouts/header.css
@@ -1,3 +1,8 @@
+/**
+ * A collection of popular layouts and patterns made with CSS (https://csslayout.io)
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
+ */
+
.header {
background-color: var(--background-color);
}
@@ -11,6 +16,6 @@
margin-right: auto;
}
.header__nav a {
- color: var(--text-color);
+ color: var(--color-gray-9);
margin-left: 1rem;
}
\ No newline at end of file
diff --git a/client/loaders/CoverLoader.tsx b/client/loaders/CoverLoader.tsx
index b8949e4..af6ee25 100644
--- a/client/loaders/CoverLoader.tsx
+++ b/client/loaders/CoverLoader.tsx
@@ -1,6 +1,6 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
import loadable, { LoadableComponent } from '@loadable/component';
diff --git a/client/loaders/DetailsLoader.tsx b/client/loaders/DetailsLoader.tsx
index 2c281f5..1657d98 100644
--- a/client/loaders/DetailsLoader.tsx
+++ b/client/loaders/DetailsLoader.tsx
@@ -1,10 +1,10 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
import loadable, { LoadableComponent } from '@loadable/component';
-import React from 'react';
+import * as React from 'react';
import './spinner.css';
diff --git a/client/loaders/spinner.css b/client/loaders/spinner.css
index bf22435..bc6cea3 100644
--- a/client/loaders/spinner.css
+++ b/client/loaders/spinner.css
@@ -1,6 +1,6 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
.spinner {
diff --git a/client/pages/ExplorePage.tsx b/client/pages/ExplorePage.tsx
index 318b0c8..22063a4 100644
--- a/client/pages/ExplorePage.tsx
+++ b/client/pages/ExplorePage.tsx
@@ -1,9 +1,9 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
-import React from 'react';
+import * as React from 'react';
import { Helmet } from 'react-helmet';
import Ad from '../components/Ad';
diff --git a/client/pages/HomePage.tsx b/client/pages/HomePage.tsx
index 7fd1bff..0eac96b 100644
--- a/client/pages/HomePage.tsx
+++ b/client/pages/HomePage.tsx
@@ -1,6 +1,6 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
import * as React from 'react';
@@ -40,22 +40,44 @@ const HomePage = () => {
-
Zero Dependencies
+
+
+ Zero Dependencies
+
-
No CSS Hacks
+
+
+ No CSS Hacks
+
-
Accessibility
+
+
Accessibility Support
soon
diff --git a/client/pages/PatternPage.tsx b/client/pages/PatternPage.tsx
index 1e25b86..5b6bcb8 100644
--- a/client/pages/PatternPage.tsx
+++ b/client/pages/PatternPage.tsx
@@ -1,9 +1,9 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
-import React from 'react';
+import * as React from 'react';
import Pattern from '../constants/Pattern';
import DetailsLoader from '../loaders/DetailsLoader';
diff --git a/client/pages/explorePage.css b/client/pages/explorePage.css
index 1f9901c..5f4b5a8 100644
--- a/client/pages/explorePage.css
+++ b/client/pages/explorePage.css
@@ -1,6 +1,6 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
.explore__collection {
diff --git a/client/pages/homePage.css b/client/pages/homePage.css
index edc4381..50504da 100644
--- a/client/pages/homePage.css
+++ b/client/pages/homePage.css
@@ -1,6 +1,6 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
.home__features {
@@ -10,19 +10,18 @@
max-width: 48rem;
}
.home__feature {
- padding: 2rem;
+ padding: 1rem;
text-align: center;
- width: 33.333%;
+ width: 50%;
}
-.home__feature:not(:nth-child(3n)) {
- border-right: 1px solid var(--text-color);
-}
-.home__feature:nth-child(-n+3) {
- border-bottom: 1px solid var(--text-color);
+.home__icon {
+ color: var(--color-blue-6);
+ margin-bottom: 1rem;
}
.home__title {
- font-size: 2rem;
- font-weight: 500;
+ color: var(--color-gray-5);
+ font-size: 1.5rem;
+ font-weight: 600;
}
.home__patterns {
@@ -44,6 +43,7 @@
z-index: 10;
}
.home__heading {
+ color: var(--color-gray-9);
font-size: 4rem;
font-weight: 600;
margin-bottom: 1rem;
@@ -51,17 +51,19 @@
.home__explore {
background-color: var(--background-color);
border-radius: 0.4rem;
- color: var(--text-color);
- font-size: 2rem;
+ color: var(--color-gray-9);
+ font-size: 1.5rem;
+ font-weight: 600;
padding: 1rem 2rem;
}
.home__sliders {
align-items: center;
display: flex;
+ flex-direction: column;
flex-wrap: nowrap;
+ height: 180rem;
opacity: 0.4;
- width: 192rem;
}
.home__slide {
animation: slide 20s linear infinite;
@@ -69,15 +71,23 @@
flex-wrap: wrap;
height: 60rem;
justify-content: center;
- width: 64rem;
+ width: 60rem;
will-change: transform;
}
+.home__soon {
+ background: #1e1d6e;
+ border-radius: 9999px;
+ color: #fff;
+ display: inline-block;
+ padding: 0.125rem 1rem;
+}
+
@keyframes slide {
from {
- transform: translateX(0);
+ transform: translateY(0);
}
to {
- transform: translateX(-100%);
+ transform: translateY(-100%);
}
}
diff --git a/client/patterns/accordion/Cover.tsx b/client/patterns/accordion/Cover.tsx
index 301108a..695a2ab 100644
--- a/client/patterns/accordion/Cover.tsx
+++ b/client/patterns/accordion/Cover.tsx
@@ -1,9 +1,9 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
-import React from 'react';
+import * as React from 'react';
import Frame from '../../placeholders/Frame';
import Line from '../../placeholders/Line';
diff --git a/client/patterns/accordion/Details.tsx b/client/patterns/accordion/Details.tsx
index 0903b21..ca70dc2 100644
--- a/client/patterns/accordion/Details.tsx
+++ b/client/patterns/accordion/Details.tsx
@@ -1,9 +1,9 @@
/**
* A collection of popular layouts and patterns made with CSS (https://csslayout.io)
- * (c) 2019 - 2020 Nguyen Huu Phuoc
+ * (c) 2019 - 2021 Nguyen Huu Phuoc
*/
-import React, { useState } from 'react';
+import * as React from 'react';
import { Helmet } from 'react-helmet';
import RelatedPatterns from '../../components/RelatedPatterns';
@@ -20,7 +20,7 @@ interface ItemProps {
}
const Details: React.FC<{}> = () => {
- const [activeItem, setActiveItem] = useState(1);
+ const [activeItem, setActiveItem] = React.useState(1);
const Item: React.FC = ({ index, title, children }) => {
const isOpened = (index === activeItem);
@@ -66,22 +66,22 @@ const Details: React.FC<{}> = () => {
-