MCPcopy Create free account
hub / github.com/frank-lam/fullstack-tutorial / tpl

Function tpl

notes/docsify/unpkg/docsify/lib/plugins/search.js:194–204  ·  view source on GitHub ↗
(defaultValue)

Source from the content-addressed store, hash-verified

192}
193
194function 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
206function doSearch(value) {
207 var $search = Docsify.dom.find('div.search');

Callers 1

initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected