mirror of
https://github.com/Lapikud/tipilan.git
synced 2026-05-08 18:08:32 +00:00
adjust floating images colorscale
This commit is contained in:
1756
package-lock.json
generated
1756
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -5,6 +5,7 @@ import Image from "next/image";
|
|||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
import { SLIDES, type CarouselSlide } from "./constants";
|
import { SLIDES, type CarouselSlide } from "./constants";
|
||||||
import { BLUR_PLACEHOLDERS } from "@/lib/blurPlaceholders";
|
import { BLUR_PLACEHOLDERS } from "@/lib/blurPlaceholders";
|
||||||
|
import {gray} from "next/dist/lib/picocolors";
|
||||||
|
|
||||||
function blurKey(src: string) {
|
function blurKey(src: string) {
|
||||||
return src.replace('/images/', '').replace(/\.\w+$/, '');
|
return src.replace('/images/', '').replace(/\.\w+$/, '');
|
||||||
@@ -56,7 +57,7 @@ function CarouselSlideComponent({
|
|||||||
className="relative shrink-0 w-[35vw] xl:w-[40vw] overflow-hidden shadow-teaser transition-transform duration-700 ease-out"
|
className="relative shrink-0 w-[35vw] xl:w-[40vw] overflow-hidden shadow-teaser transition-transform duration-700 ease-out"
|
||||||
style={{
|
style={{
|
||||||
aspectRatio: "850 / 900",
|
aspectRatio: "850 / 900",
|
||||||
transform: isActive ? "translateY(0)" : "translateY(110%)",
|
transform: isActive ? "translateY(0)" : "translateY(110%)"
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Image
|
<Image
|
||||||
@@ -68,6 +69,7 @@ function CarouselSlideComponent({
|
|||||||
blurDataURL={BLUR_PLACEHOLDERS[blurKey(slide.heroImage)]}
|
blurDataURL={BLUR_PLACEHOLDERS[blurKey(slide.heroImage)]}
|
||||||
sizes="(min-width: 1280px) 40vw, 35vw"
|
sizes="(min-width: 1280px) 40vw, 35vw"
|
||||||
className="object-cover"
|
className="object-cover"
|
||||||
|
style={{ filter: "grayscale(50%)" }}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user