aboutsummaryrefslogtreecommitdiff
path: root/_includes
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2017-12-31 02:11:59 +0200
committerGitHub <[email protected]>2017-12-31 02:11:59 +0200
commite0e9bc8b5894c31557bfe7bc013707c887190c6b (patch)
treef9e86512ea031599d9bcb3bbc977c6f097deadb6 /_includes
parentbf0e753517ab83a148088189b136375f21cb684d (diff)
downloadbootstrap-e0e9bc8b5894c31557bfe7bc013707c887190c6b.tar.xz
bootstrap-e0e9bc8b5894c31557bfe7bc013707c887190c6b.zip
Move inline JS outside of HTML. (#25140)
Diffstat (limited to '_includes')
-rw-r--r--_includes/scripts.html37
1 files changed, 4 insertions, 33 deletions
diff --git a/_includes/scripts.html b/_includes/scripts.html
index 261ca9a17..ee598dcc4 100644
--- a/_includes/scripts.html
+++ b/_includes/scripts.html
@@ -9,6 +9,10 @@
<script src="{{ site.baseurl }}/dist/js/bootstrap.js"></script>
{%- endif -%}
+{%- if page.layout == "docs" -%}
+<script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
+{%- endif -%}
+
{%- if site.github -%}
<script src="{{ site.baseurl }}/assets/js/docs.min.js"></script>
{%- else -%}
@@ -19,36 +23,3 @@
<script src="{{ site.baseurl }}/assets/js/src/ie-emulation-modes-warning.js"></script>
<script src="{{ site.baseurl }}/assets/js/src/pwa.js"></script>
{%- endif -%}
-
-{%- if page.layout == "docs" -%}
-<script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
-<script>
- docsearch({
- apiKey: '48cb48b22351bc71ea5f12f4d1ede198',
- indexName: 'bootstrap-v4',
- inputSelector: '#search-input',
- handleSelected: function (input, event, suggestion) {
- var url = suggestion.url;
- url = suggestion.isLvl1 ? url.split('#')[0]: url;
- // If it's a title we remove the anchor so it does not jump.
- window.location.href = url;
- },
- transformData: function (hits) {
- return hits.map(function (hit) {
- hit.url = hit.url.replace('https://v4-alpha.getbootstrap.com', '/docs/4.0');
- return hit;
- });
- },
- debug: false // Set debug to true if you want to inspect the dropdown
- });
-</script>
-{%- endif -%}
-
-<script>
- Holder.addTheme('gray', {
- bg: '#777',
- fg: 'rgba(255,255,255,.75)',
- font: 'Helvetica',
- fontweight: 'normal'
- });
-</script>