Selaa lähdekoodia

edit style of autcompleter

Thomas Pointhuber 11 vuotta sitten
vanhempi
commit
e181fd8f56

+ 10
- 13
searx/static/css/style.css Näytä tiedosto

@@ -1,10 +1,15 @@
1
-ul.autocompleter-choices{position:absolute;margin:0;padding:0;list-style:none;border:1px solid #7c7c7c;border-left-color:#c3c3c3;border-right-color:#c3c3c3;border-bottom-color:#ddd;background-color:#fff;text-align:left;font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;z-index:50;background-color:#fff}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}
2
-ul.autocompleter-choices span.autocompleter-queried{display:inline;float:none;font-weight:bold;margin:0;padding:0}
3
-.autocompleter-loading{background-repeat:no-repeat;background-position:right 50%}
4
-textarea.autocompleter-loading{background-position:right bottom}
5 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}
6 2
 body,#container{padding:0;margin:0}
7 3
 #container{width:100%;position:absolute;top:0}
4
+.search{background:#ecf0f1;padding:0;margin:0}.search .checkbox_container label{border-bottom:4px solid #e8e7e6}
5
+.search .checkbox_container label:hover{border-bottom:4px solid #3498db}
6
+.search .checkbox_container input[type="checkbox"]:checked+label{border-bottom:4px solid #2980b9}
7
+#search_wrapper{position:relative;max-width:600px;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:680px){#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}
8 13
 .row{max-width:800px;margin:20px auto;text-align:justify}.row h1{font-size:3em;margin-top:50px}
9 14
 .row p{padding:0 10px;max-width:700px}
10 15
 .row h3,.row ul{margin:4px 8px}
@@ -24,9 +29,6 @@ fieldset{margin:8px;border:1px solid #3498db}
24 29
 .checkbox_container{display:inline-block;position:relative;margin:0 3px;padding:0}.checkbox_container input{display:none}
25 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}
26 31
 .checkbox_container input[type="checkbox"]:checked+label{background:#3498db;color:#fff}
27
-.search .checkbox_container label{border-bottom:4px solid #e8e7e6}
28
-.search .checkbox_container label:hover{border-bottom:4px solid #3498db}
29
-.search .checkbox_container input[type="checkbox"]:checked+label{border-bottom:4px solid #2980b9}
30 32
 .engine_checkbox{padding:4px}
31 33
 label.allow{background:#e74c3c;padding:4px 8px;color:#fff;display:none}
32 34
 label.deny{background:#2ecc71;padding:4px 8px;color:#444;display:inline}
@@ -43,7 +45,6 @@ a{text-decoration:none;color:#1a11be}a:visited{color:#8e44ad}
43 45
 .engines{color:#888}
44 46
 .small_font{font-size:.8em}
45 47
 .small p{margin:2px 0}
46
-.search{background:#ecf0f1;padding:0;margin:0}
47 48
 .right{float:right}
48 49
 .invisible{display:none}
49 50
 .left{float:left}
@@ -56,10 +57,6 @@ a{text-decoration:none;color:#1a11be}a:visited{color:#8e44ad}
56 57
 table{width:100%}
57 58
 td{padding:0 4px}
58 59
 tr:hover{background:#ddd}
59
-#search_wrapper{position:relative;max-width:600px;padding:10px}
60
-.center #search_wrapper{margin-left:auto;margin-right:auto}
61
-.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}
62
-#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}
63 60
 #results{margin:10px;padding:0;margin-bottom:20px}
64 61
 #sidebar{position:absolute;left:54em;width:15em;margin:0 2px 5px 5px;padding:0 2px 2px 2px}
65 62
 #suggestions span{display:block;margin:0 2px 2px 2px;padding:0}
@@ -69,5 +66,5 @@ tr:hover{background:#ddd}
69 66
 #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}
70 67
 #pagination{clear:both}
71 68
 #apis{margin-top:8px;clear:both}
72
-@media screen and (max-width:60em){#sidebar{position:static;max-width:50em;margin:0 0 2px 0;padding:0;float:none;border:none;width:auto} #suggestions span{display:inline;font-size:.8em} #suggestions form{display:inline} #suggestions input{padding:2px 6px;margin:2px 4px;font-size:.8em;display:inline-block;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;border:0;cursor:pointer}}@media screen and (max-width:680px){#search_wrapper{width:90%;clear:both;overflow:hidden} .right{display:none;postion:fixed !important;top:100px;right:0} #apis{display:none} #categories{font-size:80%;clear:both}#categories .checkbox_container{margin-top:2px;margin:0 2px} .checkbox_container{display:block;width:100%}.checkbox_container label{border-bottom:0} .result{border-top:1px solid #e8e7e6;margin:7px 0 6px 0}.result img{max-width:90%;width:auto;height:auto}}.favicon{float:left;margin-right:4px;margin-top:2px}
69
+@media screen and (max-width:60em){#sidebar{position:static;max-width:50em;margin:0 0 2px 0;padding:0;float:none;border:none;width:auto} #suggestions span{display:inline;font-size:.8em} #suggestions form{display:inline} #suggestions input{padding:2px 6px;margin:2px 4px;font-size:.8em;display:inline-block;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;border:0;cursor:pointer}}@media screen and (max-width:680px){.right{display:none;postion:fixed !important;top:100px;right:0} #apis{display:none} #categories{font-size:80%;clear:both}#categories .checkbox_container{margin-top:2px;margin:0 2px} .checkbox_container{display:block;width:100%}.checkbox_container label{border-bottom:0} .result{border-top:1px solid #e8e7e6;margin:7px 0 6px 0}.result img{max-width:90%;width:auto;height:auto}}.favicon{float:left;margin-right:4px;margin-top:2px}
73 70
 .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}

+ 18
- 14
searx/static/less/autocompleter.less Näytä tiedosto

@@ -1,19 +1,23 @@
1
+/*
2
+ * searx, A privacy-respecting, hackable metasearch engine
3
+ */
4
+
1 5
 ul {
2 6
 	&.autocompleter-choices {
3 7
 		position: absolute;
4 8
 		margin: 0;
5 9
 		padding: 0;
6 10
 		list-style: none;
7
-		border: 1px solid #7c7c7c;
8
-		border-left-color: #c3c3c3;
9
-		border-right-color: #c3c3c3;
10
-		border-bottom-color: #ddd;
11
-		background-color: #fff;
11
+		border: 1px solid @color-autocompleter-choices-border;
12
+		border-left-color: @color-autocompleter-choices-border-left-right;
13
+		border-right-color: @color-autocompleter-choices-border-left-right;
14
+		border-bottom-color: @color-autocompleter-choices-border-bottom;
12 15
 		text-align: left;
13 16
 		font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
14 17
 		z-index: 50;
15
-		background-color: #fff;
16
-	
18
+		background-color: @color-autocompleter-choices-background;
19
+	    color: @color-autocompleter-choices-font;
20
+	    
17 21
 		li {
18 22
 			position: relative;
19 23
 			margin: -2px 0 0 0;
@@ -27,11 +31,11 @@ ul {
27 31
 			line-height: 1.5em;
28 32
 
29 33
 			&.autocompleter-selected {
30
-				background-color: #444;
31
-				color: #fff;
34
+				background-color: @color-autocompleter-selected-background;
35
+				color: @color-autocompleter-selected-font;
32 36
 
33 37
 				span.autocompleter-queried {
34
-					color: #9FCFFF;
38
+					color: @color-autocompleter-selected-queried-font;
35 39
 				}
36 40
 			}
37 41
 		}
@@ -46,12 +50,12 @@ ul {
46 50
 	}
47 51
 }
48 52
 
49
-.autocompleter-loading {
53
+/*.autocompleter-loading {
50 54
 	//background-image: url(images/spinner.gif);
51 55
 	background-repeat: no-repeat;
52 56
 	background-position: right 50%;
53
-}
57
+}*/
54 58
 
55
-textarea.autocompleter-loading {
59
+/*textarea.autocompleter-loading {
56 60
 	background-position: right bottom;
57
-}
61
+}*/

+ 14
- 0
searx/static/less/definitions.less Näytä tiedosto

@@ -33,6 +33,20 @@
33 33
 @color-search-background: #FFF;
34 34
 @color-search-font: #222;
35 35
 
36
+/// Autocompleter
37
+
38
+@color-autocompleter-choices-background: #FFF;
39
+@color-autocompleter-choices-border: @color-base;
40
+@color-autocompleter-choices-border-left-right: @color-base;
41
+@color-autocompleter-choices-border-bottom: @color-base;
42
+
43
+@color-autocompleter-choices-font: #444;
44
+
45
+// Selected
46
+@color-autocompleter-selected-background: #444;
47
+@color-autocompleter-selected-font: #FFF;
48
+@color-autocompleter-selected-queried-font: #9FCFFF;
49
+
36 50
 /// Categories
37 51
 
38 52
 @color-categories-item-selected: @color-base;

+ 8
- 91
searx/static/less/style.less Näytä tiedosto

@@ -8,10 +8,6 @@
8 8
 
9 9
 @import "mixins.less";
10 10
 
11
-// Autocompleter
12
-
13
-@import "autocompleter.less";
14
-
15 11
 // Main LESS-Code
16 12
 
17 13
 html {
@@ -34,6 +30,14 @@ body, #container {
34 30
     top: 0;
35 31
 }
36 32
 
33
+// Search-Field
34
+
35
+@import "search.less";
36
+
37
+// Autocompleter
38
+
39
+@import "autocompleter.less";
40
+
37 41
 .row {
38 42
 	max-width: 800px;
39 43
 	margin: 20px auto;
@@ -149,20 +153,6 @@ fieldset {
149 153
 	color: @color-categories-item-selected-font;
150 154
 }
151 155
 
152
-.search  {
153
-	.checkbox_container label {
154
-		border-bottom: 4px solid @color-categories-item-border-unselected;
155
-	}
156
-
157
-	.checkbox_container label:hover {
158
-		border-bottom: 4px solid @color-categories-item-border-unselected-hover;
159
-	}
160
-
161
-	.checkbox_container input[type="checkbox"]:checked + label { 
162
-		border-bottom: 4px solid @color-categories-item-border-selected;
163
-	}
164
-}
165
-
166 156
 .engine_checkbox {
167 157
 	padding: 4px;
168 158
 }
@@ -272,12 +262,6 @@ a {
272 262
 	margin: 2px 0;
273 263
 }
274 264
 
275
-.search {
276
-	background: @color-result-search-background;
277
-	padding: 0;
278
-	margin: 0
279
-}
280
-
281 265
 .right {
282 266
 	float: right;
283 267
 }
@@ -360,46 +344,6 @@ tr {
360 344
 	}
361 345
 }
362 346
 
363
-#search_wrapper {
364
-	position: relative;
365
-	max-width: 600px;
366
-	padding: 10px;
367
-}
368
-
369
-.center #search_wrapper {
370
-	margin-left: auto;
371
-	margin-right: auto;
372
-}
373
-
374
-.q {
375
-	background: none repeat scroll 0 0 @color-search-background;
376
-	border: 1px solid @color-search-border;
377
-	color: @color-search-font;
378
-	font-size: 16px;
379
-	height: 28px;
380
-	margin: 0;
381
-	outline: medium none;
382
-	padding: 2px;
383
-	padding-left: 8px;
384
-	padding-right: 0px !important;
385
-	width: 100%;
386
-	z-index: 2;
387
-}
388
-
389
-#search_submit {
390
-	position: absolute;
391
-	top: 13px;
392
-	right: 1px;
393
-	padding: 0;
394
-	border: 0;
395
-	background: url('../img/search-icon.png') no-repeat;
396
-	background-size: 24px 24px;
397
-	opacity: 0.8;
398
-	width: 24px;
399
-	height: 30px;
400
-	font-size: 0;
401
-}
402
-
403 347
 #results {
404 348
 	margin: 10px;
405 349
 	padding: 0;
@@ -510,12 +454,6 @@ tr {
510 454
 }
511 455
 
512 456
 @media screen and (max-width: 680px) {
513
-	#search_wrapper {
514
-		width: 90%;
515
-		clear:both;
516
-		overflow: hidden
517
-	}
518
-
519 457
 	.right {
520 458
 		display: none;
521 459
 		postion: fixed !important;
@@ -578,24 +516,3 @@ tr {
578 516
 		color: @color-settings-return-font;
579 517
 	}
580 518
 }
581
-
582
-/*#search_autocompleter {
583
-	border: 1px solid #3498DB;
584
-	position: absolute;
585
-	top: 43px;
586
-	width:100%;
587
-	background:#FFF;
588
-	z-index:2;
589
-
590
-	p {
591
-		border-bottom: 1px solid #ccc;
592
-	}
593
-}*/
594
-
595
-/*#search_input {
596
-position: relative;
597
-}
598
-
599
-#search_form {
600
-
601
-}*/