| 111 | } |
| 112 | |
| 113 | function tpl(defaultValue = '') { |
| 114 | const html = `<div class="input-wrap"> |
| 115 | <input type="search" value="${defaultValue}" aria-label="Search text" /> |
| 116 | <div class="clear-button"> |
| 117 | <svg width="26" height="24"> |
| 118 | <circle cx="12" cy="12" r="11" fill="#ccc" /> |
| 119 | <path stroke="white" stroke-width="2" d="M8.25,8.25,15.75,15.75" /> |
| 120 | <path stroke="white" stroke-width="2"d="M8.25,15.75,15.75,8.25" /> |
| 121 | </svg> |
| 122 | </div> |
| 123 | </div> |
| 124 | <div class="results-panel"></div> |
| 125 | </div>`; |
| 126 | const el = Docsify.dom.create('div', html); |
| 127 | const aside = Docsify.dom.find('aside'); |
| 128 | |
| 129 | Docsify.dom.toggleClass(el, 'search'); |
| 130 | Docsify.dom.before(aside, el); |
| 131 | } |
| 132 | |
| 133 | function doSearch(value) { |
| 134 | const $search = Docsify.dom.find('div.search'); |