diff --git a/components/product/ProductCard/ProductCard.module.css b/components/product/ProductCard/ProductCard.module.css index 2d2fa9f5e..559bc1b69 100644 --- a/components/product/ProductCard/ProductCard.module.css +++ b/components/product/ProductCard/ProductCard.module.css @@ -1,14 +1,10 @@ .root { @apply relative max-h-full w-full box-border overflow-hidden bg-no-repeat bg-center bg-cover transition-transform - ease-linear cursor-pointer; + ease-linear cursor-pointer inline-block; height: 100% !important; &:hover { - & .squareBg:before { - transform: scale(0.98); - } - & .productImage { transform: scale(1.2625); } @@ -43,47 +39,18 @@ @apply bg-cyan text-white; } } - - &:nth-child(6n + 1) .squareBg { - @apply bg-violet; - } - - &:nth-child(6n + 5) .squareBg { - @apply bg-blue; - } - - &:nth-child(6n + 3) .squareBg { - @apply bg-pink; - } - - &:nth-child(6n + 6) .squareBg { - @apply bg-cyan; - } } -.squareBg, +.wishlistButton { + @apply top-3 right-3 z-50 absolute bg-accent-9 text-accent-0; +} + .productTitle > span, .productPrice { @apply transition-colors ease-in-out duration-500; } -.squareBg { - @apply transition-colors absolute inset-0 z-0; - background-color: #212529; -} - -.squareBg:before { - @apply transition ease-in-out duration-500 bg-repeat-space w-full h-full block; - background-image: url('/bg-products.svg'); - content: ''; -} - .simple { - & .squareBg { - @apply bg-accent-0 !important; - background-image: url('/bg-products.svg'); - } - & .productTitle { @apply pt-2; font-size: 1rem; @@ -117,10 +84,6 @@ letter-spacing: 0.4px; } -.wishlistButton { - @apply top-0 right-0 z-50 absolute; -} - .imageContainer { @apply flex items-center justify-center; overflow: hidden; diff --git a/components/product/ProductCard/ProductCard.tsx b/components/product/ProductCard/ProductCard.tsx index 006a0c781..28bbaae6a 100644 --- a/components/product/ProductCard/ProductCard.tsx +++ b/components/product/ProductCard/ProductCard.tsx @@ -49,7 +49,13 @@ const ProductCard: FC = ({ ) : ( <> -
+ {process.env.COMMERCE_WISHLIST_ENABLED && ( + + )}
{!noNameTag && (
@@ -63,13 +69,6 @@ const ProductCard: FC = ({
)} - {process.env.COMMERCE_WISHLIST_ENABLED && ( - - )}
{product?.images && ( diff --git a/components/product/ProductSlider/ProductSlider.module.css b/components/product/ProductSlider/ProductSlider.module.css index 065202a99..7dc02a8ae 100644 --- a/components/product/ProductSlider/ProductSlider.module.css +++ b/components/product/ProductSlider/ProductSlider.module.css @@ -113,3 +113,19 @@ .positionIndicatorActive:hover .dot { @apply bg-white; } + +.album { + @apply bg-violet-dark; + overflow: auto; + white-space: nowrap; +} + +.album > * { + @apply cursor-pointer; + display: inline-block; + width: 300px; +} + +.album > div:hover { + @apply bg-violet-light; +} diff --git a/components/product/ProductSlider/ProductSlider.tsx b/components/product/ProductSlider/ProductSlider.tsx index e6ee0f82c..957d33fc2 100644 --- a/components/product/ProductSlider/ProductSlider.tsx +++ b/components/product/ProductSlider/ProductSlider.tsx @@ -62,28 +62,27 @@ const ProductSlider: FC = ({ children }) => { return (
-
- - -
-
+
+ + +
{Children.map(children, (child) => { // Add the keen-slider__slide className to children if (isValidElement(child)) { @@ -99,27 +98,29 @@ const ProductSlider: FC = ({ children }) => { } return child })} + {slider && ( +
+ {[...Array(slider.details().size).keys()].map((idx) => { + return ( + + ) + })} +
+ )}
- {slider && ( -
- {[...Array(slider.details().size).keys()].map((idx) => { - return ( - - ) - })} -
- )} + +
{Children.map(children, (child) => child)}
) } diff --git a/components/product/ProductView/ProductView.module.css b/components/product/ProductView/ProductView.module.css index eed908567..21f4cdad9 100644 --- a/components/product/ProductView/ProductView.module.css +++ b/components/product/ProductView/ProductView.module.css @@ -19,10 +19,6 @@ } } -.squareBg { - @apply absolute inset-0 bg-violet z-0 h-full; -} - .nameBox { @apply absolute top-0 left-0 z-20 pr-16; @@ -32,7 +28,7 @@ & .name { @apply px-6 py-2 bg-primary text-primary font-bold; - font-size: 2rem; + font-size: 1.8rem; letter-spacing: 0.4px; } diff --git a/tailwind.config.js b/tailwind.config.js index 46c8bb1c5..25f9d8e38 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -39,6 +39,7 @@ module.exports = { 'accent-9': 'var(--accent-9)', violet: 'var(--violet)', 'violet-light': 'var(--violet-light)', + 'violet-dark': 'var(--violet-dark)', pink: 'var(--pink)', 'pink-light': 'var(--pink-light)', cyan: 'var(--cyan)',