utn-cli 2.1.17 → 2.1.19
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
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
<nav>
|
|
7
7
|
<ul class="toc-lista">
|
|
8
8
|
@for (entrada of toc; track entrada.id) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
<li [class]="'toc-nivel-' + entrada.nivel">
|
|
10
|
+
<button class="toc-enlace" (click)="irA(entrada.id)" [title]="entrada.texto">
|
|
11
|
+
{{ entrada.texto }}
|
|
12
|
+
</button>
|
|
13
|
+
</li>
|
|
14
14
|
}
|
|
15
15
|
</ul>
|
|
16
16
|
</nav>
|
|
@@ -20,24 +20,25 @@
|
|
|
20
20
|
<main class="manual-main" role="main" aria-label="Manual de usuario">
|
|
21
21
|
|
|
22
22
|
@if (cargando) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
<div class="manual-estado" role="status" aria-live="polite" aria-busy="true">
|
|
24
|
+
<p>Cargando manual…</p>
|
|
25
|
+
</div>
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
@if (error) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
<div class="manual-estado manual-error" role="alert">
|
|
30
|
+
<p>
|
|
31
|
+
No se pudo cargar el manual. Verifique que el archivo
|
|
32
|
+
<code>Manual.md</code> esté en la carpeta <code>public/</code>.
|
|
33
|
+
</p>
|
|
34
|
+
</div>
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
@if (!cargando && !error) {
|
|
38
|
-
|
|
38
|
+
<article #contenidoManual class="manual-articulo" [innerHTML]="contenido" (click)="manejarClicEnContenido($event)">
|
|
39
|
+
</article>
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
</main>
|
|
42
43
|
|
|
43
|
-
</div>
|
|
44
|
+
</div>
|
|
@@ -44,7 +44,7 @@ export class ManualComponent implements OnInit, OnDestroy {
|
|
|
44
44
|
|
|
45
45
|
doc.querySelectorAll('h1, h2, h3').forEach((heading) => {
|
|
46
46
|
const texto = heading.textContent ?? '';
|
|
47
|
-
const id =
|
|
47
|
+
const id = texto
|
|
48
48
|
.toLowerCase()
|
|
49
49
|
.normalize('NFD')
|
|
50
50
|
.replace(DIACRITICOS, '')
|
|
@@ -72,6 +72,15 @@ export class ManualComponent implements OnInit, OnDestroy {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
irA(id: string): void {
|
|
75
|
-
|
|
75
|
+
document.getElementById(id)?.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
manejarClicEnContenido(event: MouseEvent): void {
|
|
79
|
+
const anchor = (event.target as Element).closest('a');
|
|
80
|
+
if (!anchor) return;
|
|
81
|
+
const href = anchor.getAttribute('href') ?? '';
|
|
82
|
+
if (!href.startsWith('#')) return;
|
|
83
|
+
event.preventDefault();
|
|
84
|
+
this.irA(href.slice(1));
|
|
76
85
|
}
|
|
77
86
|
}
|