forked from Bunteshaus/bunteshaus.de
59 lines
2.7 KiB
HTML
59 lines
2.7 KiB
HTML
|
<form id="custom-search" name="custom-search" method="post" action="" onsubmit="customSearchResults(); return false;">
|
||
|
<p>
|
||
|
<input id="custom-search-field" type="text" name="search" value="" title="Search String" placeholder="SearchString">
|
||
|
<!-- <input type="submit" value="Suchen"> -->
|
||
|
</p>
|
||
|
<!-- <p><em>durchsuchen:</em><br>
|
||
|
<input type="checkbox"name="section[]" value="site" checked="checked"> alles<br>
|
||
|
<input type="checkbox" name="section[]" value="post"> Blog<br>
|
||
|
<input type="checkbox" name="section[]" value="other-section"> Other Section
|
||
|
</p> -->
|
||
|
<p>
|
||
|
<input type="radio" name="option" value="AND" checked="checked"> UND-Suche<br>
|
||
|
<input type="radio" name="option" value="OR"> ODER-Suche
|
||
|
</p>
|
||
|
</form>
|
||
|
|
||
|
<div id="custom-search-results"></div>
|
||
|
|
||
|
<script>
|
||
|
// CUSTOM AREA
|
||
|
let params = {
|
||
|
json_src : '../index.json', // for multiple sources: comma separated list of JSONarrays
|
||
|
minlength : 3,
|
||
|
defaultsearch : 'AND',
|
||
|
sort_date : 'DESC',
|
||
|
autocomplete : 1, // 0: form needs a submit button
|
||
|
section_search : 0, // 1: needs checkboxes with name="section[]"
|
||
|
badwords : 'und,oder,aber,wenn,also,der,die,das,den,dem,des,ein,eines,einer', //ignore this words
|
||
|
json_wait : '<p><em>Einen Moment bitte, Suche wird geladen...</em></p>',
|
||
|
json_ready : '<p><em>Bitte geben Sie einen Suchbegriff ein</em></p>',
|
||
|
extern_icon : ' (externer Link)', // marker for external links (optional)
|
||
|
err_badstring : '<p>Der Suchbegriff ist zu kurz!</p>',
|
||
|
err_noresult : '<p>Leider kein Suchergebnis. Bitte versuchen Sie es noch einmal.</p>',
|
||
|
err_norequest : '<p style="text-align: center; color:red;">Die Volltextsuche steht zur Zeit nicht zurVerfügung.</p>',
|
||
|
err_filefailed : '<p style="text-align: center;color: red;">Eine Datei konnte nicht abgerufen werden.</p>',
|
||
|
res_one_item : '<p><em>[CNT] SUCHERGEBNIS</em></p>',
|
||
|
res_more_items : '<p><em>[CNT] SUCHERGEBNISSE</em></p>',
|
||
|
res_out_top : '<ul>',
|
||
|
res_out_bottom : '</ul>',
|
||
|
res_item_tpl : '<li><a href="[URL]">[TITLE]</a><br>[DATE]:[SUMMARY]<br><em>[SECTION][TAGS]</em></li>',
|
||
|
add_searchlink : '<p><a href="https://duckduckgo.com/?q=site:yourdomain.com [QUERY]" target="_blank"><i>Nicht zufrieden mit den Suchergebnissen? Externe Suche via DuckDuckGo ...</i></a></p>'
|
||
|
};
|
||
|
|
||
|
// Translation of section name (optional)
|
||
|
let section_trans = {
|
||
|
"news" : "News",
|
||
|
// "other-section" : "Other Section"
|
||
|
};
|
||
|
|
||
|
let searchfield_weight = {
|
||
|
"title" : 5,
|
||
|
"tags" : 5,
|
||
|
"summary" : 2,
|
||
|
"content" : 1
|
||
|
};
|
||
|
// CUSTOM AREA END
|
||
|
</script>
|
||
|
<script type="text/javascript" src="/js/search.js"></script>
|