wip(org): Switched to worm component for footer
This commit is contained in:
parent
2890443320
commit
9088439f7b
2 changed files with 43 additions and 22 deletions
32
packages/freesewing.shared/components/worm.js
Normal file
32
packages/freesewing.shared/components/worm.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
import Link from 'next/link'
|
||||
|
||||
const PreviewTile = ({ img, slug, title }) => (
|
||||
<div
|
||||
style={{ backgroundImage: `url(${img})`, backgroundSize: 'cover' }}
|
||||
className={`
|
||||
rounded-full inline-block border-neutral hover:border-0 shrink-0
|
||||
border-4 hover:border w-12 h-12 -ml-4
|
||||
md:w-14 md:h-14 md:-ml-4 md:border-6 md:hover:border-2
|
||||
xl:w-20 xl:h-20 xl:-ml-6 xl:border-6 xl:hover:border-2
|
||||
mb-2 xl:mb-4
|
||||
`}
|
||||
>
|
||||
<Link href={`/showcase/${slug}`}>
|
||||
<a className="w-12 h-12 block" title={title}/>
|
||||
</Link>
|
||||
</div>
|
||||
)
|
||||
|
||||
const Worm = ({ list, size=20 }) => {
|
||||
return (
|
||||
<div className={`
|
||||
flex flex-row flex-wrap items-center justify-center
|
||||
-mr-8 pl-8 pr-8
|
||||
md:-mr-12 md:pl-12
|
||||
`}>
|
||||
{list.map(item => <PreviewTile {...item} />)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Worm
|
Loading…
Add table
Add a link
Reference in a new issue