diff options
| author | Adam Tauber <asciimoo@gmail.com> | 2014-03-25 18:00:45 +0100 |
|---|---|---|
| committer | Adam Tauber <asciimoo@gmail.com> | 2014-03-25 18:00:45 +0100 |
| commit | 20504a0e834a99fb1274ad907c0b62fb90eb96d3 (patch) | |
| tree | e15473776d3311379c7a40234beaa7edbb97be53 /searx/static/less | |
| parent | 0207070cde9d6319a3403d1a1c6b1a37c8d3c60c (diff) | |
| parent | a76525d1f3256105d45ee0a0f1301a8cc0b2e4c6 (diff) | |
Merge branch 'autocompleter' of https://github.com/pointhi/searx into autocomplete
Diffstat (limited to 'searx/static/less')
| -rw-r--r-- | searx/static/less/autocompleter.less | 61 | ||||
| -rw-r--r-- | searx/static/less/definitions.less | 14 | ||||
| -rw-r--r-- | searx/static/less/search.less | 68 | ||||
| -rw-r--r-- | searx/static/less/style.less | 74 |
4 files changed, 151 insertions, 66 deletions
diff --git a/searx/static/less/autocompleter.less b/searx/static/less/autocompleter.less new file mode 100644 index 000000000..db9601aeb --- /dev/null +++ b/searx/static/less/autocompleter.less @@ -0,0 +1,61 @@ +/*
+ * searx, A privacy-respecting, hackable metasearch engine
+ */
+
+ul {
+ &.autocompleter-choices {
+ position: absolute;
+ margin: 0;
+ padding: 0;
+ list-style: none;
+ border: 1px solid @color-autocompleter-choices-border;
+ border-left-color: @color-autocompleter-choices-border-left-right;
+ border-right-color: @color-autocompleter-choices-border-left-right;
+ border-bottom-color: @color-autocompleter-choices-border-bottom;
+ text-align: left;
+ font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
+ z-index: 50;
+ background-color: @color-autocompleter-choices-background;
+ color: @color-autocompleter-choices-font;
+
+ li {
+ position: relative;
+ margin: -2px 0 0 0;
+ padding: 0.2em 1.5em 0.2em 1em;
+ display: block;
+ float: none !important;
+ cursor: pointer;
+ font-weight: normal;
+ white-space: nowrap;
+ font-size: 1em;
+ line-height: 1.5em;
+
+ &.autocompleter-selected {
+ background-color: @color-autocompleter-selected-background;
+ color: @color-autocompleter-selected-font;
+
+ span.autocompleter-queried {
+ color: @color-autocompleter-selected-queried-font;
+ }
+ }
+ }
+
+ span.autocompleter-queried {
+ display: inline;
+ float: none;
+ font-weight: bold;
+ margin: 0;
+ padding: 0;
+ }
+ }
+}
+
+/*.autocompleter-loading {
+ //background-image: url(images/spinner.gif);
+ background-repeat: no-repeat;
+ background-position: right 50%;
+}*/
+
+/*textarea.autocompleter-loading {
+ background-position: right bottom;
+}*/
diff --git a/searx/static/less/definitions.less b/searx/static/less/definitions.less index 2d85f7815..289b8cbc2 100644 --- a/searx/static/less/definitions.less +++ b/searx/static/less/definitions.less @@ -33,6 +33,20 @@ @color-search-background: #FFF; @color-search-font: #222; +/// Autocompleter + +@color-autocompleter-choices-background: #FFF; +@color-autocompleter-choices-border: @color-base; +@color-autocompleter-choices-border-left-right: @color-base; +@color-autocompleter-choices-border-bottom: @color-base; + +@color-autocompleter-choices-font: #444; + +// Selected +@color-autocompleter-selected-background: #444; +@color-autocompleter-selected-font: #FFF; +@color-autocompleter-selected-queried-font: #9FCFFF; + /// Categories @color-categories-item-selected: @color-base; diff --git a/searx/static/less/search.less b/searx/static/less/search.less new file mode 100644 index 000000000..f5d9620fb --- /dev/null +++ b/searx/static/less/search.less @@ -0,0 +1,68 @@ +/* + * searx, A privacy-respecting, hackable metasearch engine + */ + +.search { + background: @color-result-search-background; + padding: 0; + margin: 0; + .checkbox_container label { + border-bottom: 4px solid @color-categories-item-border-unselected; + } + + .checkbox_container label:hover { + border-bottom: 4px solid @color-categories-item-border-unselected-hover; + } + + .checkbox_container input[type="checkbox"]:checked + label { + border-bottom: 4px solid @color-categories-item-border-selected; + } +} + +#search_wrapper { + position: relative; + max-width: 600px; + padding: 10px; +} + +.center #search_wrapper { + margin-left: auto; + margin-right: auto; +} + +.q { + background: none repeat scroll 0 0 @color-search-background; + border: 1px solid @color-search-border; + color: @color-search-font; + font-size: 16px; + height: 28px; + margin: 0; + outline: medium none; + padding: 2px; + padding-left: 8px; + padding-right: 0px !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: 0.8; + width: 24px; + height: 30px; + font-size: 0; +} + +@media screen and (max-width: 680px) { + #search_wrapper { + width: 90%; + clear:both; + overflow: hidden + } +} diff --git a/searx/static/less/style.less b/searx/static/less/style.less index 4b4e2554c..8653e6e68 100644 --- a/searx/static/less/style.less +++ b/searx/static/less/style.less @@ -30,6 +30,14 @@ body, #container { top: 0; } +// Search-Field + +@import "search.less"; + +// Autocompleter + +@import "autocompleter.less"; + .row { max-width: 800px; margin: 20px auto; @@ -145,20 +153,6 @@ fieldset { color: @color-categories-item-selected-font; } -.search { - .checkbox_container label { - border-bottom: 4px solid @color-categories-item-border-unselected; - } - - .checkbox_container label:hover { - border-bottom: 4px solid @color-categories-item-border-unselected-hover; - } - - .checkbox_container input[type="checkbox"]:checked + label { - border-bottom: 4px solid @color-categories-item-border-selected; - } -} - .engine_checkbox { padding: 4px; } @@ -268,12 +262,6 @@ a { margin: 2px 0; } -.search { - background: @color-result-search-background; - padding: 0; - margin: 0 -} - .right { float: right; } @@ -356,46 +344,6 @@ tr { } } -#search_wrapper { - position: relative; - max-width: 600px; - padding: 10px; -} - -.center #search_wrapper { - margin-left: auto; - margin-right: auto; -} - -.q { - background: none repeat scroll 0 0 @color-search-background; - border: 1px solid @color-search-border; - color: @color-search-font; - font-size: 16px; - height: 28px; - margin: 0; - outline: medium none; - padding: 2px; - padding-left: 8px; - padding-right: 0px !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: 0.8; - width: 24px; - height: 30px; - font-size: 0; -} - #results { margin: 10px; padding: 0; @@ -506,12 +454,6 @@ tr { } @media screen and (max-width: 680px) { - #search_wrapper { - width: 90%; - clear:both; - overflow: hidden - } - .right { display: none; postion: fixed !important; |