hdoc-tools 0.29.3 → 0.31.0
Sign up to get free protection for your applications and to get access to all the features.
- package/custom_modules/tips.js +6 -0
- package/hdoc-validate.js +7 -0
- package/package.json +1 -1
- package/templates/pdf/css/hdocs-pdf.css +11 -2
- package/templates/pdf/css/vars.css +16 -5
- package/ui/css/theme-default/styles/components/htl-doc.css +11 -2
- package/ui/css/theme-default/styles/vars.css +16 -4
package/custom_modules/tips.js
CHANGED
@@ -26,6 +26,11 @@
|
|
26
26
|
class: "bi bi-megaphone",
|
27
27
|
title: "Important",
|
28
28
|
};
|
29
|
+
case "info":
|
30
|
+
return {
|
31
|
+
class: "bi bi-info-circle",
|
32
|
+
title: "Information",
|
33
|
+
};
|
29
34
|
case "caution":
|
30
35
|
return {
|
31
36
|
class: "bi bi-x-circle",
|
@@ -77,6 +82,7 @@
|
|
77
82
|
setupContainer("note");
|
78
83
|
setupContainer("tip");
|
79
84
|
setupContainer("important");
|
85
|
+
setupContainer("info");
|
80
86
|
setupContainer("caution");
|
81
87
|
setupContainer("warning");
|
82
88
|
|
package/hdoc-validate.js
CHANGED
@@ -462,6 +462,13 @@ const e = require("express");
|
|
462
462
|
if (link_segments[0] === "") link_segments.shift();
|
463
463
|
const link_root = link_segments[0] === "_books" ? link_segments[1] : link_segments[0];
|
464
464
|
|
465
|
+
// Check for links with a _books path that have no specific file target
|
466
|
+
// We do need to exclude those with an extension though, for pages that link downloadable resources
|
467
|
+
if (link_segments[0] === "_books" && path.extname(links[i]) === '') {
|
468
|
+
const error_message = processErrorMessage(`Root relative page links should not include _books in the path: ${links[i]}`, markdown_paths.relativePath, markdown_content, links[i]);
|
469
|
+
errors[htmlFile.relativePath].push(error_message);
|
470
|
+
}
|
471
|
+
|
465
472
|
// Checking for internal links in other books - can't easily validate those here, returning
|
466
473
|
if (link_segments.length > 1 && link_root !== hdocbook_config.docId) {
|
467
474
|
continue;
|
package/package.json
CHANGED
@@ -212,13 +212,22 @@ video {
|
|
212
212
|
}
|
213
213
|
|
214
214
|
.hdoc-alert.alert-icon-important {
|
215
|
+
border-color: var(--htl-custom-block-important-border);
|
216
|
+
color: var(--htl-custom-block-important-text);
|
217
|
+
background-color: var(--htl-custom-block-important-bg);
|
218
|
+
}
|
219
|
+
|
220
|
+
.hdoc-alert.alert-icon-important code {
|
221
|
+
background-color: var(--htl-custom-block-important-code-bg);
|
222
|
+
}
|
223
|
+
|
224
|
+
.hdoc-alert.alert-icon-info {
|
215
225
|
border-color: var(--htl-custom-block-info-border);
|
216
226
|
color: var(--htl-custom-block-info-text);
|
217
227
|
background-color: var(--htl-custom-block-info-bg);
|
218
|
-
|
219
228
|
}
|
220
229
|
|
221
|
-
.hdoc-alert.alert-icon-
|
230
|
+
.hdoc-alert.alert-icon-info code {
|
222
231
|
background-color: var(--htl-custom-block-info-code-bg);
|
223
232
|
}
|
224
233
|
|
@@ -310,14 +310,18 @@
|
|
310
310
|
* Component: Custom Block
|
311
311
|
* -------------------------------------------------------------------------- */
|
312
312
|
|
313
|
-
:root {
|
313
|
+
:root {
|
314
314
|
--htl-custom-block-code-font-size: var(--htl-default-font-size);
|
315
315
|
|
316
|
-
--htl-custom-block-
|
317
|
-
--htl-custom-block-
|
318
|
-
--htl-custom-block-
|
319
|
-
--htl-custom-block-
|
316
|
+
--htl-custom-block-important-border: var(--htl-c-indigo-dark);
|
317
|
+
--htl-custom-block-important-text: var(--htl-c-indigo-dark);
|
318
|
+
--htl-custom-block-important-bg: var(--htl-c-indigo-lighter);
|
319
|
+
--htl-custom-block-important-code-bg: var(--htl-custom-block-important-bg);
|
320
320
|
|
321
|
+
--htl-custom-block-info-border: var(--htl-c-blue-dimm-1);
|
322
|
+
--htl-custom-block-info-text: var(--htl-c-blue-darker);
|
323
|
+
--htl-custom-block-info-bg: var(--htl-c-blue-dimm-3);
|
324
|
+
--htl-custom-block-info-code-bg: var(--htl-custom-block-info-bg);
|
321
325
|
|
322
326
|
--htl-custom-block-tip-border: var(--htl-c-green-dimm-1);
|
323
327
|
--htl-custom-block-tip-text: var(--htl-c-green-darker);
|
@@ -346,6 +350,13 @@
|
|
346
350
|
--htl-custom-block-details-bg: var(--htl-c-black-mute);
|
347
351
|
--htl-custom-block-details-code-bg: var(--htl-c-gray-dark-4);
|
348
352
|
|
353
|
+
--htl-custom-block-important-border: var(--htl-c-indigo-lighter);
|
354
|
+
--htl-custom-block-important-bg: var(--htl-c-indigo-dark);
|
355
|
+
--htl-custom-block-important-text: var(--htl-c-indigo-lighter);
|
356
|
+
|
357
|
+
--htl-custom-block-info-text: var(--htl-c-blue);
|
358
|
+
--htl-custom-block-info-bg: var(--htl-c-blue-dimm-3);
|
359
|
+
|
349
360
|
--htl-custom-block-tip-border: var(--htl-c-green-dimm-2);
|
350
361
|
--htl-custom-block-tip-text: var(--htl-c-green-light);
|
351
362
|
|
@@ -796,13 +796,22 @@
|
|
796
796
|
}
|
797
797
|
|
798
798
|
.HTL-doc .hdoc-alert.alert-icon-important {
|
799
|
+
border-color: var(--htl-custom-block-important-border);
|
800
|
+
color: var(--htl-custom-block-important-text);
|
801
|
+
background-color: var(--htl-custom-block-important-bg);
|
802
|
+
}
|
803
|
+
|
804
|
+
.HTL-doc .hdoc-alert.alert-icon-important code {
|
805
|
+
background-color: var(--htl-custom-block-important-code-bg);
|
806
|
+
}
|
807
|
+
|
808
|
+
.HTL-doc .hdoc-alert.alert-icon-info {
|
799
809
|
border-color: var(--htl-custom-block-info-border);
|
800
810
|
color: var(--htl-custom-block-info-text);
|
801
811
|
background-color: var(--htl-custom-block-info-bg);
|
802
|
-
|
803
812
|
}
|
804
813
|
|
805
|
-
.HTL-doc .hdoc-alert.alert-icon-
|
814
|
+
.HTL-doc .hdoc-alert.alert-icon-info code {
|
806
815
|
background-color: var(--htl-custom-block-info-code-bg);
|
807
816
|
}
|
808
817
|
|
@@ -313,10 +313,15 @@
|
|
313
313
|
:root {
|
314
314
|
--htl-custom-block-code-font-size: var(--htl-default-font-size);
|
315
315
|
|
316
|
-
--htl-custom-block-
|
317
|
-
--htl-custom-block-
|
318
|
-
--htl-custom-block-
|
319
|
-
--htl-custom-block-
|
316
|
+
--htl-custom-block-important-border: var(--htl-c-indigo-dark);
|
317
|
+
--htl-custom-block-important-text: var(--htl-c-indigo-dark);
|
318
|
+
--htl-custom-block-important-bg: var(--htl-c-indigo-lighter);
|
319
|
+
--htl-custom-block-important-code-bg: var(--htl-custom-block-important-bg);
|
320
|
+
|
321
|
+
--htl-custom-block-info-border: var(--htl-c-blue-dimm-1);
|
322
|
+
--htl-custom-block-info-text: var(--htl-c-blue-darker);
|
323
|
+
--htl-custom-block-info-bg: var(--htl-c-blue-dimm-3);
|
324
|
+
--htl-custom-block-info-code-bg: var(--htl-custom-block-info-bg);
|
320
325
|
|
321
326
|
--htl-custom-block-tip-border: var(--htl-c-green-dimm-1);
|
322
327
|
--htl-custom-block-tip-text: var(--htl-c-green-darker);
|
@@ -345,6 +350,13 @@
|
|
345
350
|
--htl-custom-block-details-bg: var(--htl-c-black-mute);
|
346
351
|
--htl-custom-block-details-code-bg: var(--htl-c-gray-dark-4);
|
347
352
|
|
353
|
+
--htl-custom-block-important-border: var(--htl-c-indigo-lighter);
|
354
|
+
--htl-custom-block-important-bg: var(--htl-c-indigo-dark);
|
355
|
+
--htl-custom-block-important-text: var(--htl-c-indigo-lighter);
|
356
|
+
|
357
|
+
--htl-custom-block-info-text: var(--htl-c-blue);
|
358
|
+
--htl-custom-block-info-bg: var(--htl-c-blue-dimm-3);
|
359
|
+
|
348
360
|
--htl-custom-block-tip-border: var(--htl-c-green-dimm-2);
|
349
361
|
--htl-custom-block-tip-text: var(--htl-c-green-light);
|
350
362
|
|