A. js / nav-tab-fixed.js

1
import { resaltaSiEstasEn } from "./lib/resaltaSiEstasEn.js"
2
3
export class NavTabFixed extends HTMLElement {
4
5
 constructor() {
6
  super()
7
  this.creado = false
8
 }
9
10
 connectedCallback() {
11
  this.classList.add("md-tab", "fixed")
12
13
  if (!this.creado) {
14
15
   this.innerHTML = /* HTML */`
16
    <a ${resaltaSiEstasEn(["/index.html", "", "/"])} href="index.html">
17
     <span class="material-symbols-outlined">home</span>
18
     Inicio
19
    </a>
20
 
21
    <a ${resaltaSiEstasEn(["/select.html"])} href="select.html">
22
     <span class="material-symbols-outlined">bottom_panel_close</span>
23
     Select
24
    </a>
25
 
26
    <a ${resaltaSiEstasEn(["/ayuda.html"])} href="ayuda.html">
27
     <span class="material-symbols-outlined">help</span>
28
     Ayuda
29
    </a>`
30
31
   this.creado = true
32
33
  }
34
35
 }
36
37
}
38
39
customElements.define("nav-tab-fixed", NavTabFixed)
skip_previous skip_next