63 lines
3.0 KiB
HTML
63 lines
3.0 KiB
HTML
<noscript><p><b>Bitte aktiviere Javascript, sonst funktioniert die Suche nicht.</b></p></noscript>
|
|
<form id="custom-search" name="custom-search" method="post" action="" onsubmit="customSearchResults(); return false;">
|
|
{{ $search := "Search" }}
|
|
{{ if i18n "search" }}
|
|
{{ $search = i18n "search" }}
|
|
{{ end }}
|
|
<input id="custom-search-field" type="text" name="search" value="" title="Search String" placeholder="{{ $search }}">
|
|
<!-- <input type="submit" value="Suchen"> -->
|
|
|
|
<!-- <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 : '<div>',
|
|
res_out_bottom : '</div><hr>',
|
|
res_item_tpl : '<div style=" font-size: .9em;">[DATE]: <a href="[URL]" class="underline">[TITLE]</a></div><div style="margin-left: 1em; font-size: .8em;">[SUMMARY]<a href="[URL]"> weiterlesen</a></div><div style="margin-left: 1em; font-size: .8em;"><em>Tags: [TAGS]</em></div>',
|
|
// 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 = {
|
|
"posts" : "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>
|