1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-08-05 05:37:29 +02:00

Count the number of patterns

This commit is contained in:
Phuoc Nguyen
2019-12-13 09:20:31 +07:00
parent a0b6eb28e4
commit f328dbd8b3
2 changed files with 4 additions and 2 deletions

View File

@@ -10,6 +10,7 @@ import ProductHuntBadge from '../layouts/ProductHuntBadge';
const ExplorePage = () => {
useDocumentTitle('CSS Layout ∙ Explore');
const numPatterns = Object.keys(Pattern).length;
return (
<Layout>
@@ -62,7 +63,7 @@ const ExplorePage = () => {
textAlign: 'center',
}}
>
Here is the collection of 67 patterns
Here is the collection of {numPatterns} patterns
</h2>
<div style={{ marginBottom: '32px', textAlign: 'center' }}>
All covers you see in this page are made with CSS only. Inspect them! 🎉

View File

@@ -12,6 +12,7 @@ import MadeOf from './MadeOf';
const HomePage = () => {
useDocumentTitle('CSS Layout');
const numPatterns = Object.keys(Pattern).length;
return (
<Layout>
@@ -170,7 +171,7 @@ const HomePage = () => {
marginBottom: '16px',
}}
>
67 patterns
{numPatterns} patterns
</div>
<Link
to="/patterns"