libreria-astro-lefebvre 0.2.18 → 0.2.20
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
|
@@ -17,11 +17,21 @@ export const metadata: ComponentMetadata = {
|
|
|
17
17
|
{
|
|
18
18
|
name: 'title',
|
|
19
19
|
type: 'text',
|
|
20
|
-
help: 'Título principal (h2) que aparece superpuesto sobre la imagen o vídeo de fondo. Si se deja vacío, no se muestra',
|
|
20
|
+
help: 'Título principal (h2 por defecto, o h1 según "Tipo de título") que aparece superpuesto sobre la imagen o vídeo de fondo. Si se deja vacío, no se muestra',
|
|
21
21
|
label: 'Texto del título',
|
|
22
22
|
mandatory: false,
|
|
23
23
|
example_value: 'Prueba GenIA-L gratis durante 30 días'
|
|
24
24
|
},
|
|
25
|
+
{
|
|
26
|
+
name: 'titleTag',
|
|
27
|
+
type: 'select',
|
|
28
|
+
help: 'Etiqueta HTML del título. Ambas opciones tienen exactamente el mismo aspecto; solo cambia la jerarquía semántica. Usa h1 solo si el título es el encabezado principal de la página (una sola vez por página)',
|
|
29
|
+
label: 'Tipo de título',
|
|
30
|
+
mandatory: false,
|
|
31
|
+
options: ['h2', 'h1'],
|
|
32
|
+
options_labels: ['Encabezado h2 (por defecto)', 'Encabezado h1'],
|
|
33
|
+
example_value: 'h2'
|
|
34
|
+
},
|
|
25
35
|
{
|
|
26
36
|
name: 'subtitle',
|
|
27
37
|
type: 'text',
|
|
@@ -3,6 +3,7 @@ import { extractImageUrl } from '../../lib/functions.js';
|
|
|
3
3
|
|
|
4
4
|
const {
|
|
5
5
|
title,
|
|
6
|
+
titleTag = 'h2',
|
|
6
7
|
subtitle,
|
|
7
8
|
description,
|
|
8
9
|
txtBtn,
|
|
@@ -15,6 +16,7 @@ const {
|
|
|
15
16
|
} = Astro.props;
|
|
16
17
|
|
|
17
18
|
const srcUrl = extractImageUrl(src);
|
|
19
|
+
const TitleTag = titleTag === 'h1' ? 'h1' : 'h2';
|
|
18
20
|
---
|
|
19
21
|
|
|
20
22
|
<section class="w-full flex items-center justify-center pb-9">
|
|
@@ -34,7 +36,7 @@ const srcUrl = extractImageUrl(src);
|
|
|
34
36
|
{(title || subtitle || description || (showBtn && linkBtn)) && (
|
|
35
37
|
<div class="absolute inset-0 flex flex-col justify-center items-center p-4 md:p-6 lg:p-8 z-10">
|
|
36
38
|
<div class="max-w-4xl w-full text-center">
|
|
37
|
-
{title && <
|
|
39
|
+
{title && <TitleTag class="text-[#1b1b1b] font-heading text-[28px] sm:text-[36px] md:text-[48px] lg:text-[64px] font-medium text-center leading-tight mb-4">{title}</TitleTag>}
|
|
38
40
|
{subtitle && <p class="text-[#1b1b1b] font-body sm:font-heading text-[18px] sm:text-[22px] md:text-[28px] lg:text-[32px] font-normal leading-tight text-center mb-4">{subtitle}</p>}
|
|
39
41
|
{description && <div class="text-[#403830] font-body lg:font-heading text-sm sm:text-base md:text-lg lg:text-xl font-normal leading-7 mb-6 text-center" set:html={description}></div>}
|
|
40
42
|
|
|
@@ -27,11 +27,11 @@ const fontClass = fontSize === 'xl' || fontSize === '2xl' ? 'font-heading' : 'fo
|
|
|
27
27
|
{
|
|
28
28
|
!title || title.trim() === "" ? null
|
|
29
29
|
: h1Subtitle && h1Subtitle.trim() !== ""
|
|
30
|
-
? <h1 class="font-
|
|
30
|
+
? <h1 class="flex items-center gap-2 before:content-[''] before:size-1.5 before:shrink-0 before:rounded-full before:bg-[#d71635] font-mono text-[#403830] text-center text-sm leading-5 tracking-[0.84px] uppercase font-normal rounded bg-black/[0.04] [font-feature-settings:'liga'_off,'clig'_off] mt-20 mb-8 w-fit py-2 px-3 mx-auto"><span set:html={title}></span></h1>
|
|
31
31
|
: tipo === "h1" ? <h1 class="font-heading text-[#1b1b1b] text-[40px] md:text-[56px] font-normal text-center leading-[48px] md:leading-[64px] px-6 md:my-12" set:html={title}></h1>
|
|
32
32
|
: tipo === "h1-40" ? <h1 class="font-heading text-[#1b1b1b] text-[36px] md:text-[40px] font-normal text-center leading-[44px] md:leading-[48px] mb-8" set:html={title}></h1>
|
|
33
33
|
: tipo === "h1-40-left" ? <h1 class="font-heading text-[#1b1b1b] text-[36px] md:text-[40px] font-normal text-left leading-[44px] md:leading-[48px] mb-0 md:mb-8" set:html={title}></h1>
|
|
34
|
-
: tipo === "h2-mb24" ? <h2 class="font-
|
|
34
|
+
: tipo === "h2-mb24" ? <h2 class="flex items-center gap-2 before:content-[''] before:size-1.5 before:shrink-0 before:rounded-full before:bg-[#d71635] font-mono text-[#403830] text-center text-sm leading-5 tracking-[0.84px] uppercase font-normal rounded bg-black/[0.04] [font-feature-settings:'liga'_off,'clig'_off] mb-6 w-fit py-2 px-3 mx-auto"><span set:html={title}></span></h2>
|
|
35
35
|
: tipo === "h2" ? <h2 class="font-heading text-[#1b1b1b] text-[36px] md:text-[40px] font-normal text-center leading-[44px] md:leading-[48px] my-8 md:mb-8" set:html={title}></h2>
|
|
36
36
|
: tipo === "h2-mb64" ? <h2 class="font-heading text-[#1b1b1b] text-[36px] md:text-[40px] font-normal text-center leading-[44px] md:leading-[48px] p-6 md:p-2 md:pb-6 mb-0" set:html={title}></h2>
|
|
37
37
|
: tipo === "h2-mb64-max900" ? <h2 class="font-heading text-[#1b1b1b] text-[36px] md:text-[40px] max-w-[900px] mx-auto font-normal text-center leading-[44px] md:leading-[48px] p-6 md:p-2 md:pb-6 mb-0" set:html={title}></h2>
|