diff --git a/_includes/header.html b/_includes/header.html index 14e6f55ef..7811a6367 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -39,11 +39,10 @@
- diff --git a/_sass/minima/_search-page.scss b/_sass/minima/_search-page.scss index 591dd5a35..ecc42f35d 100644 --- a/_sass/minima/_search-page.scss +++ b/_sass/minima/_search-page.scss @@ -13,20 +13,24 @@ form { input { - display: block; - width: 100%; - height: 60px; - border: 1px solid rgba(var(--front), 0.2); - font-size: 27px; - padding-left: 20px; - padding-right: 20px; - box-sizing: border-box; - - &:active, - &:focus { - border-color: var(--primary-color); - outline: none; - } + display: block; + width: 100%; + height: 60px; + border: 1px solid rgba(var(--front), 0.2); + font-size: 27px; + padding-left: 20px; + padding-right: 20px; + box-sizing: border-box; + + &:active, + &:focus { + border-color: var(--primary-color); + outline: none; + } + + &::placeholder { + color: #cccccc; + } } } @@ -36,45 +40,110 @@ margin: 20px 0 0 0; li { - h3 { - margin-top: 0; - margin-bottom: 0; - font-size: 18px; - line-height: 1.2; - color: var(--frontHex); - transition: color 100ms $ease; + border-bottom: 1px solid #ededed; + + h3 { + margin-top: 0; + margin-bottom: 0; + font-size: 18px; + line-height: 1.2; + color: var(--frontHex); + transition: color 100ms $ease; + + span { + margin-left: 5px; + vertical-align: middle; + display: inline-block; + width: 8px; + height: 8px; + border-radius: 4px; + transform: translateY(-1px); } + } - a { - display: block; - padding: 15px 0; - transition: background-color 100ms $ease; - - p { - margin-top: 5px; - margin-bottom: 0; - font-size: 16px; - line-height: 1.4; - color: rgba(var(--front), 0.7); - } + a { + display: block; + padding: 15px 0; + transition: background-color 100ms $ease; + + p { + margin-top: 5px; + margin-bottom: 0; + font-size: 16px; + line-height: 1.4; + color: rgba(var(--front), 0.7); + } - &:hover { - text-decoration: none; - background-color: rgba(var(--primary-color-rgb), 0.05); + &:hover { + text-decoration: none; + background-color: rgba(var(--primary-color-rgb), 0.05); - h3 { - color: var(--primary-color); - } + h3 { + color: var(--primary-color); } } + } + + &.no-results { + padding: 15px 0; + } + } + } + + #search-tips { + padding: 15px 0; + + button { + appearance: none; + background-color: transparent; + border-width: 0; + padding: 0; + display: flex; + gap: 3px; + font-size: 15px; + align-items: center; + transition: all 150ms $ease; - > h3 { - padding: 15px 0; + svg { + width: 14px; + height: 14px; + transition: all 150ms $ease; + } + + &:hover { + color: var(--primary-color); + cursor: pointer; + } + + &[aria-expanded="true"] { + svg { + transform: rotate(90deg); } + } + } + } + + #search-tips-content { + p { + font-size: 15px; + } - & + li { - border-top: 1px solid #ededed; + ul { + margin-top: 5px; + + li { + font-size: 15px; + + em { + font-style: normal; + font-weight: 500; + color: var(--front); } + } + + & + p { + margin-top: 5px; + } } } } diff --git a/_sass/minima/_site-header.scss b/_sass/minima/_site-header.scss index 19e66b4e3..a869f999c 100644 --- a/_sass/minima/_site-header.scss +++ b/_sass/minima/_site-header.scss @@ -188,6 +188,16 @@ line-height: 1.2; color: var(--frontHex); transition: color 100ms $ease; + + span { + margin-left: 5px; + vertical-align: middle; + display: inline-block; + width: 8px; + height: 8px; + border-radius: 4px; + transform: translateY(-1px); + } } a { diff --git a/js/lunr.min.js b/js/lunr.min.js index 4fd086e7c..cdc94cd39 100644 --- a/js/lunr.min.js +++ b/js/lunr.min.js @@ -1,6 +1,6 @@ /** - * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 0.7.1 - * Copyright (C) 2016 Oliver Nightingale + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 + * Copyright (C) 2020 Oliver Nightingale * @license MIT */ -!function(){var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.7.1",t.utils={},t.utils.warn=function(t){return function(e){t.console&&console.warn&&console.warn(e)}}(this),t.utils.asString=function(t){return void 0===t||null===t?"":t.toString()},t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var t=Array.prototype.slice.call(arguments),e=t.pop(),n=t;if("function"!=typeof e)throw new TypeError("last argument must be a function");n.forEach(function(t){this.hasHandler(t)||(this.events[t]=[]),this.events[t].push(e)},this)},t.EventEmitter.prototype.removeListener=function(t,e){if(this.hasHandler(t)){var n=this.events[t].indexOf(e);this.events[t].splice(n,1),this.events[t].length||delete this.events[t]}},t.EventEmitter.prototype.emit=function(t){if(this.hasHandler(t)){var e=Array.prototype.slice.call(arguments,1);this.events[t].forEach(function(t){t.apply(void 0,e)})}},t.EventEmitter.prototype.hasHandler=function(t){return t in this.events},t.tokenizer=function(e){return arguments.length&&null!=e&&void 0!=e?Array.isArray(e)?e.map(function(e){return t.utils.asString(e).toLowerCase()}):e.toString().trim().toLowerCase().split(t.tokenizer.seperator):[]},t.tokenizer.seperator=/[\s\-]+/,t.tokenizer.load=function(t){var e=this.registeredFunctions[t];if(!e)throw new Error("Cannot load un-registered function: "+t);return e},t.tokenizer.label="default",t.tokenizer.registeredFunctions={"default":t.tokenizer},t.tokenizer.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing tokenizer: "+n),e.label=n,this.registeredFunctions[n]=e},t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.registeredFunctions[e];if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(e);if(-1==i)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(e);if(-1==i)throw new Error("Cannot find existingFn");this._stack.splice(i,0,n)},t.Pipeline.prototype.remove=function(t){var e=this._stack.indexOf(t);-1!=e&&this._stack.splice(e,1)},t.Pipeline.prototype.run=function(t){for(var e=[],n=t.length,i=this._stack.length,r=0;n>r;r++){for(var o=t[r],s=0;i>s&&(o=this._stack[s](o,r,t),void 0!==o&&""!==o);s++);void 0!==o&&""!==o&&e.push(o)}return e},t.Pipeline.prototype.reset=function(){this._stack=[]},t.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Vector=function(){this._magnitude=null,this.list=void 0,this.length=0},t.Vector.Node=function(t,e,n){this.idx=t,this.val=e,this.next=n},t.Vector.prototype.insert=function(e,n){this._magnitude=void 0;var i=this.list;if(!i)return this.list=new t.Vector.Node(e,n,i),this.length++;if(e' + content + '...
'; appendString += '' + content + '...
'; appendString += 'Search supports several tricks to help you find what you’re looking for:
+You can also try combining these commands. If you still cannot find anything, ask in Discord.
+