hdoc-tools 0.8.7 → 0.8.8
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/hdoc-build.js
CHANGED
|
@@ -18,13 +18,14 @@ const {
|
|
|
18
18
|
|
|
19
19
|
const h_tags_to_search = ['h1', 'h2', 'h3'],
|
|
20
20
|
index_cols = [
|
|
21
|
-
'relative_url',
|
|
21
|
+
'relative_url UNINDEXED',
|
|
22
22
|
'book_id',
|
|
23
|
-
'book_audience',
|
|
23
|
+
'book_audience UNINDEXED',
|
|
24
24
|
'book_tags',
|
|
25
25
|
'doc_title',
|
|
26
26
|
'doc_content',
|
|
27
|
-
'doc_preview'
|
|
27
|
+
'doc_preview UNINDEXED',
|
|
28
|
+
'doc_family_id'
|
|
28
29
|
];
|
|
29
30
|
|
|
30
31
|
let conversion_attempted = 0,
|
|
@@ -336,6 +337,7 @@ const {
|
|
|
336
337
|
index_records[i].index_html.fm_props.title,
|
|
337
338
|
index_records[i].index_html.text,
|
|
338
339
|
index_records[i].index_html.preview,
|
|
340
|
+
hdocbook_config.productFamily
|
|
339
341
|
];
|
|
340
342
|
const index_response = hdoc_index.insert_record(db, table_name, index_cols, index_vals, hdocbook_config.docId, index_records[i].index_html.fm_props.title);
|
|
341
343
|
if (!index_response.success) {
|
package/hdoc-db.js
CHANGED
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
let vals = 'VALUES (';
|
|
34
34
|
for (let i = 0; i < columns.length; i++) {
|
|
35
35
|
if (i === 0) {
|
|
36
|
-
cols += `${columns[i]}`;
|
|
36
|
+
cols += `${columns[i].replace('UNINDEXED', '').trim()}`;
|
|
37
37
|
vals += '?';
|
|
38
38
|
} else {
|
|
39
|
-
cols += `,${columns[i]}`;
|
|
39
|
+
cols += `,${columns[i].replace('UNINDEXED', '').trim()}`;
|
|
40
40
|
vals += ',?';
|
|
41
41
|
}
|
|
42
42
|
}
|
package/hdoc-init.js
CHANGED
|
@@ -71,9 +71,6 @@
|
|
|
71
71
|
process.exit(1);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
// The file update tasks can now all be done async now
|
|
75
|
-
// we have the file and folder structure in place
|
|
76
|
-
|
|
77
74
|
// Update hdocbook-project.json
|
|
78
75
|
const hdocBookProjectFilePath = path.join(source_path, 'hdocbook-project.json');
|
|
79
76
|
const hdocBookProjectFile = require(hdocBookProjectFilePath);
|
package/package.json
CHANGED
|
@@ -3,7 +3,14 @@
|
|
|
3
3
|
"title": "--title--",
|
|
4
4
|
"description": "--description--",
|
|
5
5
|
"publicSource": "--publicSource--",
|
|
6
|
+
"productFamily": "docs",
|
|
6
7
|
"version": "0.0.1",
|
|
8
|
+
"audience": [
|
|
9
|
+
"public"
|
|
10
|
+
],
|
|
11
|
+
"languages": [
|
|
12
|
+
"en"
|
|
13
|
+
],
|
|
7
14
|
"navigation": {
|
|
8
15
|
"items": [
|
|
9
16
|
{
|
|
@@ -11,5 +18,6 @@
|
|
|
11
18
|
"expand": true
|
|
12
19
|
}
|
|
13
20
|
]
|
|
14
|
-
}
|
|
21
|
+
},
|
|
22
|
+
"tags": []
|
|
15
23
|
}
|
|
@@ -34,6 +34,36 @@
|
|
|
34
34
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
/* nav tabs in doc content */
|
|
38
|
+
.DocContent .nav-tabs
|
|
39
|
+
{
|
|
40
|
+
padding-left: 0!important;
|
|
41
|
+
list-style: none!important;
|
|
42
|
+
}
|
|
43
|
+
.DocContent .nav-tabs li
|
|
44
|
+
{
|
|
45
|
+
margin-top: 0px !important
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
.DocContent .nav-tabs.codeblock
|
|
50
|
+
{
|
|
51
|
+
border-bottom: 1px solid #1E1E1E;
|
|
52
|
+
margin-bottom: 0px
|
|
53
|
+
}
|
|
54
|
+
.DocContent .nav-tabs.codeblock .nav-link.active
|
|
55
|
+
{
|
|
56
|
+
background-color: #1E1E1E;
|
|
57
|
+
color: #fff;
|
|
58
|
+
border-color: #1E1E1E;
|
|
59
|
+
}
|
|
60
|
+
.DocContent .nav-tabs.codeblock .nav-link:hover
|
|
61
|
+
{
|
|
62
|
+
border-bottom-color: #1E1E1E;
|
|
63
|
+
}
|
|
64
|
+
/* eof nav tabs in doc content */
|
|
65
|
+
|
|
66
|
+
|
|
37
67
|
|
|
38
68
|
|
|
39
69
|
@media (min-width: 1000px) {
|
|
@@ -68,13 +98,13 @@
|
|
|
68
98
|
/* LAYOUT MODS */
|
|
69
99
|
|
|
70
100
|
/* table-list*/
|
|
71
|
-
.DocContent.
|
|
101
|
+
.DocContent.article-wide .injected-document-content
|
|
72
102
|
{
|
|
73
103
|
/* take up max width - overrides max-width set in [.DocContent .injected-document-content] */
|
|
74
104
|
max-width:100%;
|
|
75
105
|
}
|
|
76
106
|
|
|
77
|
-
.DocContent.
|
|
107
|
+
.DocContent.article-wide .injected-document-content table
|
|
78
108
|
{
|
|
79
109
|
/* make all tables 100% */
|
|
80
110
|
width:100%;
|
package/ui/js/doc.hornbill.js
CHANGED
|
@@ -267,6 +267,44 @@ function loadContentUrl(linkRef,fromPageRefresh,fromPopState)
|
|
|
267
267
|
generateTableOfContentsFromDoc();
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
+
//-- find any <tabs> and andd a bootstrap tab item strip
|
|
271
|
+
$("#DocContent").find('tabs').each((idx,el) => {
|
|
272
|
+
let tabClass = el.getAttribute("tabstyle");
|
|
273
|
+
let tabMarkup = "<ul class='nav nav-tabs'>";
|
|
274
|
+
//-- for each tab we need to create a tab link
|
|
275
|
+
$(el).find("tab").each((idx,aTab) => {
|
|
276
|
+
|
|
277
|
+
let activeClass=(idx===0)?" active":"";
|
|
278
|
+
tabMarkup += `<li class='nav-item c-pointer' contentidx='${idx}'><span class='nav-link${activeClass}'>${aTab.getAttribute("name")}</span></li>`;
|
|
279
|
+
|
|
280
|
+
//-- hide the tab element if it is not the active one (first)
|
|
281
|
+
if(idx>0)$(aTab).addClass("d-none");
|
|
282
|
+
|
|
283
|
+
});
|
|
284
|
+
|
|
285
|
+
tabMarkup += "</ul>";
|
|
286
|
+
//-- inject markup
|
|
287
|
+
$(el).prepend(tabMarkup).find(".nav.nav-tabs").addClass(tabClass);
|
|
288
|
+
|
|
289
|
+
//-- add event handler for switching tab items
|
|
290
|
+
$(el).find("li").off("click").on("click",function()
|
|
291
|
+
{
|
|
292
|
+
let contentIdx = this.getAttribute('contentidx');
|
|
293
|
+
let tabsContainer = $(this).closest("tabs").eq(0);
|
|
294
|
+
let tabs= tabsContainer.find("tab");
|
|
295
|
+
|
|
296
|
+
//-- hide other tab content and show this tabs content
|
|
297
|
+
tabs.addClass("d-none");
|
|
298
|
+
tabs.eq(contentIdx-0).removeClass("d-none");
|
|
299
|
+
|
|
300
|
+
//-- set clicked tab item to active
|
|
301
|
+
tabsContainer.find(".nav-link").removeClass("active");
|
|
302
|
+
$(this).find(".nav-link").addClass("active");
|
|
303
|
+
|
|
304
|
+
});
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
|
|
270
308
|
//-- do any code highlighting
|
|
271
309
|
document.querySelectorAll('pre code').forEach((el) => {
|
|
272
310
|
hljs.highlightBlock(el);
|