Skip to content

Commit

Permalink
Fix images
Browse files Browse the repository at this point in the history
  • Loading branch information
scottyzen committed Apr 27, 2024
1 parent 872fc9c commit c97bf51
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 34 deletions.
16 changes: 0 additions & 16 deletions CHANGELOG.md

This file was deleted.

9 changes: 0 additions & 9 deletions netlify.toml

This file was deleted.

5 changes: 3 additions & 2 deletions woonuxt_base/components/CategoryCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ const ImageHeight = Math.round(imageWidth * 1.25);
<NuxtImg
:width="imageWidth"
:height="ImageHeight"
class="absolute inset-0 object-cover w-full h-full skeleton"
class="absolute inset-0 object-cover w-full h-full"
:src="node.image?.sourceUrl || fallbackImage"
:alt="node.image?.altText || node.name"
:title="node.image?.title || node.name"
loading="lazy" />
loading="lazy"
placeholder />
<div class="absolute inset-x-0 bottom-0 opacity-50 bg-gradient-to-t from-black to-transparent h-1/2" />
<span class="relative z-10 mt-auto mb-2 text-sm font-semibold text-white capitalize md:text-base md:mb-4" v-html="node.name" />
</NuxtLink>
Expand Down
6 changes: 4 additions & 2 deletions woonuxt_base/components/generalElements/HeroBanner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
<NuxtImg
width="1400"
height="800"
class="object-cover w-full h-[420px] lg:h-[560px] xl:h-[640px] skeleton"
class="object-cover w-full h-[420px] lg:h-[560px] xl:h-[640px]"
src="/images/hero-4.jpg"
alt="Hero image"
loading="eager"
sizes="sm:100vw lg:1400px"
fetchpriority="high"
preload />
preload
placeholder
placeholder-class="blur-xl" />
<div class="container absolute inset-0 flex flex-col items-start justify-center bg-gradient-to-l from-gray-200 md:bg-none p-8">
<h1 class="text-3xl font-bold md:mb-4 md:text-4xl lg:text-6xl">Just landed.</h1>
<h2 class="text-lg font-bold md:mb-4 lg:text-3xl">The New Year Collection</h2>
Expand Down
3 changes: 2 additions & 1 deletion woonuxt_base/components/productElements/ProductCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ const imagetoDisplay = computed<string>(() => {
:alt="node.image?.altText || node.name"
:title="node.image?.title || node.name"
:loading="index <= 3 ? 'eager' : 'lazy'"
class="skeleton" />
placeholder
placeholder-class="blur-xl" />
</NuxtLink>
<div class="p-2">
<StarRating :rating="node.averageRating" :count="node.reviewCount" />
Expand Down
11 changes: 7 additions & 4 deletions woonuxt_base/components/productElements/ProductImageGallery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,28 @@ watch(
<div>
<SaleBadge :node="node" class="absolute text-base top-4 right-4" />
<NuxtImg
class="rounded-xl object-contain w-full min-w-[350px] skeleton"
:imgAttrs="{ class: 'rounded-xl object-contain w-full min-w-[350px] skeleton' }"
class="rounded-xl object-contain w-full min-w-[350px]"
width="640"
height="640"
:alt="imageToShow.altText || node.name"
:title="imageToShow.title || node.name"
:src="imageToShow.sourceUrl || fallbackImage"
fetchpriority="high" />
fetchpriority="high"
placeholder
placeholder-class="blur-xl" />
<div v-if="gallery.nodes.length" class="my-4 gallery-images">
<NuxtImg
v-for="galleryImg in galleryImages"
:key="galleryImg.databaseId"
class="cursor-pointer rounded-xl skeleton"
class="cursor-pointer rounded-xl"
width="640"
height="640"
:src="galleryImg.sourceUrl"
:alt="galleryImg.altText || node.name"
:title="galleryImg.title || node.name"
@click.native="changeImage(galleryImg)"
placeholder
placeholder-class="blur-xl"
loading="lazy" />
</div>
</div>
Expand Down

0 comments on commit c97bf51

Please sign in to comment.