yacy_search_server/htroot/yacysearchtrailer.html

225 lines
13 KiB
HTML
Raw Normal View History

<script>
if (document.getElementById("progressbar").getAttribute('class') != "progress-bar progress-bar-success") {
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;");
document.getElementById("progressbar").setAttribute('class',"progress-bar progress-bar-success");
window.setTimeout(fadeOutBar, 500);
}
</script>
#(resource-select)#::
<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"
data-on-text="<span>&nbsp;&nbsp;&nbsp;Peer-to-Peer&nbsp;&nbsp;&nbsp;&nbsp;</span>"
data-off-text="<span>&nbsp;&nbsp;&nbsp;&nbsp;Stealth&nbsp;Mode&nbsp;&nbsp;&nbsp;</span>"
data-on-color="warning" data-off-color="success"
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();">
</form>
<script>$("#resource-switch-form").popover(); $("[name='resource-switch']").bootstrapSwitch();</script>
::
<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
data-label-text="Peer-to-Peer"
data-on-text="<span>&nbsp;&nbsp;&nbsp;Peer-to-Peer&nbsp;&nbsp;&nbsp;&nbsp;</span>"
data-off-text="<span>&nbsp;&nbsp;&nbsp;&nbsp;Stealth&nbsp;Mode&nbsp;&nbsp;&nbsp;</span>"
data-on-color="warning" data-off-color="success"
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();">
</form>
<script>$("#resource-switch-form").popover(); $("[name='resource-switch']").bootstrapSwitch();</script>
#(/resource-select)#
2014-03-24 09:52:27 +01:00
<p class="navbutton">
2014-03-23 13:01:25 +01:00
<div class="btn-group btn-group-justified">
<div class="btn-group btn-group-xs"><button type="button" id="sort_button_context" class="btn btn-default" 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" onclick="document.getElementById('search').value=document.getElementById('search').value + ' /date';document.searchform.submit();">Sort by Date</button></div>
</div>
2014-03-24 09:52:27 +01:00
</p>
2014-03-23 13:01:25 +01:00
<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>
2014-03-27 12:03:51 +01:00
#(searchdomswitches)#::<p class="navbutton">
<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>
</p>#(/searchdomswitches)#
#(nav-protocols)#::
<div class="btn-group btn-group-justified">
#{element}#
<div class="btn-group btn-group-xs"><button type="button" class="btn btn-default#(on)#:: active#(/on)#"#(on)# onclick="window.location.href='#[url]#';"::#(/on)#>#[name]# (#[count]#)</button></div>
#{/element}#
</div>
#(/nav-protocols)#
2014-04-29 16:24:21 +02:00
#(nav-topics)#<p>&nbsp;</p>::
<div id="tagcloud" style="text-align:justify">#{element}#
2014-03-24 09:52:27 +01:00
<a rel="#[count]#" href="#[url]#" style="text-decoration:none;font-size:#[size]#px;">#[name]#</a>
#{/element}#</div>
#(/nav-topics)#
2014-10-15 00:55:57 +02:00
#(cat-location)#::
<ul class="nav nav-sidebar menugroup">
<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)#
added a new way of content browsing in search results: - date navigation The date is taken from the CONTENT of the documents / web pages, NOT from a date submitted in the context of metadata (i.e. http header or html head form). This makes it possible to search for documents in the future, i.e. when documents contain event descriptions for future events. The date is written to an index field which is now enabled by default. All documents are scanned for contained date mentions. To visualize the dates for a specific search results, a histogram showing the number of documents for each day is displayed. To render these histograms the morris.js library is used. Morris.js requires also raphael.js which is now also integrated in YaCy. The histogram is now also displayed in the index browser by default. To select a specific range from a search result, the following modifiers had been introduced: from:<date> to:<date> These modifiers can be used separately (i.e. only 'from' or only 'to') to describe an open interval or combined to have a closed interval. Both dates are inclusive. To select a specific single date only, use the 'to:' - modifier. The histogram shows blue and green lines; the green lines denot weekend days (saturday and sunday). Clicking on bars in the histogram has the following reaction: 1st click: add a from:<date> modifier for the date of the bar 2nd click: add a to:<date> modifier for the date of the bar 3rd click: remove from and date modifier and set a on:<date> for the bar When the on:<date> modifier is used, the histogram shows an unlimited time period. This makes it possible to click again (4th click) which is then interpreted as a 1st click again (sets a from modifier). The display feature is NOT switched on by default; to switch it on use the /ConfigSearchPage_p.html servlet.
2015-03-02 04:30:10 +01:00
#(nav-dates)#::
<link rel="stylesheet" href="/env/morris.css">
<script src="/js/raphael-min.js"></script>
<script src="/js/morris.js"></script>
<script>
document.getElementById("datehistogram").style = "height:200px";
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) 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) {
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();
}
var date = row.x;
console.log(i, row, query);
});
</script>
#(/nav-dates)#
<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";
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";
document.getElementById("chevron-" + name).className = "glyphicon glyphicon-chevron-down";
}
}
</script>
2014-03-27 12:03:51 +01:00
#(nav-domains)#::
<ul class="nav nav-sidebar menugroup">
<li style="cursor: pointer; cursor: hand;"><h3 onclick="toggleVisibility('domains', #[count]#);">Provider [#[count]#] <span style="float:right" id="chevron-domains" class="glyphicon glyphicon-chevron-down" title="click to expand facet"></span></h3></li>
#{element}#
<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>
#{/element}#</ul>
<script>if (#[count]# <= 8) toggleVisibility('domains', #[count]#);</script>
2014-03-27 12:03:51 +01:00
#(/nav-domains)#
2014-03-27 12:03:51 +01:00
#(nav-filetypes)#::
<ul class="nav nav-sidebar menugroup">
<li style="cursor: pointer; cursor: hand;"><h3 onclick="toggleVisibility('filetypes', #[count]#);">Filetype [#[count]#] <span style="float:right" id="chevron-filetypes" class="glyphicon glyphicon-chevron-down" title="click to expand facet"></span></h3></li>
#{element}#
<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>
#{/element}#</ul>
<script>if (#[count]# <= 8) toggleVisibility('filetypes', #[count]#);</script>
2014-03-27 12:03:51 +01:00
#(/nav-filetypes)#
#(nav-languages)#::
<ul class="nav nav-sidebar menugroup">
<li style="cursor: pointer; cursor: hand;"><h3 onclick="toggleVisibility('languages', #[count]#);">Language [#[count]#] <span style="float:right" id="chevron-languages" class="glyphicon glyphicon-chevron-down" title="click to expand facet"></span></h3></li>
#{element}#
<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>
#{/element}#</ul>
<script>if (#[count]# <= 8) toggleVisibility('languages', #[count]#);</script>
#(/nav-languages)#
#(nav-namespace)#::
<ul class="nav nav-sidebar menugroup">
<li style="cursor: pointer; cursor: hand;"><h3 onclick="toggleVisibility('namespace', #[count]#);">Name Space [#[count]#] <span style="float:right" id="chevron-namespace" class="glyphicon glyphicon-chevron-down" title="click to expand facet"></span></h3></li>
#{element}#
<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>
#{/element}#</ul>
<script>if (#[count]# <= 8) toggleVisibility('namespace', #[count]#);</script>
#(/nav-namespace)#
#(nav-authors)#::
<ul class="nav nav-sidebar menugroup">
<li style="cursor: pointer; cursor: hand;"><h3 onclick="toggleVisibility('authors', #[count]#);">Author [#[count]#] <span style="float:right" id="chevron-authors" class="glyphicon glyphicon-chevron-down" title="click to expand facet"></span></h3></li>
#{element}#
<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>
#{/element}#</ul>
<script>if (#[count]# <= 8) toggleVisibility('authors', #[count]#);</script>
#(/nav-authors)#
#(nav-collections)#::
<ul class="nav nav-sidebar menugroup">
<li style="cursor: pointer; cursor: hand;"><h3 onclick="toggleVisibility('collections', #[count]#);">Collection [#[count]#] <span style="float:right" id="chevron-collections" class="glyphicon glyphicon-chevron-down" title="click to expand facet"></span></h3></li>
#{element}#
<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>
#{/element}#</ul>
<script>if (#[count]# <= 8) toggleVisibility('collections', #[count]#);</script>
#(/nav-collections)#
#{nav-vocabulary}#
<ul class="nav nav-sidebar menugroup">
<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>
#{element}#
<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>
#{/element}#</ul>
<script>if (#[count]# <= 8) toggleVisibility('vocabulary_#[navname]#', #[count]#);</script>
#{/nav-vocabulary}#
#(nav-about)#::
<ul class="nav nav-sidebar menugroup">
<li><h3>#[headline]#</h3></li>
<li>#[body]#</li>
</ul>
#(/nav-about)#