mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-08-05 21:57:32 +02:00
Count the number of patterns
This commit is contained in:
@@ -10,6 +10,7 @@ import ProductHuntBadge from '../layouts/ProductHuntBadge';
|
|||||||
|
|
||||||
const ExplorePage = () => {
|
const ExplorePage = () => {
|
||||||
useDocumentTitle('CSS Layout ∙ Explore');
|
useDocumentTitle('CSS Layout ∙ Explore');
|
||||||
|
const numPatterns = Object.keys(Pattern).length;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
@@ -62,7 +63,7 @@ const ExplorePage = () => {
|
|||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Here is the collection of 67 patterns
|
Here is the collection of {numPatterns} patterns
|
||||||
</h2>
|
</h2>
|
||||||
<div style={{ marginBottom: '32px', textAlign: 'center' }}>
|
<div style={{ marginBottom: '32px', textAlign: 'center' }}>
|
||||||
All covers you see in this page are made with CSS only. Inspect them! 🎉
|
All covers you see in this page are made with CSS only. Inspect them! 🎉
|
||||||
|
@@ -12,6 +12,7 @@ import MadeOf from './MadeOf';
|
|||||||
|
|
||||||
const HomePage = () => {
|
const HomePage = () => {
|
||||||
useDocumentTitle('CSS Layout');
|
useDocumentTitle('CSS Layout');
|
||||||
|
const numPatterns = Object.keys(Pattern).length;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
@@ -170,7 +171,7 @@ const HomePage = () => {
|
|||||||
marginBottom: '16px',
|
marginBottom: '16px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
67 patterns
|
{numPatterns} patterns
|
||||||
</div>
|
</div>
|
||||||
<Link
|
<Link
|
||||||
to="/patterns"
|
to="/patterns"
|
||||||
|
Reference in New Issue
Block a user