libreria-astro-lefebvre 0.1.2 → 0.1.3
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
|
@@ -20,7 +20,7 @@ export const metadata: ComponentMetadata = {
|
|
|
20
20
|
{
|
|
21
21
|
name: 'title',
|
|
22
22
|
type: 'text',
|
|
23
|
-
help: 'Título principal. Admite HTML. La etiqueta HTML
|
|
23
|
+
help: 'Título principal. Admite HTML. La etiqueta HTML y su estilo visual se eligen en el campo "Etiqueta del título" (cada variante tiene su propio tamaño, leading y márgenes).',
|
|
24
24
|
label: 'Texto del título',
|
|
25
25
|
mandatory: true,
|
|
26
26
|
example_value: 'Inteligencia artificial al servicio del Derecho'
|
|
@@ -37,7 +37,7 @@ export const metadata: ComponentMetadata = {
|
|
|
37
37
|
{
|
|
38
38
|
name: 'titleAlign',
|
|
39
39
|
type: 'select',
|
|
40
|
-
help: 'Alineación horizontal del pretítulo, del título y del botón. La descripción siempre
|
|
40
|
+
help: 'Alineación horizontal del pretítulo, del título, de la descripción y del botón. La descripción mantiene siempre ancho completo (w-full); solo cambia la alineación de su texto interno.',
|
|
41
41
|
label: 'Alineación del título',
|
|
42
42
|
options: ['left', 'center', 'right'],
|
|
43
43
|
options_labels: ['Izquierda', 'Centro', 'Derecha'],
|
|
@@ -46,7 +46,7 @@ export const metadata: ComponentMetadata = {
|
|
|
46
46
|
{
|
|
47
47
|
name: 'description',
|
|
48
48
|
type: 'textArea',
|
|
49
|
-
help: 'Descripción a ancho completo del contenedor padre. Admite HTML (editor enriquecido). Solo se muestra si tiene valor.',
|
|
49
|
+
help: 'Descripción a ancho completo del contenedor padre. Admite HTML (editor enriquecido). La alineación del texto interno sigue el campo "Alineación del título". Solo se muestra si tiene valor.',
|
|
50
50
|
label: 'Descripción',
|
|
51
51
|
mandatory: false,
|
|
52
52
|
example_value: '<p>Descubre cómo la IA jurídica transforma el trabajo diario de los despachos de abogados.</p>'
|
|
@@ -12,10 +12,15 @@ const {
|
|
|
12
12
|
|
|
13
13
|
const alignClass = titleAlign === 'center' ? 'text-center' : titleAlign === 'right' ? 'text-right' : 'text-left';
|
|
14
14
|
const btnSelf = titleAlign === 'center' ? 'self-center' : titleAlign === 'right' ? 'self-end' : 'self-start';
|
|
15
|
+
const pretitleMargin = titleAlign === 'center' ? 'mx-auto' : titleAlign === 'right' ? 'ml-auto' : '';
|
|
15
16
|
---
|
|
16
17
|
|
|
17
18
|
<section class="w-full flex flex-col gap-4">
|
|
18
|
-
{pretitle &&
|
|
19
|
+
{pretitle && (
|
|
20
|
+
<div class={`w-auto w-fit ${pretitleMargin}`}>
|
|
21
|
+
<span class="block font-inter text-[#363942] text-sm md:text-base font-normal rounded-sm bg-[#F2F3F8] py-2 px-3" set:html={pretitle}></span>
|
|
22
|
+
</div>
|
|
23
|
+
)}
|
|
19
24
|
|
|
20
25
|
{title && titleTag === 'h1' && <h1 class={`font-poppins text-[#262626] text-[36px] md:text-[56px] font-normal ${alignClass} leading-[44px] md:leading-[64px] px-6 md:my-12`} set:html={title}></h1>}
|
|
21
26
|
{title && titleTag === 'h1-40' && <h1 class={`font-poppins text-[#262626] text-[40px] font-normal ${alignClass} leading-[48px] mb-8`} set:html={title}></h1>}
|
|
@@ -25,7 +30,7 @@ const btnSelf = titleAlign === 'center' ? 'self-center' : titleAlign === 'right'
|
|
|
25
30
|
{title && titleTag === 'h5' && <h5 class={`font-poppins text-[#262626] ${alignClass}`} set:html={title}></h5>}
|
|
26
31
|
{title && titleTag === 'h6' && <h6 class={`font-poppins text-[#262626] ${alignClass}`} set:html={title}></h6>}
|
|
27
32
|
|
|
28
|
-
{description && <div class=
|
|
33
|
+
{description && <div class={`w-full font-inter text-[#363942] text-base font-normal leading-7 ${alignClass}`} set:html={description}></div>}
|
|
29
34
|
|
|
30
35
|
{showBtn && btnLabel && (
|
|
31
36
|
<a href={btnSrc} class={`${btnSelf} text-white font-inter font-normal bg-[#2134F1] px-5 py-3 border border-[#2134F1] rounded-xl hover:bg-white hover:text-[#2134F1] transition-all duration-300`}>{btnLabel}</a>
|