| 192 | } |
| 193 | |
| 194 | function tpl(defaultValue) { |
| 195 | if ( defaultValue === void 0 ) defaultValue = ''; |
| 196 | |
| 197 | var html = |
| 198 | "<div class=\"input-wrap\">\n <input type=\"search\" value=\"" + defaultValue + "\" />\n <div class=\"clear-button\">\n <svg width=\"26\" height=\"24\">\n <circle cx=\"12\" cy=\"12\" r=\"11\" fill=\"#ccc\" />\n <path stroke=\"white\" stroke-width=\"2\" d=\"M8.25,8.25,15.75,15.75\" />\n <path stroke=\"white\" stroke-width=\"2\"d=\"M8.25,15.75,15.75,8.25\" />\n </svg>\n </div>\n </div>\n <div class=\"results-panel\"></div>\n </div>"; |
| 199 | var el = Docsify.dom.create('div', html); |
| 200 | var aside = Docsify.dom.find('aside'); |
| 201 | |
| 202 | Docsify.dom.toggleClass(el, 'search'); |
| 203 | Docsify.dom.before(aside, el); |
| 204 | } |
| 205 | |
| 206 | function doSearch(value) { |
| 207 | var $search = Docsify.dom.find('div.search'); |