1
0
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:
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 = () => { 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! 🎉

View File

@@ -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"