diff --git a/_includes/scripts.html b/_includes/scripts.html index 261ca9a176..ee598dcc4d 100644 --- a/_includes/scripts.html +++ b/_includes/scripts.html @@ -9,6 +9,10 @@ {%- endif -%} +{%- if page.layout == "docs" -%} + +{%- endif -%} + {%- if site.github -%} {%- else -%} @@ -19,36 +23,3 @@ {%- endif -%} - -{%- if page.layout == "docs" -%} - - -{%- endif -%} - - diff --git a/assets/js/src/application.js b/assets/js/src/application.js index eb52848756..d5ee22ebc3 100644 --- a/assets/js/src/application.js +++ b/assets/js/src/application.js @@ -10,7 +10,7 @@ * details, see https://creativecommons.org/licenses/by/3.0/. */ -/* global Clipboard, anchors */ +/* global Clipboard: false, anchors: false, Holder: false */ (function ($) { 'use strict' @@ -101,5 +101,35 @@ } anchors.add('.bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5') $('.bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5').wrapInner('
') + + // Search + if (window.docsearch) { + window.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 + }) + } + + // Holder + Holder.addTheme('gray', { + bg: '#777', + fg: 'rgba(255,255,255,.75)', + font: 'Helvetica', + fontweight: 'normal' + }) }) }(jQuery)) diff --git a/docs/4.0/examples/album/index.html b/docs/4.0/examples/album/index.html index de6ff5e8da..6e5fc61731 100644 --- a/docs/4.0/examples/album/index.html +++ b/docs/4.0/examples/album/index.html @@ -65,41 +65,41 @@
- Card image cap + Card image cap

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

- Card image cap + Card image cap

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

- Card image cap + Card image cap

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

- Card image cap + Card image cap

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

- Card image cap + Card image cap

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

- Card image cap + Card image cap

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

- Card image cap + Card image cap

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

- Card image cap + Card image cap

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

- Card image cap + Card image cap

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

@@ -127,12 +127,5 @@ -