libreria-astro-lefebvre 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -9,6 +9,14 @@ export const metadata: ComponentMetadata = {
|
|
|
9
9
|
priority: 1,
|
|
10
10
|
tags: ['contenido', 'contacto', 'icono', 'seo', 'listado'],
|
|
11
11
|
fields: [
|
|
12
|
+
{
|
|
13
|
+
name: 'categoria',
|
|
14
|
+
type: 'text',
|
|
15
|
+
help: 'Etiqueta opcional (span) que se muestra encima del título, con bullet rojo, fondo gris suave y tipografía mono en mayúsculas. Solo se renderiza si tiene valor',
|
|
16
|
+
label: 'Categoría',
|
|
17
|
+
mandatory: false,
|
|
18
|
+
example_value: 'Otras vías'
|
|
19
|
+
},
|
|
12
20
|
{
|
|
13
21
|
name: 'title',
|
|
14
22
|
type: 'text',
|
|
@@ -5,9 +5,10 @@ interface QuitoItem {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
const {
|
|
8
|
+
categoria,
|
|
8
9
|
title,
|
|
9
10
|
items = [],
|
|
10
|
-
}: { title?: string; items?: QuitoItem[] } = Astro.props;
|
|
11
|
+
}: { categoria?: string; title?: string; items?: QuitoItem[] } = Astro.props;
|
|
11
12
|
|
|
12
13
|
const stripHtml = (s?: string) => (s ?? '').replace(/<[^>]*>/g, '').trim();
|
|
13
14
|
const phone = stripHtml(items.find((item: QuitoItem) => item.icon === "phone")?.text);
|
|
@@ -42,6 +43,7 @@ const {
|
|
|
42
43
|
---
|
|
43
44
|
<article class="max-w-7xl w-full flex flex-col text-left items-start p-4">
|
|
44
45
|
<div class="w-full flex flex-col">
|
|
46
|
+
{categoria?.trim() && <span class="self-start inline-flex items-center gap-2 px-2 py-1 mb-4 rounded bg-black/[0.04] text-center font-mono text-sm font-normal leading-5 tracking-[0.84px] uppercase text-[#403830] [font-feature-settings:'liga'_off,'clig'_off]"><span class="size-1.5 rounded-full bg-[#d71635]" aria-hidden="true"></span>{categoria}</span>}
|
|
45
47
|
<h2 class="font-heading text-[28px] leading-9 md:text-[32px] md:leading-10 font-normal mb-12">{title}</h2>
|
|
46
48
|
</div>
|
|
47
49
|
|
|
@@ -21,10 +21,10 @@ const {
|
|
|
21
21
|
<div class="w-full flex">
|
|
22
22
|
{showBtn ? (
|
|
23
23
|
<div class="flex justify-center gap-2">
|
|
24
|
-
<a href={buttonUrl} class="pl-0 lg:pl-5 font-body font-semibold text-base leading-6 text-[#
|
|
24
|
+
<a href={buttonUrl} class="pl-0 lg:pl-5 font-body font-semibold text-base leading-6 text-[#1B1B1B] hover:underline transition-all duration-300 cursor-pointer">{buttonText}</a>
|
|
25
25
|
<div class="flex justify-center">
|
|
26
26
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
27
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.7455 20.8049C7.43901 20.5263 7.41642 20.052 7.69505 19.7455L14.7364 12L7.69505 4.2545C7.41642 3.94801 7.43901 3.47367 7.7455 3.19504C8.05199 2.91641 8.52633 2.939 8.80496 3.24549L16.305 11.4955C16.565 11.7816 16.565 12.2184 16.305 12.5045L8.80496 20.7545C8.52633 21.061 8.05199 21.0836 7.7455 20.8049Z" fill="#
|
|
27
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.7455 20.8049C7.43901 20.5263 7.41642 20.052 7.69505 19.7455L14.7364 12L7.69505 4.2545C7.41642 3.94801 7.43901 3.47367 7.7455 3.19504C8.05199 2.91641 8.52633 2.939 8.80496 3.24549L16.305 11.4955C16.565 11.7816 16.565 12.2184 16.305 12.5045L8.80496 20.7545C8.52633 21.061 8.05199 21.0836 7.7455 20.8049Z" fill="#1B1B1B"/>
|
|
28
28
|
</svg>
|
|
29
29
|
</div>
|
|
30
30
|
</div>
|
|
@@ -9,17 +9,17 @@ const {
|
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
<p class="px-8 md:px-0 my-8 mb-2"><a href={url} target={target} rel={target === "_blank" ? "noopener noreferrer" : undefined} aria-label={text} class="inline-flex items-center gap-1 text-[#
|
|
12
|
+
<p class="px-8 md:px-0 my-8 mb-2"><a href={url} target={target} rel={target === "_blank" ? "noopener noreferrer" : undefined} aria-label={text} class="inline-flex items-center gap-1 text-[#1B1B1B] font-body font-semibold text-base leading-6 text-center no-underline hover:underline transition-all duration-300 cursor-pointer">
|
|
13
13
|
{icon === "play" && (
|
|
14
14
|
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" aria-hidden="true" focusable="false">
|
|
15
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.25476 4.25476C5.77849 2.73102 7.84512 1.875 10 1.875C12.1549 1.875 14.2215 2.73102 15.7452 4.25476C17.269 5.77849 18.125 7.84512 18.125 10C18.125 12.1549 17.269 14.2215 15.7452 15.7452C14.2215 17.269 12.1549 18.125 10 18.125C7.84512 18.125 5.77849 17.269 4.25476 15.7452C2.73102 14.2215 1.875 12.1549 1.875 10C1.875 7.84512 2.73102 5.77849 4.25476 4.25476ZM10 3.0787C8.16436 3.0787 6.4039 3.80791 5.1059 5.1059C3.80791 6.4039 3.0787 8.16436 3.0787 10C3.0787 11.8356 3.80791 13.5961 5.1059 14.8941C6.4039 16.1921 8.16436 16.9213 10 16.9213C11.8356 16.9213 13.5961 16.1921 14.8941 14.8941C16.1921 13.5961 16.9213 11.8356 16.9213 10C16.9213 8.16436 16.1921 6.4039 14.8941 5.1059C13.5961 3.80791 11.8356 3.0787 10 3.0787Z" fill="#
|
|
16
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.48482 7.62824C8.41036 7.6748 8.34491 7.76731 8.34491 7.90342V12.0966C8.34491 12.2327 8.41036 12.3252 8.48483 12.3718C8.55637 12.4165 8.6336 12.4208 8.71111 12.375L12.2622 10.2785C12.349 10.2272 12.4074 10.1279 12.4074 10C12.4074 9.87213 12.349 9.77282 12.2622 9.72154L8.71112 7.62501C8.6336 7.57924 8.55636 7.58351 8.48482 7.62824ZM9.32308 6.58847L12.8742 8.68503C13.8567 9.26522 13.8567 10.7348 12.8742 11.3149L9.32309 13.4115C9.32309 13.4115 9.3231 13.4115 9.32309 13.4115C8.29502 14.0185 7.1412 13.1917 7.1412 12.0966V7.90342C7.1412 6.80822 8.29505 5.98152 9.32308 6.58847Z" fill="#
|
|
15
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.25476 4.25476C5.77849 2.73102 7.84512 1.875 10 1.875C12.1549 1.875 14.2215 2.73102 15.7452 4.25476C17.269 5.77849 18.125 7.84512 18.125 10C18.125 12.1549 17.269 14.2215 15.7452 15.7452C14.2215 17.269 12.1549 18.125 10 18.125C7.84512 18.125 5.77849 17.269 4.25476 15.7452C2.73102 14.2215 1.875 12.1549 1.875 10C1.875 7.84512 2.73102 5.77849 4.25476 4.25476ZM10 3.0787C8.16436 3.0787 6.4039 3.80791 5.1059 5.1059C3.80791 6.4039 3.0787 8.16436 3.0787 10C3.0787 11.8356 3.80791 13.5961 5.1059 14.8941C6.4039 16.1921 8.16436 16.9213 10 16.9213C11.8356 16.9213 13.5961 16.1921 14.8941 14.8941C16.1921 13.5961 16.9213 11.8356 16.9213 10C16.9213 8.16436 16.1921 6.4039 14.8941 5.1059C13.5961 3.80791 11.8356 3.0787 10 3.0787Z" fill="#1B1B1B"/>
|
|
16
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.48482 7.62824C8.41036 7.6748 8.34491 7.76731 8.34491 7.90342V12.0966C8.34491 12.2327 8.41036 12.3252 8.48483 12.3718C8.55637 12.4165 8.6336 12.4208 8.71111 12.375L12.2622 10.2785C12.349 10.2272 12.4074 10.1279 12.4074 10C12.4074 9.87213 12.349 9.77282 12.2622 9.72154L8.71112 7.62501C8.6336 7.57924 8.55636 7.58351 8.48482 7.62824ZM9.32308 6.58847L12.8742 8.68503C13.8567 9.26522 13.8567 10.7348 12.8742 11.3149L9.32309 13.4115C9.32309 13.4115 9.3231 13.4115 9.32309 13.4115C8.29502 14.0185 7.1412 13.1917 7.1412 12.0966V7.90342C7.1412 6.80822 8.29505 5.98152 9.32308 6.58847Z" fill="#1B1B1B"/>
|
|
17
17
|
</svg>
|
|
18
18
|
)}
|
|
19
|
-
<span class={icon === "play" ? "text-[#
|
|
19
|
+
<span class={icon === "play" ? "text-[#1B1B1B] font-body text-base font-normal leading-6 underline" : ""}>{text}</span>
|
|
20
20
|
{icon !== "play" && (
|
|
21
21
|
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" aria-hidden="true" focusable="false">
|
|
22
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.444 4.39541C11.3124 4.42289 11.2168 4.47922 11.115 4.58917C10.9456 4.77214 10.8952 5.02993 10.9805 5.27748C11.0209 5.39451 11.1068 5.48907 12.8866 7.37436L14.7503 9.3487L9.15683 9.35414L3.56332 9.35958L3.46199 9.41616C3.2456 9.53697 3.125 9.74787 3.125 10.0054C3.125 10.2629 3.2456 10.4738 3.46199 10.5946L3.56332 10.6512L9.15683 10.6566L14.7503 10.6621L12.8866 12.6364C11.1068 14.5217 11.0209 14.6163 10.9805 14.7333C10.8952 14.9808 10.9456 15.2386 11.115 15.4216C11.2207 15.5359 11.3101 15.5867 11.4568 15.6161C11.5844 15.6417 11.7596 15.6103 11.8689 15.5422C11.913 15.5147 13.0399 14.3363 14.3732 12.9235C17.0572 10.0796 16.8723 10.2955 16.8723 10.0054C16.8723 9.7153 17.0572 9.93119 14.3732 7.08726C13.0399 5.67445 11.913 4.49626 11.8689 4.46907C11.7962 4.42416 11.6122 4.36966 11.5527 4.37542C11.5395 4.37669 11.4906 4.38569 11.444 4.39541Z" fill="#
|
|
22
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.444 4.39541C11.3124 4.42289 11.2168 4.47922 11.115 4.58917C10.9456 4.77214 10.8952 5.02993 10.9805 5.27748C11.0209 5.39451 11.1068 5.48907 12.8866 7.37436L14.7503 9.3487L9.15683 9.35414L3.56332 9.35958L3.46199 9.41616C3.2456 9.53697 3.125 9.74787 3.125 10.0054C3.125 10.2629 3.2456 10.4738 3.46199 10.5946L3.56332 10.6512L9.15683 10.6566L14.7503 10.6621L12.8866 12.6364C11.1068 14.5217 11.0209 14.6163 10.9805 14.7333C10.8952 14.9808 10.9456 15.2386 11.115 15.4216C11.2207 15.5359 11.3101 15.5867 11.4568 15.6161C11.5844 15.6417 11.7596 15.6103 11.8689 15.5422C11.913 15.5147 13.0399 14.3363 14.3732 12.9235C17.0572 10.0796 16.8723 10.2955 16.8723 10.0054C16.8723 9.7153 17.0572 9.93119 14.3732 7.08726C13.0399 5.67445 11.913 4.49626 11.8689 4.46907C11.7962 4.42416 11.6122 4.36966 11.5527 4.37542C11.5395 4.37669 11.4906 4.38569 11.444 4.39541Z" fill="#1B1B1B"/>
|
|
23
23
|
</svg>
|
|
24
24
|
)}
|
|
25
25
|
</a></p>
|