libreria-astro-lefebvre 0.1.151 → 0.2.1
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: ['formulario', 'lf2', 'leads', 'imagen', 'contacto'],
|
|
11
11
|
fields: [
|
|
12
|
+
{
|
|
13
|
+
name: 'categoria',
|
|
14
|
+
type: 'text',
|
|
15
|
+
help: 'Etiqueta opcional (span) encima del título, con bullet rojo, fondo gris suave y tipografía mono en mayúsculas. Solo se muestra si "Mostrar imagen" está desactivado y el campo tiene valor',
|
|
16
|
+
label: 'Categoría',
|
|
17
|
+
mandatory: false,
|
|
18
|
+
example_value: 'Contacto'
|
|
19
|
+
},
|
|
12
20
|
{
|
|
13
21
|
name: 'title',
|
|
14
22
|
type: 'text',
|
|
@@ -9,6 +9,14 @@ export const metadata: ComponentMetadata = {
|
|
|
9
9
|
priority: 1,
|
|
10
10
|
tags: ['texto', 'html', 'titulo', 'contenido'],
|
|
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: 'Garantías'
|
|
19
|
+
},
|
|
12
20
|
{
|
|
13
21
|
name: 'title',
|
|
14
22
|
type: 'text',
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { extractImageUrl } from '../../lib/functions.js';
|
|
3
3
|
|
|
4
4
|
const {
|
|
5
|
+
categoria = "",
|
|
5
6
|
title,
|
|
6
7
|
description = "",
|
|
7
8
|
showImage = false,
|
|
@@ -72,6 +73,7 @@ const structuredData = `<script type="application/ld+json">
|
|
|
72
73
|
<article class="flex flex-col items-center justify-center">
|
|
73
74
|
<div class={`flex-col md:flex ${orientation === 'left' ? 'flex-row' : 'flex-row-reverse'} w-full items-start gap-4 justify-center`}>
|
|
74
75
|
<div class="w-full md:w-1/2 flex justify-start mb-8 flex-col">
|
|
76
|
+
{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>}
|
|
75
77
|
<h2 class="w-[300px] sm:w-auto font-heading text-[#1b1b1b] text-[28px] leading-9 md:text-[32px] md:leading-10 font-semibold text-left mb-4 text-wrap">{title}</h2>
|
|
76
78
|
<p class="text-[#403830] font-heading text-xl leading-7">{description}</p>
|
|
77
79
|
</div>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
|
|
3
3
|
const {
|
|
4
|
+
categoria = "",
|
|
4
5
|
title = "",
|
|
5
6
|
tipo = "none",
|
|
6
7
|
contentHTML = "",
|
|
@@ -12,6 +13,7 @@ const color = rawColor?.toLowerCase() === '#262626' ? '#1b1b1b' : (rawColor ?? '
|
|
|
12
13
|
---
|
|
13
14
|
|
|
14
15
|
<div class:list={["w-full flex flex-col gap-3 px-8 md:px-0 mb-8", align === "center" ? "items-center" : "items-start"]}>
|
|
16
|
+
{categoria?.trim() && <span class="inline-flex items-center gap-2 px-2 py-1 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>}
|
|
15
17
|
{title && tipo === "h1" && <h1 class={`font-heading text-[${color}] text-[36px] leading-[44px] md:text-[40px] md:leading-[48px] font-semibold mb-4`} set:html={title}></h1>}
|
|
16
18
|
{title && tipo === "h2-40" && <h2 class={`font-heading text-[${color}] text-[36px] leading-[44px] md:text-[40px] md:leading-[48px] font-normal text-center my-8`} set:html={title}></h2>}
|
|
17
19
|
{title && tipo === "h2-32" && <h2 class={`font-heading text-[${color}] text-[28px] leading-9 md:text-[32px] md:leading-10 font-semibold mb-4`} set:html={title}></h2>}
|