Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

YaCy-UI Widget: - added parameters fontsize=[small,normal,big], height and width - e.g. http://localhost:8080/yacy/ui/yacyui-widget.html?style=darkness&fontsize=small&height=400&width=300

apfelmaennchenb6b39e9556f8
diff --git a/htroot/yacy/ui/css/widget.css b/htroot/yacy/ui/css/widget.css
index a7a10bc60..e79d390ba 100644
--- a/htroot/yacy/ui/css/widget.css
+++ b/htroot/yacy/ui/css/widget.css
@@ -1,7 +1,13 @@
/* Body */
-body {
+body.normal {
font-size: 75.0%;
}
+body.small {
+ font-size: 55.0%;
+}
+body.big {
+ font-size: 85.0%;
+}
p.url {
padding-top: 1px;
font-size: 0.9em;
@@ -25,5 +31,6 @@ img.favicon{
width: 16px;
height: 16px;
vertical-align: middle;
- margin-bottom: -40px;
+ margin-bottom: -40px;
+ padding: 5px 5px 5px 5px;
}
diff --git a/htroot/yacy/ui/yacyui-widget.html b/htroot/yacy/ui/yacyui-widget.html
index daf524c39..6c4d90a28 100644
--- a/htroot/yacy/ui/yacyui-widget.html
+++ b/htroot/yacy/ui/yacyui-widget.html
@@ -31,16 +31,35 @@
//<![CDATA[
$(document).ready(function() {
- var style = $.query.get('style');
- $.query.REMOVE('style');
- if (style) {
- switchStylestyle(style);
- }
+ var style = $.query.get('style');
+ if (style) { switchStylestyle(style); }
+
+ var height = $.query.get('height');
+ if (!height) { height = 600; }
+
+ var width = $.query.get('width');
+ if (!width) { width = 400; }
+
+ var size = $.query.get('fontsize');
+ if (size) {
+ $('body').removeClass();
+ switch(size) {
+ case 'normal':
+ $('body').addClass('normal');
+ break;
+ case 'small':
+ $('body').addClass('small');
+ break;
+ case 'big':
+ $('body').addClass('big');
+ break;
+ }
+ }
$("#yresult").dialog({
autoOpen: false,
- height: 600,
- width: 500,
+ height: height,
+ width: width,
position: ['top',50],
modal: false,
resizable: true,
@@ -113,7 +132,7 @@
</script>
<title>YaCy-UI Widget</title>
</head>
- <body>
+ <body class="normal">
<div class="yform">
<form id="searchbox" class="small" method="get" accept-charset="UTF-8" action="jQuery">
<input id="search" name="search" type="text" size="15" maxlength="80" value=""/>