2014-03-21 18:01:26 +01:00
< script >
2016-11-29 02:11:44 +01:00
if (document.getElementById("progressbar") != null & & document.getElementById("progressbar").getAttribute('class') != "progress-bar progress-bar-success") {
2014-03-21 18:01:26 +01:00
document.getElementById("progressbar").setAttribute('style',"width:100%");
2014-03-22 07:02:26 +01:00
document.getElementById("progressbar").setAttribute('style',"transition:transform 0s;-webkit-transition:-webkit-transform 0s;");
2014-03-21 18:01:26 +01:00
document.getElementById("progressbar").setAttribute('class',"progress-bar progress-bar-success");
window.setTimeout(fadeOutBar, 500);
}
< / script >
#(resource-select)#::
2014-04-02 13:33:43 +02:00
< form
action="yacysearch.html" method="get" accept-charset="UTF-8" id="resource-switch-form"
data-trigger="hover" data-placement="right" data-container="body"
data-original-title="Your search is done using peers in the YaCy P2P network."
data-content="You can switch to 'Stealth Mode' which will switch off P2P, giving you full privacy. Expect less results then, because then only your own search index is used."
>
2014-03-22 07:02:26 +01:00
< input checked = "checked"
data-label-text="Privacy"
2014-04-02 13:33:43 +02:00
data-on-text="< span > Peer-to-Peer < / span > "
data-off-text="< span > Stealth Mode < / span > "
2014-03-23 12:29:46 +01:00
data-on-color="warning" data-off-color="success"
2016-12-13 15:33:18 +01:00
data-animate="false"
2014-03-23 12:29:46 +01:00
type="checkbox" name="resource-switch" value="local" data-size="large"
2014-03-22 07:02:26 +01:00
onchange="document.getElementById('resource').value='local';document.searchform.submit();">
2014-03-21 18:01:26 +01:00
< / form >
2014-04-02 13:33:43 +02:00
< script > $ ( "#resource-switch-form" ) . popover ( ) ; $ ( "[name='resource-switch']" ) . bootstrapSwitch ( ) ; < / script >
2014-03-21 18:01:26 +01:00
::
2014-04-02 13:33:43 +02:00
< form action = "yacysearch.html" method = "get" accept-charset = "UTF-8" id = "resource-switch-form"
data-trigger="hover" data-placement="right" data-container="body"
data-original-title="Your search is done using only your own peer, locally."
data-content="You can switch to 'Peer-to-Peer Mode' which will cause that your search is done using the other peers in the YaCy network."
>
2014-03-22 07:02:26 +01:00
< input
2014-10-01 23:53:41 +02:00
data-label-text="Peer-to-Peer"
2014-04-02 13:33:43 +02:00
data-on-text="< span > Peer-to-Peer < / span > "
data-off-text="< span > Stealth Mode < / span > "
2014-03-23 12:29:46 +01:00
data-on-color="warning" data-off-color="success"
2016-12-13 15:33:18 +01:00
data-animate="false"
2014-03-23 12:29:46 +01:00
type="checkbox" name="resource-switch" value="global" data-size="large"
2014-03-22 07:02:26 +01:00
onchange="document.getElementById('resource').value='global';document.searchform.submit();">
2014-03-21 18:01:26 +01:00
< / form >
2014-04-02 13:33:43 +02:00
< script > $ ( "#resource-switch-form" ) . popover ( ) ; $ ( "[name='resource-switch']" ) . bootstrapSwitch ( ) ; < / script >
2014-03-21 18:01:26 +01:00
#(/resource-select)#
2010-05-21 00:05:04 +02:00
2016-09-29 14:24:15 +02:00
< p class = "navbutton" > < / p >
2017-10-12 07:16:19 +02:00
< div id = "rankingButtons" class = "btn-group btn-group-justified" data-nav-generation = "#[nav-generation]#" >
<!-- data - nav - generation attribute helps the browser know whether the search navigators have to be refreshed -->
2018-03-27 18:05:20 +02:00
< div class = "btn-group btn-group-xs" >
< button type = "button" id = "sort_button_context" class = "btn btn-default" title = "Use the default ranking profile (customizable), ordering results by score."
onclick="document.getElementById('search').value=document.getElementById('search').value.replace(' /date','');document.searchform.submit();">Context Ranking< / button >
< / div >
< div class = "btn-group btn-group-xs" >
< button type = "button" id = "sort_button_date" class = "btn btn-default" title = "Use the 'Date' ranking profile, ordering results by default on each document last modification date."
onclick="document.getElementById('search').value=document.getElementById('search').value + ' /date';document.searchform.submit();">Sort by Date< / button >
< / div >
2014-03-23 13:01:25 +01:00
< / div >
< script >
if (document.getElementById('search').value.indexOf(" /date") == -1) {
document.getElementById("sort_button_context").setAttribute("class","btn btn-default active");
document.getElementById("sort_button_context").setAttribute("onclick","");
} else {
document.getElementById("sort_button_date").setAttribute("class","btn btn-default active");
document.getElementById("sort_button_date").setAttribute("onclick","");
}
< / script >
2016-09-29 14:24:15 +02:00
#(searchdomswitches)#::< p class = "navbutton" > < / p >
2014-03-27 12:03:51 +01:00
< div class = "btn-group btn-group-justified" >
#(searchtext)#::< div class = "btn-group btn-group-xs" > < button type = "button" class = "btn btn-default#(check)#:: active#(/check)#" # ( check ) # onclick = "document.getElementById('contentdom').value='text';document.searchform.submit();" :: # ( / check ) # > Documents< / button > < / div > #(/searchtext)#
#(searchimage)#::< div class = "btn-group btn-group-xs" > < button type = "button" class = "btn btn-default#(check)#:: active#(/check)#" # ( check ) # onclick = "document.getElementById('contentdom').value='image';document.searchform.submit();" :: # ( / check ) # > Images< / button > < / div > #(/searchimage)#
#(searchaudio)#::< div class = "btn-group btn-group-xs" > < button type = "button" class = "btn btn-default#(check)#:: active#(/check)#" # ( check ) # onclick = "document.getElementById('contentdom').value='audio';document.searchform.submit();" :: # ( / check ) # > Audio< / button > < / div > #(/searchaudio)#
#(searchvideo)#::< div class = "btn-group btn-group-xs" > < button type = "button" class = "btn btn-default#(check)#:: active#(/check)#" # ( check ) # onclick = "document.getElementById('contentdom').value='video';document.searchform.submit();" :: # ( / check ) # > Video< / button > < / div > #(/searchvideo)#
#(searchapp)#::< div class = "btn-group btn-group-xs" > < button type = "button" class = "btn btn-default#(check)#:: active#(/check)#" # ( check ) # onclick = "document.getElementById('contentdom').value='app';document.searchform.submit();" :: # ( / check ) # > Apps< / button > < / div > #(/searchapp)#
< / div >
2018-01-02 08:13:14 +01:00
#(strictContentDomSwitch)#::
< div class = "btn-group btn-group-justified" >
< div class = "btn-group btn-group-xs" > < button type = "button" title = "Extend media search results to pages including such medias (provides generally more results, but eventually less relevant)" class = "btn btn-default#(strictContentDom)# active::#(/strictContentDom)#" # ( strictContentDom ) # ::onclick = "document.getElementById('strictContentDom').value='false';document.searchform.submit();" # ( / strictContentDom ) # > Extended< / button > < / div >
< div class = "btn-group btn-group-xs" > < button type = "button" title = "Strictly limit media search results to indexed documents matching exactly the desired content domain." class = "btn btn-default#(strictContentDom)#:: active#(/strictContentDom)#" # ( strictContentDom ) # onclick = "document.getElementById('strictContentDom').value='true';document.searchform.submit();" :: # ( / strictContentDom ) # > Strict< / button > < / div >
< / div >
#(/strictContentDomSwitch)#
2016-09-29 14:24:15 +02:00
#(/searchdomswitches)#
2014-03-27 12:03:51 +01:00
2014-03-27 13:50:13 +01:00
#(nav-protocols)#::
2016-09-29 14:24:15 +02:00
< p class = "navbutton" > < / p >
2017-04-03 04:32:09 +02:00
< div id = "nav-protocols" class = "btn-group btn-group-justified" >
2014-03-27 13:50:13 +01:00
#{element}#
2017-04-03 04:32:09 +02:00
< div id = "nav-protocols-#[name]#" class = "btn-group btn-group-xs" > < button type = "button" class = "btn btn-default#(on)#:: active#(/on)#" # ( onclick ) # onclick = "window.location.href='#[url]#';" :: # ( / onclick ) # > #[name]# (#[count]#)< / button > < / div >
2014-03-27 13:50:13 +01:00
#{/element}#
< / div >
#(/nav-protocols)#
2014-04-29 16:24:21 +02:00
#(nav-topics)#< p > < / p > ::
2013-10-22 14:20:17 +02:00
< div id = "tagcloud" style = "text-align:justify" > #{element}#
2016-09-30 09:43:51 +02:00
< a href = "#[url]#" style = "text-decoration:none;font-size:#[size]#px;" > #[name]#< / a >
2013-10-22 14:20:17 +02:00
#{/element}#< / div >
2010-10-16 00:01:39 +02:00
#(/nav-topics)#
2014-10-15 00:55:57 +02:00
#(cat-location)#::
2017-04-03 04:32:09 +02:00
< ul id = "cat-location" class = "nav nav-sidebar menugroup" >
2014-10-15 00:55:57 +02:00
< li > < h3 > Location< / h3 > < / li >
< li >
< a href = "yacysearch_location.html?query=#[queryenc]#" class = "MenuItemLink" >
< img src = "env/grafics/earthsearch.png" width = "100%" height = "86" alt = "earthsearchlogo" / > < br / >
show search results for "#[query]#" on map< / a >
< / li >
< / ul >
#(/cat-location)#
2015-03-02 04:30:10 +01:00
#(nav-dates)#::
2016-11-08 03:05:51 +01:00
< link rel = "stylesheet" href = "env/morris.css" >
2017-09-20 07:59:20 +02:00
< script src = "js/raphael.min.js" > < / script >
2016-11-08 03:05:51 +01:00
< script src = "js/morris.js" > < / script >
2017-09-22 11:00:46 +02:00
< script type = "text/javascript" src = "js/accessibleHistogram.js" charset = "UTF-8" > < / script >
2015-03-02 04:30:10 +01:00
< script >
2017-09-22 11:00:46 +02:00
var histogramContainer = document.getElementById("datehistogram");
if(histogramContainer != null) {
dates_in_content_dts = [#{element}#"#[name]#","#[count]#"#(nl)#::,#(/nl)##{/element}#];
var parsed = [];
for (var i = 0; i < dates_in_content_dts.length ; i = i + 2 ) {
var date = dates_in_content_dts[i];
var count = dates_in_content_dts[i + 1];
if (date & & count) {parsed[parsed.length] = {x: date,y: count};};
};
if (parsed.length > 0) {
histogramContainer.style = "height:200px; cursor: pointer;";
var histogramClickhandler = function(row) {
var query = document.getElementsByClassName('searchinput')[0].getAttribute("value");
var onp = -1, fromp = -1, top = -1;
if ((onp = query.indexOf("on:")) >= 0) {
query = query.substring(0, onp - 1);
}
if ((fromp = query.indexOf("from:")) < 0 ) {
query = query + " from:" + row.x;
document.getElementsByClassName('searchinput')[0].value = query;
document.getElementById('Enter').click();
} else if ((top = query.indexOf("to:")) < 0 ) {
query = query + " to:" + row.x;
document.getElementsByClassName('searchinput')[0].value = query;
document.getElementById('Enter').click();
} else {
query = query.substring(0, fromp) + " on:" + row.x;
document.getElementsByClassName('searchinput')[0].value = query;
document.getElementById('Enter').click();
}
console.log(i, row, query);
}
var histogram = Morris.Bar({
element: 'datehistogram',
data: parsed,
xkey: 'x',
ykeys: ['y'],
labels: ['number of documents about this date'],
yLabelFormat: function (y) { return y.toString() + ' docs'; },
barColors: function (row, series, type) {
var d = new Date(row.label);
if (d.getDay() === 6) return '#4aaf46'; //saturday
if (d.getDay() === 0) return '#4aaf46'; //sunday
return '#3574c0';
},
hideHover: 'false'
}).on('click', function(i, row) {
histogramClickhandler(row);
});
/* Add keyboard navigation support and accessible attributes */
makeAccessibleMorrisBar(histogram,
"Number of documents per date histogram",
function(data) {return data.x + " : " + data.y + " docs"},
"link",
histogramClickhandler);
2015-03-02 04:30:10 +01:00
}
2017-09-22 11:00:46 +02:00
}
2015-03-02 04:30:10 +01:00
< / script >
#(/nav-dates)#
2015-04-01 18:17:52 +02:00
< script >
function toggleVisibility(name, count) {
if (document.getElementById(name + "_0").style.display == "none") {
2015-04-13 23:32:06 +02:00
for (i = 0; i < count ; i + + ) document . getElementById ( name + " _ " + i ) . style . display = "block" ;
2015-04-01 18:17:52 +02:00
document.getElementById("chevron-" + name).className = "glyphicon glyphicon-chevron-up";
} else {
2015-04-13 23:32:06 +02:00
for (i = 0; i < count ; i + + ) document . getElementById ( name + " _ " + i ) . style . display = "none" ;
2015-04-01 18:17:52 +02:00
document.getElementById("chevron-" + name).className = "glyphicon glyphicon-chevron-down";
}
}
< / script >
2011-06-23 17:39:52 +02:00
2016-10-31 02:17:43 +01:00
#{navs}#
2017-09-15 14:23:49 +02:00
< ul id = "nav-#[name]#" class = "nav nav-sidebar menugroup" >
2016-10-31 02:17:43 +01:00
< li style = "cursor: pointer; cursor: hand;" > < h3 onclick = "toggleVisibility('#[name]#', #[count]#);" > #[displayname]# [#[count]#] < span style = "float:right" id = "chevron-#[name]#" class = "glyphicon glyphicon-chevron-down" title = "click to expand facet" > < / span > < / h3 > < / li >
2014-03-18 13:42:31 +01:00
#{element}#
2015-04-01 18:17:52 +02:00
< li style = "display:none" id = "#[id]#" > < a href = "#[url]#" class = "MenuItemLink" > < input type = "checkbox" onchange = "window.location.href='#[url]#'" # ( on ) # checked = "checked" :: # ( / on ) # / > #[name]# (#[count]#)< / a > < / li >
2014-03-18 13:42:31 +01:00
#{/element}#< / ul >
2016-10-31 02:17:43 +01:00
< script > if ( # [ count ] # <= 8 ) toggleVisibility ( '#[name]#' , # [ count ] # ) ; < / script >
#{/navs}#
2014-06-15 12:11:23 +02:00
2012-01-17 01:53:08 +01:00
#{nav-vocabulary}#
2017-09-15 14:23:49 +02:00
< ul id = "nav-vocabulary" class = "nav nav-sidebar menugroup" >
2015-04-01 18:37:45 +02:00
< li style = "cursor: pointer; cursor: hand;" > < h3 onclick = "toggleVisibility('vocabulary_#[navname]#', #[count]#);" > #[navname]# [#[count]#] < span style = "float:right" id = "chevron-vocabulary_#[navname]#" class = "glyphicon glyphicon-chevron-down" title = "click to expand facet" > < / span > < / h3 > < / li >
2014-03-18 13:42:31 +01:00
#{element}#
2015-04-01 18:17:52 +02:00
< li style = "display:none" id = "#[id]#" > < a href = "#[url]#" class = "MenuItemLink" > < input type = "checkbox" onchange = "window.location.href='#[url]#'" # ( on ) # checked = "checked" :: # ( / on ) # / > #[name]# (#[count]#)< / a > < / li >
2014-03-18 13:42:31 +01:00
#{/element}#< / ul >
2015-04-01 18:17:52 +02:00
< script > if ( # [ count ] # <= 8 ) toggleVisibility ( 'vocabulary_#[navname]#' , # [ count ] # ) ; < / script >
2012-01-17 01:53:08 +01:00
#{/nav-vocabulary}#
2009-09-21 00:10:45 +02:00
#(nav-about)#::
2014-03-18 13:42:31 +01:00
< ul class = "nav nav-sidebar menugroup" >
< li > < h3 > #[headline]#< / h3 > < / li >
< li > #[body]#< / li >
< / ul >
#(/nav-about)#