2022-06-16 14:26:33 +02:00
< noscript > < p > < b > Bitte aktiviere Javascript, sonst funktioniert die Suche nicht.< / b > < / p > < / noscript >
2022-06-16 13:46:25 +02:00
< form id = "custom-search" name = "custom-search" method = "post" action = "" onsubmit = "customSearchResults(); return false;" >
2022-06-16 14:26:33 +02:00
{{ $search := "Search" }}
{{ if i18n "search" }}
{{ $search = i18n "search" }}
{{ end }}
2022-06-16 13:46:25 +02:00
< p >
2022-06-16 14:26:33 +02:00
< input id = "custom-search-field" type = "text" name = "search" value = "" title = "Search String" placeholder = "{{ $search }}" >
2022-06-16 13:46:25 +02:00
<!-- <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 > ',
2022-06-16 14:17:19 +02:00
// 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 > '
2022-06-16 13:46:25 +02:00
};
// Translation of section name (optional)
let section_trans = {
2022-06-22 18:36:10 +02:00
"posts" : "Posts",
2022-06-16 13:46:25 +02:00
// "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 >