@@ -50,7 +50,7 @@ const DisplayProducts = ({ products }: IDisplayProductsProps) => (
50
50
< section className = "container mx-auto bg-white" >
51
51
< div
52
52
id = "product-container"
53
- className = "flex flex-wrap items-center mb-[120px] md:mb-0"
53
+ className = "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 mb-[120px] md:mb-0 px-4 lg:px-6 "
54
54
>
55
55
{ products ? (
56
56
products . map (
@@ -79,7 +79,7 @@ const DisplayProducts = ({ products }: IDisplayProductsProps) => (
79
79
return (
80
80
< div
81
81
key = { uuidv4 ( ) }
82
- className = "flex flex-col p-6 md:w-1/2 xl:w-1/4 "
82
+ className = "flex flex-col"
83
83
>
84
84
< Link
85
85
href = { `/produkt/${ encodeURIComponent (
@@ -90,14 +90,14 @@ const DisplayProducts = ({ products }: IDisplayProductsProps) => (
90
90
{ image ? (
91
91
< img
92
92
id = "product-image"
93
- className = "transition duration-500 ease-in-out transform cursor-pointer hover:grow hover:shadow-lg hover:scale-105"
93
+ className = "w-full h-auto object-cover aspect-square transition duration-500 ease-in-out transform cursor-pointer hover:grow hover:shadow-lg hover:scale-105"
94
94
alt = { name }
95
95
src = { image . sourceUrl }
96
96
/>
97
97
) : (
98
98
< img
99
99
id = "product-image"
100
- className = "transition duration-500 ease-in-out transform cursor-pointer hover:grow hover:shadow-lg hover:scale-105"
100
+ className = "w-full h-auto object-cover aspect-square transition duration-500 ease-in-out transform cursor-pointer hover:grow hover:shadow-lg hover:scale-105"
101
101
alt = { name }
102
102
src = {
103
103
process . env . NEXT_PUBLIC_PLACEHOLDER_SMALL_IMAGE_URL
@@ -113,7 +113,7 @@ const DisplayProducts = ({ products }: IDisplayProductsProps) => (
113
113
>
114
114
< span >
115
115
< div className = "flex justify-center pt-3" >
116
- < p className = "font-bold text-center cursor-pointer text-2xl " >
116
+ < p className = "font-bold text-center cursor-pointer text-lg md:text-xl " >
117
117
{ name }
118
118
</ p >
119
119
</ div >
@@ -122,19 +122,19 @@ const DisplayProducts = ({ products }: IDisplayProductsProps) => (
122
122
{ /* Display sale price when on sale */ }
123
123
{ onSale && (
124
124
< div className = "flex justify-center" >
125
- < div className = "pt-1 text-gray-900 text-xl" >
125
+ < div className = "pt-1 text-gray-900 text-lg md:text- xl" >
126
126
{ variations && filteredVariantPrice ( price , '' ) }
127
127
{ ! variations && salePrice }
128
128
</ div >
129
- < div className = "pt-1 ml-2 text-gray-500 line-through text-lg" >
129
+ < div className = "pt-1 ml-2 text-gray-500 line-through text-md md:text- lg" >
130
130
{ variations && filteredVariantPrice ( price , 'right' ) }
131
131
{ ! variations && regularPrice }
132
132
</ div >
133
133
</ div >
134
134
) }
135
135
{ /* Display regular price when not on sale */ }
136
136
{ ! onSale && (
137
- < p className = "pt-1 text-center text-gray-900 text-xl" >
137
+ < p className = "pt-1 text-center text-gray-900 text-lg md:text- xl" >
138
138
{ price }
139
139
</ p >
140
140
) }
@@ -143,7 +143,7 @@ const DisplayProducts = ({ products }: IDisplayProductsProps) => (
143
143
} ,
144
144
)
145
145
) : (
146
- < div className = "mx-auto text-xl font-bold text-center text-gray-800 no-underline uppercase" >
146
+ < div className = "col-span-full mx-auto text-xl font-bold text-center text-gray-800 no-underline uppercase" >
147
147
Ingen produkter funnet
148
148
</ div >
149
149
) }
0 commit comments