@lit-roa/custom-footer 0.1.9 → 0.1.10

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.
@@ -25,8 +25,13 @@ const metodosPago = {
25
25
  amex: { nombre: 'American Express', contenido: html `AMEX` },
26
26
  'mercado-pago': { nombre: 'Mercado Pago', contenido: html `<img src=${logoMercadoPago} alt="" />` },
27
27
  };
28
- /** Ancho (px) por debajo del cual el footer pasa a una columna con acordeones. */
29
- const ANCHO_ESTRECHO = 640;
28
+ /**
29
+ * Ancho de la ventana (px) desde el cual el footer pasa a una columna con
30
+ * acordeones. Se mide con media query, como el CSS: incluye la barra de
31
+ * desplazamiento (medir el componente la restaba y el cambio llegaba ~15 px tarde).
32
+ */
33
+ const ANCHO_ESTRECHO = 700;
34
+ const CONSULTA_ESTRECHO = `(max-width: ${ANCHO_ESTRECHO}px)`;
30
35
  /**
31
36
  * Footer genérico y responsive.
32
37
  *
@@ -65,344 +70,363 @@ let LrCustomFooter = class LrCustomFooter extends LitElement {
65
70
  this.estrecho = false;
66
71
  this.abiertos = new Set();
67
72
  this.conBoletin = false;
73
+ this.alCambiarAncho = () => {
74
+ this.estrecho = this.consulta?.matches ?? false;
75
+ };
68
76
  }
69
77
  static { this.styles = [
70
78
  tokens,
71
79
  estilosBase,
72
- css `
73
- :host {
74
- display: block;
75
- --_f-fondo: var(--lr-footer-fondo, #1c1917);
76
- --_f-fondo-alterno: var(--lr-footer-fondo-alterno, rgb(255 255 255 / 0.04));
77
- --_f-texto: var(--lr-footer-texto, #e7e5e4);
78
- --_f-titulos: var(--lr-footer-titulos, #ffffff);
79
- --_f-texto-suave: var(--lr-footer-texto-suave, #a8a29e);
80
- --_f-borde: var(--lr-footer-borde, #3a3431);
81
- --_f-ancho: var(--lr-footer-ancho-maximo, 1160px);
82
- }
83
- footer {
84
- background: var(--_f-fondo);
85
- color: var(--_f-texto);
86
- font-size: 0.875rem;
87
- }
88
- .cont {
89
- max-width: var(--_f-ancho);
90
- margin: 0 auto;
91
- padding: 3rem 2rem 0;
92
- }
93
- a {
94
- color: inherit;
95
- }
96
- a:focus-visible,
97
- button:focus-visible {
98
- outline: 2px solid var(--_color-primario);
99
- outline-offset: 2px;
100
- border-radius: 4px;
101
- }
102
- svg {
103
- flex: none;
104
- }
105
-
106
- .boletin {
107
- margin-bottom: 2.75rem;
108
- }
109
- .boletin[hidden] {
110
- display: none;
111
- }
112
-
113
- .rejilla {
114
- display: grid;
115
- grid-template-columns: 1.5fr repeat(var(--_grupos, 3), 1fr) 1.3fr;
116
- gap: 2rem;
117
- }
118
-
119
- .logo {
120
- display: inline-flex;
121
- align-items: center;
122
- gap: 0.625rem;
123
- font-size: 1.375rem;
124
- font-weight: 600;
125
- color: var(--_f-titulos);
126
- text-decoration: none;
127
- }
128
- .logo img {
129
- display: block;
130
- max-height: var(--lr-footer-alto-logo, 44px);
131
- max-width: 200px;
132
- object-fit: contain;
133
- }
134
- .descripcion {
135
- color: var(--_f-texto-suave);
136
- line-height: 1.6;
137
- margin: 1rem 0 1.25rem;
138
- max-width: 300px;
139
- }
140
- .redes {
141
- display: flex;
142
- flex-wrap: wrap;
143
- gap: 0.5rem;
144
- margin: 0;
145
- padding: 0;
146
- list-style: none;
147
- }
148
- .redes a {
149
- display: grid;
150
- place-items: center;
151
- width: 38px;
152
- height: 38px;
153
- border-radius: 999px;
154
- border: 1px solid var(--_f-borde);
155
- font-size: 1.25rem;
156
- transition: background 0.15s, border-color 0.15s;
157
- }
158
- .redes a:hover {
159
- background: var(--_color-primario);
160
- border-color: var(--_color-primario);
161
- color: var(--_color-sobre-primario);
162
- }
163
-
164
- .titulo {
165
- margin: 0 0 0.875rem;
166
- font-size: 0.9375rem;
167
- font-weight: 600;
168
- color: var(--_f-titulos);
169
- }
170
- .titulo button {
171
- all: unset;
172
- box-sizing: border-box;
173
- display: flex;
174
- width: 100%;
175
- justify-content: space-between;
176
- align-items: center;
177
- padding: 1rem 0.125rem;
178
- cursor: pointer;
179
- }
180
- .titulo button svg {
181
- color: var(--_f-texto-suave);
182
- font-size: 1.125rem;
183
- transition: transform 0.2s;
184
- }
185
- .titulo button[aria-expanded='true'] svg {
186
- transform: rotate(180deg);
187
- }
188
- .enlaces {
189
- list-style: none;
190
- margin: 0;
191
- padding: 0;
192
- display: grid;
193
- gap: 0.625rem;
194
- }
195
- .enlaces a {
196
- color: var(--_f-texto-suave);
197
- text-decoration: none;
198
- }
199
- .enlaces a:hover {
200
- color: var(--_f-texto);
201
- text-decoration: underline;
202
- text-underline-offset: 3px;
203
- }
204
-
205
- .dato {
206
- display: flex;
207
- gap: 0.625rem;
208
- color: var(--_f-texto-suave);
209
- margin: 0 0 0.75rem;
210
- line-height: 1.45;
211
- font-style: normal;
212
- }
213
- .dato svg {
214
- color: var(--_color-primario);
215
- font-size: 1.125rem;
216
- margin-top: 1px;
217
- }
218
- .dato a {
219
- text-decoration: none;
220
- }
221
- .dato a:hover {
222
- text-decoration: underline;
223
- }
224
-
225
- .pie {
226
- display: flex;
227
- justify-content: space-between;
228
- align-items: center;
229
- flex-wrap: wrap;
230
- gap: 1rem;
231
- border-top: 1px solid var(--_f-borde);
232
- margin-top: 2.75rem;
233
- padding: 1.375rem 0 1.625rem;
234
- color: var(--_f-texto-suave);
235
- font-size: 0.8125rem;
236
- }
237
- .derechos {
238
- display: flex;
239
- flex-wrap: wrap;
240
- gap: 0.5rem 1rem;
241
- align-items: center;
242
- }
243
- .pagos {
244
- display: flex;
245
- gap: 0.375rem;
246
- flex-wrap: wrap;
247
- margin: 0;
248
- padding: 0;
249
- list-style: none;
250
- }
251
- .pago {
252
- height: 26px;
253
- min-width: 44px;
254
- padding: 0 0.5rem;
255
- border-radius: 5px;
256
- background: #fff;
257
- display: inline-flex;
258
- align-items: center;
259
- justify-content: center;
260
- font-weight: 800;
261
- font-size: 0.6875rem;
262
- }
263
- .pago.visa {
264
- color: #1a1f71;
265
- font-style: italic;
266
- font-size: 0.8125rem;
267
- }
268
- .pago.amex {
269
- background: #2e77bc;
270
- color: #fff;
271
- }
272
- .pago.mastercard i {
273
- width: 15px;
274
- height: 15px;
275
- border-radius: 50%;
276
- background: #eb001b;
277
- }
278
- .pago.mastercard i + i {
279
- background: #f79e1b;
280
- margin-left: -6px;
281
- opacity: 0.9;
282
- }
283
- .pago.mercado-pago {
284
- gap: 5px;
285
- padding: 2px;
286
- color: #0a0a6b;
287
- font-weight: 700;
288
- font-size: 8.5px;
289
- line-height: 1;
290
- text-align: left;
291
- min-width: 94px;
292
- }
293
-
294
- /* Celular o contenedor angosto */
295
- .estrecho .cont {
296
- padding: 2rem 1rem 0;
297
- }
298
- .estrecho .boletin {
299
- margin-bottom: 1.75rem;
300
- }
301
- .estrecho .rejilla {
302
- grid-template-columns: 1fr;
303
- gap: 0;
304
- }
305
- .estrecho .marca {
306
- text-align: center;
307
- padding-bottom: 1.5rem;
308
- }
309
- .estrecho .descripcion {
310
- margin: 0.875rem auto 1.125rem;
311
- }
312
- .estrecho .redes {
313
- justify-content: center;
314
- }
315
- .estrecho .grupo {
316
- border-top: 1px solid var(--_f-borde);
317
- }
318
- .estrecho .grupo .titulo {
319
- margin: 0;
320
- }
321
- .estrecho .enlaces {
322
- padding: 0 0.125rem 1rem;
323
- }
324
- .estrecho .enlaces[hidden] {
325
- display: none;
326
- }
327
- .estrecho .contacto {
328
- border-top: 1px solid var(--_f-borde);
329
- padding-top: 1.25rem;
330
- }
331
- .estrecho .pie {
332
- flex-direction: column;
333
- text-align: center;
334
- margin-top: 1.5rem;
335
- }
336
- .estrecho .derechos,
337
- .estrecho .pagos {
338
- justify-content: center;
339
- }
80
+ css `
81
+ :host {
82
+ display: block;
83
+ --_f-fondo: var(--lr-footer-fondo, #1c1917);
84
+ --_f-fondo-alterno: var(--lr-footer-fondo-alterno, rgb(255 255 255 / 0.04));
85
+ --_f-texto: var(--lr-footer-texto, #e7e5e4);
86
+ --_f-titulos: var(--lr-footer-titulos, #ffffff);
87
+ --_f-texto-suave: var(--lr-footer-texto-suave, #a8a29e);
88
+ --_f-borde: var(--lr-footer-borde, #3a3431);
89
+ --_f-ancho: var(--lr-footer-ancho-maximo, 1160px);
90
+ }
91
+ footer {
92
+ background: var(--_f-fondo);
93
+ color: var(--_f-texto);
94
+ font-size: 0.875rem;
95
+ }
96
+ .cont {
97
+ max-width: var(--_f-ancho);
98
+ margin: 0 auto;
99
+ padding: 3rem 2rem 0;
100
+ }
101
+ a {
102
+ color: inherit;
103
+ }
104
+ a:focus-visible,
105
+ button:focus-visible {
106
+ outline: 2px solid var(--_color-primario);
107
+ outline-offset: 2px;
108
+ border-radius: 4px;
109
+ }
110
+ svg {
111
+ flex: none;
112
+ }
113
+
114
+ .boletin {
115
+ margin-bottom: 2.75rem;
116
+ }
117
+ .boletin[hidden] {
118
+ display: none;
119
+ }
120
+
121
+ .rejilla {
122
+ display: grid;
123
+ /* Contacto con mínimo fijo: un correo largo se parte en vez de ensanchar */
124
+ grid-template-columns: 1.5fr repeat(var(--_grupos, 3), 1fr) minmax(9rem, 1.3fr);
125
+ gap: 2rem;
126
+ }
127
+
128
+ .logo {
129
+ display: inline-flex;
130
+ align-items: center;
131
+ gap: 0.625rem;
132
+ font-size: 1.375rem;
133
+ font-weight: 600;
134
+ color: var(--_f-titulos);
135
+ text-decoration: none;
136
+ }
137
+ .logo img {
138
+ display: block;
139
+ max-height: var(--lr-footer-alto-logo, 44px);
140
+ max-width: 200px;
141
+ object-fit: contain;
142
+ }
143
+ .descripcion {
144
+ color: var(--_f-texto-suave);
145
+ line-height: 1.6;
146
+ margin: 1rem 0 1.25rem;
147
+ max-width: 300px;
148
+ }
149
+ .redes {
150
+ display: flex;
151
+ flex-wrap: wrap;
152
+ gap: 0.5rem;
153
+ margin: 0;
154
+ padding: 0;
155
+ list-style: none;
156
+ }
157
+ .redes a {
158
+ display: grid;
159
+ place-items: center;
160
+ width: 38px;
161
+ height: 38px;
162
+ border-radius: 999px;
163
+ border: 1px solid var(--_f-borde);
164
+ font-size: 1.25rem;
165
+ transition: background 0.15s, border-color 0.15s;
166
+ }
167
+ .redes a:hover {
168
+ background: var(--_color-primario);
169
+ border-color: var(--_color-primario);
170
+ color: var(--_color-sobre-primario);
171
+ }
172
+
173
+ .titulo {
174
+ margin: 0 0 0.875rem;
175
+ font-size: 0.9375rem;
176
+ font-weight: 600;
177
+ color: var(--_f-titulos);
178
+ }
179
+ .titulo button {
180
+ all: unset;
181
+ box-sizing: border-box;
182
+ display: flex;
183
+ width: 100%;
184
+ justify-content: space-between;
185
+ align-items: center;
186
+ padding: 1rem 0.125rem;
187
+ cursor: pointer;
188
+ }
189
+ .titulo button svg {
190
+ color: var(--_f-texto-suave);
191
+ font-size: 1.125rem;
192
+ transition: transform 0.2s;
193
+ }
194
+ .titulo button[aria-expanded='true'] svg {
195
+ transform: rotate(180deg);
196
+ }
197
+ .enlaces {
198
+ list-style: none;
199
+ margin: 0;
200
+ padding: 0;
201
+ display: grid;
202
+ gap: 0.625rem;
203
+ }
204
+ .enlaces a {
205
+ color: var(--_f-texto-suave);
206
+ text-decoration: none;
207
+ }
208
+ .enlaces a:hover {
209
+ color: var(--_f-texto);
210
+ text-decoration: underline;
211
+ text-underline-offset: 3px;
212
+ }
213
+
214
+ .dato {
215
+ display: flex;
216
+ gap: 0.625rem;
217
+ color: var(--_f-texto-suave);
218
+ margin: 0 0 0.75rem;
219
+ line-height: 1.45;
220
+ font-style: normal;
221
+ }
222
+ .dato svg {
223
+ color: var(--_color-primario);
224
+ font-size: 1.125rem;
225
+ margin-top: 1px;
226
+ }
227
+ .dato > span,
228
+ .dato > a {
229
+ min-width: 0;
230
+ /* Correos y direcciones largas parten la línea en vez de desbordar */
231
+ overflow-wrap: anywhere;
232
+ }
233
+ .dato a {
234
+ text-decoration: none;
235
+ }
236
+ .dato a:hover {
237
+ text-decoration: underline;
238
+ }
239
+
240
+ .pie {
241
+ display: flex;
242
+ justify-content: space-between;
243
+ align-items: center;
244
+ flex-wrap: wrap;
245
+ gap: 1rem;
246
+ border-top: 1px solid var(--_f-borde);
247
+ margin-top: 2.75rem;
248
+ padding: 1.375rem 0 1.625rem;
249
+ color: var(--_f-texto-suave);
250
+ font-size: 0.8125rem;
251
+ }
252
+ .derechos {
253
+ display: flex;
254
+ flex-wrap: wrap;
255
+ gap: 0.5rem 1rem;
256
+ align-items: center;
257
+ }
258
+ .pagos {
259
+ display: flex;
260
+ gap: 0.375rem;
261
+ flex-wrap: wrap;
262
+ margin: 0;
263
+ padding: 0;
264
+ list-style: none;
265
+ }
266
+ .pago {
267
+ height: 26px;
268
+ min-width: 44px;
269
+ padding: 0 0.5rem;
270
+ border-radius: 5px;
271
+ background: #fff;
272
+ display: inline-flex;
273
+ align-items: center;
274
+ justify-content: center;
275
+ font-weight: 800;
276
+ font-size: 0.6875rem;
277
+ }
278
+ .pago.visa {
279
+ color: #1a1f71;
280
+ font-style: italic;
281
+ font-size: 0.8125rem;
282
+ }
283
+ .pago.amex {
284
+ background: #2e77bc;
285
+ color: #fff;
286
+ }
287
+ .pago.mastercard i {
288
+ width: 15px;
289
+ height: 15px;
290
+ border-radius: 50%;
291
+ background: #eb001b;
292
+ }
293
+ .pago.mastercard i + i {
294
+ background: #f79e1b;
295
+ margin-left: -6px;
296
+ opacity: 0.9;
297
+ }
298
+ .pago.mercado-pago {
299
+ gap: 5px;
300
+ padding: 2px;
301
+ color: #0a0a6b;
302
+ font-weight: 700;
303
+ font-size: 8.5px;
304
+ line-height: 1;
305
+ text-align: left;
306
+ min-width: 94px;
307
+ }
308
+
309
+ /* Tableta: la marca ocupa su propia fila y deja espacio a las columnas */
310
+ @media (max-width: 960px) {
311
+ .rejilla {
312
+ grid-template-columns: repeat(var(--_grupos, 3), minmax(0, 1fr)) minmax(9rem, 1.3fr);
313
+ }
314
+ .marca {
315
+ grid-column: 1 / -1;
316
+ }
317
+ }
318
+
319
+ /* Celular */
320
+ .estrecho .cont {
321
+ padding: 2rem 1rem 0;
322
+ }
323
+ .estrecho .boletin {
324
+ margin-bottom: 1.75rem;
325
+ }
326
+ .estrecho .rejilla {
327
+ grid-template-columns: minmax(0, 1fr);
328
+ gap: 0;
329
+ }
330
+ .estrecho .marca {
331
+ text-align: center;
332
+ padding-bottom: 1.5rem;
333
+ }
334
+ .estrecho .descripcion {
335
+ margin: 0.875rem auto 1.125rem;
336
+ }
337
+ .estrecho .redes {
338
+ justify-content: center;
339
+ }
340
+ .estrecho .grupo {
341
+ border-top: 1px solid var(--_f-borde);
342
+ }
343
+ .estrecho .grupo .titulo {
344
+ margin: 0;
345
+ }
346
+ .estrecho .enlaces {
347
+ padding: 0 0.125rem 1rem;
348
+ }
349
+ .estrecho .enlaces[hidden] {
350
+ display: none;
351
+ }
352
+ .estrecho .contacto {
353
+ border-top: 1px solid var(--_f-borde);
354
+ padding-top: 1.25rem;
355
+ }
356
+ .estrecho .pie {
357
+ flex-direction: column;
358
+ text-align: center;
359
+ margin-top: 1.5rem;
360
+ }
361
+ .estrecho .derechos,
362
+ .estrecho .pagos {
363
+ justify-content: center;
364
+ }
340
365
  `,
341
366
  ]; }
342
367
  connectedCallback() {
343
368
  super.connectedCallback();
344
- this.observador = new ResizeObserver(([entrada]) => {
345
- this.estrecho = entrada.contentRect.width < ANCHO_ESTRECHO;
346
- });
347
- this.observador.observe(this);
369
+ this.consulta = window.matchMedia(CONSULTA_ESTRECHO);
370
+ this.consulta.addEventListener('change', this.alCambiarAncho);
371
+ this.alCambiarAncho();
348
372
  }
349
373
  disconnectedCallback() {
350
374
  super.disconnectedCallback();
351
- this.observador?.disconnect();
375
+ this.consulta?.removeEventListener('change', this.alCambiarAncho);
352
376
  }
353
377
  render() {
354
378
  const { direccion, telefono, correo, horario } = this.contacto;
355
379
  const conContacto = Boolean(direccion || telefono || correo || horario);
356
380
  const derechos = this.textoDerechos || `${this.nombre}. Todos los derechos reservados.`;
357
- return html `
358
- <footer class=${this.estrecho ? 'estrecho' : ''}>
359
- <div class="cont">
360
- <div class="boletin" ?hidden=${!this.conBoletin}>
361
- <slot name="boletin" @slotchange=${this.revisarBoletin}></slot>
362
- </div>
363
-
364
- <div class="rejilla" style="--_grupos: ${this.grupos.length}">
365
- <div class="marca">
366
- ${this.renderLogo()}
367
- ${this.descripcion ? html `<p class="descripcion">${this.descripcion}</p>` : nothing}
381
+ return html `
382
+ <footer class=${this.estrecho ? 'estrecho' : ''}>
383
+ <div class="cont">
384
+ <div class="boletin" ?hidden=${!this.conBoletin}>
385
+ <slot name="boletin" @slotchange=${this.revisarBoletin}></slot>
386
+ </div>
387
+
388
+ <div class="rejilla" style="--_grupos: ${this.grupos.length}">
389
+ <div class="marca">
390
+ ${this.renderLogo()}
391
+ ${this.descripcion ? html `<p class="descripcion">${this.descripcion}</p>` : nothing}
368
392
  ${this.redes.length
369
- ? html `<ul class="redes">
370
- ${this.redes.map((r) => this.renderRed(r))}
393
+ ? html `<ul class="redes">
394
+ ${this.redes.map((r) => this.renderRed(r))}
371
395
  </ul>`
372
- : nothing}
373
- </div>
374
-
375
- ${this.grupos.map((g, i) => this.renderGrupo(g, i))}
376
-
377
- <div class="contacto">
378
- ${conContacto ? html `<h2 class="titulo">${this.tituloContacto}</h2>` : nothing}
379
- <address>
380
- ${direccion ? html `<p class="dato">${iconoMapPin}<span>${direccion}</span></p>` : nothing}
396
+ : nothing}
397
+ </div>
398
+
399
+ ${this.grupos.map((g, i) => this.renderGrupo(g, i))}
400
+
401
+ <div class="contacto">
402
+ ${conContacto ? html `<h2 class="titulo">${this.tituloContacto}</h2>` : nothing}
403
+ <address>
404
+ ${direccion ? html `<p class="dato">${iconoMapPin}<span>${direccion}</span></p>` : nothing}
381
405
  ${telefono
382
- ? html `<p class="dato">
383
- ${iconoPhone}<a href="tel:${telefono.replace(/[^\d+]/g, '')}">${telefono}</a>
406
+ ? html `<p class="dato">
407
+ ${iconoPhone}<a href="tel:${telefono.replace(/[^\d+]/g, '')}">${telefono}</a>
384
408
  </p>`
385
- : nothing}
386
- ${correo ? html `<p class="dato">${iconoMail}<a href="mailto:${correo}">${correo}</a></p>` : nothing}
387
- ${horario ? html `<p class="dato">${iconoClock}<span>${horario}</span></p>` : nothing}
388
- </address>
389
- <slot name="extra"></slot>
390
- </div>
391
- </div>
392
-
393
- <div class="pie">
394
- <div class="derechos">
395
- <span>© ${new Date().getFullYear()} ${derechos}</span>
396
- <slot name="pie"></slot>
397
- </div>
409
+ : nothing}
410
+ ${correo ? html `<p class="dato">${iconoMail}<a href="mailto:${correo}">${correo}</a></p>` : nothing}
411
+ ${horario ? html `<p class="dato">${iconoClock}<span>${horario}</span></p>` : nothing}
412
+ </address>
413
+ <slot name="extra"></slot>
414
+ </div>
415
+ </div>
416
+
417
+ <div class="pie">
418
+ <div class="derechos">
419
+ <span>© ${new Date().getFullYear()} ${derechos}</span>
420
+ <slot name="pie"></slot>
421
+ </div>
398
422
  ${this.metodosPago.length
399
- ? html `<ul class="pagos" aria-label="Métodos de pago">
400
- ${this.metodosPago.map((m) => this.renderPago(m))}
423
+ ? html `<ul class="pagos" aria-label="Métodos de pago">
424
+ ${this.metodosPago.map((m) => this.renderPago(m))}
401
425
  </ul>`
402
- : nothing}
403
- </div>
404
- </div>
405
- </footer>
426
+ : nothing}
427
+ </div>
428
+ </div>
429
+ </footer>
406
430
  `;
407
431
  }
408
432
  renderLogo() {
@@ -412,48 +436,48 @@ let LrCustomFooter = class LrCustomFooter extends LitElement {
412
436
  ? html `<img src=${this.logo} alt=${this.logoAlt || this.nombre} />`
413
437
  : html `<span>${this.nombre}</span>`;
414
438
  const enlace = { texto: this.nombre, href: this.logoHref, id: 'inicio' };
415
- return html `<a class="logo" href=${this.logoHref} @click=${(e) => this.clic(e, enlace)}>
416
- ${contenido}
439
+ return html `<a class="logo" href=${this.logoHref} @click=${(e) => this.clic(e, enlace)}>
440
+ ${contenido}
417
441
  </a>`;
418
442
  }
419
443
  renderRed({ red, url, etiqueta }) {
420
444
  const datos = iconosRedes[red];
421
445
  if (!datos)
422
446
  return nothing;
423
- return html `<li>
424
- <a href=${url} target="_blank" rel="noopener noreferrer" aria-label=${etiqueta || datos.nombre} title=${etiqueta || datos.nombre}>
425
- ${datos.icono}
426
- </a>
447
+ return html `<li>
448
+ <a href=${url} target="_blank" rel="noopener noreferrer" aria-label=${etiqueta || datos.nombre} title=${etiqueta || datos.nombre}>
449
+ ${datos.icono}
450
+ </a>
427
451
  </li>`;
428
452
  }
429
453
  renderGrupo(grupo, indice) {
430
454
  const abierto = !this.estrecho || this.abiertos.has(indice);
431
455
  const idLista = `grupo-${indice}`;
432
- return html `
433
- <nav class="grupo" aria-label=${grupo.titulo}>
434
- <h2 class="titulo">
456
+ return html `
457
+ <nav class="grupo" aria-label=${grupo.titulo}>
458
+ <h2 class="titulo">
435
459
  ${this.estrecho
436
- ? html `<button aria-expanded=${abierto} aria-controls=${idLista} @click=${() => this.alternar(indice)}>
437
- ${grupo.titulo} ${iconoChevronDown}
460
+ ? html `<button aria-expanded=${abierto} aria-controls=${idLista} @click=${() => this.alternar(indice)}>
461
+ ${grupo.titulo} ${iconoChevronDown}
438
462
  </button>`
439
- : grupo.titulo}
440
- </h2>
441
- <ul class="enlaces" id=${idLista} ?hidden=${!abierto}>
442
- ${grupo.enlaces.map((enlace) => html `<li>
443
- <a href=${enlace.href || '#'} @click=${(e) => this.clic(e, enlace, grupo.titulo)}>
444
- ${enlace.texto}
445
- </a>
446
- </li>`)}
447
- </ul>
448
- </nav>
463
+ : grupo.titulo}
464
+ </h2>
465
+ <ul class="enlaces" id=${idLista} ?hidden=${!abierto}>
466
+ ${grupo.enlaces.map((enlace) => html `<li>
467
+ <a href=${enlace.href || '#'} @click=${(e) => this.clic(e, enlace, grupo.titulo)}>
468
+ ${enlace.texto}
469
+ </a>
470
+ </li>`)}
471
+ </ul>
472
+ </nav>
449
473
  `;
450
474
  }
451
475
  renderPago(metodo) {
452
476
  const datos = metodosPago[metodo];
453
477
  if (!datos)
454
478
  return nothing;
455
- return html `<li class="pago ${metodo}" role="img" aria-label=${datos.nombre} title=${datos.nombre}>
456
- ${datos.contenido}
479
+ return html `<li class="pago ${metodo}" role="img" aria-label=${datos.nombre} title=${datos.nombre}>
480
+ ${datos.contenido}
457
481
  </li>`;
458
482
  }
459
483
  alternar(indice) {