22import { Image } from " astro:assets"
33import ferrisCooking from " ~/assets/images/webp/ferris_cooking.jpg"
44
5+ import { defaultLang , ui } from " ~/i18n/ui"
6+
7+ const lang = defaultLang
8+
9+ type TranslationKey = keyof (typeof ui )[typeof defaultLang ]
10+ const t = (key : TranslationKey ) => ui [lang ][key ]
511const projectId = import .meta .env .VITE_CLARITY_PROJECT_ID
612---
713
@@ -17,33 +23,29 @@ const projectId = import.meta.env.VITE_CLARITY_PROJECT_ID
1723 <div class =" relative aspect-4/3 md:aspect-auto" >
1824 <Image
1925 src ={ ferrisCooking }
20- alt =" Ferris cocinando cookies "
26+ alt ={ t ( " cookie.banner.img.alt " ) }
2127 class =" absolute inset-0 w-full h-full object-cover"
2228 />
2329 </div >
2430
2531 <div class =" flex flex-col justify-center gap-5 p-6 overflow-y-auto" >
2632 <div class =" flex flex-col gap-3" >
27- <h2 class =" text-secondary font-semibold text-lg" >🍪 Aviso de Cookies </h2 >
33+ <h2 class =" text-secondary font-semibold text-lg" >{ t ( " cookie.banner.title " ) } </h2 >
2834 <p class =" text-sm text-secondary/70 leading-relaxed" >
29- Utilizamos cookies propias y de terceros para mejorar tu experiencia
30- en nuestro sitio web, analizar el tráfico y entender cómo interactúan
31- los usuarios con nuestro contenido.
35+ { t (" cookie.banner.purpose" )}
3236 </p >
3337 <p class =" text-sm text-secondary/70 leading-relaxed" >
34- También utilizamos <span class =" text-secondary font-medium" >Microsoft Clarity</span >,
35- una herramienta de análisis que nos permite comprender el comportamiento
36- de navegación mediante mapas de calor y grabaciones anónimas de sesiones,
37- con el fin de optimizar nuestro servicio.
38+ { t (" cookie.banner.company.also" )} <span class =" text-secondary font-medium" >{ t (" cookie.banner.company" )} </span >
39+ { t (" cookie.banner.company.description" )}
3840 </p >
3941 <p class =" text-xs text-secondary/50 leading-relaxed" >
40- Al hacer clic en "Aceptar", consientes el uso de cookies según nuestra
42+ { t ( " cookie.banner.accept " ) }
4143 <a
4244 href =" /privacidad"
4345 target =" _blank"
4446 rel =" noopener noreferrer"
4547 class =" text-yellow hover:underline"
46- >Política de Privacidad </a >.
48+ >{ t ( " policy.privacy " ) } </a >.
4749 </p >
4850 </div >
4951
@@ -52,13 +54,13 @@ const projectId = import.meta.env.VITE_CLARITY_PROJECT_ID
5254 id =" reject-cookies"
5355 class =" flex-1 px-4 py-2 text-sm text-secondary/60 border border-stroke-color rounded-lg hover:bg-stroke-color/20 transition-colors cursor-pointer"
5456 >
55- Rechazar
57+ { t ( " text.denied " ) }
5658 </button >
5759 <button
5860 id =" accept-cookies"
5961 class =" flex-1 px-4 py-2 text-sm bg-yellow text-primary font-semibold rounded-lg hover:opacity-90 transition-opacity cursor-pointer"
6062 >
61- Aceptar
63+ { t ( " text.accept " ) }
6264 </button >
6365 </div >
6466 </div >
0 commit comments