diff --git a/docs/_includes/header.html b/docs/_includes/header.html
index 027aa3987..def45a9e9 100644
--- a/docs/_includes/header.html
+++ b/docs/_includes/header.html
@@ -13,6 +13,13 @@
+ -
+
+
{% assign url = page.url %}
{% for link in site.navigation %}
-
diff --git a/docs/_includes/searchbar.html b/docs/_includes/searchbar.html
new file mode 100644
index 000000000..2653919d0
--- /dev/null
+++ b/docs/_includes/searchbar.html
@@ -0,0 +1,46 @@
+
+
+
+
+
diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html
index bd9e5245c..0bdb964e0 100644
--- a/docs/_layouts/default.html
+++ b/docs/_layouts/default.html
@@ -35,7 +35,7 @@
-
+
@@ -60,6 +60,18 @@
{% endif %}
+
+
+
{% include marketing.html %}
{% contentblock site-footer %}
diff --git a/docs/css/_docsearch.scss b/docs/css/_docsearch.scss
new file mode 100644
index 000000000..97fff4401
--- /dev/null
+++ b/docs/css/_docsearch.scss
@@ -0,0 +1,187 @@
+$color-border: #EEE;
+$color-border-light: lighten($color-border, 15%);
+$color-category-header-background: white;
+$color-highlight-header-background: lighten($color-category-header-background, 15%);
+$color-highlight-text: #0064E1;
+$color-selected-background: rgba(#40ADDC,.07);
+$color-selected-text: black;
+$color-left-column-bg: white;
+$color-left-column: #aaa;
+
+$breakpoint-medium: 568px;
+$breakpoint-large: 768px;
+
+$dropdown-min-width-medium: 400px;
+$dropdown-min-width-large: 600px;
+
+// Main autocomplete wrapper
+.aa-dropdown-menu {
+ background-color: #FFF;
+ border: 1px solid #333;
+ border-radius: 4px;
+ font-size: 16px;
+ padding: 4px;
+ text-align: left;
+ top: 38px !important;
+ margin-left: -$dropdown-min-width-medium !important;
+}
+
+// Each suggestion
+.algolia-docsearch-suggestion {
+ color: #333;
+ cursor: pointer;
+ overflow: hidden;
+}
+
+ // Each sub-suggestion
+ .algolia-docsearch-suggestion__secondary {
+ border-top: 1px solid $color-border;
+ }
+
+// Main category headers
+.algolia-docsearch-suggestion--category-header {
+ display: none;
+ border-bottom: solid 1px #ccc;
+ color: #40ADDC;
+ font-weight: 600;
+ padding: 5px 15px;
+ text-align: left;
+ font-size: 1.1em;
+ background-color: white;
+ // Only show it when flaggued as "__main"
+ .algolia-docsearch-suggestion__main & {
+ display: block;
+ }
+}
+
+// Highlight
+.algolia-docsearch-suggestion--highlight {
+ padding: 0;
+ color: #40ADDC;
+ padding: 0 2px;
+ background: rgba(#40ADDC,.1);
+ // Highlight the background in header
+ .algolia-docsearch-suggestion--category-header & {
+ color: inherit;
+ background: $color-highlight-header-background;
+ }
+}
+
+// Selected suggestion
+.aa-cursor .algolia-docsearch-suggestion--content {
+ color: $color-selected-text;
+}
+.aa-cursor .algolia-docsearch-suggestion {
+ background: $color-selected-background;
+}
+
+// The secondary column is hidden on small screens
+.algolia-docsearch-suggestion--subcategory-column {
+ display: none;
+ cursor: default;
+}
+// The text snippet is hidden on small screens
+.algolia-docsearch-suggestion--text {
+ display: none;
+}
+
+.algolia-docsearch-suggestion--content {
+ padding: 3px 5px;
+ width: 100%;
+}
+
+ .algolia-docsearch-suggestion__main .algolia-docsearch-suggestion--content,
+ .algolia-docsearch-suggestion__secondary .algolia-docsearch-suggestion--content {
+ border-top: 0;
+ }
+
+.algolia-docsearch-suggestion--subcategory-inline {
+ display: inline-block;
+ font-weight: 400;
+ &:after {
+ content: " › ";
+ }
+}
+.algolia-docsearch-suggestion--title {
+ display: inline;
+ font-weight: 600;
+}
+
+// Footer
+.algolia-docsearch-footer {
+ border-top: 1px solid $color-border-light;
+ text-align: right;
+ font-size: 12px;
+ padding: 4px 2px 0 0;
+ color: #333;
+
+ .algolia-docsearch-footer--logo {
+ display: inline-block !important;
+ width: 45px;
+ height: 16px;
+ text-indent: 101%;
+ overflow: hidden;
+ white-space: nowrap;
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAAAoCAYAAAA2cfJIAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAA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JfmElROB40VkOFCjSiT/qyWSRmhFdRvwGrDEz2XfCJfVxVs2L/6gu/Ghxf8DwvKOSmwdryMAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTUtMDktMjFUMTc6NTE6MTIrMDI6MDAaMs3qAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE1LTA5LTIxVDE3OjUxOjEyKzAyOjAwa291VgAAAABJRU5ErkJggg==');
+ background-repeat: no-repeat;
+ background-size: contain;
+ vertical-align: middle;
+ }
+}
+
+.aa-dropdown-menu {
+ min-width: $dropdown-min-width-large;
+}
+.algolia-docsearch-suggestion {
+ display: table;
+ width: 100%;
+}
+
+.algolia-docsearch-suggestion__secondary {
+ border-top: 1px solid $color-border-light;
+}
+
+.algolia-docsearch-suggestion--subcategory-column {
+ border-right: 1px solid $color-border-light;
+ background: transparent;
+ color: #999;
+ display: table-cell;
+ overflow: hidden;
+ padding: 5px 7px 5px 10px;
+ text-align: left;
+ font-size: 0.9em;
+ font-family: "Open Sans";
+ text-overflow: ellipsis;
+ vertical-align: top;
+ border-right: 1px solid #ccc;
+
+ width: 160px; // Hardcoded
+ max-width: 160px; // Hardcoded
+ min-width: 160px; // Hardcoded
+}
+
+.algolia-docsearch-suggestion--subcategory-column-text {
+ display: none;
+
+ .algolia-docsearch-suggestion__secondary & {
+ display: block;
+ }
+}
+.algolia-docsearch-suggestion--content {
+ display: table-cell;
+ padding: 5px 10px;
+}
+.algolia-docsearch-suggestion--subcategory-inline {
+ display: none;
+}
+.algolia-docsearch-suggestion--text {
+ display: block;
+ font-weight: 400;
+ font-family: "Open Sans";
+ font-size: .8em;
+ padding: 2px;
+}
+
+.algolia-docsearch-suggestion--wrapper {
+ margin: 10px;
+}
diff --git a/docs/css/_searchbar.scss b/docs/css/_searchbar.scss
new file mode 100644
index 000000000..e268a5d2a
--- /dev/null
+++ b/docs/css/_searchbar.scss
@@ -0,0 +1,188 @@
+$custom:(
+ input-width: 240px,
+ input-height: 36px,
+ border-width: 2px,
+ border-radius: 18px,
+ input-border-color: darken(#1D96C7,10%),
+ input-focus-border-color: #1D96C7,
+ input-background: #091724,
+ input-focus-background: #091724,
+ font-size: 13px,
+ placeholder-color: #AAAAAA,
+ icon-size: 16px,
+ icon-position: left,
+ icon-color: #1D96C7,
+ icon-background: #FFFFFF,
+ icon-background-opacity: 0,
+ icon-clear-size: 12px
+);
+
+@mixin searchbox(
+ $input-width: 500px,
+ $input-height: 40px,
+ $border-width: 1px,
+ $border-radius: 3px,
+ $input-border-color: #ccc,
+ $input-focus-border-color: darken($input-border-color, 15%),
+ $input-background: #fff,
+ $input-focus-background: $input-background,
+ $font-size: 14px,
+ $placeholder-color: #aaa,
+ $icon: 'sbx-icon-search-1',
+ $icon-size: 18px,
+ $icon-position: right,
+ $icon-color: #fff,
+ $icon-background: #3e82f7,
+ $icon-background-opacity: 1,
+ $icon-clear: 'sbx-icon-clear-1',
+ $icon-clear-size: 12px
+) {
+ display: inline-block;
+ position: relative;
+ width: $input-width;
+ height: $input-height;
+ white-space: nowrap;
+ box-sizing: border-box;
+
+ &__input {
+ display: inline-block;
+ transition: box-shadow .4s ease, background .4s ease, padding .4s ease;
+ border: 0;
+ border-radius: $border-radius;
+ box-shadow: inset 0 0 0 $border-width $input-border-color;
+ background: $input-background;
+ padding: 0;
+ padding-right: if($icon-position == 'right', $input-height, 0) + $icon-clear-size * 2 + 8px;
+ padding-left: if($icon-position == 'right', $font-size, $input-height + if($icon-background-opacity == 0, 0, 8px));
+ width: 100%;
+ height: 100%;
+ vertical-align: middle;
+ white-space: normal;
+ font-size: $font-size;
+ appearance: none;
+ color: white;
+
+ &::-webkit-search-decoration,
+ &::-webkit-search-cancel-button,
+ &::-webkit-search-results-button,
+ &::-webkit-search-results-decoration {
+ display: none;
+ }
+
+ &:hover {
+ box-shadow: inset 0 0 0 $border-width darken($input-border-color, 10%);
+ }
+
+ &:focus,
+ &:active {
+ outline: 0;
+ box-shadow: inset 0 0 0 $border-width $input-focus-border-color;
+ background: $input-focus-background;
+ }
+
+ &::placeholder {
+ color: $placeholder-color;
+ }
+
+ }
+
+ &__submit {
+ position: absolute;
+ top: 0;
+ #{$icon-position}: 0;
+ margin: 0;
+ border: 0;
+ border-radius: if($icon-position == 'right', 0 $border-radius $border-radius 0, $border-radius 0 0 $border-radius);
+ background-color: rgba($icon-background, $icon-background-opacity);
+ padding: 0;
+ width: $input-height;
+ height: 100%;
+ vertical-align: middle;
+ text-align: center;
+ user-select: none;
+
+ // Helper for vertical alignement of the icon
+ &::before {
+ display: inline-block;
+ margin-right: -4px;
+ height: 100%;
+ vertical-align: middle;
+ content: '';
+ }
+
+ &:hover,
+ &:active {
+ cursor: pointer;
+ }
+
+ &:focus {
+ outline: 0;
+ }
+
+ svg {
+ width: $icon-size;
+ height: $icon-size;
+ vertical-align: middle;
+ fill: $icon-color;
+ }
+ }
+
+ &__reset {
+ position: absolute;
+ top: ($input-height - $icon-clear-size) / 2 - 4px;
+ right: if($icon-position == 'right', 8px + $input-height, ($input-height - $icon-clear-size) / 2) - 4px;
+ margin: 0;
+ border: 0;
+ background: none;
+ cursor: pointer;
+ padding: 0;
+ user-select: none;
+
+ &.hide{
+ display: none;
+ }
+
+ &:focus {
+ outline: 0;
+ }
+
+ svg {
+ display: block;
+ margin: 4px;
+ width: $icon-clear-size;
+ height: $icon-clear-size;
+ fill: $icon-color;
+ }
+ }
+
+ &__input:valid ~ &__reset {
+ display: block;
+ animation-name: sbx-reset-in;
+ animation-duration: .15s;
+ }
+
+ @keyframes sbx-reset-in {
+ from {
+ transform: translate3d(-20%, 0, 0);
+ opacity: 0;
+ }
+
+ to {
+ transform: none;
+ opacity: 1;
+ }
+ }
+}
+
+.sbx-custom{
+ @include searchbox($custom...);
+}
+
+.site-header .navbar .navbar-nav > li.searchbar-wrapper {
+ padding-top: 0;
+ padding-bottom: 0;
+}
+
+.algolia-autocomplete {
+ display: inline !important;
+}
diff --git a/docs/css/main.scss b/docs/css/main.scss
index ade665a59..6ade1f824 100644
--- a/docs/css/main.scss
+++ b/docs/css/main.scss
@@ -11,3 +11,5 @@
@import "home";
@import "page";
+@import "searchbar";
+@import "docsearch";
diff --git a/docs/documentation.md b/docs/documentation.md
index 19eabb446..3889e6987 100644
--- a/docs/documentation.md
+++ b/docs/documentation.md
@@ -32,7 +32,10 @@ need to add the following code snippet to your website:
docsearch({
apiKey: '',
indexName: '',
- inputSelector: ''
+ inputSelector: '',
+ autocompleteOptions: {
+ debug: false
+ }
});
```
@@ -93,7 +96,8 @@ If you want to do heavily change the way results are displayed, you might find
it easier to directly edit the `scss` files in this repository.
[`_variables.scss`][18]
-contains all the color, breakpoints and size definitions while
+contains all the color, breakpoints and size definitions while
+
[`_main.scss`][19]
holds the structure of the display.
@@ -113,7 +117,7 @@ results from the Algolia API. As such, you can use any options provided by
You can pass any options to the underlying `autocomplete` instance through
the`autocompleteOptions` parameter. You will find all `autocomplete` options in
-its [own documentation][22].
+its [own documentation][22].
You can also listen to `autocomplete` events through the `.autocomplete`
property of the `docsearch` instance.
@@ -184,4 +188,3 @@ You will find all Algolia API options in its [own documentation][23]
[25]: https://jekyllrb.com/
[26]: https://www.ruby-lang.org/en/
[27]: http://bundler.io/
-
diff --git a/src/lib/DocSearch.js b/src/lib/DocSearch.js
index ad3521f77..82c47bad3 100644
--- a/src/lib/DocSearch.js
+++ b/src/lib/DocSearch.js
@@ -7,8 +7,8 @@ import version from './version.js';
import $ from 'npm-zepto';
/**
- * Adds an autocomplete dropdown to an input fields
- * @function documentationSearch
+ * Adds an autocomplete dropdown to an input field
+ * @function DocSearch
* @param {string} options.apiKey Read-only API key
* @param {string} options.indexName Name of the index to target
* @param {string} options.inputSelector CSS selector that targets the input