@healthcatalyst/catalyst-docfx-template 1.0.37 → 1.0.41
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/cashmere/hcicons/hcicons.eot +0 -0
- package/cashmere/hcicons/hcicons.scss +504 -0
- package/cashmere/hcicons/hcicons.svg +169 -0
- package/cashmere/hcicons/hcicons.ttf +0 -0
- package/cashmere/hcicons/hcicons.woff +0 -0
- package/cashmere/hcicons/hcicons.woff2 +0 -0
- package/healthcatalyst-catalyst-docfx-template-1.0.41.tgz +0 -0
- package/package.json +1 -1
- package/partials/affix.tmpl.partial +5 -2
- package/partials/breadcrumb.tmpl.partial +11 -8
- package/partials/footer.tmpl.partial +3 -2
- package/partials/head.tmpl.partial +2 -1
- package/partials/navbar.tmpl.partial +1 -2
- package/partials/scripts.tmpl.partial +1 -0
- package/styles/docs-navbar.js +2581 -1976
- package/styles/main.css +1018 -937
- package/styles/main.js +65 -50
- package/healthcatalyst-catalyst-docfx-template-1.0.37.tgz +0 -0
package/styles/main.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
// .startsWith polyfill for IE
|
|
2
2
|
if (!String.prototype.startsWith) {
|
|
3
|
-
String.prototype.startsWith = function
|
|
3
|
+
String.prototype.startsWith = function(searchString, position) {
|
|
4
4
|
position = position || 0;
|
|
5
5
|
return this.indexOf(searchString, position) === position;
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
$(function
|
|
9
|
+
$(function() {
|
|
10
10
|
// version dropdown
|
|
11
|
-
var $version = $('#version').on('change', function
|
|
11
|
+
var $version = $('#version').on('change', function() {
|
|
12
12
|
window.location.href = this.value;
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
-
$.getJSON('https://platformdocfiles.blob.core.windows.net/static/versions.json').done(function
|
|
15
|
+
$.getJSON('https://platformdocfiles.blob.core.windows.net/static/versions.json').done(function(json) {
|
|
16
16
|
var currentUrl = window.location.href.toLowerCase();
|
|
17
17
|
var selected = '';
|
|
18
18
|
$version.show();
|
|
@@ -40,55 +40,70 @@ $(function () {
|
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
// lightbox2 (Lokesh Dhakar, https://lokeshdhakar.com/projects/lightbox2, MIT License)
|
|
43
|
-
$('article img').each(function
|
|
43
|
+
$('article img').each(function() {
|
|
44
44
|
var $e = $(this);
|
|
45
45
|
var title = $e.attr('title') || $e.attr('alt') || '';
|
|
46
46
|
$e.wrap("<a data-lightbox='image' data-title='" + title + "' href='" + $e.attr('src') + "' class='expand-img'></a>");
|
|
47
47
|
});
|
|
48
48
|
|
|
49
49
|
// feedback from to GSheets integration
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
document.getElementById(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
50
|
+
if ($('#feedback-survey').length > 0) {
|
|
51
|
+
// console.log('feedback form is loaded');
|
|
52
|
+
document.getElementById("feedback-response").style.display = "none";
|
|
53
|
+
document.getElementById("feedback-survey").style.display = "none";
|
|
54
|
+
document.getElementById("no-wrong").style.display = "none";
|
|
55
|
+
const scriptURL = 'https://script.google.com/macros/s/AKfycbwBUtLzPSKIffsCEDUS_Yh7TrWtDO2Y6u6gafuXJMof9vgiS2Q/exec'
|
|
56
|
+
const form = document.forms['feedback']
|
|
57
|
+
|
|
58
|
+
function fillUrl() {
|
|
59
|
+
var currentPage = window.location.href;
|
|
60
|
+
document.getElementById("herenow").value = currentPage;
|
|
61
|
+
var productName = window.location.pathname.split('/')[1];
|
|
62
|
+
document.getElementById("product").value = productName;
|
|
63
|
+
}
|
|
65
64
|
|
|
66
|
-
function
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
document.getElementById('no-wrong').checked = false;
|
|
65
|
+
function checkHelpful() {
|
|
66
|
+
document.getElementById('suggestions').removeAttribute('required');
|
|
67
|
+
document.getElementById("helpful").value = "yes";
|
|
70
68
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function checkNoHelp() {
|
|
72
|
+
document.getElementById("helpful").value = "no";
|
|
73
|
+
document.getElementById("feedback-survey").style.display = "block";
|
|
74
|
+
document.getElementById("no-wrong").checked = false;
|
|
75
|
+
|
|
76
|
+
document.getElementById("feedback-yes").disabled = true;
|
|
77
|
+
document.getElementById("feedback-yes").style.opacity = 0.3;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function unCheckNoHelp() {
|
|
81
|
+
document.getElementById("feedback-response").style.display = "none";
|
|
82
|
+
document.getElementById("feedback-survey").style.display = "none";
|
|
83
|
+
document.getElementById("no-wrong").style.display = "none";
|
|
84
|
+
document.getElementById("feedback-yes").disabled = false;
|
|
85
|
+
document.getElementById("feedback-yes").style.opacity = 1;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
form.addEventListener('submit', e => {
|
|
89
|
+
e.preventDefault()
|
|
90
|
+
fetch(scriptURL, { method: 'POST', body: new FormData(form) })
|
|
91
|
+
.then(response => console.log('Success!', response))
|
|
92
|
+
.catch(error => console.error('Error!', error.message))
|
|
93
|
+
$(".feedback-container").toggle();
|
|
94
|
+
$("#feedback-response").toggle(500);
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
$("h3").on("click", function() {
|
|
98
|
+
var windowHeight = $(window).height();
|
|
99
|
+
$("body").animate({ scrollTop: windowHeight }, 800);
|
|
100
|
+
});
|
|
101
|
+
} else {
|
|
102
|
+
// console.log('feedback form is not loaded');
|
|
80
103
|
}
|
|
81
|
-
form.addEventListener('submit', (e) => {
|
|
82
|
-
e.preventDefault();
|
|
83
|
-
fetch(scriptURL, { method: 'POST', body: new FormData(form) })
|
|
84
|
-
.then((response) => console.log('Success!', response))
|
|
85
|
-
.catch((error) => console.error('Error!', error.message));
|
|
86
|
-
$('.feedback-container').toggle();
|
|
87
|
-
$('#feedback-response').toggle(500);
|
|
88
|
-
});
|
|
89
104
|
|
|
90
105
|
// Add code copy buttons -------------------------
|
|
91
|
-
document.querySelectorAll('pre > code').forEach(function
|
|
106
|
+
document.querySelectorAll('pre > code').forEach(function(codeBlock) {
|
|
92
107
|
var button = document.createElement('button');
|
|
93
108
|
button.className = 'copy-code-button';
|
|
94
109
|
button.type = 'button';
|
|
@@ -106,29 +121,29 @@ document.querySelectorAll('pre > code').forEach(function (codeBlock) {
|
|
|
106
121
|
|
|
107
122
|
// Function to copy code and show success --------------------
|
|
108
123
|
var copyCode = new ClipboardJS('.copy-code-button', {
|
|
109
|
-
target: function
|
|
124
|
+
target: function(trigger) {
|
|
110
125
|
return trigger.nextElementSibling;
|
|
111
126
|
}
|
|
112
127
|
});
|
|
113
128
|
|
|
114
|
-
copyCode.on('success', function
|
|
129
|
+
copyCode.on('success', function(event) {
|
|
115
130
|
event.clearSelection();
|
|
116
131
|
event.trigger.textContent = 'Copied';
|
|
117
|
-
window.setTimeout(function
|
|
132
|
+
window.setTimeout(function() {
|
|
118
133
|
event.trigger.innerHTML = "<i class='fa fa-copy'></i> Copy Code";
|
|
119
134
|
}, 2000);
|
|
120
135
|
});
|
|
121
136
|
|
|
122
137
|
// Replace {{ keys }} with plain-text values in sourcedContent/terms.json at directory root
|
|
123
138
|
|
|
124
|
-
var terms = (function
|
|
139
|
+
var terms = (function() {
|
|
125
140
|
var json = null;
|
|
126
141
|
$.ajax({
|
|
127
142
|
async: false,
|
|
128
143
|
global: false,
|
|
129
144
|
url: '../../sourcedContent/terms.json',
|
|
130
145
|
dataType: 'json',
|
|
131
|
-
success: function
|
|
146
|
+
success: function(data) {
|
|
132
147
|
json = data;
|
|
133
148
|
}
|
|
134
149
|
});
|
|
@@ -143,14 +158,14 @@ var terms = (function () {
|
|
|
143
158
|
|
|
144
159
|
// Replace {{ keys }} with icon and message banner from sourcedContent/messages.json at directory root
|
|
145
160
|
|
|
146
|
-
var messages = (function
|
|
161
|
+
var messages = (function() {
|
|
147
162
|
var json = null;
|
|
148
163
|
$.ajax({
|
|
149
164
|
async: false,
|
|
150
165
|
global: false,
|
|
151
166
|
url: '../../sourcedContent/messages.json',
|
|
152
167
|
dataType: 'json',
|
|
153
|
-
success: function
|
|
168
|
+
success: function(data) {
|
|
154
169
|
json = data;
|
|
155
170
|
}
|
|
156
171
|
});
|
|
@@ -163,4 +178,4 @@ var messages = (function () {
|
|
|
163
178
|
document.body.innerHTML = document.body.innerHTML.replace(toReplace, replaceWith);
|
|
164
179
|
}
|
|
165
180
|
return messages;
|
|
166
|
-
})();
|
|
181
|
+
})();
|
|
Binary file
|