on master help sign in
Merge pull request #118 from dalf/master

default theme : small modifications

commit58cc03351a10668da8aedd355d8b7da33057855a authorAdam Tauber <asciimoo@gmail.com> dateThu 30 Oct 2014, 08:09 (12 years ago) parent79f16768534d8b
16 files changed+134−144
searx/static/default/css/style.css+1−81 searx/static/default/img/favicon.png searx/static/default/img/preference-icon.png searx/static/default/img/search-icon.png searx/static/default/img/searx.png searx/static/default/js/searx.js+4 searx/static/default/less/style.less+107−35 searx/templates/default/base.html+4−4 searx/templates/default/categories.html+5−3 searx/templates/default/index.html+2−1 searx/templates/default/infobox.html+1−1 searx/templates/default/result_templates/default.html+2−9 searx/templates/default/result_templates/videos.html+2−6 searx/templates/default/results.html+4−2 searx/templates/default/search.html+1−1 searx/tests/test_webapp.py+1−1
searx/static/default/css/style.css+1−81
@@ -1,81 +1 @@
1−html{font-family:sans-serif;font-size:.9em;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;color:#444;padding:0;margin:0}
2−body,#container{padding:0;margin:0}
3−#container{width:100%;position:absolute;top:0}
4−.search{padding:0;margin:0}.search .checkbox_container label{font-size:.9em;border-bottom:2px solid #e8e7e6}
5−.search .checkbox_container label:hover{border-bottom:2px solid #3498db}
6−.search .checkbox_container input[type="checkbox"]:checked+label{border-bottom:2px solid #2980b9}
7−#search_wrapper{position:relative;width:50em;padding:10px}
8−.center #search_wrapper{margin-left:auto;margin-right:auto}
9−.q{background:none repeat scroll 0 0 #fff;border:1px solid #3498db;color:#222;font-size:16px;height:28px;margin:0;outline:medium none;padding:2px;padding-left:8px;padding-right:0 !important;width:100%;z-index:2}
10−#search_submit{position:absolute;top:13px;right:1px;padding:0;border:0;background:url('../img/search-icon.png') no-repeat;background-size:24px 24px;opacity:.8;width:24px;height:30px;font-size:0}
11−@media screen and (max-width:50em){#search_wrapper{width:90%;clear:both;overflow:hidden}}ul.autocompleter-choices{position:absolute;margin:0;padding:0;list-style:none;border:1px solid #3498db;border-left-color:#3498db;border-right-color:#3498db;border-bottom-color:#3498db;text-align:left;font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;z-index:50;background-color:#fff;color:#444}ul.autocompleter-choices li{position:relative;margin:-2px 0 0 0;padding:.2em 1.5em .2em 1em;display:block;float:none !important;cursor:pointer;font-weight:normal;white-space:nowrap;font-size:1em;line-height:1.5em}ul.autocompleter-choices li.autocompleter-selected{background-color:#444;color:#fff}ul.autocompleter-choices li.autocompleter-selected span.autocompleter-queried{color:#9fcfff}
12−ul.autocompleter-choices span.autocompleter-queried{display:inline;float:none;font-weight:bold;margin:0;padding:0}
13−.row{max-width:800px;margin:20px auto;text-align:justify}.row h1{font-size:3em;margin-top:50px}
14−.row p{padding:0 10px;max-width:700px}
15−.row h3,.row ul{margin:4px 8px}
16−.hmarg{margin:0 20px;border:1px solid #3498db;padding:4px 10px}
17−a:link.hmarg{color:#3498db}
18−a:visited.hmarg{color:#3498db}
19−a:active.hmarg{color:#3498db}
20−a:hover.hmarg{color:#3498db}
21−.top_margin{margin-top:60px}
22−.center{text-align:center}
23−h1{font-size:5em}
24−div.title{background:url('../img/searx.png') no-repeat;width:100%;background-position:center}div.title h1{visibility:hidden}
25−input[type="submit"]{padding:2px 6px;margin:2px 4px;display:inline-block;background:#3498db;color:#fff;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;border:0;cursor:pointer}
26−input[type="checkbox"]{visibility:hidden}
27−fieldset{margin:8px;border:1px solid #3498db}
28−#categories{margin:0 10px}
29−.checkbox_container{display:inline-block;position:relative;margin:0 3px;padding:0}.checkbox_container input{display:none}
30−.checkbox_container label,.engine_checkbox label{cursor:pointer;padding:4px 10px;margin:0;display:block;text-transform:capitalize;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
31−.checkbox_container input[type="checkbox"]:checked+label{background:#3498db;color:#fff}
32−.engine_checkbox{padding:4px}
33−label.allow{background:#e74c3c;padding:4px 8px;color:#fff;display:none}
34−label.deny{background:#2ecc71;padding:4px 8px;color:#444;display:inline}
35−.engine_checkbox input[type="checkbox"]:checked+label:nth-child(2)+label{display:none}
36−.engine_checkbox input[type="checkbox"]:checked+label.allow{display:inline}
37−a{text-decoration:none;color:#1a11be}a:visited{color:#8e44ad}
38−.result{margin:19px 0 18px 0;padding:0;clear:both}
39−.result_title{margin-bottom:0}.result_title a{color:#2980b9;font-weight:normal;font-size:1.1em}.result_title a:hover{text-decoration:underline}
40−.result_title a:visited{color:#8e44ad}
41−.cache_link{font-size:10px !important}
42−.result h3{font-size:1em;word-wrap:break-word;margin:5px 0 1px 0;padding:0}
43−.result .content{font-size:.8em;margin:0;padding:0;max-width:54em;word-wrap:break-word;line-height:1.24}.result .content img{float:left;margin-right:5px;max-width:200px;max-height:100px}
44−.result .content br.last{clear:both}
45−.result .url{font-size:.8em;margin:0 0 3px 0;padding:0;max-width:54em;word-wrap:break-word;color:#c0392b}
46−.result .published_date{font-size:.8em;color:#888;margin:5px 20px}
47−.engines{color:#888}
48−.small_font{font-size:.8em}
49−.small p{margin:2px 0}
50−.right{float:right}
51−.invisible{display:none}
52−.left{float:left}
53−.highlight{color:#094089}
54−.content .highlight{color:#000}
55−.image_result{float:left;margin:10px 10px;position:relative;height:160px}.image_result img{border:0;height:160px}
56−.image_result p{margin:0;padding:0}.image_result p span a{display:none;color:#fff}
57−.image_result p:hover span a{display:block;position:absolute;bottom:0;right:0;padding:4px;background-color:rgba(0,0,0,0.6);font-size:.7em}
58−.torrent_result{border-left:10px solid #d3d3d3;padding-left:3px}.torrent_result p{margin:3px;font-size:.8em}
59−.definition_result{border-left:10px solid #808080;padding-left:3px}
60−.percentage{position:relative;width:300px}.percentage div{background:#444}
61−table{width:100%}
62−td{padding:0 4px}
63−tr:hover{background:#ddd}
64−#results{margin:auto;padding:0;width:50em;margin-bottom:20px}
65−#sidebar{position:fixed;bottom:10px;left:10px;margin:0 2px 5px 5px;padding:0 2px 2px 2px;width:14em}#sidebar input{padding:0;margin:3px;font-size:.8em;display:inline-block;background:transparent;color:#444;cursor:pointer}
66−#sidebar input[type="submit"]{text-decoration:underline}
67−#suggestions,#answers{margin-top:20px}
68−#suggestions input,#answers input,#infoboxes input{padding:0;margin:3px;font-size:.8em;display:inline-block;background:transparent;color:#444;cursor:pointer}
69−#suggestions input[type="submit"],#answers input[type="submit"],#infoboxes input[type="submit"]{text-decoration:underline}
70−#suggestions form,#answers form,#infoboxes form{display:inline}
71−#infoboxes{position:absolute;top:100px;right:20px;margin:0 2px 5px 5px;padding:0 2px 2px;max-width:21em}#infoboxes .infobox{margin:10px 0 10px;border:1px solid #ddd;padding:5px;font-size:.8em}#infoboxes .infobox img{max-width:20em;max-heigt:12em;display:block;margin:5px;padding:5px}
72−#infoboxes .infobox h2{margin:0}
73−#infoboxes .infobox table{width:auto}#infoboxes .infobox table td{vertical-align:top}
74−#infoboxes .infobox input{font-size:1em}
75−#infoboxes .infobox br{clear:both}
76−#search_url{margin-top:8px}#search_url input{border:1px solid #888;padding:4px;color:#444;width:14em;display:block;margin:4px;font-size:.8em}
77−#preferences{top:10px;padding:0;border:0;background:url('../img/preference-icon.png') no-repeat;background-size:28px 28px;opacity:.8;width:28px;height:30px;display:block}#preferences *{display:none}
78−#pagination{clear:both;width:40em}
79−#apis{margin-top:8px;clear:both}
80−@media screen and (max-width:50em){#results{margin:auto;padding:0;width:90%} .github{display:none} .checkbox_container{display:block;width:90%}.checkbox_container label{border-bottom:0} .right{display:none;postion:fixed !important;top:100px;right:0}}@media screen and (max-width:75em){#infoboxes{position:inherit;max-width:inherit}#infoboxes .infobox{clear:both}#infoboxes .infobox img{float:left;max-width:10em} #categories{font-size:90%;clear:both}#categories .checkbox_container{margin-top:2px;margin:auto} #sidebar{position:static;max-width:50em;margin:0 0 2px 0;padding:0;float:none;border:none;width:auto}#sidebar input{border:0} #apis{display:none} #search_url{display:none} .result{border-top:1px solid #e8e7e6;margin:7px 0 6px 0}}.favicon{float:left;margin-right:4px;margin-top:2px}
81−.preferences_back{background:none repeat scroll 0 0 #3498db;border:0 none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;cursor:pointer;display:inline-block;margin:2px 4px;padding:4px 6px}.preferences_back a{color:#fff}
1+html{font-family:sans-serif;font-size:.9em;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;color:#444;padding:0;margin:0}body,#container{padding:0;margin:0}#container{width:100%;position:absolute;top:0}.search{padding:0;margin:0}.search .checkbox_container label{font-size:.9em;border-bottom:2px solid #e8e7e6}.search .checkbox_container label:hover{border-bottom:2px solid #3498db}.search .checkbox_container input[type="checkbox"]:checked+label{border-bottom:2px solid #2980b9}#search_wrapper{position:relative;width:50em;padding:10px}.center #search_wrapper{margin-left:auto;margin-right:auto}.q{background:none repeat scroll 0 0 #fff;border:1px solid #3498db;color:#222;font-size:16px;height:28px;margin:0;outline:medium none;padding:2px;padding-left:8px;padding-right:0 !important;width:100%;z-index:2}#search_submit{position:absolute;top:13px;right:1px;padding:0;border:0;background:url('../img/search-icon.png') no-repeat;background-size:24px 24px;opacity:.8;width:24px;height:30px;font-size:0}@media screen and (max-width:50em){#search_wrapper{width:90%;clear:both;overflow:hidden}}ul.autocompleter-choices{position:absolute;margin:0;padding:0;list-style:none;border:1px solid #3498db;border-left-color:#3498db;border-right-color:#3498db;border-bottom-color:#3498db;text-align:left;font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;z-index:50;background-color:#fff;color:#444}ul.autocompleter-choices li{position:relative;margin:-2px 0 0 0;padding:.2em 1.5em .2em 1em;display:block;float:none !important;cursor:pointer;font-weight:normal;white-space:nowrap;font-size:1em;line-height:1.5em}ul.autocompleter-choices li.autocompleter-selected{background-color:#444;color:#fff}ul.autocompleter-choices li.autocompleter-selected span.autocompleter-queried{color:#9fcfff}ul.autocompleter-choices span.autocompleter-queried{display:inline;float:none;font-weight:bold;margin:0;padding:0}.row{max-width:800px;margin:20px auto;text-align:justify}.row h1{font-size:3em;margin-top:50px}.row p{padding:0 10px;max-width:700px}.row h3,.row ul{margin:4px 8px}.hmarg{margin:0 20px;border:1px solid #3498db;padding:4px 10px}a:link.hmarg{color:#3498db}a:visited.hmarg{color:#3498db}a:active.hmarg{color:#3498db}a:hover.hmarg{color:#3498db}.top_margin{margin-top:60px}.center{text-align:center}h1{font-size:5em}div.title{background:url('../img/searx.png') no-repeat;width:100%;min-height:80px;background-position:center}div.title h1{visibility:hidden}input[type="submit"]{padding:2px 6px;margin:2px 4px;display:inline-block;background:#3498db;color:#fff;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;border:0;cursor:pointer}input[type="checkbox"]{visibility:hidden}fieldset{margin:8px;border:1px solid #3498db}#categories{margin:0 10px;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.checkbox_container{display:inline-block;position:relative;margin:0 3px;padding:0}.checkbox_container input{display:none}.checkbox_container label,.engine_checkbox label{cursor:pointer;padding:4px 10px;margin:0;display:block;text-transform:capitalize;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.checkbox_container input[type="checkbox"]:checked+label{background:#3498db;color:#fff}.engine_checkbox{padding:4px}label.allow{background:#e74c3c;padding:4px 8px;color:#fff;display:none}label.deny{background:#2ecc71;padding:4px 8px;color:#444;display:inline}.engine_checkbox input[type="checkbox"]:checked+label:nth-child(2)+label{display:none}.engine_checkbox input[type="checkbox"]:checked+label.allow{display:inline}a{text-decoration:none;color:#1a11be}a:visited{color:#8e44ad}.result{margin:19px 0 18px 0;padding:0;clear:both}.result_title{margin-bottom:0}.result_title a{color:#2980b9;font-weight:normal;font-size:1.1em}.result_title a:hover{text-decoration:underline}.result_title a:visited{color:#8e44ad}.cache_link{font-size:10px !important}.result h3{font-size:1em;word-wrap:break-word;margin:5px 0 1px 0;padding:0}.result .content{font-size:.8em;margin:0;padding:0;max-width:54em;word-wrap:break-word;line-height:1.24}.result .content img{float:left;margin-right:5px;max-width:200px;max-height:100px}.result .content br.last{clear:both}.result .url{font-size:.8em;margin:0 0 3px 0;padding:0;max-width:54em;word-wrap:break-word;color:#c0392b}.result .published_date{font-size:.8em;color:#888;Margin:5px 20px}.result .thumbnail{width:400px}.engines{color:#888}.small_font{font-size:.8em}.small p{margin:2px 0}.right{float:right}.invisible{display:none}.left{float:left}.highlight{color:#094089}.content .highlight{color:#000}.image_result{display:inline-block;margin:10px 10px;position:relative;max-height:160px}.image_result img{border:0;max-height:160px}.image_result p{margin:0;padding:0}.image_result p span a{display:none;color:#fff}.image_result p:hover span a{display:block;position:absolute;bottom:0;right:0;padding:4px;background-color:rgba(0,0,0,0.6);font-size:.7em}.torrent_result{border-left:10px solid #d3d3d3;padding-left:3px}.torrent_result p{margin:3px;font-size:.8em}.definition_result{border-left:10px solid #808080;padding-left:3px}.percentage{position:relative;width:300px}.percentage div{background:#444}table{width:100%}td{padding:0 4px}tr:hover{background:#ddd}#results{margin:auto;padding:0;width:50em;margin-bottom:20px}#sidebar{position:fixed;bottom:10px;left:10px;margin:0 2px 5px 5px;padding:0 2px 2px 2px;width:14em}#sidebar input{padding:0;margin:3px;font-size:.8em;display:inline-block;background:transparent;color:#444;cursor:pointer}#sidebar input[type="submit"]{text-decoration:underline}#suggestions span{display:block}#suggestions,#answers{margin-top:20px}#suggestions input,#answers input,#infoboxes input{padding:0;margin:3px;font-size:.8em;display:inline-block;background:transparent;color:#444;cursor:pointer}#suggestions input[type="submit"],#answers input[type="submit"],#infoboxes input[type="submit"]{text-decoration:underline}#suggestions form,#answers form,#infoboxes form{display:inline-block;min-width:210px}#infoboxes{position:absolute;top:100px;right:20px;margin:0 2px 5px 5px;padding:0 2px 2px;max-width:21em}#infoboxes .infobox{margin:10px 0 10px;border:1px solid #ddd;padding:5px;font-size:.8em}#infoboxes .infobox img{max-width:20em;max-heigt:12em;display:block;margin:5px;padding:5px}#infoboxes .infobox h2{margin:0}#infoboxes .infobox table{width:auto}#infoboxes .infobox table td{vertical-align:top}#infoboxes .infobox input{font-size:1em}#infoboxes .infobox br{clear:both}#search_url{margin-top:8px}#search_url input{border:1px solid #888;padding:4px;color:#444;width:14em;display:block;margin:4px;font-size:.8em}#preferences{top:10px;padding:0;border:0;background:url('../img/preference-icon.png') no-repeat;background-size:28px 28px;opacity:.8;width:28px;height:30px;display:block}#preferences *{display:none}#pagination{clear:both}#pagination br{clear:both}#apis{margin-top:8px;clear:both}@media screen and (max-width:50em){#results{margin:auto;padding:0;width:90%}.github{display:none}.checkbox_container{display:block;width:90%}.checkbox_container label{border-bottom:0}.preferences_container{display:none;postion:fixed !important;top:100px;right:0}}@media screen and (max-width:75em){div.title h1{font-size:1em}html.touch #categories{width:95%;height:30px;text-align:left;overflow-x:scroll;overflow-y:hidden;-webkit-overflow-scrolling:touch}html.touch #categories #categories_container{width:1000px;width:-moz-max-content;width:-webkit-max-content;width:max-content}html.touch #categories #categories_container .checkbox_container{display:inline-block;width:auto}#categories{font-size:90%;clear:both}#categories .checkbox_container{margin-top:2px;margin:auto}#suggestions,#answers{margin-top:5px}#infoboxes{position:inherit;max-width:inherit}#infoboxes .infobox{clear:both}#infoboxes .infobox img{float:left;max-width:10em}#categories{font-size:90%;clear:both}#categories .checkbox_container{margin-top:2px;margin:auto}#sidebar{position:static;max-width:50em;margin:0 0 2px 0;padding:0;float:none;border:none;width:auto}#sidebar input{border:0}#apis{display:none}#search_url{display:none}.result{border-top:1px solid #e8e7e6;margin:8px 0 8px 0}.result .thumbnail{max-width:98%}.image_result{max-width:98%}.image_result img{max-width:98%}}.favicon{float:left;margin-right:4px;margin-top:2px}.preferences_back{background:none repeat scroll 0 0 #3498db;border:0 none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;cursor:pointer;display:inline-block;margin:2px 4px;padding:4px 6px}.preferences_back a{color:#fff}
searx/static/default/img/favicon.png

Binary file not shown.

searx/static/default/img/preference-icon.png

Binary file not shown.

searx/static/default/img/search-icon.png

Binary file not shown.

searx/static/default/img/searx.png

Binary file not shown.

searx/static/default/js/searx.js+4
@@ -41,5 +41,9 @@ if(searx.autocompleter) {
4141 }
4242 });
4343
44+ if (!!('ontouchstart' in window)) {
45+ document.getElementsByTagName("html")[0].className += " touch";
46+ }
47+
4448})(window, document);
4549
searx/static/default/less/style.less+107−35
@@ -97,6 +97,7 @@ h1 {
9797div.title {
9898 background: url('../img/searx.png') no-repeat;
9999 width: 100%;
100+ min-height: 80px;
100101 background-position: center;
101102
102103 h1 {
@@ -126,6 +127,7 @@ fieldset {
126127
127128#categories {
128129 margin: 0 10px;
130+ .user-select;
129131}
130132
131133.checkbox_container {
@@ -260,8 +262,12 @@ a {
260262 .published_date {
261263 font-size: 0.8em;
262264 color: @color-result-publishdate-font;
263− margin: 5px 20px;
265+ Margin: 5px 20px;
264266 }
267+
268+ .thumbnail {
269+ width: 400px;
270+ }
265271}
266272
267273.engines {
@@ -297,14 +303,14 @@ a {
297303}
298304
299305.image_result {
300− float: left;
306+ display: inline-block;
301307 margin: 10px 10px;
302308 position: relative;
303− height: 160px;
309+ max-height: 160px;
304310
305311 img {
306312 border: 0;
307− height: 160px;
313+ max-height: 160px;
308314 }
309315
310316 p {
@@ -369,17 +375,17 @@ tr {
369375#results {
370376 margin: auto;
371377 padding: 0;
372− width: @results-width;
378+ width: @results-width;
373379 margin-bottom: 20px;
374380}
375381
376382#sidebar {
377383 position: fixed;
378− bottom: 10px;
379− left: 10px;
384+ bottom: 10px;
385+ left: 10px;
380386 margin: 0 2px 5px 5px;
381387 padding: 0 2px 2px 2px;
382− width: 14em;
388+ width: 14em;
383389
384390 input {
385391 padding: 0;
@@ -390,9 +396,17 @@ tr {
390396 color: @color-result-search-url-font;
391397 cursor: pointer;
392398 }
393− input[type="submit"] {
399+ input[type="submit"] {
394400 text-decoration: underline;
395− }
401+ }
402+}
403+
404+#suggestions {
405+
406+ span {
407+ display: block;
408+ }
409+
396410}
397411
398412#suggestions, #answers {
@@ -418,7 +432,8 @@ tr {
418432 }
419433
420434 form {
421− display: inline;
435+ display: inline-block;
436+ min-width: 210px;
422437 }
423438}
424439
@@ -436,6 +451,7 @@ tr {
436451 border: 1px solid #ddd;
437452 padding: 5px;
438453 font-size: 0.8em;
454+ /* box-shadow: 0px 0px 5px #CCC; */
439455
440456 img {
441457 max-width: 20em;
@@ -501,7 +517,10 @@ tr {
501517
502518#pagination {
503519 clear: both;
504− width: 40em;
520+
521+ br {
522+ clear: both;
523+ }
505524}
506525
507526#apis {
@@ -511,18 +530,19 @@ tr {
511530
512531@media screen and (max-width: @results-width) {
513532
514− #results {
515− margin: auto;
516− padding: 0;
517− width: 90%;
518− }
533+ #results {
534+ margin: auto;
535+ padding: 0;
536+ width: 90%;
537+ }
538+
519539 .github {
520540 display: none;
521541 }
522542
523543 .checkbox_container {
524544 display: block;
525− width: 90%;
545+ width: 90%;
526546 //float: left;
527547
528548 label {
@@ -530,7 +550,7 @@ tr {
530550 }
531551 }
532552
533− .right {
553+ .preferences_container {
534554 display: none;
535555 postion: fixed !important;
536556 top: 100px;
@@ -541,20 +561,61 @@ tr {
541561
542562@media screen and (max-width: 75em) {
543563
544− #infoboxes {
545− position: inherit;
546− max-width: inherit;
564+ div.title {
565+
566+ h1 {
567+ font-size: 1em;
568+ }
569+ }
570+
571+ html.touch #categories {
572+ width: 95%;
573+ height: 30px;
574+ text-align: left;
575+ overflow-x: scroll;
576+ overflow-y: hidden;
577+ -webkit-overflow-scrolling: touch;
578+
579+ #categories_container {
580+ width: 1000px;
581+ width: -moz-max-content;
582+ width: -webkit-max-content;
583+ width: max-content;
584+
585+ .checkbox_container {
586+ display: inline-block;
587+ width: auto;
588+ }
589+ }
590+ }
591+
592+ #categories {
593+ font-size: 90%;
594+ clear: both;
595+
596+ .checkbox_container {
597+ margin-top: 2px;
598+ margin: auto;
599+ }
600+ }
601+
602+ #suggestions, #answers {
603+ margin-top: 5px;
604+ }
605+
606+ #infoboxes {
607+ position: inherit;
608+ max-width: inherit;
547609
548− .infobox {
549− clear:both;
610+ .infobox {
611+ clear:both;
550612
551− img {
552− float: left;
553− max-width: 10em;
554− }
555− }
556−
557− }
613+ img {
614+ float: left;
615+ max-width: 10em;
616+ }
617+ }
618+ }
558619
559620 #categories {
560621 font-size: 90%;
@@ -583,13 +644,24 @@ tr {
583644 display: none;
584645 }
585646
586− #search_url {
587− display: none;
588− }
647+ #search_url {
648+ display: none;
649+ }
589650
590651 .result {
591652 border-top: 1px solid @color-result-top-border;
592− margin: 7px 0 6px 0;
653+ margin: 8px 0 8px 0;
654+
655+ .thumbnail {
656+ max-width: 98%;
657+ }
658+ }
659+
660+ .image_result {
661+ max-width: 98%;
662+ img {
663+ max-width: 98%;
664+ }
593665 }
594666}
595667
searx/templates/default/base.html+4−4
@@ -13,10 +13,6 @@
1313 {% block head %}
1414 <link title="searx" type="application/opensearchdescription+xml" rel="search" href="{{ url_for('opensearch') }}"/>
1515 {% endblock %}
16− <script type="text/javascript">
17− searx = {};
18− searx.autocompleter = {% if autocomplete %}true{% else %}false{% endif %};
19− </script>
2016</head>
2117<body>
2218<div id="container">
@@ -26,6 +22,10 @@
2622<script src="{{ url_for('static', filename='js/mootools-core-1.4.5-min.js') }}" ></script>
2723<script src="{{ url_for('static', filename='js/mootools-autocompleter-1.1.2-min.js') }}" ></script>
2824{% endif %}
25+<script type="text/javascript">
26+ searx = {};
27+ searx.autocompleter = {% if autocomplete %}true{% else %}false{% endif %};
28+</script>
2929<script src="{{ url_for('static', filename='js/searx.js') }}" ></script>
3030</div>
3131</body>
searx/templates/default/categories.html+5−3
@@ -1,7 +1,9 @@
11<div id="categories">
2+ <div id="categories_container">
23{% for category in categories %}
3− <div class="checkbox_container">
4− <input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} /><label for="checkbox_{{ category|replace(' ', '_') }}">{{ _(category) }}</label>
5− </div>
4+ <div class="checkbox_container">
5+ <input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} /><label for="checkbox_{{ category|replace(' ', '_') }}">{{ _(category) }}</label>
6+ </div>
67{% endfor %}
8+ </div>
79</div>
searx/templates/default/index.html+2−1
@@ -1,6 +1,5 @@
11{% extends "default/base.html" %}
22{% block content %}
3−{% include 'default/github_ribbon.html' %}
43<div class="center">
54 <div class="title"><h1>searx</h1></div>
65 {% include 'default/search.html' %}
@@ -9,4 +8,6 @@
98 <a href="{{ url_for('preferences') }}" class="hmarg">{{ _('preferences') }}</a>
109 </p>
1110</div>
11+{% include 'default/github_ribbon.html' %}
1212{% endblock %}
13+
searx/templates/default/infobox.html+1−1
@@ -2,7 +2,7 @@
22 <h2>{{ infobox.infobox }}</h2>
33 {% if infobox.img_src %}<img src="{{ infobox.img_src }}" />{% endif %}
44 <p>{{ infobox.entity }}</p>
5− <p>{{ infobox.content }}</p>
5+ <p>{{ infobox.content | safe }}</p>
66 {% if infobox.attributes %}
77 <div class="attributes">
88 <table>
searx/templates/default/result_templates/default.html+2−9
@@ -1,13 +1,6 @@
11<div class="result {{ result.class }}">
2−
3− {% if result['favicon'] %}
4− <img width="14" height="14" class="favicon" src="static/{{theme}}/img/icon_{{result['favicon']}}.ico" />
5− {% endif %}
6−
7− <div>
8− <h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
2+ <h3 class="result_title"> {% if result['favicon'] %}<img width="14" height="14" class="favicon" src="static/{{theme}}/img/icon_{{result['favicon']}}.ico" />{% endif %}<a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
93 <p class="url">{{ result.pretty_url }} <a class="cache_link" href="https://web.archive.org/web/{{ result.url }}">cached</a></p>
10− {% if result.publishedDate %}<p class="published_date">{{ result.publishedDate }}</p>{% endif %}
4+ {% if result.publishedDate %}<p class="published_date">{{ result.publishedDate }}</p>{% endif %}
115 <p class="content">{% if result.img_src %}<img src="{{ result.img_src }}" class="image" />{% endif %}{% if result.content %}{{ result.content|safe }}<br class="last"/>{% endif %}</p>
12− </div>
136</div>
searx/templates/default/result_templates/videos.html+2−6
@@ -1,12 +1,8 @@
11<div class="result">
2− {% if result['favicon'] %}
3− <img width="14" height="14" class="favicon" src="static/{{theme}}/img/icon_{{result['favicon']}}.ico" />
4− {% endif %}
5−
62 <p>
7− <h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
3+ <h3 class="result_title"> {% if result['favicon'] %}<img width="14" height="14" class="favicon" src="static/{{theme}}/img/icon_{{result['favicon']}}.ico" />{% endif %}<a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
84 {% if result.publishedDate %}<p class="published_date">{{ result.publishedDate }}</p>{% endif %}
9− <a href="{{ result.url }}"><img width="400px" src="{{ result.thumbnail }}" title={{ result.title }} alt=" {{ result.title }}"/></a>
5+ <a href="{{ result.url }}"><img class="thumbnail" src="{{ result.thumbnail }}" title={{ result.title }} alt=" {{ result.title }}"/></a>
106 <p class="url">{{ result.url }}</p>
117 </p>
128</div>
searx/templates/default/results.html+4−2
@@ -1,7 +1,7 @@
11{% extends "default/base.html" %}
22{% block title %}{{ q }} - {% endblock %}
33{% block content %}
4−<div class="right"><a href="{{ url_for('preferences') }}" id="preferences"><span>preferences</span></a></div>
4+<div class="preferences_container right"><a href="{{ url_for('preferences') }}" id="preferences"><span>preferences</span></a></div>
55<div class="small search center">
66 {% include 'default/search.html' %}
77</div>
@@ -80,7 +80,7 @@
8080 </form>
8181 {% endif %}
8282 <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
83− <div class="left">
83+ <div class="right">
8484 {% for category in selected_categories %}
8585 <input type="hidden" name="category_{{ category }}" value="1"/>
8686 {% endfor %}
@@ -89,6 +89,8 @@
8989 <input type="submit" value="{{ _('next page') }} >>" />
9090 </div>
9191 </form>
92+
93+ <br />
9294 </div>
9395 {% endif %}
9496</div>
searx/templates/default/search.html+1−1
@@ -1,6 +1,6 @@
11<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" id="search_form">
22 <div id="search_wrapper">
3− <input type="text" placeholder="{{ _('Search for...') }}" id="q" class="q" name="q" tabindex="1" autocomplete="off" {% if q %}value="{{ q }}"{% endif %}/>
3+ <input type="text" placeholder="{{ _('Search for...') }}" id="q" class="q" name="q" tabindex="1" autocomplete="off" size="100" {% if q %}value="{{ q }}"{% endif %}/>
44 <input type="submit" value="search" id="search_submit" />
55 </div>
66 {% include 'default/categories.html' %}
searx/tests/test_webapp.py+1−1
@@ -49,7 +49,7 @@ class ViewsTestCase(SearxTestCase):
4949 )
5050 result = self.app.post('/', data={'q': 'test'})
5151 self.assertIn(
52− '<h3 class="result_title"><a href="http://first.test.xyz">First <span class="highlight">Test</span></a></h3>', # noqa
52+ '<h3 class="result_title"> <img width="14" height="14" class="favicon" src="static/default/img/icon_youtube.ico" /><a href="http://first.test.xyz">First <span class="highlight">Test</span></a></h3>', # noqa
5353 result.data
5454 )
5555 self.assertIn(