change aspect ratio preview images

This commit is contained in:
2025-03-21 13:26:46 +01:00
parent 9544849ef6
commit 6cbd9f5a3b
3 changed files with 143 additions and 151 deletions

View File

@@ -591,14 +591,14 @@ video {
bottom: 0px; bottom: 0px;
} }
.right-0 {
right: 0px;
}
.left-0 { .left-0 {
left: 0px; left: 0px;
} }
.right-0 {
right: 0px;
}
.top-0 { .top-0 {
top: 0px; top: 0px;
} }
@@ -642,6 +642,10 @@ video {
margin-right: auto; margin-right: auto;
} }
.-me-0\.5 {
margin-inline-end: -0.125rem;
}
.mb-2 { .mb-2 {
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
} }
@@ -662,6 +666,10 @@ video {
margin-bottom: 2rem; margin-bottom: 2rem;
} }
.me-2 {
margin-inline-end: 0.5rem;
}
.ml-2 { .ml-2 {
margin-left: 0.5rem; margin-left: 0.5rem;
} }
@@ -678,6 +686,14 @@ video {
margin-right: 1rem; margin-right: 1rem;
} }
.ms-2 {
margin-inline-start: 0.5rem;
}
.ms-auto {
margin-inline-start: auto;
}
.mt-1 { .mt-1 {
margin-top: 0.25rem; margin-top: 0.25rem;
} }
@@ -698,22 +714,6 @@ video {
margin-top: 1.5rem; margin-top: 1.5rem;
} }
.-me-0\.5 {
margin-inline-end: -0.125rem;
}
.me-2 {
margin-inline-end: 0.5rem;
}
.ms-2 {
margin-inline-start: 0.5rem;
}
.ms-auto {
margin-inline-start: auto;
}
.block { .block {
display: block; display: block;
} }
@@ -758,6 +758,10 @@ video {
height: 4rem; height: 4rem;
} }
.h-3 {
height: 0.75rem;
}
.h-4 { .h-4 {
height: 1rem; height: 1rem;
} }
@@ -770,14 +774,6 @@ video {
height: 460px; height: 460px;
} }
.h-full {
height: 100%;
}
.h-3 {
height: 0.75rem;
}
.h-\[calc\(100\%-1rem\)\] { .h-\[calc\(100\%-1rem\)\] {
height: calc(100% - 1rem); height: calc(100% - 1rem);
} }
@@ -786,6 +782,10 @@ video {
height: auto; height: auto;
} }
.h-full {
height: 100%;
}
.max-h-full { .max-h-full {
max-height: 100%; max-height: 100%;
} }
@@ -806,22 +806,14 @@ video {
width: 3rem; width: 3rem;
} }
.w-4 {
width: 1rem;
}
.w-auto {
width: auto;
}
.w-full {
width: 100%;
}
.w-3 { .w-3 {
width: 0.75rem; width: 0.75rem;
} }
.w-4 {
width: 1rem;
}
.w-56 { .w-56 {
width: 14rem; width: 14rem;
} }
@@ -830,10 +822,22 @@ video {
width: 2rem; width: 2rem;
} }
.w-auto {
width: auto;
}
.w-full {
width: 100%;
}
.max-w-2xl { .max-w-2xl {
max-width: 42rem; max-width: 42rem;
} }
.max-w-3xl {
max-width: 48rem;
}
.max-w-6xl { .max-w-6xl {
max-width: 72rem; max-width: 72rem;
} }
@@ -842,18 +846,14 @@ video {
max-width: 80rem; max-width: 80rem;
} }
.max-w-md {
max-width: 28rem;
}
.max-w-3xl {
max-width: 48rem;
}
.max-w-lg { .max-w-lg {
max-width: 32rem; max-width: 32rem;
} }
.max-w-md {
max-width: 28rem;
}
.max-w-screen-xl { .max-w-screen-xl {
max-width: 1280px; max-width: 1280px;
} }
@@ -906,14 +906,6 @@ video {
justify-content: space-between; justify-content: space-between;
} }
.gap-4 {
gap: 1rem;
}
.gap-5 {
gap: 1.25rem;
}
.gap-1 { .gap-1 {
gap: 0.25rem; gap: 0.25rem;
} }
@@ -922,6 +914,14 @@ video {
gap: 0.5rem; gap: 0.5rem;
} }
.gap-4 {
gap: 1rem;
}
.gap-5 {
gap: 1.25rem;
}
.gap-x-6 { .gap-x-6 {
-moz-column-gap: 1.5rem; -moz-column-gap: 1.5rem;
column-gap: 1.5rem; column-gap: 1.5rem;
@@ -953,18 +953,18 @@ video {
margin-bottom: calc(0.5rem * var(--tw-space-y-reverse)); margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
} }
.space-y-6 > :not([hidden]) ~ :not([hidden]) {
--tw-space-y-reverse: 0;
margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));
margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
}
.space-y-4 > :not([hidden]) ~ :not([hidden]) { .space-y-4 > :not([hidden]) ~ :not([hidden]) {
--tw-space-y-reverse: 0; --tw-space-y-reverse: 0;
margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse))); margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
margin-bottom: calc(1rem * var(--tw-space-y-reverse)); margin-bottom: calc(1rem * var(--tw-space-y-reverse));
} }
.space-y-6 > :not([hidden]) ~ :not([hidden]) {
--tw-space-y-reverse: 0;
margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));
margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
}
.divide-y > :not([hidden]) ~ :not([hidden]) { .divide-y > :not([hidden]) ~ :not([hidden]) {
--tw-divide-y-reverse: 0; --tw-divide-y-reverse: 0;
border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse))); border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
@@ -1021,16 +1021,16 @@ video {
border-radius: 0.375rem; border-radius: 0.375rem;
} }
.rounded-l-md {
border-top-left-radius: 0.375rem;
border-bottom-left-radius: 0.375rem;
}
.rounded-e-lg { .rounded-e-lg {
border-start-end-radius: 0.5rem; border-start-end-radius: 0.5rem;
border-end-end-radius: 0.5rem; border-end-end-radius: 0.5rem;
} }
.rounded-l-md {
border-top-left-radius: 0.375rem;
border-bottom-left-radius: 0.375rem;
}
.rounded-s-lg { .rounded-s-lg {
border-start-start-radius: 0.5rem; border-start-start-radius: 0.5rem;
border-end-start-radius: 0.5rem; border-end-start-radius: 0.5rem;
@@ -1135,15 +1135,15 @@ video {
background-color: rgb(127 29 29 / var(--tw-bg-opacity, 1)); background-color: rgb(127 29 29 / var(--tw-bg-opacity, 1));
} }
.bg-transparent {
background-color: transparent;
}
.bg-white { .bg-white {
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
} }
.bg-transparent {
background-color: transparent;
}
.fill-red-50 { .fill-red-50 {
fill: #fef2f2; fill: #fef2f2;
} }
@@ -1188,6 +1188,11 @@ video {
padding-right: 1rem; padding-right: 1rem;
} }
.px-5 {
padding-left: 1.25rem;
padding-right: 1.25rem;
}
.px-6 { .px-6 {
padding-left: 1.5rem; padding-left: 1.5rem;
padding-right: 1.5rem; padding-right: 1.5rem;
@@ -1213,6 +1218,11 @@ video {
padding-bottom: 0.5rem; padding-bottom: 0.5rem;
} }
.py-2\.5 {
padding-top: 0.625rem;
padding-bottom: 0.625rem;
}
.py-24 { .py-24 {
padding-top: 6rem; padding-top: 6rem;
padding-bottom: 6rem; padding-bottom: 6rem;
@@ -1228,16 +1238,6 @@ video {
padding-bottom: 2rem; padding-bottom: 2rem;
} }
.px-5 {
padding-left: 1.25rem;
padding-right: 1.25rem;
}
.py-2\.5 {
padding-top: 0.625rem;
padding-bottom: 0.625rem;
}
.pb-3 { .pb-3 {
padding-bottom: 0.75rem; padding-bottom: 0.75rem;
} }
@@ -1258,14 +1258,14 @@ video {
padding-top: 0.5rem; padding-top: 0.5rem;
} }
.pt-5 {
padding-top: 1.25rem;
}
.pt-4 { .pt-4 {
padding-top: 1rem; padding-top: 1rem;
} }
.pt-5 {
padding-top: 1.25rem;
}
.text-left { .text-left {
text-align: left; text-align: left;
} }
@@ -1323,16 +1323,16 @@ video {
line-height: 2rem; line-height: 2rem;
} }
.text-xs {
font-size: 0.75rem;
line-height: 1rem;
}
.text-xl { .text-xl {
font-size: 1.25rem; font-size: 1.25rem;
line-height: 1.75rem; line-height: 1.75rem;
} }
.text-xs {
font-size: 0.75rem;
line-height: 1rem;
}
.font-bold { .font-bold {
font-weight: 700; font-weight: 700;
} }
@@ -1375,6 +1375,11 @@ video {
color: rgb(209 213 219 / var(--tw-text-opacity, 1)); color: rgb(209 213 219 / var(--tw-text-opacity, 1));
} }
.text-gray-400 {
--tw-text-opacity: 1;
color: rgb(156 163 175 / var(--tw-text-opacity, 1));
}
.text-gray-500 { .text-gray-500 {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(107 114 128 / var(--tw-text-opacity, 1)); color: rgb(107 114 128 / var(--tw-text-opacity, 1));
@@ -1425,11 +1430,6 @@ video {
color: rgb(255 255 255 / var(--tw-text-opacity, 1)); color: rgb(255 255 255 / var(--tw-text-opacity, 1));
} }
.text-gray-400 {
--tw-text-opacity: 1;
color: rgb(156 163 175 / var(--tw-text-opacity, 1));
}
.underline { .underline {
text-decoration-line: underline; text-decoration-line: underline;
} }
@@ -1443,18 +1443,18 @@ video {
opacity: 0; opacity: 0;
} }
.shadow-sm {
--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.shadow { .shadow {
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
} }
.shadow-sm {
--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.shadow-transparent { .shadow-transparent {
--tw-shadow-color: transparent; --tw-shadow-color: transparent;
--tw-shadow: var(--tw-shadow-colored); --tw-shadow: var(--tw-shadow-colored);
@@ -1492,14 +1492,14 @@ video {
transition-duration: 150ms; transition-duration: 150ms;
} }
.duration-500 {
transition-duration: 500ms;
}
.duration-300 { .duration-300 {
transition-duration: 300ms; transition-duration: 300ms;
} }
.duration-500 {
transition-duration: 500ms;
}
.placeholder\:text-gray-400::-moz-placeholder { .placeholder\:text-gray-400::-moz-placeholder {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(156 163 175 / var(--tw-text-opacity, 1)); color: rgb(156 163 175 / var(--tw-text-opacity, 1));
@@ -1548,6 +1548,16 @@ video {
background-color: rgb(29 78 216 / var(--tw-bg-opacity, 1)); background-color: rgb(29 78 216 / var(--tw-bg-opacity, 1));
} }
.hover\:bg-gray-100:hover {
--tw-bg-opacity: 1;
background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));
}
.hover\:bg-gray-200:hover {
--tw-bg-opacity: 1;
background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1));
}
.hover\:bg-gray-400:hover { .hover\:bg-gray-400:hover {
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(156 163 175 / var(--tw-bg-opacity, 1)); background-color: rgb(156 163 175 / var(--tw-bg-opacity, 1));
@@ -1588,14 +1598,9 @@ video {
background-color: rgb(127 29 29 / var(--tw-bg-opacity, 1)); background-color: rgb(127 29 29 / var(--tw-bg-opacity, 1));
} }
.hover\:bg-gray-100:hover { .hover\:text-gray-900:hover {
--tw-bg-opacity: 1; --tw-text-opacity: 1;
background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1)); color: rgb(17 24 39 / var(--tw-text-opacity, 1));
}
.hover\:bg-gray-200:hover {
--tw-bg-opacity: 1;
background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1));
} }
.hover\:text-indigo-500:hover { .hover\:text-indigo-500:hover {
@@ -1608,11 +1613,6 @@ video {
color: rgb(255 255 255 / var(--tw-text-opacity, 1)); color: rgb(255 255 255 / var(--tw-text-opacity, 1));
} }
.hover\:text-gray-900:hover {
--tw-text-opacity: 1;
color: rgb(17 24 39 / var(--tw-text-opacity, 1));
}
.hover\:underline:hover { .hover\:underline:hover {
text-decoration-line: underline; text-decoration-line: underline;
} }
@@ -1818,15 +1818,15 @@ video {
padding-right: 0px; padding-right: 0px;
} }
.sm\:text-sm\/6 {
font-size: 0.875rem;
line-height: 1.5rem;
}
.sm\:text-2xl { .sm\:text-2xl {
font-size: 1.5rem; font-size: 1.5rem;
line-height: 2rem; line-height: 2rem;
} }
.sm\:text-sm\/6 {
font-size: 0.875rem;
line-height: 1.5rem;
}
} }
@media (min-width: 768px) { @media (min-width: 768px) {
@@ -1834,18 +1834,10 @@ video {
inset: 0px; inset: 0px;
} }
.md\:w-\[384px\] {
width: 384px;
}
.md\:flex-1 { .md\:flex-1 {
flex: 1 1 0%; flex: 1 1 0%;
} }
.md\:table-fixed {
table-layout: fixed;
}
.md\:grid-cols-2 { .md\:grid-cols-2 {
grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: repeat(2, minmax(0, 1fr));
} }
@@ -1996,29 +1988,14 @@ video {
background-color: rgb(31 41 55 / var(--tw-bg-opacity, 1)); background-color: rgb(31 41 55 / var(--tw-bg-opacity, 1));
} }
.dark\:bg-red-600 {
--tw-bg-opacity: 1;
background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1));
}
.dark\:bg-gray-900 { .dark\:bg-gray-900 {
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(17 24 39 / var(--tw-bg-opacity, 1)); background-color: rgb(17 24 39 / var(--tw-bg-opacity, 1));
} }
.dark\:text-gray-300 { .dark\:bg-red-600 {
--tw-text-opacity: 1; --tw-bg-opacity: 1;
color: rgb(209 213 219 / var(--tw-text-opacity, 1)); background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1));
}
.dark\:text-gray-900 {
--tw-text-opacity: 1;
color: rgb(17 24 39 / var(--tw-text-opacity, 1));
}
.dark\:text-white {
--tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity, 1));
} }
.dark\:text-gray-200 { .dark\:text-gray-200 {
@@ -2026,6 +2003,11 @@ video {
color: rgb(229 231 235 / var(--tw-text-opacity, 1)); color: rgb(229 231 235 / var(--tw-text-opacity, 1));
} }
.dark\:text-gray-300 {
--tw-text-opacity: 1;
color: rgb(209 213 219 / var(--tw-text-opacity, 1));
}
.dark\:text-gray-400 { .dark\:text-gray-400 {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(156 163 175 / var(--tw-text-opacity, 1)); color: rgb(156 163 175 / var(--tw-text-opacity, 1));
@@ -2036,6 +2018,16 @@ video {
color: rgb(107 114 128 / var(--tw-text-opacity, 1)); color: rgb(107 114 128 / var(--tw-text-opacity, 1));
} }
.dark\:text-gray-900 {
--tw-text-opacity: 1;
color: rgb(17 24 39 / var(--tw-text-opacity, 1));
}
.dark\:text-white {
--tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}
.dark\:placeholder-gray-400::-moz-placeholder { .dark\:placeholder-gray-400::-moz-placeholder {
--tw-placeholder-opacity: 1; --tw-placeholder-opacity: 1;
color: rgb(156 163 175 / var(--tw-placeholder-opacity, 1)); color: rgb(156 163 175 / var(--tw-placeholder-opacity, 1));

View File

@@ -5,7 +5,7 @@
<div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8"> <div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex flex-col md:flex-row -mx-4"> <div class="flex flex-col md:flex-row -mx-4">
<div class="md:flex-1 px-4"> <div class="md:flex-1 px-4">
<div class="h-[460px] rounded-lg bg-gray-300 dark:bg-gray-700 mb-4"> <div class="rounded-lg bg-gray-300 dark:bg-gray-700 mb-4">
<img class="w-full h-full object-cover" src="/{{ .data.shopItem.Image}}" alt="Product Image"> <img class="w-full h-full object-cover" src="/{{ .data.shopItem.Image}}" alt="Product Image">
</div> </div>
<div class="flex -mx-2 mb-4"> <div class="flex -mx-2 mb-4">

View File

@@ -6,7 +6,7 @@
{{ range .data.shopItems }} {{ range .data.shopItems }}
<div class="group relative"> <div class="group relative">
<img src="/{{ .Image }}" alt="Product Image" class="aspect-square w-full rounded-md bg-gray-200 object-cover group-hover:opacity-75 lg:aspect-auto lg:h-80"> <img src="/{{ .Image }}" alt="Product Image" class="aspect-4/5 w-full rounded-md bg-gray-200 object-cover group-hover:opacity-75 lg:aspect-auto lg:h-80">
<div class="mt-4 flex justify-between"> <div class="mt-4 flex justify-between">
<div> <div>
<h3 class="text-sm text-gray-700"> <h3 class="text-sm text-gray-700">