|
| 1 | +import Image from "next/image"; |
1 | 2 | import parse from "html-react-parser"; |
2 | 3 | import { cn } from "../../lib/cn"; |
3 | 4 | import { Button } from "@prisma/eclipse"; |
@@ -66,36 +67,56 @@ export function Hero({ data }: { data: HeroData }) { |
66 | 67 | </div> |
67 | 68 | <div className="logos relative max-h-78 hidden md:block"> |
68 | 69 | <div className="absolute left-0 top-0 w-57 h-44 object-cover bg-background-default flex items-center justify-center p-9 border border-stroke-ppg-weak rounded-2xl"> |
69 | | - <img |
70 | | - src={data.imageUrl} |
| 70 | + <div |
71 | 71 | className={cn( |
72 | | - "dark:hidden h-full max-w-full contain", |
| 72 | + "dark:hidden h-full w-full relative", |
73 | 73 | data.imageClassName, |
74 | 74 | )} |
75 | | - alt={`Prisma with ${data.tech}`} |
76 | | - /> |
| 75 | + > |
| 76 | + <Image |
| 77 | + src={data.imageUrl} |
| 78 | + fill |
| 79 | + className="object-contain" |
| 80 | + alt={`Prisma with ${data.tech}`} |
| 81 | + priority={true} |
| 82 | + /> |
| 83 | + </div> |
77 | 84 | {data.imageUrlLight && ( |
78 | | - <img |
79 | | - src={data.imageUrlLight} |
| 85 | + <div |
80 | 86 | className={cn( |
81 | | - "hidden dark:block h-full max-w-full contain", |
| 87 | + "hidden dark:block h-full w-full relative", |
82 | 88 | data.imageClassNameLight, |
83 | 89 | )} |
84 | | - alt={`Prisma with ${data.tech}`} |
85 | | - /> |
| 90 | + > |
| 91 | + <Image |
| 92 | + src={data.imageUrlLight} |
| 93 | + fill |
| 94 | + className="object-contain" |
| 95 | + alt={`Prisma with ${data.tech}`} |
| 96 | + priority={true} |
| 97 | + /> |
| 98 | + </div> |
86 | 99 | )} |
87 | 100 | </div> |
88 | 101 | <div className="absolute right-0 bottom-0 w-57 h-44 object-cover bg-background-default flex items-center justify-center p-9 border border-stroke-ppg-weak rounded-2xl"> |
89 | | - <img |
90 | | - src="/icons/technologies/prisma.svg" |
91 | | - className="dark:block hidden h-full contain" |
92 | | - alt="Prisma" |
93 | | - /> |
94 | | - <img |
95 | | - src="/icons/technologies/prisma_light.svg" |
96 | | - className="dark:hidden h-full contain" |
97 | | - alt="Prisma" |
98 | | - /> |
| 102 | + <div className="dark:block hidden h-full w-full relative"> |
| 103 | + <Image |
| 104 | + src="/icons/technologies/prisma.svg" |
| 105 | + fill |
| 106 | + className="object-contain" |
| 107 | + alt="Prisma" |
| 108 | + priority={true} |
| 109 | + /> |
| 110 | + </div> |
| 111 | + <div className="dark:hidden h-full w-full relative"> |
| 112 | + <Image |
| 113 | + src="/icons/technologies/prisma_light.svg" |
| 114 | + fill |
| 115 | + className="object-contain" |
| 116 | + alt="Prisma" |
| 117 | + priority={true} |
| 118 | + /> |
| 119 | + </div> |
99 | 120 | </div> |
100 | 121 | </div> |
101 | 122 | </div> |
|
0 commit comments