From 10a24bdc2c3870f07ec62dd710841628d325aaf6 Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Sun, 12 Feb 2017 15:06:01 +0100 Subject: [PATCH] [enh] add simple theme (WIP) --- .gitattributes | 10 + .travis.yml | 5 +- manage.sh | 10 +- searx/plugins/doai_rewrite.py | 1 + searx/plugins/https_rewrite.py | 1 + searx/plugins/infinite_scroll.py | 1 + searx/plugins/search_on_category_select.py | 1 + searx/plugins/tracker_url_remover.py | 1 + searx/static/themes/simple/.jshintignore | 1 + searx/static/themes/simple/css/searx-rtl.css | 2049 +++++++++++++++++ .../themes/simple/css/searx-rtl.min.css | 1 + searx/static/themes/simple/css/searx.css | 2045 ++++++++++++++++ searx/static/themes/simple/css/searx.min.css | 1 + searx/static/themes/simple/fonts/ion.css | 134 ++ searx/static/themes/simple/fonts/ion.eot | Bin 0 -> 3796 bytes searx/static/themes/simple/fonts/ion.html | 261 +++ searx/static/themes/simple/fonts/ion.svg | 97 + searx/static/themes/simple/fonts/ion.ttf | Bin 0 -> 3640 bytes searx/static/themes/simple/fonts/ion.woff | Bin 0 -> 4452 bytes searx/static/themes/simple/fonts/ion.woff2 | Bin 0 -> 1880 bytes searx/static/themes/simple/gruntfile.js | 150 ++ searx/static/themes/simple/img/favicon.png | Bin 0 -> 1474 bytes searx/static/themes/simple/img/loader.gif | Bin 0 -> 8314 bytes .../static/themes/simple/img/logo_searx_a.png | Bin 0 -> 8390 bytes searx/static/themes/simple/img/searx.png | Bin 0 -> 2130 bytes searx/static/themes/simple/img/searx_logo.svg | 203 ++ searx/static/themes/simple/js/searx.js | 1534 ++++++++++++ searx/static/themes/simple/js/searx.min.js | 4 + .../static/themes/simple/js/searx.min.js.map | 1 + .../simple/js/searx_src/00_searx_toolkit.js | 155 ++ .../simple/js/searx_src/autocomplete.js | 536 +++++ .../simple/js/searx_src/searx_imageresult.js | 151 ++ .../simple/js/searx_src/searx_keyboard.js | 360 +++ .../simple/js/searx_src/searx_mapresult.js | 175 ++ .../simple/js/searx_src/searx_results.js | 63 + .../simple/js/searx_src/searx_search.js | 94 + .../simple/leaflet/images/layers-2x.png | Bin 0 -> 1259 bytes .../themes/simple/leaflet/images/layers.png | Bin 0 -> 696 bytes .../leaflet/images/marker-icon-2x-green.png | Bin 0 -> 3753 bytes .../leaflet/images/marker-icon-2x-orange.png | Bin 0 -> 3691 bytes .../leaflet/images/marker-icon-2x-red.png | Bin 0 -> 3692 bytes .../simple/leaflet/images/marker-icon-2x.png | Bin 0 -> 2586 bytes .../leaflet/images/marker-icon-green.png | Bin 0 -> 1696 bytes .../leaflet/images/marker-icon-orange.png | Bin 0 -> 1714 bytes .../simple/leaflet/images/marker-icon-red.png | Bin 0 -> 1690 bytes .../simple/leaflet/images/marker-icon.png | Bin 0 -> 1466 bytes .../simple/leaflet/images/marker-shadow.png | Bin 0 -> 618 bytes .../static/themes/simple/leaflet/leaflet.css | 624 +++++ searx/static/themes/simple/leaflet/leaflet.js | 9 + .../themes/simple/less/autocomplete.less | 67 + searx/static/themes/simple/less/code.less | 83 + .../themes/simple/less/definitions.less | 135 ++ searx/static/themes/simple/less/index.less | 43 + searx/static/themes/simple/less/ion.less | 174 ++ searx/static/themes/simple/less/mixins.less | 62 + .../static/themes/simple/less/normalize.less | 447 ++++ .../themes/simple/less/preferences.less | 78 + searx/static/themes/simple/less/search.less | 232 ++ searx/static/themes/simple/less/stats.less | 8 + .../static/themes/simple/less/style-rtl.less | 6 + searx/static/themes/simple/less/style.less | 709 ++++++ searx/static/themes/simple/less/toolkit.less | 346 +++ searx/static/themes/simple/magnet.svg | 1 + searx/static/themes/simple/package.json | 20 + searx/templates/oscar/preferences.html | 2 +- searx/templates/simple/404.html | 9 + searx/templates/simple/about.html | 4 + searx/templates/simple/base.html | 61 + searx/templates/simple/categories.html | 8 + searx/templates/simple/index.html | 12 + searx/templates/simple/infobox.html | 46 + searx/templates/simple/languages.html | 8 + searx/templates/simple/macros.html | 86 + searx/templates/simple/preferences.html | 190 ++ .../simple/result_templates/code.html | 13 + .../simple/result_templates/default.html | 17 + .../simple/result_templates/images.html | 4 + .../simple/result_templates/map.html | 71 + .../simple/result_templates/torrent.html | 24 + .../simple/result_templates/videos.html | 15 + searx/templates/simple/results.html | 151 ++ searx/templates/simple/search.html | 16 + searx/templates/simple/simple.spec.txt | 40 + searx/templates/simple/stats.html | 25 + searx/templates/simple/time-range.html | 17 + 85 files changed, 11902 insertions(+), 6 deletions(-) create mode 100644 .gitattributes create mode 100644 searx/static/themes/simple/.jshintignore create mode 100644 searx/static/themes/simple/css/searx-rtl.css create mode 100644 searx/static/themes/simple/css/searx-rtl.min.css create mode 100644 searx/static/themes/simple/css/searx.css create mode 100644 searx/static/themes/simple/css/searx.min.css create mode 100644 searx/static/themes/simple/fonts/ion.css create mode 100644 searx/static/themes/simple/fonts/ion.eot create mode 100644 searx/static/themes/simple/fonts/ion.html create mode 100644 searx/static/themes/simple/fonts/ion.svg create mode 100644 searx/static/themes/simple/fonts/ion.ttf create mode 100644 searx/static/themes/simple/fonts/ion.woff create mode 100644 searx/static/themes/simple/fonts/ion.woff2 create mode 100644 searx/static/themes/simple/gruntfile.js create mode 100644 searx/static/themes/simple/img/favicon.png create mode 100644 searx/static/themes/simple/img/loader.gif create mode 100644 searx/static/themes/simple/img/logo_searx_a.png create mode 100644 searx/static/themes/simple/img/searx.png create mode 100644 searx/static/themes/simple/img/searx_logo.svg create mode 100644 searx/static/themes/simple/js/searx.js create mode 100644 searx/static/themes/simple/js/searx.min.js create mode 100644 searx/static/themes/simple/js/searx.min.js.map create mode 100644 searx/static/themes/simple/js/searx_src/00_searx_toolkit.js create mode 100644 searx/static/themes/simple/js/searx_src/autocomplete.js create mode 100644 searx/static/themes/simple/js/searx_src/searx_imageresult.js create mode 100644 searx/static/themes/simple/js/searx_src/searx_keyboard.js create mode 100644 searx/static/themes/simple/js/searx_src/searx_mapresult.js create mode 100644 searx/static/themes/simple/js/searx_src/searx_results.js create mode 100644 searx/static/themes/simple/js/searx_src/searx_search.js create mode 100644 searx/static/themes/simple/leaflet/images/layers-2x.png create mode 100644 searx/static/themes/simple/leaflet/images/layers.png create mode 100644 searx/static/themes/simple/leaflet/images/marker-icon-2x-green.png create mode 100644 searx/static/themes/simple/leaflet/images/marker-icon-2x-orange.png create mode 100644 searx/static/themes/simple/leaflet/images/marker-icon-2x-red.png create mode 100644 searx/static/themes/simple/leaflet/images/marker-icon-2x.png create mode 100644 searx/static/themes/simple/leaflet/images/marker-icon-green.png create mode 100644 searx/static/themes/simple/leaflet/images/marker-icon-orange.png create mode 100644 searx/static/themes/simple/leaflet/images/marker-icon-red.png create mode 100644 searx/static/themes/simple/leaflet/images/marker-icon.png create mode 100644 searx/static/themes/simple/leaflet/images/marker-shadow.png create mode 100644 searx/static/themes/simple/leaflet/leaflet.css create mode 100644 searx/static/themes/simple/leaflet/leaflet.js create mode 100644 searx/static/themes/simple/less/autocomplete.less create mode 100644 searx/static/themes/simple/less/code.less create mode 100644 searx/static/themes/simple/less/definitions.less create mode 100644 searx/static/themes/simple/less/index.less create mode 100644 searx/static/themes/simple/less/ion.less create mode 100644 searx/static/themes/simple/less/mixins.less create mode 100644 searx/static/themes/simple/less/normalize.less create mode 100644 searx/static/themes/simple/less/preferences.less create mode 100644 searx/static/themes/simple/less/search.less create mode 100644 searx/static/themes/simple/less/stats.less create mode 100644 searx/static/themes/simple/less/style-rtl.less create mode 100644 searx/static/themes/simple/less/style.less create mode 100644 searx/static/themes/simple/less/toolkit.less create mode 100644 searx/static/themes/simple/magnet.svg create mode 100644 searx/static/themes/simple/package.json create mode 100644 searx/templates/simple/404.html create mode 100644 searx/templates/simple/about.html create mode 100644 searx/templates/simple/base.html create mode 100644 searx/templates/simple/categories.html create mode 100644 searx/templates/simple/index.html create mode 100644 searx/templates/simple/infobox.html create mode 100644 searx/templates/simple/languages.html create mode 100644 searx/templates/simple/macros.html create mode 100644 searx/templates/simple/preferences.html create mode 100644 searx/templates/simple/result_templates/code.html create mode 100644 searx/templates/simple/result_templates/default.html create mode 100644 searx/templates/simple/result_templates/images.html create mode 100644 searx/templates/simple/result_templates/map.html create mode 100644 searx/templates/simple/result_templates/torrent.html create mode 100644 searx/templates/simple/result_templates/videos.html create mode 100644 searx/templates/simple/results.html create mode 100644 searx/templates/simple/search.html create mode 100644 searx/templates/simple/simple.spec.txt create mode 100644 searx/templates/simple/stats.html create mode 100644 searx/templates/simple/time-range.html diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..0a75fa6d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,10 @@ +searx/static/css/bootstrap.min.css -diff +searx/static/js/bootstrap.min.js -diff +searx/static/themes/oscar/css/logicodev.min.css -diff +searx/static/themes/oscar/css/leaflet.min.css -diff +searx/static/themes/oscar/css/pointhi.min.css -diff +searx/static/themes/oscar/js/searx.min.js -diff +searx/static/themes/simple/css/searx.min.css -diff +searx/static/themes/simple/css/searx-rtl.min.css -diff +searx/static/themes/simple/js/searx.min.js -diff +searx/static/themes/simple/js/searx.min.js.map -diff diff --git a/.travis.yml b/.travis.yml index b6017cd9..1eb6573f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,10 +13,11 @@ python: before_install: - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" - - npm install less grunt-cli + - npm install less less-plugin-clean-css grunt-cli - ( cd searx/static/themes/oscar;npm install; cd - ) + - ( cd searx/static/themes/simple;npm install; cd - ) - mkdir -p ~/drivers; export PATH=~/drivers:$PATH; - - GECKODRIVER_URL="https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-linux64.tar.gz"; + - GECKODRIVER_URL="https://github.com/mozilla/geckodriver/releases/download/v0.14.0/geckodriver-v0.14.0-linux64.tar.gz"; - FILE=`mktemp`; wget "$GECKODRIVER_URL" -qO $FILE && tar xz -C ~/drivers -f $FILE geckodriver; rm $FILE; chmod 777 ~/drivers/geckodriver; install: - ./manage.sh update_dev_packages diff --git a/manage.sh b/manage.sh index 2466f25c..681f3a97 100755 --- a/manage.sh +++ b/manage.sh @@ -22,7 +22,7 @@ check_geckodriver() { if [ -z $NOTFOUND ]; then return fi - GECKODRIVER_VERSION="v0.11.1" + GECKODRIVER_VERSION="v0.14.0" PLATFORM=`python -c "import platform; print platform.system().lower(), platform.architecture()[0]"` case $PLATFORM in "linux 32bit" | "linux2 32bit") ARCH="linux32";; @@ -49,7 +49,7 @@ pep8_check() { # ignored rules: # E402 module level import not at top of file # W503 line break before binary operator - pep8 --max-line-length=120 --ignore "E402,W503" "$SEARX_DIR" "$BASE_DIR/tests" + pep8 --exclude=searx/static --max-line-length=120 --ignore "E402,W503" "$SEARX_DIR" "$BASE_DIR/tests" } unit_tests() { @@ -79,7 +79,8 @@ tests() { } build_style() { - lessc -x "$BASE_DIR/searx/static/$1" "$BASE_DIR/searx/static/$2" + # lessc -x "$BASE_DIR/searx/static/$1" "$BASE_DIR/searx/static/$2" + lessc --clean-css="--s1 --advanced --compatibility=ie9" "$BASE_DIR/searx/static/$1" "$BASE_DIR/searx/static/$2" } styles() { @@ -92,10 +93,13 @@ styles() { build_style themes/oscar/less/pointhi/oscar.less themes/oscar/css/pointhi.min.css build_style themes/oscar/less/logicodev/oscar.less themes/oscar/css/logicodev.min.css build_style themes/pix-art/less/style.less themes/pix-art/css/style.css + build_style themes/simple/less/style.less themes/simple/css/searx.min.css + build_style themes/simple/less/style-rtl.less themes/simple/css/searx-rtl.min.css } grunt_build() { grunt --gruntfile "$SEARX_DIR/static/themes/oscar/gruntfile.js" + grunt --gruntfile "$SEARX_DIR/static/themes/simple/gruntfile.js" } locales() { diff --git a/searx/plugins/doai_rewrite.py b/searx/plugins/doai_rewrite.py index 95efa8f9..b7b814fa 100644 --- a/searx/plugins/doai_rewrite.py +++ b/searx/plugins/doai_rewrite.py @@ -7,6 +7,7 @@ regex = re.compile(r'10\.\d{4,9}/[^\s]+') name = gettext('DOAI rewrite') description = gettext('Avoid paywalls by redirecting to open-access versions of publications when available') default_on = False +preference_section = 'privacy' def extract_doi(url): diff --git a/searx/plugins/https_rewrite.py b/searx/plugins/https_rewrite.py index 4462c86b..3d986770 100644 --- a/searx/plugins/https_rewrite.py +++ b/searx/plugins/https_rewrite.py @@ -31,6 +31,7 @@ if sys.version_info[0] == 3: name = "HTTPS rewrite" description = gettext('Rewrite HTTP links to HTTPS if possible') default_on = True +preference_section = 'privacy' if 'SEARX_HTTPS_REWRITE_PATH' in environ: rules_path = environ['SEARX_rules_path'] diff --git a/searx/plugins/infinite_scroll.py b/searx/plugins/infinite_scroll.py index 422a4bef..e3726671 100644 --- a/searx/plugins/infinite_scroll.py +++ b/searx/plugins/infinite_scroll.py @@ -3,6 +3,7 @@ from flask_babel import gettext name = gettext('Infinite scroll') description = gettext('Automatically load next page when scrolling to bottom of current page') default_on = False +preference_section = 'ui' js_dependencies = ('plugins/js/infinite_scroll.js',) css_dependencies = ('plugins/css/infinite_scroll.css',) diff --git a/searx/plugins/search_on_category_select.py b/searx/plugins/search_on_category_select.py index f72c63d7..2a38cac7 100644 --- a/searx/plugins/search_on_category_select.py +++ b/searx/plugins/search_on_category_select.py @@ -19,5 +19,6 @@ name = gettext('Search on category select') description = gettext('Perform search immediately if a category selected. ' 'Disable to select multiple categories. (JavaScript required)') default_on = True +preference_section = 'ui' js_dependencies = ('plugins/js/search_on_category_select.js',) diff --git a/searx/plugins/tracker_url_remover.py b/searx/plugins/tracker_url_remover.py index a8401282..630c8a63 100644 --- a/searx/plugins/tracker_url_remover.py +++ b/searx/plugins/tracker_url_remover.py @@ -26,6 +26,7 @@ regexes = {re.compile(r'utm_[^&]+&?'), name = gettext('Tracker URL remover') description = gettext('Remove trackers arguments from the returned URL') default_on = True +preference_section = 'privacy' def on_result(request, search, result): diff --git a/searx/static/themes/simple/.jshintignore b/searx/static/themes/simple/.jshintignore new file mode 100644 index 00000000..3b2b7148 --- /dev/null +++ b/searx/static/themes/simple/.jshintignore @@ -0,0 +1 @@ +js/searx_src/autocomplete.js diff --git a/searx/static/themes/simple/css/searx-rtl.css b/searx/static/themes/simple/css/searx-rtl.css new file mode 100644 index 00000000..e43f02d5 --- /dev/null +++ b/searx/static/themes/simple/css/searx-rtl.css @@ -0,0 +1,2049 @@ +/*! searx | 06-08-2017 | https://github.com/asciimoo/searx */ +/* +* searx, A privacy-respecting, hackable metasearch engine +* +* To convert "style.less" to "style.css" run: $make styles +*/ +/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */ +/* Document + ========================================================================== */ +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in + * IE on Windows Phone and in iOS. + */ +html { + line-height: 1.15; + /* 1 */ + -ms-text-size-adjust: 100%; + /* 2 */ + -webkit-text-size-adjust: 100%; + /* 2 */ +} +/* Sections + ========================================================================== */ +/** + * Remove the margin in all browsers (opinionated). + */ +body { + margin: 0; +} +/** + * Add the correct display in IE 9-. + */ +article, +aside, +footer, +header, +nav, +section { + display: block; +} +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ +h1 { + font-size: 2em; + margin: 0.67em 0; +} +/* Grouping content + ========================================================================== */ +/** + * Add the correct display in IE 9-. + * 1. Add the correct display in IE. + */ +figcaption, +figure, +main { + /* 1 */ + display: block; +} +/** + * Add the correct margin in IE 8. + */ +figure { + margin: 1em 40px; +} +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ +hr { + box-sizing: content-box; + /* 1 */ + height: 0; + /* 1 */ + overflow: visible; + /* 2 */ +} +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ +pre { + font-family: monospace, monospace; + /* 1 */ + font-size: 1em; + /* 2 */ +} +/* Text-level semantics + ========================================================================== */ +/** + * 1. Remove the gray background on active links in IE 10. + * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. + */ +a { + background-color: transparent; + /* 1 */ + -webkit-text-decoration-skip: objects; + /* 2 */ +} +/** + * 1. Remove the bottom border in Chrome 57- and Firefox 39-. + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ +abbr[title] { + border-bottom: none; + /* 1 */ + text-decoration: underline; + /* 2 */ + text-decoration: underline dotted; + /* 2 */ +} +/** + * Prevent the duplicate application of `bolder` by the next rule in Safari 6. + */ +b, +strong { + font-weight: inherit; +} +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ +b, +strong { + font-weight: bolder; +} +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ +code, +kbd, +samp { + font-family: monospace, monospace; + /* 1 */ + font-size: 1em; + /* 2 */ +} +/** + * Add the correct font style in Android 4.3-. + */ +dfn { + font-style: italic; +} +/** + * Add the correct background and color in IE 9-. + */ +mark { + background-color: #ff0; + color: #000; +} +/** + * Add the correct font size in all browsers. + */ +small { + font-size: 80%; +} +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} +sub { + bottom: -0.25em; +} +sup { + top: -0.5em; +} +/* Embedded content + ========================================================================== */ +/** + * Add the correct display in IE 9-. + */ +audio, +video { + display: inline-block; +} +/** + * Add the correct display in iOS 4-7. + */ +audio:not([controls]) { + display: none; + height: 0; +} +/** + * Remove the border on images inside links in IE 10-. + */ +img { + border-style: none; +} +/** + * Hide the overflow in IE. + */ +svg:not(:root) { + overflow: hidden; +} +/* Forms + ========================================================================== */ +/** + * 1. Change the font styles in all browsers (opinionated). + * 2. Remove the margin in Firefox and Safari. + */ +button, +input, +optgroup, +select, +textarea { + font-family: sans-serif; + /* 1 */ + font-size: 100%; + /* 1 */ + line-height: 1.15; + /* 1 */ + margin: 0; + /* 2 */ +} +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ +button, +input { + /* 1 */ + overflow: visible; +} +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ +button, +select { + /* 1 */ + text-transform: none; +} +/** + * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` + * controls in Android 4. + * 2. Correct the inability to style clickable types in iOS and Safari. + */ +button, +html [type="button"], +[type="reset"], +[type="submit"] { + -webkit-appearance: button; + /* 2 */ +} +/** + * Remove the inner border and padding in Firefox. + */ +button::-moz-focus-inner, +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; +} +/** + * Restore the focus styles unset by the previous rule. + */ +button:-moz-focusring, +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; +} +/** + * Correct the padding in Firefox. + */ +fieldset { + padding: 0.35em 0.75em 0.625em; +} +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ +legend { + box-sizing: border-box; + /* 1 */ + color: inherit; + /* 2 */ + display: table; + /* 1 */ + max-width: 100%; + /* 1 */ + padding: 0; + /* 3 */ + white-space: normal; + /* 1 */ +} +/** + * 1. Add the correct display in IE 9-. + * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ +progress { + display: inline-block; + /* 1 */ + vertical-align: baseline; + /* 2 */ +} +/** + * Remove the default vertical scrollbar in IE. + */ +textarea { + overflow: auto; +} +/** + * 1. Add the correct box sizing in IE 10-. + * 2. Remove the padding in IE 10-. + */ +[type="checkbox"], +[type="radio"] { + box-sizing: border-box; + /* 1 */ + padding: 0; + /* 2 */ +} +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ +[type="search"] { + -webkit-appearance: textfield; + /* 1 */ + outline-offset: -2px; + /* 2 */ +} +/** + * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. + */ +[type="search"]::-webkit-search-cancel-button, +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ +::-webkit-file-upload-button { + -webkit-appearance: button; + /* 1 */ + font: inherit; + /* 2 */ +} +/* Interactive + ========================================================================== */ +/* + * Add the correct display in IE 9-. + * 1. Add the correct display in Edge, IE, and Firefox. + */ +details, +menu { + display: block; +} +/* + * Add the correct display in all browsers. + */ +summary { + display: list-item; +} +/* Scripting + ========================================================================== */ +/** + * Add the correct display in IE 9-. + */ +canvas { + display: inline-block; +} +/** + * Add the correct display in IE. + */ +template { + display: none; +} +/* Hidden + ========================================================================== */ +/** + * Add the correct display in IE 10-. + */ +[hidden] { + display: none; +} +/* + * searx, A privacy-respecting, hackable metasearch engine + * + * To change the colors of the site, simple edit this variables + */ +/* +* searx, A privacy-respecting, hackable metasearch engine +*/ +.highlight .hll { + background-color: #ffffcc; +} +.highlight { + background: #f8f8f8; +} +.highlight .c { + color: #408080; + font-style: italic; +} +/* Comment */ +.highlight .err { + border: 1px solid #FF0000; +} +/* Error */ +.highlight .k { + color: #008000; + font-weight: bold; +} +/* Keyword */ +.highlight .o { + color: #666666; +} +/* Operator */ +.highlight .cm { + color: #408080; + font-style: italic; +} +/* Comment.Multiline */ +.highlight .cp { + color: #BC7A00; +} +/* Comment.Preproc */ +.highlight .c1 { + color: #408080; + font-style: italic; +} +/* Comment.Single */ +.highlight .cs { + color: #408080; + font-style: italic; +} +/* Comment.Special */ +.highlight .gd { + color: #A00000; +} +/* Generic.Deleted */ +.highlight .ge { + font-style: italic; +} +/* Generic.Emph */ +.highlight .gr { + color: #FF0000; +} +/* Generic.Error */ +.highlight .gh { + color: #000080; + font-weight: bold; +} +/* Generic.Heading */ +.highlight .gi { + color: #00A000; +} +/* Generic.Inserted */ +.highlight .go { + color: #888888; +} +/* Generic.Output */ +.highlight .gp { + color: #000080; + font-weight: bold; +} +/* Generic.Prompt */ +.highlight .gs { + font-weight: bold; +} +/* Generic.Strong */ +.highlight .gu { + color: #800080; + font-weight: bold; +} +/* Generic.Subheading */ +.highlight .gt { + color: #0044DD; +} +/* Generic.Traceback */ +.highlight .kc { + color: #008000; + font-weight: bold; +} +/* Keyword.Constant */ +.highlight .kd { + color: #008000; + font-weight: bold; +} +/* Keyword.Declaration */ +.highlight .kn { + color: #008000; + font-weight: bold; +} +/* Keyword.Namespace */ +.highlight .kp { + color: #008000; +} +/* Keyword.Pseudo */ +.highlight .kr { + color: #008000; + font-weight: bold; +} +/* Keyword.Reserved */ +.highlight .kt { + color: #B00040; +} +/* Keyword.Type */ +.highlight .m { + color: #666666; +} +/* Literal.Number */ +.highlight .s { + color: #BA2121; +} +/* Literal.String */ +.highlight .na { + color: #7D9029; +} +/* Name.Attribute */ +.highlight .nb { + color: #008000; +} +/* Name.Builtin */ +.highlight .nc { + color: #0000FF; + font-weight: bold; +} +/* Name.Class */ +.highlight .no { + color: #880000; +} +/* Name.Constant */ +.highlight .nd { + color: #AA22FF; +} +/* Name.Decorator */ +.highlight .ni { + color: #999999; + font-weight: bold; +} +/* Name.Entity */ +.highlight .ne { + color: #D2413A; + font-weight: bold; +} +/* Name.Exception */ +.highlight .nf { + color: #0000FF; +} +/* Name.Function */ +.highlight .nl { + color: #A0A000; +} +/* Name.Label */ +.highlight .nn { + color: #0000FF; + font-weight: bold; +} +/* Name.Namespace */ +.highlight .nt { + color: #008000; + font-weight: bold; +} +/* Name.Tag */ +.highlight .nv { + color: #19177C; +} +/* Name.Variable */ +.highlight .ow { + color: #AA22FF; + font-weight: bold; +} +/* Operator.Word */ +.highlight .w { + color: #bbbbbb; +} +/* Text.Whitespace */ +.highlight .mf { + color: #666666; +} +/* Literal.Number.Float */ +.highlight .mh { + color: #666666; +} +/* Literal.Number.Hex */ +.highlight .mi { + color: #666666; +} +/* Literal.Number.Integer */ +.highlight .mo { + color: #666666; +} +/* Literal.Number.Oct */ +.highlight .sb { + color: #BA2121; +} +/* Literal.String.Backtick */ +.highlight .sc { + color: #BA2121; +} +/* Literal.String.Char */ +.highlight .sd { + color: #BA2121; + font-style: italic; +} +/* Literal.String.Doc */ +.highlight .s2 { + color: #BA2121; +} +/* Literal.String.Double */ +.highlight .se { + color: #BB6622; + font-weight: bold; +} +/* Literal.String.Escape */ +.highlight .sh { + color: #BA2121; +} +/* Literal.String.Heredoc */ +.highlight .si { + color: #BB6688; + font-weight: bold; +} +/* Literal.String.Interpol */ +.highlight .sx { + color: #008000; +} +/* Literal.String.Other */ +.highlight .sr { + color: #BB6688; +} +/* Literal.String.Regex */ +.highlight .s1 { + color: #BA2121; +} +/* Literal.String.Single */ +.highlight .ss { + color: #19177C; +} +/* Literal.String.Symbol */ +.highlight .bp { + color: #008000; +} +/* Name.Builtin.Pseudo */ +.highlight .vc { + color: #19177C; +} +/* Name.Variable.Class */ +.highlight .vg { + color: #19177C; +} +/* Name.Variable.Global */ +.highlight .vi { + color: #19177C; +} +/* Name.Variable.Instance */ +.highlight .il { + color: #666666; +} +/* Literal.Number.Integer.Long */ +.highlight pre { + overflow: auto; +} +.highlight .lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: default; +} +.highlight .lineno::selection { + background: transparent; + /* WebKit/Blink Browsers */ +} +.highlight .lineno::-moz-selection { + background: transparent; + /* Gecko Browsers */ +} +html.no-js .hide_if_nojs { + display: none; +} +html.js .show_if_nojs { + display: none; +} +.center { + text-align: center; +} +.right { + float: right ; +} +.left { + float: left; +} +.invisible { + display: none; +} +.danger { + background-color: #fae1e1; +} +.badge { + display: inline-block; + color: #fff; + background-color: #777; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + min-width: 10px; + padding: 1px 5px; + border-radius: 5px; +} +table { + width: 100%; +} +table.striped tr { + border-bottom: 1px solid #ececec; +} +th { + padding: 0.4em; +} +td { + padding: 0 4px; +} +tr:hover { + background: #ececec; +} +.dialog-error { + position: relative; + width: 70%; + padding: 1em 1em 1em 2.7em; + margin: 0em 8% 1em 8%; + border: 1px solid black; + border-radius: 4px; + text-align: left; + color: #db3434; + background: #fae1e1; + border-color: #db3434; +} +.dialog-error:before { + position: absolute; + top: 0.5em; + left: 0.5em; + font-family: "ion"; + font-size: 1.5em; +} +.dialog-error .close { + float: right; + position: relative; + top: -3px; + color: inherit; + font-size: 1.5em; +} +.dialog-error ul, +.dialog-error ol, +.dialog-error p { + margin: 1px 0 0 0; +} +.dialog-error:before { + content: "\f110"; +} +.dialog-warning { + position: relative; + width: 70%; + padding: 1em 1em 1em 2.7em; + margin: 0em 8% 1em 8%; + border: 1px solid black; + border-radius: 4px; + text-align: left; + color: #dbba34; + background: #faf5e1; + border-color: #dbba34; +} +.dialog-warning:before { + position: absolute; + top: 0.5em; + left: 0.5em; + font-family: "ion"; + font-size: 1.5em; +} +.dialog-warning .close { + float: right; + position: relative; + top: -3px; + color: inherit; + font-size: 1.5em; +} +.dialog-warning ul, +.dialog-warning ol, +.dialog-warning p { + margin: 1px 0 0 0; +} +.dialog-warning:before { + content: "\f10f"; +} +.btn-collapse { + cursor: pointer; +} +.scrollx { + overflow-x: auto; + overflow-y: hidden; + display: block; + padding: 0; + margin: 0; + border: none; +} +.tabs .tabs > label { + font-size: 90%; +} +.tabs { + display: -webkit-box; + display: -moz-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + flex-wrap: wrap; + width: 100%; + min-width: 100%; +} +.tabs > * { + order: 2; +} +.tabs > input[type=radio] { + display: none; +} +.tabs > label { + order: 1; + padding: 0.7em; + margin: 0 0.7em; + letter-spacing: 0.5px; + text-transform: uppercase; + border: solid white; + border-width: 0px 0px 2px 0; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; +} +.tabs > label:hover { + border-bottom: 2px solid #084999; +} +.tabs > section { + min-width: 100%; + padding: 0.7rem 0; + box-sizing: border-box; + border-top: 1px solid black; + display: none; +} +.tabs > label:last-of-type { + border-bottom: 2px solid #084999; + background: #3498DB; + color: #FFF; + font-weight: bold; + letter-spacing: -0.1px; +} +.tabs > section:last-of-type { + display: block; +} +html body .tabs > input:checked ~ section { + display: none; +} +html body .tabs > input:checked ~ label { + position: inherited; + background: inherit; + border-bottom: 2px solid transparent; + font-weight: normal; + color: inherit; +} +html body .tabs > input:checked ~ label:hover { + border-bottom: 2px solid #084999; +} +html body .tabs > input:checked + label { + border-bottom: 2px solid #084999; + background: #3498DB; + color: #FFF; + font-weight: bold; + letter-spacing: -0.1px; +} +html body .tabs > input:checked + label + section { + display: block; +} +select { + height: 28px; + margin: 0 1em 0 0; + padding: 2px 8px 2px 0 !important; + color: #222; + font-size: 12px; + z-index: 2; +} +select:hover, +select:focus { + cursor: pointer; +} +@supports ((background-position-x: 100%) and ((appearance: none) or (-webkit-appearance: none) or (-moz-appearance: none))) { + select { + appearance: none; + -webkit-appearance: none; + -moz-appearance: none; + border: none; + border-bottom: 1px solid #d7d7d7; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI1MTJweCIgaGVpZ2h0PSI1MTJweCIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDUxMiA1MTIiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTI4LDE5MiAyNTYsMzIwIDM4NCwxOTIiLz48L2c+PC9zdmc+Cg==) no-repeat; + background-position-x: 105%; + background-size: 2em; + background-origin: content-box; + outline: medium none; + } + select:hover, + select:focus { + border-bottom: 1px solid #3498DB; + } +} +@supports (border-radius: 50px) { + .checkbox-onoff { + display: inline-block; + width: 40px; + height: 10px; + background: #dcdcdc; + margin: 8px auto; + position: relative; + border-radius: 50px; + } + .checkbox-onoff label { + display: block; + width: 20px; + height: 20px; + position: absolute; + top: -5px; + cursor: pointer; + border-radius: 50px; + box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.3); + transition: all 0.4s ease; + left: 27px; + background-color: #3498DB; + } + .checkbox-onoff input[type=checkbox] { + visibility: hidden; + } + .checkbox-onoff input[type=checkbox]:checked + label { + left: -5px; + background: #dcdcdc; + } +} +@supports (transform: rotate(-45deg)) { + .checkbox { + width: 20px; + position: relative; + margin: 20px auto; + } + .checkbox label { + width: 20px; + height: 20px; + cursor: pointer; + position: absolute; + top: 0; + left: 0; + background: white; + border-radius: 4px; + box-shadow: inset 0px 1px 1px white, 0px 1px 4px rgba(0, 0, 0, 0.5); + } + .checkbox label:after { + content: ''; + width: 9px; + height: 5px; + position: absolute; + top: 4px; + left: 4px; + border: 3px solid #333; + border-top: none; + border-right: none; + background: transparent; + opacity: 0; + transform: rotate(-45deg); + } + .checkbox input[type=checkbox] { + visibility: hidden; + } + .checkbox input[type=checkbox]:checked + label:after { + border-color: #3498DB; + opacity: 1; + } + .checkbox input[disabled] + label { + background-color: transparent !important; + box-shadow: none !important; + cursor: inherit; + } + .checkbox input:not(:checked):not([readonly]):not([disabled]) + label:hover::after { + opacity: 0.5; + } +} +@media screen and (max-width: 50em) { + .tabs > label { + width: 100%; + } +} +.autocomplete { + position: absolute; + max-height: 0; + overflow-y: hidden; + text-align: left; +} +.autocomplete:active, +.autocomplete:focus, +.autocomplete:hover { + background-color: white; +} +.autocomplete:empty { + display: none; +} +.autocomplete > ul { + list-style-type: none; + margin: 0; + padding: 0; +} +.autocomplete > ul > li { + cursor: pointer; + padding: 5px 0 5px 10px; +} +.autocomplete > ul > li.active, +.autocomplete > ul > li:active, +.autocomplete > ul > li:focus { + background-color: #3498DB; +} +.autocomplete > ul > li.active a:active, +.autocomplete > ul > li:active a:active, +.autocomplete > ul > li:focus a:active, +.autocomplete > ul > li.active a:focus, +.autocomplete > ul > li:active a:focus, +.autocomplete > ul > li:focus a:focus, +.autocomplete > ul > li.active a:hover, +.autocomplete > ul > li:active a:hover, +.autocomplete > ul > li:focus a:hover { + text-decoration: none; +} +.autocomplete > ul > li.locked { + cursor: inherit; +} +.autocomplete.open { + display: block; + background-color: white; + border: 1px solid #3498DB; + max-height: 500px; + overflow-y: auto; + z-index: 100; +} +.autocomplete.open:empty { + display: none; +} +@media screen and (max-width: 50em) { + .autocomplete { + bottom: 0; + } + .autocomplete > ul > li { + padding: 7px 0 7px 10px; + border-bottom: 1px solid #E8E7E6; + text-align: left; + } +} +@font-face { + font-family: "ion"; + src: url("../fonts/ion.eot?94af7082ea096aefe3a7b6642834716e"); + src: url("../fonts/ion.eot?#iefix") format("embedded-opentype"), url("../fonts/ion.woff2?94af7082ea096aefe3a7b6642834716e") format("woff2"), url("../fonts/ion.woff?94af7082ea096aefe3a7b6642834716e") format("woff"), url("../fonts/ion.ttf?94af7082ea096aefe3a7b6642834716e") format("truetype"), url("../fonts/ion.svg?94af7082ea096aefe3a7b6642834716e#ion") format("svg"); + font-weight: normal; + font-style: normal; +} +.ion-icon { + display: inline-block; + vertical-align: middle; + line-height: 1; + font-weight: normal; + font-style: normal; + speak: none; + text-decoration: inherit; + text-transform: none; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.ion-icon:before { + font-family: "ion"; +} +.ion-navicon-round:before { + content: "\f101"; +} +.ion-search:before { + content: "\f102"; +} +.ion-play:before { + content: "\f103"; +} +.ion-link:before { + content: "\f104"; +} +.ion-chevron-up:before { + content: "\f105"; +} +.ion-chevron-left:before { + content: "\f106"; +} +.ion-chevron-right:before { + content: "\f107"; +} +.ion-arrow-down-a:before { + content: "\f108"; +} +.ion-arrow-up-a:before { + content: "\f109"; +} +.ion-arrow-swap:before { + content: "\f10a"; +} +.ion-arrow-dropdown:before { + content: "\f10b"; +} +.ion-globe:before { + content: "\f10c"; +} +.ion-time:before { + content: "\f10d"; +} +.ion-location:before { + content: "\f10e"; +} +.ion-warning:before { + content: "\f10f"; +} +.ion-error:before { + content: "\f110"; +} +.ion-film-outline:before { + content: "\f111"; +} +.ion-music-note:before { + content: "\f112"; +} +.ion-more-vertical:before { + content: "\f113"; +} +.ion-magnet:before { + content: "\f114"; +} +.ion-icon-big { + display: inline-block; + vertical-align: middle; + line-height: 1; + font-weight: normal; + font-style: normal; + speak: none; + text-decoration: inherit; + text-transform: none; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-size: 149%; +} +.ion-icon-big:before { + font-family: "ion"; +} +.index { + text-align: center; +} +.index .title { + background: url('../img/searx.png') no-repeat; + width: 100%; + min-height: 80px; + background-position: center; +} +.index h1 { + font-size: 5em; + visibility: hidden; +} +.index #search { + margin: 0 auto; + background: inherit; + border: inherit; +} +.index .search_filters { + display: block; + margin: 1em 0; +} +.index .category label { + padding: 6px 10px; + border-bottom: initial !important; +} +@media screen and (max-width: 75em) { + div.title h1 { + font-size: 1em; + } +} +#main_preferences form { + width: 100%; +} +#main_preferences fieldset { + margin: 8px; + border: none; +} +#main_preferences legend { + margin: 0; + padding: 5px 0 0 0; + display: block; + float: left; + width: 300px; +} +#main_preferences .value { + margin: 0; + padding: 0; + float: left; + width: 15em; +} +#main_preferences .description { + margin: 0; + padding: 5px 0 0 0; + float: left; + width: 50%; + color: #909090; + font-size: 90%; +} +#main_preferences select { + width: 200px; + font-size: inherit !important; +} +#main_preferences table { + border-collapse: collapse; +} +#main_preferences table td { + text-align: center; +} +#main_preferences .name, +#main_preferences .shortcut { + text-align: left; +} +#main_preferences .preferences_back { + background: none repeat scroll 0 0 #3498DB; + color: white; + border: 0 none; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + cursor: pointer; + display: inline-block; + margin: 2px 4px; + padding: 0.5em; +} +#main_preferences .preferences_back a { + display: block; + color: #FFF; +} +#main_preferences .preferences_back a::first-letter { + text-transform: uppercase; +} +@media screen and (max-width: 75em) { + .preferences_back { + clear: both; + } +} +/* +* searx, A privacy-respecting, hackable metasearch engine +*/ +#search { + padding: 0 2em; + margin: 0; + background: #f7f7f7; + border-bottom: 1px solid #d7d7d7; +} +#search_wrapper { + padding: 10px 0; +} +.search_box { + margin: 0 12px 0 0; + display: inline-flex; + flex-direction: row; + white-space: nowrap; + /* + &:has(q:focus) { + box-shadow: 0px 0px 5px #CCC; +} +*/ +} +#q, +#send_search { + display: block !important; + border-collapse: separate; + box-sizing: border-box; + position: relative; + margin: 0; + padding: 2px; + height: 2.2em; + background: none repeat scroll 0 0 #FFF; + border: 1px solid #3498DB; + border-radius: 0px; + outline: none; + color: #222; + font-size: 16px; + z-index: 2; +} +#q { + outline: medium none; + padding-left: 8px; + padding-right: 0px !important; + border-right: none; + width: 40em; +} +#send_search { + border-left: none; + width: 2.2em; +} +#send_search:hover { + cursor: pointer; + background-color: #3498DB; + color: #ECF0F1; +} +.no-js #send_search { + width: auto !important; +} +.search_filters { + display: inline-block; + vertical-align: middle; +} +@media screen and (max-width: 75em) { + #categories { + font-size: 90%; + clear: both; + } + #categories .checkbox_container { + margin-top: 2px; + margin: auto; + } + html.touch #main_index #categories_container, + html.touch #main_results #categories_container { + width: 1000px; + width: -moz-max-content; + width: -webkit-max-content; + width: max-content; + } + html.touch #main_index #categories_container .category, + html.touch #main_results #categories_container .category { + display: inline-block; + width: auto; + } + html.touch #main_index #categories, + html.touch #main_results #categories { + width: 100%; + margin: 0; + text-align: left; + overflow-x: scroll; + overflow-y: hidden; + -webkit-overflow-scrolling: touch; + } +} +@media screen and (max-width: 50em) { + #search { + width: 100%; + margin: 0; + padding: 0.1em 0 0 0; + } + #search_wrapper { + width: 100%; + margin: 0 0 0.7em 0; + padding: 0; + } + .search_box { + width: 99%; + margin: 0.1em; + padding: 0 0.1em 0 0; + display: flex; + flex-direction: row; + } + #q { + width: auto !important; + flex: 1; + } + .search_filters { + display: block; + margin: 0.5em; + } + .language, + .time_range { + width: 45%; + } + .category { + display: block; + width: 90%; + } + .category label { + border-bottom: 0; + } +} +#categories { + margin: 0 10px 0 0; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +#categories::-webkit-scrollbar { + width: 0; + height: 0; +} +.category { + display: inline-block; + position: relative; + margin: 0 3px; + padding: 0px; + /*label:hover { + border-bottom: 2px solid @color-categories-item-border-unselected-hover; + }*/ +} +.category input { + display: none; +} +.category label { + cursor: pointer; + padding: 4px 10px; + margin: 0; + display: block; + text-transform: capitalize; + font-size: 0.9em; + border-bottom: 2px solid transparent; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.category input[type="checkbox"]:focus + label { + box-shadow: 0px 0px 8px #3498DB; +} +.category input[type="checkbox"]:checked + label { + background: #3498DB; + color: #FFF; + border-bottom: 2px solid #084999; +} +#categories_container { + position: relative; +} +#categories_container .help { + position: absolute; + width: 100%; + bottom: -20px; + overflow: hidden; + opacity: 0; + transition: opacity 1s ease; + font-size: 0.8em; + text-position: center; + background: white; +} +#categories_container:hover .help { + opacity: 0.8; + transition: opacity 1s ease; +} +html { + font-family: arial, sans-serif; + font-size: 0.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, +main { + padding: 0; + margin: 0; +} +main { + width: 100%; +} +footer { + bottom: 0; + width: 100%; + height: 50px; +} +#main_preferences, +#main_about, +#main_stats { + margin: 3em; + width: auto; +} +footer { + bottom: 0; + height: 3em; + margin: 1em 0; + padding: 1em 0; + clear: both; + width: 100%; + text-align: center; +} +footer p { + font-size: 0.9em; +} +#main_preferences h1, +#main_stats h1 { + background: url('../img/searx.png') no-repeat; + background-size: auto 75%; + min-height: 40px; + margin: 0 auto; +} +#main_preferences h1 span, +#main_stats h1 span { + visibility: hidden; +} +input[type="submit"], +#results button[type="submit"] { + padding: 0.5rem; + 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; +} +a { + text-decoration: none; + color: #29314d; +} +a:visited { + color: #684898; +} +a:visited .highlight { + color: #684898; +} +article[data-vim-selected] { + background: #f7f7f7; +} +article[data-vim-selected]::before { + position: absolute; + left: 1em; + padding: 2px; + content: ">"; + font-weight: bold; + color: #3498DB; +} +article.result-images[data-vim-selected] { + background: #3498DB; +} +article.result-images[data-vim-selected]::before { + display: none; + content: ""; +} +.result { + margin: 19px 0 18px 0; + padding: 0; +} +.result h3 { + font-size: 1.1em; + word-wrap: break-word; + margin: 5px 0 1px 0; + padding: 0; + margin-bottom: 0; +} +.result h3 a { + color: #084999; + font-weight: normal; + font-size: 1.1em; +} +.result h3 a:visited { + color: #684898; +} +.result h3 a:focus, +.result h3 a:hover { + text-decoration: underline; + border: none; + -webkit-box-shadow: none; + box-shadow: none; + outline: none; +} +.result .cache_link, +.result .proxyfied_link { + font-size: 0.9em !important; +} +.result .content, +.result .stat, +.result .altlink { + font-size: 0.9em; + margin: 0; + padding: 0; + max-width: 54em; + word-wrap: break-word; + line-height: 1.24; +} +.result .content .highlight, +.result .stat .highlight, +.result .altlink .highlight { + color: #000000; + background: inherit; + font-weight: bold; +} +.result .codelines .highlight { + color: inherit; + background: inherit; + font-weight: normal; +} +.result .url { + font-size: 0.9em; + margin: 0 0 3px 0; + padding: 0; + max-width: 54em; + word-wrap: break-word; + color: #25a55b; +} +.result .published_date { + font-size: 0.8em; + color: #888; +} +.result img.thumbnail { + float: left; + padding: 0 5px 10px 0; + width: 20em; + min-width: 20em; + min-height: 8em; +} +.result img.image { + float: left; + padding: 0 5px 10px 0; + width: 100px; + max-height: 100px; + object-fit: scale-down; + object-position: right top; +} +.result .break { + clear: both; +} +.category-social .image { + width: auto !important; + min-width: 48px; + min-height: 48px; + padding: 0 5px 25px 0 !important; +} +.result-videos .content { + overflow: hidden; +} +.engines { + float: right; + color: #888; +} +.engines span { + font-size: smaller; + margin: 0 0.5em 0 0; +} +.small_font { + font-size: 0.8em; +} +.highlight { + color: #094089; + background: inherit; + font-weight: bold; +} +.result-images { + display: inline-block; + margin: 0; + padding: 0; + position: relative; + max-height: 200px; +} +.result-images img { + float: inherit; + margin: 0; + padding: 0; + border: none; + max-height: 200px; + background: #084999; +} +.result-images span a { + display: none; + color: #FFF; +} +.result-images:hover span a { + display: block; + position: absolute; + bottom: 0; + right: 0; + padding: 4px; + margin: 0 0 4px 4px; + background-color: rgba(0, 0, 0, 0.6); + font-size: 0.7em; +} +.torrent_result { + border-left: 10px solid lightgray; + padding-left: 3px; +} +.torrent_result p { + margin: 3px; + font-size: 0.8em; +} +.torrent_result a { + color: #084999; +} +.torrent_result a:hover { + text-decoration: underline; +} +.torrent_result a:visited { + color: #684898; +} +#results { + margin: 2em 2em 20px 2em; + padding: 0; + width: 50em; +} +#suggestions .wrapper { + display: flex; + flex-flow: row wrap; + justify-content: flex-end; +} +#suggestions .wrapper form { + display: inline-block; + flex: 1 1 50%; +} +#suggestions, +#answers, +#corrections { + max-width: 50em; +} +#suggestions input, +#answers input, +#infoboxes input, +#corrections input { + padding: 0; + margin: 3px; + font-size: 0.9em; + display: inline-block; + background: transparent; + color: #444; + cursor: pointer; +} +#suggestions input[type="submit"], +#answers input[type="submit"], +#infoboxes input[type="submit"], +#corrections input[type="submit"], +#suggestions .infobox .url a, +#answers .infobox .url a, +#infoboxes .infobox .url a, +#corrections .infobox .url a { + color: #084999; + text-decoration: none; + font-size: 0.9rem; +} +#suggestions input[type="submit"]:hover, +#answers input[type="submit"]:hover, +#infoboxes input[type="submit"]:hover, +#corrections input[type="submit"]:hover, +#suggestions .infobox .url a:hover, +#answers .infobox .url a:hover, +#infoboxes .infobox .url a:hover, +#corrections .infobox .url a:hover { + text-decoration: underline; +} +#corrections { + display: flex; + flex-flow: row wrap; + margin: 1em 0; +} +#corrections h4, +#corrections input[type="submit"] { + display: inline-block; + margin: 0 0.5em 0 0; +} +#corrections input[type="submit"]::after { + content: ", "; +} +#suggestions .title, +#search_url .title, +#apis .title { + margin: 2em 0 0.5em 0; + color: #444; +} +#answers { + margin: 10px 8px 10px 8px; + border: 1px solid #ddd; + padding: 0.9em; + box-shadow: 0px 0px 5px #CCC; +} +#answers h4 { + display: none; +} +#answers .answer { + display: block; + font-size: 1.2em; + font-weight: bold; +} +#answers form, +#infoboxes form { + min-width: 210px; +} +#sidebar { + position: absolute; + top: 100px; + left: 57em; + margin: 0px 2px 5px 5px; + padding: 0px 2px 2px; + max-width: 25em; + word-wrap: break-word; +} +#sidebar .infobox { + margin: 10px 0 10px; + border: 1px solid #ddd; + padding: 0.9em; + font-size: 0.9em; + box-shadow: 0px 0px 5px #CCC; +} +#sidebar .infobox h2 { + margin: 0 0 .5em 0; +} +#sidebar .infobox img { + max-width: 100%; + max-height: 12em; + display: block; + margin: 0; + padding: 0; +} +#sidebar .infobox dl { + margin: 0.5em 0; +} +#sidebar .infobox dt { + display: inline; + margin: 0.5em 0.25em 0.5em 0; + padding: 0; + font-weight: bold; +} +#sidebar .infobox dd { + display: inline; + margin: 0.5em 0; + padding: 0; +} +#sidebar .infobox input { + font-size: 1em; +} +#sidebar .infobox br { + clear: both; +} +#sidebar .infobox .attributes, +#sidebar .infobox .urls { + clear: both; +} +#search_url { + margin-top: 8px; +} +#search_url div { + border: 1px solid #888; + padding: 4px; + color: #444; + width: 100%; + display: block; + margin: 0.1em; + overflow: hidden; + height: 1.2em; + line-height: 1.2em; +} +#search_url div pre { + display: block; + width: 200em; + font-size: 0.8em; + word-break: break-all; + margin: 0.1em; + -webkit-user-select: all; + -moz-user-select: all; + -ms-user-select: all; + user-select: all; +} +#linkto_preferences { + position: absolute; + right: 10px; + top: 0.9em; + padding: 0; + border: 0; + display: block; + font-size: 1.2em; + color: #222; +} +#linkto_preferences a:link *, +#linkto_preferences a:hover *, +#linkto_preferences a:visited *, +#linkto_preferences a:active * { + color: #222; +} +#pagination { + clear: both; +} +#pagination br { + clear: both; +} +#apis { + margin-top: 8px; + clear: both; +} +#backToTop { + border: 1px solid #ddd; + margin: 0 0 0 2em; + padding: 0; + font-size: 1em; + box-shadow: 0px 0px 5px #CCC; + background: white; + position: fixed; + bottom: 85px; + left: 50em; + transition: opacity 0.5s; + opacity: 0; +} +#backToTop a { + display: block; + margin: 0; + padding: 0.6em; +} +@media screen and (max-width: 75em) { + #main_preferences, + #main_about, + #main_stats { + margin: 0.5em; + width: auto; + } + #suggestions, + #answers { + margin-top: 1em; + } + #infoboxes { + position: inherit; + max-width: inherit; + } + #infoboxes .infobox { + clear: both; + } + #infoboxes .infobox img { + float: left; + max-width: 10em; + margin: 0.5em 0.5em 0.5em 0; + } + #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-bottom: 1px solid #E8E7E6; + margin: 0; + padding-top: 8px; + padding-bottom: 6px; + } + .result h3 { + margin: 0 0 1px 0; + } + .result .thumbnail { + max-width: 98%; + } + .result .url span.url { + display: block; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + width: 100%; + } + .result .url a { + float: right; + padding: 0 0.5em; + } + .result .engines { + float: right; + padding: 0 0 3px 0; + } + .result-images { + border-bottom: none !important; + } + .image_result { + max-width: 98%; + } + .image_result img { + max-width: 98%; + } +} +@media screen and (max-width: 50em) { + article[data-vim-selected]::before { + display: none; + content: ""; + } + #linkto_preferences { + display: none; + postion: fixed !important; + top: 100px; + right: 0px; + } + #sidebar { + margin: 0 5px 2px 5px; + } + #corrections { + margin: 1em 5px 1em 5px; + } + #results { + margin: 0; + padding: 0; + width: initial; + } + #backToTop { + left: 40em; + bottom: 35px; + } + .result { + padding: 8px 10px 6px 10px; + } + .result-images { + margin: 0; + padding: 0; + border: none; + } +} +@media screen and (max-width: 35em) { + .result-videos img.thumbnail { + float: none !important; + } + .result-videos .content { + overflow: inherit; + } +} +#search_submit { + left: 1px; + right: auto; +} diff --git a/searx/static/themes/simple/css/searx-rtl.min.css b/searx/static/themes/simple/css/searx-rtl.min.css new file mode 100644 index 00000000..16d03f1e --- /dev/null +++ b/searx/static/themes/simple/css/searx-rtl.min.css @@ -0,0 +1 @@ +/*! searx | 06-08-2017 | https://github.com/asciimoo/searx *//*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */button,hr,input{overflow:visible}audio,canvas,progress,video{display:inline-block}[type=checkbox],[type=radio],legend{padding:0;box-sizing:border-box}.badge,.center{text-align:center}.badge,progress,sub,sup{vertical-align:baseline}#q,#send_search,.tabs>section,legend{box-sizing:border-box}#apis,#pagination,#pagination br,#sidebar .infobox .attributes,#sidebar .infobox .urls,#sidebar .infobox br,.result .break,footer{clear:both}html{line-height:1.15}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}.highlight pre,textarea{overflow:auto}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:ButtonText dotted 1px}fieldset{padding:.35em .75em .625em}legend{color:inherit;display:table;max-width:100%;white-space:normal}.badge,.search_box{white-space:nowrap}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.highlight .c,.highlight .cm,.highlight .ge,.highlight .sd{font-style:italic}.dialog-error:before,.dialog-warning:before,.ion-icon-big:before,.ion-icon:before{font-family:ion}summary{display:list-item}.invisible,[hidden],html.js .show_if_nojs,html.no-js .hide_if_nojs,template{display:none}.highlight .hll{background-color:#ffc}.highlight .c{color:#408080}.highlight .err{border:1px solid red}.highlight .k{color:green;font-weight:700}.highlight .o{color:#666}.highlight .cm{color:#408080}.highlight .cp{color:#BC7A00}.highlight .c1,.highlight .cs{color:#408080;font-style:italic}.highlight .gd{color:#A00000}.highlight .gr{color:red}.highlight .gh{color:navy;font-weight:700}.highlight .gi{color:#00A000}.highlight .go{color:#888}.highlight .gp{color:navy;font-weight:700}.highlight .gs{font-weight:700}.highlight .gu{color:purple;font-weight:700}.highlight .gt{color:#04D}.highlight .kc,.highlight .kd,.highlight .kn{color:green;font-weight:700}.highlight .kp{color:green}.highlight .kr{color:green;font-weight:700}.highlight .kt{color:#B00040}.highlight .m{color:#666}.highlight .s{color:#BA2121}.highlight .na{color:#7D9029}.highlight .nb{color:green}.highlight .nc{color:#00F;font-weight:700}.highlight .no{color:#800}.highlight .nd{color:#A2F}.highlight .ni{color:#999;font-weight:700}.highlight .ne{color:#D2413A;font-weight:700}.highlight .nf{color:#00F}.highlight .nl{color:#A0A000}.highlight .nn{color:#00F;font-weight:700}.highlight .nt{color:green;font-weight:700}.highlight .nv{color:#19177C}.highlight .ow{color:#A2F;font-weight:700}.highlight .w{color:#bbb}.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#666}.highlight .s2,.highlight .sb,.highlight .sc{color:#BA2121}.highlight .sd{color:#BA2121}.highlight .se{color:#B62;font-weight:700}.highlight .sh{color:#BA2121}.highlight .si{color:#B68;font-weight:700}.highlight .sx{color:green}.highlight .sr{color:#B68}.highlight .s1{color:#BA2121}.highlight .ss{color:#19177C}.highlight .bp{color:green}.highlight .vc,.highlight .vg,.highlight .vi{color:#19177C}.highlight .il{color:#666}.highlight .lineno{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}#categories,.tabs>label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-touch-callout:none;-khtml-user-select:none}.btn-collapse,.tabs>label,select:focus,select:hover{cursor:pointer}.highlight .lineno::selection{background:0 0}.highlight .lineno::-moz-selection{background:0 0}.right{float:right}.left{float:left}.danger{background-color:#fae1e1}.badge{display:inline-block;color:#fff;background-color:#777;min-width:10px;padding:1px 5px;border-radius:5px}table{width:100%}table.striped tr{border-bottom:1px solid #ececec}th{padding:.4em}td{padding:0 4px}.dialog-error,.dialog-warning{width:70%;padding:1em 1em 1em 2.7em;text-align:left}tr:hover{background:#ececec}.dialog-error{position:relative;margin:0 8% 1em;border:1px solid #db3434;border-radius:4px;color:#db3434;background:#fae1e1}.dialog-error:before{position:absolute;top:.5em;left:.5em;font-size:1.5em;content:"\f110"}.dialog-error .close{float:right;position:relative;top:-3px;color:inherit;font-size:1.5em}.dialog-error ol,.dialog-error p,.dialog-error ul{margin:1px 0 0}.dialog-warning{position:relative;margin:0 8% 1em;border:1px solid #dbba34;border-radius:4px;color:#dbba34;background:#faf5e1}.dialog-warning:before{position:absolute;top:.5em;left:.5em;font-size:1.5em;content:"\f10f"}.dialog-warning .close{float:right;position:relative;top:-3px;color:inherit;font-size:1.5em}.dialog-warning ol,.dialog-warning p,.dialog-warning ul{margin:1px 0 0}.scrollx{overflow-x:auto;overflow-y:hidden;display:block;padding:0;margin:0;border:none}.tabs .tabs>label{font-size:90%}.tabs{display:-webkit-box;display:-moz-box;display:-webkit-flex;display:-ms-flexbox;display:flex;flex-wrap:wrap;width:100%;min-width:100%}.tabs>*{order:2}.tabs>input[type=radio]{display:none}.tabs>label{order:1;padding:.7em;margin:0 .7em;letter-spacing:.5px;text-transform:uppercase;border:solid #fff;border-width:0 0 2px;user-select:none}.tabs>label:hover{border-bottom:2px solid #084999}.tabs>section{min-width:100%;padding:.7rem 0;border-top:1px solid #000;display:none}.tabs>label:last-of-type{border-bottom:2px solid #084999;background:#3498DB;color:#FFF;font-weight:700;letter-spacing:-.1px}.tabs>section:last-of-type{display:block}html body .tabs>input:checked~section{display:none}html body .tabs>input:checked~label{position:inherited;background:inherit;border-bottom:2px solid transparent;font-weight:400;color:inherit}html body .tabs>input:checked~label:hover{border-bottom:2px solid #084999}html body .tabs>input:checked+label{border-bottom:2px solid #084999;background:#3498DB;color:#FFF;font-weight:700;letter-spacing:-.1px}html body .tabs>input:checked+label+section{display:block}select{height:28px;margin:0 1em 0 0;padding:2px 8px 2px 0!important;color:#222;font-size:12px;z-index:2}@supports ((background-position-x:100%) and ((appearance:none) or (-webkit-appearance:none) or (-moz-appearance:none))){select{appearance:none;-webkit-appearance:none;-moz-appearance:none;border:none;border-bottom:1px solid #d7d7d7;background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI1MTJweCIgaGVpZ2h0PSI1MTJweCIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDUxMiA1MTIiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTI4LDE5MiAyNTYsMzIwIDM4NCwxOTIiLz48L2c+PC9zdmc+Cg==) no-repeat;background-position-x:105%;background-size:2em;background-origin:content-box;outline:0}select:focus,select:hover{border-bottom:1px solid #3498DB}}@supports (border-radius:50px){.checkbox-onoff{display:inline-block;width:40px;height:10px;background:#dcdcdc;margin:8px auto;position:relative;border-radius:50px}.checkbox-onoff label{display:block;width:20px;height:20px;position:absolute;top:-5px;cursor:pointer;border-radius:50px;box-shadow:0 3px 5px 0 rgba(0,0,0,.3);transition:all .4s ease;left:27px;background-color:#3498DB}.checkbox-onoff input[type=checkbox]{visibility:hidden}.checkbox-onoff input[type=checkbox]:checked+label{left:-5px;background:#dcdcdc}}@supports (transform:rotate(-45deg)){.checkbox{width:20px;position:relative;margin:20px auto}.checkbox label{width:20px;height:20px;cursor:pointer;position:absolute;top:0;left:0;background:#fff;border-radius:4px;box-shadow:inset 0 1px 1px #fff,0 1px 4px rgba(0,0,0,.5)}.checkbox label:after{content:'';width:9px;height:5px;position:absolute;top:4px;left:4px;border:3px solid #333;border-top:none;border-right:none;background:0 0;opacity:0;transform:rotate(-45deg)}.checkbox input[type=checkbox]{visibility:hidden}.checkbox input[type=checkbox]:checked+label:after{border-color:#3498DB;opacity:1}.checkbox input[disabled]+label{background-color:transparent!important;box-shadow:none!important;cursor:inherit}.checkbox input:not(:checked):not([readonly]):not([disabled])+label:hover::after{opacity:.5}}#main_preferences form,.index .title,footer,main{width:100%}.autocomplete{position:absolute;max-height:0;overflow-y:hidden;text-align:left}#categories_container,#q,#send_search,.category{position:relative}.autocomplete:active,.autocomplete:focus,.autocomplete:hover{background-color:#fff}.autocomplete:empty{display:none}.autocomplete>ul{list-style-type:none;margin:0;padding:0}.autocomplete>ul>li{cursor:pointer;padding:5px 0 5px 10px}.autocomplete>ul>li.active,.autocomplete>ul>li:active,.autocomplete>ul>li:focus{background-color:#3498DB}.autocomplete>ul>li.active a:active,.autocomplete>ul>li.active a:focus,.autocomplete>ul>li.active a:hover,.autocomplete>ul>li:active a:active,.autocomplete>ul>li:active a:focus,.autocomplete>ul>li:active a:hover,.autocomplete>ul>li:focus a:active,.autocomplete>ul>li:focus a:focus,.autocomplete>ul>li:focus a:hover{text-decoration:none}.autocomplete>ul>li.locked{cursor:inherit}.autocomplete.open{display:block;background-color:#fff;border:1px solid #3498DB;max-height:500px;overflow-y:auto;z-index:100}.autocomplete.open:empty{display:none}.ion-icon,.ion-icon-big{display:inline-block;line-height:1;font-weight:400;font-style:normal;speak:none;text-decoration:inherit;text-transform:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:middle}@media screen and (max-width:50em){.tabs>label{width:100%}.autocomplete{bottom:0}.autocomplete>ul>li{padding:7px 0 7px 10px;border-bottom:1px solid #E8E7E6;text-align:left}}#main_preferences table td,.index{text-align:center}@font-face{font-family:ion;src:url(../fonts/ion.eot?94af7082ea096aefe3a7b6642834716e);src:url(../fonts/ion.eot?#iefix) format("embedded-opentype"),url(../fonts/ion.woff2?94af7082ea096aefe3a7b6642834716e) format("woff2"),url(../fonts/ion.woff?94af7082ea096aefe3a7b6642834716e) format("woff"),url(../fonts/ion.ttf?94af7082ea096aefe3a7b6642834716e) format("truetype"),url(../fonts/ion.svg?94af7082ea096aefe3a7b6642834716e#ion) format("svg");font-weight:400;font-style:normal}.ion-navicon-round:before{content:"\f101"}.ion-search:before{content:"\f102"}.ion-play:before{content:"\f103"}.ion-link:before{content:"\f104"}.ion-chevron-up:before{content:"\f105"}.ion-chevron-left:before{content:"\f106"}.ion-chevron-right:before{content:"\f107"}.ion-arrow-down-a:before{content:"\f108"}.ion-arrow-up-a:before{content:"\f109"}.ion-arrow-swap:before{content:"\f10a"}.ion-arrow-dropdown:before{content:"\f10b"}.ion-globe:before{content:"\f10c"}.ion-time:before{content:"\f10d"}.ion-location:before{content:"\f10e"}.ion-warning:before{content:"\f10f"}.ion-error:before{content:"\f110"}.ion-film-outline:before{content:"\f111"}.ion-music-note:before{content:"\f112"}.ion-more-vertical:before{content:"\f113"}.ion-magnet:before{content:"\f114"}.ion-icon-big{font-size:149%}.index .title{background:url(../img/searx.png) center no-repeat;min-height:80px}.index h1{font-size:5em;visibility:hidden}.index #search{margin:0 auto;background:inherit;border:inherit}.index .search_filters{display:block;margin:1em 0}.index .category label{padding:6px 10px;border-bottom:initial!important}@media screen and (max-width:75em){div.title h1{font-size:1em}.preferences_back{clear:both}}#main_preferences fieldset{margin:8px;border:none}#main_preferences legend{margin:0;padding:5px 0 0;display:block;float:left;width:300px}#main_preferences .value{margin:0;padding:0;float:left;width:15em}#main_preferences .description{margin:0;padding:5px 0 0;float:left;width:50%;color:#909090;font-size:90%}#main_preferences select{width:200px;font-size:inherit!important}#main_preferences table{border-collapse:collapse}#main_preferences .name,#main_preferences .shortcut{text-align:left}#main_preferences .preferences_back{background:#3498DB;color:#fff;border:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;cursor:pointer;display:inline-block;margin:2px 4px;padding:.5em}#main_preferences .preferences_back a{display:block;color:#FFF}#main_preferences .preferences_back a::first-letter{text-transform:uppercase}#search{padding:0 2em;margin:0;background:#f7f7f7;border-bottom:1px solid #d7d7d7}#search_wrapper{padding:10px 0}.search_box{margin:0 12px 0 0;display:inline-flex;flex-direction:row}#q,#send_search{display:block!important;border-collapse:separate;margin:0;padding:2px;height:2.2em;background:#FFF;border:1px solid #3498DB;border-radius:0;outline:0;color:#222;font-size:16px;z-index:2}#q{outline:0;padding-left:8px;padding-right:0!important;border-right:none;width:40em}#send_search{border-left:none;width:2.2em}#send_search:hover{cursor:pointer;background-color:#3498DB;color:#ECF0F1}.no-js #send_search{width:auto!important}.search_filters{display:inline-block;vertical-align:middle}@media screen and (max-width:75em){#categories{font-size:90%;clear:both}#categories .checkbox_container{margin:auto}html.touch #main_index #categories_container,html.touch #main_results #categories_container{width:1000px;width:-moz-max-content;width:-webkit-max-content;width:max-content}html.touch #main_index #categories_container .category,html.touch #main_results #categories_container .category{display:inline-block;width:auto}html.touch #main_index #categories,html.touch #main_results #categories{width:100%;margin:0;text-align:left;overflow-x:scroll;overflow-y:hidden;-webkit-overflow-scrolling:touch}}#search_url div,.result-videos .content{overflow:hidden}@media screen and (max-width:50em){#search{width:100%;margin:0;padding:.1em 0 0}#search_wrapper{width:100%;margin:0 0 .7em;padding:0}.search_box{width:99%;margin:.1em;padding:0 .1em 0 0;display:flex;flex-direction:row}#q{width:auto!important;flex:1}.search_filters{display:block;margin:.5em}.language,.time_range{width:45%}.category{display:block;width:90%}.category label{border-bottom:0}}#categories{margin:0 10px 0 0;user-select:none}#categories::-webkit-scrollbar{width:0;height:0}.category{display:inline-block;margin:0 3px;padding:0}.category input{display:none}.category label{cursor:pointer;padding:4px 10px;margin:0;display:block;text-transform:capitalize;font-size:.9em;border-bottom:2px solid transparent;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body,html,main{padding:0;margin:0}.category input[type=checkbox]:focus+label{box-shadow:0 0 8px #3498DB}.category input[type=checkbox]:checked+label{background:#3498DB;color:#FFF;border-bottom:2px solid #084999}#categories_container .help{position:absolute;width:100%;bottom:-20px;overflow:hidden;opacity:0;transition:opacity 1s ease;font-size:.8em;text-position:center;background:#fff}footer p,html{font-size:.9em}#categories_container:hover .help{opacity:.8;transition:opacity 1s ease}html{font-family:arial,sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;color:#444}#main_about,#main_preferences,#main_stats{margin:3em;width:auto}footer{bottom:0;height:3em;margin:1em 0;padding:1em 0;text-align:center}#main_preferences h1,#main_stats h1{background:url(../img/searx.png) no-repeat;background-size:auto 75%;min-height:40px;margin:0 auto}#main_preferences h1 span,#main_stats h1 span{visibility:hidden}#results button[type=submit],input[type=submit]{padding:.5rem;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}a{text-decoration:none;color:#29314d}a:visited,a:visited .highlight{color:#684898}article[data-vim-selected]{background:#f7f7f7}article[data-vim-selected]::before{position:absolute;left:1em;padding:2px;content:">";font-weight:700;color:#3498DB}article.result-images[data-vim-selected]{background:#3498DB}article.result-images[data-vim-selected]::before{display:none;content:""}.result{margin:19px 0 18px;padding:0}.result h3{font-size:1.1em;word-wrap:break-word;margin:5px 0 0;padding:0}.result h3 a{color:#084999;font-weight:400;font-size:1.1em}.result h3 a:visited{color:#684898}.result h3 a:focus,.result h3 a:hover{text-decoration:underline;border:none;-webkit-box-shadow:none;box-shadow:none;outline:0}.result .cache_link,.result .proxyfied_link{font-size:.9em!important}.result .altlink,.result .content,.result .stat,.result .url{font-size:.9em;padding:0;max-width:54em;word-wrap:break-word}.result .altlink,.result .content,.result .stat{margin:0;line-height:1.24}.result .altlink .highlight,.result .content .highlight,.result .stat .highlight{color:#000;background:inherit;font-weight:700}.result .codelines .highlight{color:inherit;background:inherit;font-weight:400}.result .url{margin:0 0 3px;color:#25a55b}.result .published_date{font-size:.8em;color:#888}.result img.thumbnail{float:left;padding:0 5px 10px 0;width:20em;min-width:20em;min-height:8em}.result img.image{float:left;padding:0 5px 10px 0;width:100px;max-height:100px;object-fit:scale-down;object-position:right top}.category-social .image{width:auto!important;min-width:48px;min-height:48px;padding:0 5px 25px 0!important}.engines{float:right;color:#888}.engines span{font-size:smaller;margin:0 .5em 0 0}.result-images,.result-images img{margin:0;padding:0;max-height:200px}.small_font{font-size:.8em}.highlight{color:#094089;background:inherit;font-weight:700}.result-images{display:inline-block;position:relative}.result-images img{float:inherit;border:none;background:#084999}.result-images span a{display:none;color:#FFF}.result-images:hover span a{display:block;position:absolute;bottom:0;right:0;padding:4px;margin:0 0 4px 4px;background-color:rgba(0,0,0,.6);font-size:.7em}.torrent_result{border-left:10px solid #d3d3d3;padding-left:3px}#answers,#backToTop,#sidebar .infobox{border:1px solid #ddd;box-shadow:0 0 5px #CCC}.torrent_result p{margin:3px;font-size:.8em}.torrent_result a{color:#084999}.torrent_result a:hover{text-decoration:underline}.torrent_result a:visited{color:#684898}#results{margin:2em 2em 20px;padding:0;width:50em}#suggestions .wrapper{display:flex;flex-flow:row wrap;justify-content:flex-end}#suggestions .wrapper form{display:inline-block;flex:1 1 50%}#answers,#corrections,#suggestions{max-width:50em}#answers input,#corrections input,#infoboxes input,#suggestions input{padding:0;margin:3px;font-size:.9em;display:inline-block;background:0 0;color:#444;cursor:pointer}#answers .infobox .url a,#answers input[type=submit],#corrections .infobox .url a,#corrections input[type=submit],#infoboxes .infobox .url a,#infoboxes input[type=submit],#suggestions .infobox .url a,#suggestions input[type=submit]{color:#084999;text-decoration:none;font-size:.9rem}#answers .infobox .url a:hover,#answers input[type=submit]:hover,#corrections .infobox .url a:hover,#corrections input[type=submit]:hover,#infoboxes .infobox .url a:hover,#infoboxes input[type=submit]:hover,#suggestions .infobox .url a:hover,#suggestions input[type=submit]:hover{text-decoration:underline}#corrections{display:flex;flex-flow:row wrap;margin:1em 0}#corrections h4,#corrections input[type=submit]{display:inline-block;margin:0 .5em 0 0}#corrections input[type=submit]::after{content:", "}#apis .title,#search_url .title,#suggestions .title{margin:2em 0 .5em;color:#444}#answers{margin:10px 8px;padding:.9em}#answers h4{display:none}#answers .answer{display:block;font-size:1.2em;font-weight:700}#answers form,#infoboxes form{min-width:210px}#sidebar{position:absolute;top:100px;left:57em;margin:0 2px 5px 5px;padding:0 2px 2px;max-width:25em;word-wrap:break-word}#sidebar .infobox{margin:10px 0;padding:.9em;font-size:.9em}#sidebar .infobox h2{margin:0 0 .5em}#sidebar .infobox img{max-width:100%;max-height:12em;display:block;margin:0;padding:0}#sidebar .infobox dl{margin:.5em 0}#sidebar .infobox dt{display:inline;margin:.5em .25em .5em 0;padding:0;font-weight:700}#sidebar .infobox dd{display:inline;margin:.5em 0;padding:0}#apis,#search_url{margin-top:8px}#sidebar .infobox input{font-size:1em}#search_url div{border:1px solid #888;padding:4px;color:#444;width:100%;display:block;margin:.1em;height:1.2em;line-height:1.2em}#search_url div pre{display:block;width:200em;font-size:.8em;word-break:break-all;margin:.1em;-webkit-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all}#linkto_preferences{position:absolute;right:10px;top:.9em;padding:0;border:0;display:block;font-size:1.2em;color:#222}#linkto_preferences a:active *,#linkto_preferences a:hover *,#linkto_preferences a:link *,#linkto_preferences a:visited *{color:#222}#backToTop{margin:0 0 0 2em;padding:0;font-size:1em;background:#fff;position:fixed;bottom:85px;left:50em;transition:opacity .5s;opacity:0}#backToTop a{display:block;margin:0;padding:.6em}@media screen and (max-width:75em){#main_about,#main_preferences,#main_stats{margin:.5em;width:auto}#answers,#suggestions{margin-top:1em}#infoboxes{position:inherit;max-width:inherit}#infoboxes .infobox{clear:both}#infoboxes .infobox img{float:left;max-width:10em;margin:.5em .5em .5em 0}#sidebar{position:static;max-width:50em;margin:0 0 2px;padding:0;float:none;border:none;width:auto}.image_result,.image_result img,.result .thumbnail{max-width:98%}#sidebar input{border:0}#apis,#search_url{display:none}.result{border-bottom:1px solid #E8E7E6;margin:0;padding-top:8px;padding-bottom:6px}.result h3{margin:0 0 1px}.result .url span.url{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;width:100%}.result .url a{float:right;padding:0 .5em}.result .engines{float:right;padding:0 0 3px}.result-images{border-bottom:none!important}}@media screen and (max-width:50em){article[data-vim-selected]::before{display:none;content:""}#linkto_preferences{display:none;postion:fixed!important;top:100px;right:0}#sidebar{margin:0 5px 2px}#corrections{margin:1em 5px}#results{margin:0;padding:0;width:initial}#backToTop{left:40em;bottom:35px}.result{padding:8px 10px 6px}.result-images{margin:0;padding:0;border:none}}@media screen and (max-width:35em){.result-videos img.thumbnail{float:none!important}.result-videos .content{overflow:inherit}}#search_submit{left:1px;right:auto} \ No newline at end of file diff --git a/searx/static/themes/simple/css/searx.css b/searx/static/themes/simple/css/searx.css new file mode 100644 index 00000000..b276bc59 --- /dev/null +++ b/searx/static/themes/simple/css/searx.css @@ -0,0 +1,2045 @@ +/*! searx | 06-08-2017 | https://github.com/asciimoo/searx */ +/* +* searx, A privacy-respecting, hackable metasearch engine +* +* To convert "style.less" to "style.css" run: $make styles +*/ +/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */ +/* Document + ========================================================================== */ +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in + * IE on Windows Phone and in iOS. + */ +html { + line-height: 1.15; + /* 1 */ + -ms-text-size-adjust: 100%; + /* 2 */ + -webkit-text-size-adjust: 100%; + /* 2 */ +} +/* Sections + ========================================================================== */ +/** + * Remove the margin in all browsers (opinionated). + */ +body { + margin: 0; +} +/** + * Add the correct display in IE 9-. + */ +article, +aside, +footer, +header, +nav, +section { + display: block; +} +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ +h1 { + font-size: 2em; + margin: 0.67em 0; +} +/* Grouping content + ========================================================================== */ +/** + * Add the correct display in IE 9-. + * 1. Add the correct display in IE. + */ +figcaption, +figure, +main { + /* 1 */ + display: block; +} +/** + * Add the correct margin in IE 8. + */ +figure { + margin: 1em 40px; +} +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ +hr { + box-sizing: content-box; + /* 1 */ + height: 0; + /* 1 */ + overflow: visible; + /* 2 */ +} +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ +pre { + font-family: monospace, monospace; + /* 1 */ + font-size: 1em; + /* 2 */ +} +/* Text-level semantics + ========================================================================== */ +/** + * 1. Remove the gray background on active links in IE 10. + * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. + */ +a { + background-color: transparent; + /* 1 */ + -webkit-text-decoration-skip: objects; + /* 2 */ +} +/** + * 1. Remove the bottom border in Chrome 57- and Firefox 39-. + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ +abbr[title] { + border-bottom: none; + /* 1 */ + text-decoration: underline; + /* 2 */ + text-decoration: underline dotted; + /* 2 */ +} +/** + * Prevent the duplicate application of `bolder` by the next rule in Safari 6. + */ +b, +strong { + font-weight: inherit; +} +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ +b, +strong { + font-weight: bolder; +} +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ +code, +kbd, +samp { + font-family: monospace, monospace; + /* 1 */ + font-size: 1em; + /* 2 */ +} +/** + * Add the correct font style in Android 4.3-. + */ +dfn { + font-style: italic; +} +/** + * Add the correct background and color in IE 9-. + */ +mark { + background-color: #ff0; + color: #000; +} +/** + * Add the correct font size in all browsers. + */ +small { + font-size: 80%; +} +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} +sub { + bottom: -0.25em; +} +sup { + top: -0.5em; +} +/* Embedded content + ========================================================================== */ +/** + * Add the correct display in IE 9-. + */ +audio, +video { + display: inline-block; +} +/** + * Add the correct display in iOS 4-7. + */ +audio:not([controls]) { + display: none; + height: 0; +} +/** + * Remove the border on images inside links in IE 10-. + */ +img { + border-style: none; +} +/** + * Hide the overflow in IE. + */ +svg:not(:root) { + overflow: hidden; +} +/* Forms + ========================================================================== */ +/** + * 1. Change the font styles in all browsers (opinionated). + * 2. Remove the margin in Firefox and Safari. + */ +button, +input, +optgroup, +select, +textarea { + font-family: sans-serif; + /* 1 */ + font-size: 100%; + /* 1 */ + line-height: 1.15; + /* 1 */ + margin: 0; + /* 2 */ +} +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ +button, +input { + /* 1 */ + overflow: visible; +} +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ +button, +select { + /* 1 */ + text-transform: none; +} +/** + * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` + * controls in Android 4. + * 2. Correct the inability to style clickable types in iOS and Safari. + */ +button, +html [type="button"], +[type="reset"], +[type="submit"] { + -webkit-appearance: button; + /* 2 */ +} +/** + * Remove the inner border and padding in Firefox. + */ +button::-moz-focus-inner, +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; +} +/** + * Restore the focus styles unset by the previous rule. + */ +button:-moz-focusring, +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; +} +/** + * Correct the padding in Firefox. + */ +fieldset { + padding: 0.35em 0.75em 0.625em; +} +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ +legend { + box-sizing: border-box; + /* 1 */ + color: inherit; + /* 2 */ + display: table; + /* 1 */ + max-width: 100%; + /* 1 */ + padding: 0; + /* 3 */ + white-space: normal; + /* 1 */ +} +/** + * 1. Add the correct display in IE 9-. + * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ +progress { + display: inline-block; + /* 1 */ + vertical-align: baseline; + /* 2 */ +} +/** + * Remove the default vertical scrollbar in IE. + */ +textarea { + overflow: auto; +} +/** + * 1. Add the correct box sizing in IE 10-. + * 2. Remove the padding in IE 10-. + */ +[type="checkbox"], +[type="radio"] { + box-sizing: border-box; + /* 1 */ + padding: 0; + /* 2 */ +} +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ +[type="search"] { + -webkit-appearance: textfield; + /* 1 */ + outline-offset: -2px; + /* 2 */ +} +/** + * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. + */ +[type="search"]::-webkit-search-cancel-button, +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ +::-webkit-file-upload-button { + -webkit-appearance: button; + /* 1 */ + font: inherit; + /* 2 */ +} +/* Interactive + ========================================================================== */ +/* + * Add the correct display in IE 9-. + * 1. Add the correct display in Edge, IE, and Firefox. + */ +details, +menu { + display: block; +} +/* + * Add the correct display in all browsers. + */ +summary { + display: list-item; +} +/* Scripting + ========================================================================== */ +/** + * Add the correct display in IE 9-. + */ +canvas { + display: inline-block; +} +/** + * Add the correct display in IE. + */ +template { + display: none; +} +/* Hidden + ========================================================================== */ +/** + * Add the correct display in IE 10-. + */ +[hidden] { + display: none; +} +/* + * searx, A privacy-respecting, hackable metasearch engine + * + * To change the colors of the site, simple edit this variables + */ +/* +* searx, A privacy-respecting, hackable metasearch engine +*/ +.highlight .hll { + background-color: #ffffcc; +} +.highlight { + background: #f8f8f8; +} +.highlight .c { + color: #408080; + font-style: italic; +} +/* Comment */ +.highlight .err { + border: 1px solid #FF0000; +} +/* Error */ +.highlight .k { + color: #008000; + font-weight: bold; +} +/* Keyword */ +.highlight .o { + color: #666666; +} +/* Operator */ +.highlight .cm { + color: #408080; + font-style: italic; +} +/* Comment.Multiline */ +.highlight .cp { + color: #BC7A00; +} +/* Comment.Preproc */ +.highlight .c1 { + color: #408080; + font-style: italic; +} +/* Comment.Single */ +.highlight .cs { + color: #408080; + font-style: italic; +} +/* Comment.Special */ +.highlight .gd { + color: #A00000; +} +/* Generic.Deleted */ +.highlight .ge { + font-style: italic; +} +/* Generic.Emph */ +.highlight .gr { + color: #FF0000; +} +/* Generic.Error */ +.highlight .gh { + color: #000080; + font-weight: bold; +} +/* Generic.Heading */ +.highlight .gi { + color: #00A000; +} +/* Generic.Inserted */ +.highlight .go { + color: #888888; +} +/* Generic.Output */ +.highlight .gp { + color: #000080; + font-weight: bold; +} +/* Generic.Prompt */ +.highlight .gs { + font-weight: bold; +} +/* Generic.Strong */ +.highlight .gu { + color: #800080; + font-weight: bold; +} +/* Generic.Subheading */ +.highlight .gt { + color: #0044DD; +} +/* Generic.Traceback */ +.highlight .kc { + color: #008000; + font-weight: bold; +} +/* Keyword.Constant */ +.highlight .kd { + color: #008000; + font-weight: bold; +} +/* Keyword.Declaration */ +.highlight .kn { + color: #008000; + font-weight: bold; +} +/* Keyword.Namespace */ +.highlight .kp { + color: #008000; +} +/* Keyword.Pseudo */ +.highlight .kr { + color: #008000; + font-weight: bold; +} +/* Keyword.Reserved */ +.highlight .kt { + color: #B00040; +} +/* Keyword.Type */ +.highlight .m { + color: #666666; +} +/* Literal.Number */ +.highlight .s { + color: #BA2121; +} +/* Literal.String */ +.highlight .na { + color: #7D9029; +} +/* Name.Attribute */ +.highlight .nb { + color: #008000; +} +/* Name.Builtin */ +.highlight .nc { + color: #0000FF; + font-weight: bold; +} +/* Name.Class */ +.highlight .no { + color: #880000; +} +/* Name.Constant */ +.highlight .nd { + color: #AA22FF; +} +/* Name.Decorator */ +.highlight .ni { + color: #999999; + font-weight: bold; +} +/* Name.Entity */ +.highlight .ne { + color: #D2413A; + font-weight: bold; +} +/* Name.Exception */ +.highlight .nf { + color: #0000FF; +} +/* Name.Function */ +.highlight .nl { + color: #A0A000; +} +/* Name.Label */ +.highlight .nn { + color: #0000FF; + font-weight: bold; +} +/* Name.Namespace */ +.highlight .nt { + color: #008000; + font-weight: bold; +} +/* Name.Tag */ +.highlight .nv { + color: #19177C; +} +/* Name.Variable */ +.highlight .ow { + color: #AA22FF; + font-weight: bold; +} +/* Operator.Word */ +.highlight .w { + color: #bbbbbb; +} +/* Text.Whitespace */ +.highlight .mf { + color: #666666; +} +/* Literal.Number.Float */ +.highlight .mh { + color: #666666; +} +/* Literal.Number.Hex */ +.highlight .mi { + color: #666666; +} +/* Literal.Number.Integer */ +.highlight .mo { + color: #666666; +} +/* Literal.Number.Oct */ +.highlight .sb { + color: #BA2121; +} +/* Literal.String.Backtick */ +.highlight .sc { + color: #BA2121; +} +/* Literal.String.Char */ +.highlight .sd { + color: #BA2121; + font-style: italic; +} +/* Literal.String.Doc */ +.highlight .s2 { + color: #BA2121; +} +/* Literal.String.Double */ +.highlight .se { + color: #BB6622; + font-weight: bold; +} +/* Literal.String.Escape */ +.highlight .sh { + color: #BA2121; +} +/* Literal.String.Heredoc */ +.highlight .si { + color: #BB6688; + font-weight: bold; +} +/* Literal.String.Interpol */ +.highlight .sx { + color: #008000; +} +/* Literal.String.Other */ +.highlight .sr { + color: #BB6688; +} +/* Literal.String.Regex */ +.highlight .s1 { + color: #BA2121; +} +/* Literal.String.Single */ +.highlight .ss { + color: #19177C; +} +/* Literal.String.Symbol */ +.highlight .bp { + color: #008000; +} +/* Name.Builtin.Pseudo */ +.highlight .vc { + color: #19177C; +} +/* Name.Variable.Class */ +.highlight .vg { + color: #19177C; +} +/* Name.Variable.Global */ +.highlight .vi { + color: #19177C; +} +/* Name.Variable.Instance */ +.highlight .il { + color: #666666; +} +/* Literal.Number.Integer.Long */ +.highlight pre { + overflow: auto; +} +.highlight .lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: default; +} +.highlight .lineno::selection { + background: transparent; + /* WebKit/Blink Browsers */ +} +.highlight .lineno::-moz-selection { + background: transparent; + /* Gecko Browsers */ +} +html.no-js .hide_if_nojs { + display: none; +} +html.js .show_if_nojs { + display: none; +} +.center { + text-align: center; +} +.right { + float: right ; +} +.left { + float: left; +} +.invisible { + display: none; +} +.danger { + background-color: #fae1e1; +} +.badge { + display: inline-block; + color: #fff; + background-color: #777; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + min-width: 10px; + padding: 1px 5px; + border-radius: 5px; +} +table { + width: 100%; +} +table.striped tr { + border-bottom: 1px solid #ececec; +} +th { + padding: 0.4em; +} +td { + padding: 0 4px; +} +tr:hover { + background: #ececec; +} +.dialog-error { + position: relative; + width: 70%; + padding: 1em 1em 1em 2.7em; + margin: 0em 8% 1em 8%; + border: 1px solid black; + border-radius: 4px; + text-align: left; + color: #db3434; + background: #fae1e1; + border-color: #db3434; +} +.dialog-error:before { + position: absolute; + top: 0.5em; + left: 0.5em; + font-family: "ion"; + font-size: 1.5em; +} +.dialog-error .close { + float: right; + position: relative; + top: -3px; + color: inherit; + font-size: 1.5em; +} +.dialog-error ul, +.dialog-error ol, +.dialog-error p { + margin: 1px 0 0 0; +} +.dialog-error:before { + content: "\f110"; +} +.dialog-warning { + position: relative; + width: 70%; + padding: 1em 1em 1em 2.7em; + margin: 0em 8% 1em 8%; + border: 1px solid black; + border-radius: 4px; + text-align: left; + color: #dbba34; + background: #faf5e1; + border-color: #dbba34; +} +.dialog-warning:before { + position: absolute; + top: 0.5em; + left: 0.5em; + font-family: "ion"; + font-size: 1.5em; +} +.dialog-warning .close { + float: right; + position: relative; + top: -3px; + color: inherit; + font-size: 1.5em; +} +.dialog-warning ul, +.dialog-warning ol, +.dialog-warning p { + margin: 1px 0 0 0; +} +.dialog-warning:before { + content: "\f10f"; +} +.btn-collapse { + cursor: pointer; +} +.scrollx { + overflow-x: auto; + overflow-y: hidden; + display: block; + padding: 0; + margin: 0; + border: none; +} +.tabs .tabs > label { + font-size: 90%; +} +.tabs { + display: -webkit-box; + display: -moz-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + flex-wrap: wrap; + width: 100%; + min-width: 100%; +} +.tabs > * { + order: 2; +} +.tabs > input[type=radio] { + display: none; +} +.tabs > label { + order: 1; + padding: 0.7em; + margin: 0 0.7em; + letter-spacing: 0.5px; + text-transform: uppercase; + border: solid white; + border-width: 0px 0px 2px 0; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; +} +.tabs > label:hover { + border-bottom: 2px solid #084999; +} +.tabs > section { + min-width: 100%; + padding: 0.7rem 0; + box-sizing: border-box; + border-top: 1px solid black; + display: none; +} +.tabs > label:last-of-type { + border-bottom: 2px solid #084999; + background: #3498DB; + color: #FFF; + font-weight: bold; + letter-spacing: -0.1px; +} +.tabs > section:last-of-type { + display: block; +} +html body .tabs > input:checked ~ section { + display: none; +} +html body .tabs > input:checked ~ label { + position: inherited; + background: inherit; + border-bottom: 2px solid transparent; + font-weight: normal; + color: inherit; +} +html body .tabs > input:checked ~ label:hover { + border-bottom: 2px solid #084999; +} +html body .tabs > input:checked + label { + border-bottom: 2px solid #084999; + background: #3498DB; + color: #FFF; + font-weight: bold; + letter-spacing: -0.1px; +} +html body .tabs > input:checked + label + section { + display: block; +} +select { + height: 28px; + margin: 0 1em 0 0; + padding: 2px 8px 2px 0 !important; + color: #222; + font-size: 12px; + z-index: 2; +} +select:hover, +select:focus { + cursor: pointer; +} +@supports ((background-position-x: 100%) and ((appearance: none) or (-webkit-appearance: none) or (-moz-appearance: none))) { + select { + appearance: none; + -webkit-appearance: none; + -moz-appearance: none; + border: none; + border-bottom: 1px solid #d7d7d7; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI1MTJweCIgaGVpZ2h0PSI1MTJweCIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDUxMiA1MTIiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTI4LDE5MiAyNTYsMzIwIDM4NCwxOTIiLz48L2c+PC9zdmc+Cg==) no-repeat; + background-position-x: 105%; + background-size: 2em; + background-origin: content-box; + outline: medium none; + } + select:hover, + select:focus { + border-bottom: 1px solid #3498DB; + } +} +@supports (border-radius: 50px) { + .checkbox-onoff { + display: inline-block; + width: 40px; + height: 10px; + background: #dcdcdc; + margin: 8px auto; + position: relative; + border-radius: 50px; + } + .checkbox-onoff label { + display: block; + width: 20px; + height: 20px; + position: absolute; + top: -5px; + cursor: pointer; + border-radius: 50px; + box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.3); + transition: all 0.4s ease; + left: 27px; + background-color: #3498DB; + } + .checkbox-onoff input[type=checkbox] { + visibility: hidden; + } + .checkbox-onoff input[type=checkbox]:checked + label { + left: -5px; + background: #dcdcdc; + } +} +@supports (transform: rotate(-45deg)) { + .checkbox { + width: 20px; + position: relative; + margin: 20px auto; + } + .checkbox label { + width: 20px; + height: 20px; + cursor: pointer; + position: absolute; + top: 0; + left: 0; + background: white; + border-radius: 4px; + box-shadow: inset 0px 1px 1px white, 0px 1px 4px rgba(0, 0, 0, 0.5); + } + .checkbox label:after { + content: ''; + width: 9px; + height: 5px; + position: absolute; + top: 4px; + left: 4px; + border: 3px solid #333; + border-top: none; + border-right: none; + background: transparent; + opacity: 0; + transform: rotate(-45deg); + } + .checkbox input[type=checkbox] { + visibility: hidden; + } + .checkbox input[type=checkbox]:checked + label:after { + border-color: #3498DB; + opacity: 1; + } + .checkbox input[disabled] + label { + background-color: transparent !important; + box-shadow: none !important; + cursor: inherit; + } + .checkbox input:not(:checked):not([readonly]):not([disabled]) + label:hover::after { + opacity: 0.5; + } +} +@media screen and (max-width: 50em) { + .tabs > label { + width: 100%; + } +} +.autocomplete { + position: absolute; + max-height: 0; + overflow-y: hidden; + text-align: left; +} +.autocomplete:active, +.autocomplete:focus, +.autocomplete:hover { + background-color: white; +} +.autocomplete:empty { + display: none; +} +.autocomplete > ul { + list-style-type: none; + margin: 0; + padding: 0; +} +.autocomplete > ul > li { + cursor: pointer; + padding: 5px 0 5px 10px; +} +.autocomplete > ul > li.active, +.autocomplete > ul > li:active, +.autocomplete > ul > li:focus { + background-color: #3498DB; +} +.autocomplete > ul > li.active a:active, +.autocomplete > ul > li:active a:active, +.autocomplete > ul > li:focus a:active, +.autocomplete > ul > li.active a:focus, +.autocomplete > ul > li:active a:focus, +.autocomplete > ul > li:focus a:focus, +.autocomplete > ul > li.active a:hover, +.autocomplete > ul > li:active a:hover, +.autocomplete > ul > li:focus a:hover { + text-decoration: none; +} +.autocomplete > ul > li.locked { + cursor: inherit; +} +.autocomplete.open { + display: block; + background-color: white; + border: 1px solid #3498DB; + max-height: 500px; + overflow-y: auto; + z-index: 100; +} +.autocomplete.open:empty { + display: none; +} +@media screen and (max-width: 50em) { + .autocomplete { + bottom: 0; + } + .autocomplete > ul > li { + padding: 7px 0 7px 10px; + border-bottom: 1px solid #E8E7E6; + text-align: left; + } +} +@font-face { + font-family: "ion"; + src: url("../fonts/ion.eot?94af7082ea096aefe3a7b6642834716e"); + src: url("../fonts/ion.eot?#iefix") format("embedded-opentype"), url("../fonts/ion.woff2?94af7082ea096aefe3a7b6642834716e") format("woff2"), url("../fonts/ion.woff?94af7082ea096aefe3a7b6642834716e") format("woff"), url("../fonts/ion.ttf?94af7082ea096aefe3a7b6642834716e") format("truetype"), url("../fonts/ion.svg?94af7082ea096aefe3a7b6642834716e#ion") format("svg"); + font-weight: normal; + font-style: normal; +} +.ion-icon { + display: inline-block; + vertical-align: middle; + line-height: 1; + font-weight: normal; + font-style: normal; + speak: none; + text-decoration: inherit; + text-transform: none; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.ion-icon:before { + font-family: "ion"; +} +.ion-navicon-round:before { + content: "\f101"; +} +.ion-search:before { + content: "\f102"; +} +.ion-play:before { + content: "\f103"; +} +.ion-link:before { + content: "\f104"; +} +.ion-chevron-up:before { + content: "\f105"; +} +.ion-chevron-left:before { + content: "\f106"; +} +.ion-chevron-right:before { + content: "\f107"; +} +.ion-arrow-down-a:before { + content: "\f108"; +} +.ion-arrow-up-a:before { + content: "\f109"; +} +.ion-arrow-swap:before { + content: "\f10a"; +} +.ion-arrow-dropdown:before { + content: "\f10b"; +} +.ion-globe:before { + content: "\f10c"; +} +.ion-time:before { + content: "\f10d"; +} +.ion-location:before { + content: "\f10e"; +} +.ion-warning:before { + content: "\f10f"; +} +.ion-error:before { + content: "\f110"; +} +.ion-film-outline:before { + content: "\f111"; +} +.ion-music-note:before { + content: "\f112"; +} +.ion-more-vertical:before { + content: "\f113"; +} +.ion-magnet:before { + content: "\f114"; +} +.ion-icon-big { + display: inline-block; + vertical-align: middle; + line-height: 1; + font-weight: normal; + font-style: normal; + speak: none; + text-decoration: inherit; + text-transform: none; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-size: 149%; +} +.ion-icon-big:before { + font-family: "ion"; +} +.index { + text-align: center; +} +.index .title { + background: url('../img/searx.png') no-repeat; + width: 100%; + min-height: 80px; + background-position: center; +} +.index h1 { + font-size: 5em; + visibility: hidden; +} +.index #search { + margin: 0 auto; + background: inherit; + border: inherit; +} +.index .search_filters { + display: block; + margin: 1em 0; +} +.index .category label { + padding: 6px 10px; + border-bottom: initial !important; +} +@media screen and (max-width: 75em) { + div.title h1 { + font-size: 1em; + } +} +#main_preferences form { + width: 100%; +} +#main_preferences fieldset { + margin: 8px; + border: none; +} +#main_preferences legend { + margin: 0; + padding: 5px 0 0 0; + display: block; + float: left; + width: 300px; +} +#main_preferences .value { + margin: 0; + padding: 0; + float: left; + width: 15em; +} +#main_preferences .description { + margin: 0; + padding: 5px 0 0 0; + float: left; + width: 50%; + color: #909090; + font-size: 90%; +} +#main_preferences select { + width: 200px; + font-size: inherit !important; +} +#main_preferences table { + border-collapse: collapse; +} +#main_preferences table td { + text-align: center; +} +#main_preferences .name, +#main_preferences .shortcut { + text-align: left; +} +#main_preferences .preferences_back { + background: none repeat scroll 0 0 #3498DB; + color: white; + border: 0 none; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + cursor: pointer; + display: inline-block; + margin: 2px 4px; + padding: 0.5em; +} +#main_preferences .preferences_back a { + display: block; + color: #FFF; +} +#main_preferences .preferences_back a::first-letter { + text-transform: uppercase; +} +@media screen and (max-width: 75em) { + .preferences_back { + clear: both; + } +} +/* +* searx, A privacy-respecting, hackable metasearch engine +*/ +#search { + padding: 0 2em; + margin: 0; + background: #f7f7f7; + border-bottom: 1px solid #d7d7d7; +} +#search_wrapper { + padding: 10px 0; +} +.search_box { + margin: 0 12px 0 0; + display: inline-flex; + flex-direction: row; + white-space: nowrap; + /* + &:has(q:focus) { + box-shadow: 0px 0px 5px #CCC; +} +*/ +} +#q, +#send_search { + display: block !important; + border-collapse: separate; + box-sizing: border-box; + position: relative; + margin: 0; + padding: 2px; + height: 2.2em; + background: none repeat scroll 0 0 #FFF; + border: 1px solid #3498DB; + border-radius: 0px; + outline: none; + color: #222; + font-size: 16px; + z-index: 2; +} +#q { + outline: medium none; + padding-left: 8px; + padding-right: 0px !important; + border-right: none; + width: 40em; +} +#send_search { + border-left: none; + width: 2.2em; +} +#send_search:hover { + cursor: pointer; + background-color: #3498DB; + color: #ECF0F1; +} +.no-js #send_search { + width: auto !important; +} +.search_filters { + display: inline-block; + vertical-align: middle; +} +@media screen and (max-width: 75em) { + #categories { + font-size: 90%; + clear: both; + } + #categories .checkbox_container { + margin-top: 2px; + margin: auto; + } + html.touch #main_index #categories_container, + html.touch #main_results #categories_container { + width: 1000px; + width: -moz-max-content; + width: -webkit-max-content; + width: max-content; + } + html.touch #main_index #categories_container .category, + html.touch #main_results #categories_container .category { + display: inline-block; + width: auto; + } + html.touch #main_index #categories, + html.touch #main_results #categories { + width: 100%; + margin: 0; + text-align: left; + overflow-x: scroll; + overflow-y: hidden; + -webkit-overflow-scrolling: touch; + } +} +@media screen and (max-width: 50em) { + #search { + width: 100%; + margin: 0; + padding: 0.1em 0 0 0; + } + #search_wrapper { + width: 100%; + margin: 0 0 0.7em 0; + padding: 0; + } + .search_box { + width: 99%; + margin: 0.1em; + padding: 0 0.1em 0 0; + display: flex; + flex-direction: row; + } + #q { + width: auto !important; + flex: 1; + } + .search_filters { + display: block; + margin: 0.5em; + } + .language, + .time_range { + width: 45%; + } + .category { + display: block; + width: 90%; + } + .category label { + border-bottom: 0; + } +} +#categories { + margin: 0 10px 0 0; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +#categories::-webkit-scrollbar { + width: 0; + height: 0; +} +.category { + display: inline-block; + position: relative; + margin: 0 3px; + padding: 0px; + /*label:hover { + border-bottom: 2px solid @color-categories-item-border-unselected-hover; + }*/ +} +.category input { + display: none; +} +.category label { + cursor: pointer; + padding: 4px 10px; + margin: 0; + display: block; + text-transform: capitalize; + font-size: 0.9em; + border-bottom: 2px solid transparent; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.category input[type="checkbox"]:focus + label { + box-shadow: 0px 0px 8px #3498DB; +} +.category input[type="checkbox"]:checked + label { + background: #3498DB; + color: #FFF; + border-bottom: 2px solid #084999; +} +#categories_container { + position: relative; +} +#categories_container .help { + position: absolute; + width: 100%; + bottom: -20px; + overflow: hidden; + opacity: 0; + transition: opacity 1s ease; + font-size: 0.8em; + text-position: center; + background: white; +} +#categories_container:hover .help { + opacity: 0.8; + transition: opacity 1s ease; +} +html { + font-family: arial, sans-serif; + font-size: 0.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, +main { + padding: 0; + margin: 0; +} +main { + width: 100%; +} +footer { + bottom: 0; + width: 100%; + height: 50px; +} +#main_preferences, +#main_about, +#main_stats { + margin: 3em; + width: auto; +} +footer { + bottom: 0; + height: 3em; + margin: 1em 0; + padding: 1em 0; + clear: both; + width: 100%; + text-align: center; +} +footer p { + font-size: 0.9em; +} +#main_preferences h1, +#main_stats h1 { + background: url('../img/searx.png') no-repeat; + background-size: auto 75%; + min-height: 40px; + margin: 0 auto; +} +#main_preferences h1 span, +#main_stats h1 span { + visibility: hidden; +} +input[type="submit"], +#results button[type="submit"] { + padding: 0.5rem; + 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; +} +a { + text-decoration: none; + color: #29314d; +} +a:visited { + color: #684898; +} +a:visited .highlight { + color: #684898; +} +article[data-vim-selected] { + background: #f7f7f7; +} +article[data-vim-selected]::before { + position: absolute; + left: 1em; + padding: 2px; + content: ">"; + font-weight: bold; + color: #3498DB; +} +article.result-images[data-vim-selected] { + background: #3498DB; +} +article.result-images[data-vim-selected]::before { + display: none; + content: ""; +} +.result { + margin: 19px 0 18px 0; + padding: 0; +} +.result h3 { + font-size: 1.1em; + word-wrap: break-word; + margin: 5px 0 1px 0; + padding: 0; + margin-bottom: 0; +} +.result h3 a { + color: #084999; + font-weight: normal; + font-size: 1.1em; +} +.result h3 a:visited { + color: #684898; +} +.result h3 a:focus, +.result h3 a:hover { + text-decoration: underline; + border: none; + -webkit-box-shadow: none; + box-shadow: none; + outline: none; +} +.result .cache_link, +.result .proxyfied_link { + font-size: 0.9em !important; +} +.result .content, +.result .stat, +.result .altlink { + font-size: 0.9em; + margin: 0; + padding: 0; + max-width: 54em; + word-wrap: break-word; + line-height: 1.24; +} +.result .content .highlight, +.result .stat .highlight, +.result .altlink .highlight { + color: #000000; + background: inherit; + font-weight: bold; +} +.result .codelines .highlight { + color: inherit; + background: inherit; + font-weight: normal; +} +.result .url { + font-size: 0.9em; + margin: 0 0 3px 0; + padding: 0; + max-width: 54em; + word-wrap: break-word; + color: #25a55b; +} +.result .published_date { + font-size: 0.8em; + color: #888; +} +.result img.thumbnail { + float: left; + padding: 0 5px 10px 0; + width: 20em; + min-width: 20em; + min-height: 8em; +} +.result img.image { + float: left; + padding: 0 5px 10px 0; + width: 100px; + max-height: 100px; + object-fit: scale-down; + object-position: right top; +} +.result .break { + clear: both; +} +.category-social .image { + width: auto !important; + min-width: 48px; + min-height: 48px; + padding: 0 5px 25px 0 !important; +} +.result-videos .content { + overflow: hidden; +} +.engines { + float: right; + color: #888; +} +.engines span { + font-size: smaller; + margin: 0 0.5em 0 0; +} +.small_font { + font-size: 0.8em; +} +.highlight { + color: #094089; + background: inherit; + font-weight: bold; +} +.result-images { + display: inline-block; + margin: 0; + padding: 0; + position: relative; + max-height: 200px; +} +.result-images img { + float: inherit; + margin: 0; + padding: 0; + border: none; + max-height: 200px; + background: #084999; +} +.result-images span a { + display: none; + color: #FFF; +} +.result-images:hover span a { + display: block; + position: absolute; + bottom: 0; + right: 0; + padding: 4px; + margin: 0 0 4px 4px; + background-color: rgba(0, 0, 0, 0.6); + font-size: 0.7em; +} +.torrent_result { + border-left: 10px solid lightgray; + padding-left: 3px; +} +.torrent_result p { + margin: 3px; + font-size: 0.8em; +} +.torrent_result a { + color: #084999; +} +.torrent_result a:hover { + text-decoration: underline; +} +.torrent_result a:visited { + color: #684898; +} +#results { + margin: 2em 2em 20px 2em; + padding: 0; + width: 50em; +} +#suggestions .wrapper { + display: flex; + flex-flow: row wrap; + justify-content: flex-end; +} +#suggestions .wrapper form { + display: inline-block; + flex: 1 1 50%; +} +#suggestions, +#answers, +#corrections { + max-width: 50em; +} +#suggestions input, +#answers input, +#infoboxes input, +#corrections input { + padding: 0; + margin: 3px; + font-size: 0.9em; + display: inline-block; + background: transparent; + color: #444; + cursor: pointer; +} +#suggestions input[type="submit"], +#answers input[type="submit"], +#infoboxes input[type="submit"], +#corrections input[type="submit"], +#suggestions .infobox .url a, +#answers .infobox .url a, +#infoboxes .infobox .url a, +#corrections .infobox .url a { + color: #084999; + text-decoration: none; + font-size: 0.9rem; +} +#suggestions input[type="submit"]:hover, +#answers input[type="submit"]:hover, +#infoboxes input[type="submit"]:hover, +#corrections input[type="submit"]:hover, +#suggestions .infobox .url a:hover, +#answers .infobox .url a:hover, +#infoboxes .infobox .url a:hover, +#corrections .infobox .url a:hover { + text-decoration: underline; +} +#corrections { + display: flex; + flex-flow: row wrap; + margin: 1em 0; +} +#corrections h4, +#corrections input[type="submit"] { + display: inline-block; + margin: 0 0.5em 0 0; +} +#corrections input[type="submit"]::after { + content: ", "; +} +#suggestions .title, +#search_url .title, +#apis .title { + margin: 2em 0 0.5em 0; + color: #444; +} +#answers { + margin: 10px 8px 10px 8px; + border: 1px solid #ddd; + padding: 0.9em; + box-shadow: 0px 0px 5px #CCC; +} +#answers h4 { + display: none; +} +#answers .answer { + display: block; + font-size: 1.2em; + font-weight: bold; +} +#answers form, +#infoboxes form { + min-width: 210px; +} +#sidebar { + position: absolute; + top: 100px; + left: 57em; + margin: 0px 2px 5px 5px; + padding: 0px 2px 2px; + max-width: 25em; + word-wrap: break-word; +} +#sidebar .infobox { + margin: 10px 0 10px; + border: 1px solid #ddd; + padding: 0.9em; + font-size: 0.9em; + box-shadow: 0px 0px 5px #CCC; +} +#sidebar .infobox h2 { + margin: 0 0 .5em 0; +} +#sidebar .infobox img { + max-width: 100%; + max-height: 12em; + display: block; + margin: 0; + padding: 0; +} +#sidebar .infobox dl { + margin: 0.5em 0; +} +#sidebar .infobox dt { + display: inline; + margin: 0.5em 0.25em 0.5em 0; + padding: 0; + font-weight: bold; +} +#sidebar .infobox dd { + display: inline; + margin: 0.5em 0; + padding: 0; +} +#sidebar .infobox input { + font-size: 1em; +} +#sidebar .infobox br { + clear: both; +} +#sidebar .infobox .attributes, +#sidebar .infobox .urls { + clear: both; +} +#search_url { + margin-top: 8px; +} +#search_url div { + border: 1px solid #888; + padding: 4px; + color: #444; + width: 100%; + display: block; + margin: 0.1em; + overflow: hidden; + height: 1.2em; + line-height: 1.2em; +} +#search_url div pre { + display: block; + width: 200em; + font-size: 0.8em; + word-break: break-all; + margin: 0.1em; + -webkit-user-select: all; + -moz-user-select: all; + -ms-user-select: all; + user-select: all; +} +#linkto_preferences { + position: absolute; + right: 10px; + top: 0.9em; + padding: 0; + border: 0; + display: block; + font-size: 1.2em; + color: #222; +} +#linkto_preferences a:link *, +#linkto_preferences a:hover *, +#linkto_preferences a:visited *, +#linkto_preferences a:active * { + color: #222; +} +#pagination { + clear: both; +} +#pagination br { + clear: both; +} +#apis { + margin-top: 8px; + clear: both; +} +#backToTop { + border: 1px solid #ddd; + margin: 0 0 0 2em; + padding: 0; + font-size: 1em; + box-shadow: 0px 0px 5px #CCC; + background: white; + position: fixed; + bottom: 85px; + left: 50em; + transition: opacity 0.5s; + opacity: 0; +} +#backToTop a { + display: block; + margin: 0; + padding: 0.6em; +} +@media screen and (max-width: 75em) { + #main_preferences, + #main_about, + #main_stats { + margin: 0.5em; + width: auto; + } + #suggestions, + #answers { + margin-top: 1em; + } + #infoboxes { + position: inherit; + max-width: inherit; + } + #infoboxes .infobox { + clear: both; + } + #infoboxes .infobox img { + float: left; + max-width: 10em; + margin: 0.5em 0.5em 0.5em 0; + } + #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-bottom: 1px solid #E8E7E6; + margin: 0; + padding-top: 8px; + padding-bottom: 6px; + } + .result h3 { + margin: 0 0 1px 0; + } + .result .thumbnail { + max-width: 98%; + } + .result .url span.url { + display: block; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + width: 100%; + } + .result .url a { + float: right; + padding: 0 0.5em; + } + .result .engines { + float: right; + padding: 0 0 3px 0; + } + .result-images { + border-bottom: none !important; + } + .image_result { + max-width: 98%; + } + .image_result img { + max-width: 98%; + } +} +@media screen and (max-width: 50em) { + article[data-vim-selected]::before { + display: none; + content: ""; + } + #linkto_preferences { + display: none; + postion: fixed !important; + top: 100px; + right: 0px; + } + #sidebar { + margin: 0 5px 2px 5px; + } + #corrections { + margin: 1em 5px 1em 5px; + } + #results { + margin: 0; + padding: 0; + width: initial; + } + #backToTop { + left: 40em; + bottom: 35px; + } + .result { + padding: 8px 10px 6px 10px; + } + .result-images { + margin: 0; + padding: 0; + border: none; + } +} +@media screen and (max-width: 35em) { + .result-videos img.thumbnail { + float: none !important; + } + .result-videos .content { + overflow: inherit; + } +} diff --git a/searx/static/themes/simple/css/searx.min.css b/searx/static/themes/simple/css/searx.min.css new file mode 100644 index 00000000..0513de2b --- /dev/null +++ b/searx/static/themes/simple/css/searx.min.css @@ -0,0 +1 @@ +/*! searx | 06-08-2017 | https://github.com/asciimoo/searx *//*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */button,hr,input{overflow:visible}audio,canvas,progress,video{display:inline-block}[type=checkbox],[type=radio],legend{padding:0;box-sizing:border-box}.badge,.center{text-align:center}.badge,progress,sub,sup{vertical-align:baseline}#q,#send_search,.tabs>section,legend{box-sizing:border-box}#apis,#pagination,#pagination br,#sidebar .infobox .attributes,#sidebar .infobox .urls,#sidebar .infobox br,.result .break,footer{clear:both}html{line-height:1.15}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}.highlight pre,textarea{overflow:auto}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:ButtonText dotted 1px}fieldset{padding:.35em .75em .625em}legend{color:inherit;display:table;max-width:100%;white-space:normal}.badge,.search_box{white-space:nowrap}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.highlight .c,.highlight .cm,.highlight .ge,.highlight .sd{font-style:italic}.dialog-error:before,.dialog-warning:before,.ion-icon-big:before,.ion-icon:before{font-family:ion}summary{display:list-item}.invisible,[hidden],html.js .show_if_nojs,html.no-js .hide_if_nojs,template{display:none}.highlight .hll{background-color:#ffc}.highlight .c{color:#408080}.highlight .err{border:1px solid red}.highlight .k{color:green;font-weight:700}.highlight .o{color:#666}.highlight .cm{color:#408080}.highlight .cp{color:#BC7A00}.highlight .c1,.highlight .cs{color:#408080;font-style:italic}.highlight .gd{color:#A00000}.highlight .gr{color:red}.highlight .gh{color:navy;font-weight:700}.highlight .gi{color:#00A000}.highlight .go{color:#888}.highlight .gp{color:navy;font-weight:700}.highlight .gs{font-weight:700}.highlight .gu{color:purple;font-weight:700}.highlight .gt{color:#04D}.highlight .kc,.highlight .kd,.highlight .kn{color:green;font-weight:700}.highlight .kp{color:green}.highlight .kr{color:green;font-weight:700}.highlight .kt{color:#B00040}.highlight .m{color:#666}.highlight .s{color:#BA2121}.highlight .na{color:#7D9029}.highlight .nb{color:green}.highlight .nc{color:#00F;font-weight:700}.highlight .no{color:#800}.highlight .nd{color:#A2F}.highlight .ni{color:#999;font-weight:700}.highlight .ne{color:#D2413A;font-weight:700}.highlight .nf{color:#00F}.highlight .nl{color:#A0A000}.highlight .nn{color:#00F;font-weight:700}.highlight .nt{color:green;font-weight:700}.highlight .nv{color:#19177C}.highlight .ow{color:#A2F;font-weight:700}.highlight .w{color:#bbb}.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo{color:#666}.highlight .s2,.highlight .sb,.highlight .sc{color:#BA2121}.highlight .sd{color:#BA2121}.highlight .se{color:#B62;font-weight:700}.highlight .sh{color:#BA2121}.highlight .si{color:#B68;font-weight:700}.highlight .sx{color:green}.highlight .sr{color:#B68}.highlight .s1{color:#BA2121}.highlight .ss{color:#19177C}.highlight .bp{color:green}.highlight .vc,.highlight .vg,.highlight .vi{color:#19177C}.highlight .il{color:#666}.highlight .lineno{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}#categories,.tabs>label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-touch-callout:none;-khtml-user-select:none}.btn-collapse,.tabs>label,select:focus,select:hover{cursor:pointer}.highlight .lineno::selection{background:0 0}.highlight .lineno::-moz-selection{background:0 0}.right{float:right}.left{float:left}.danger{background-color:#fae1e1}.badge{display:inline-block;color:#fff;background-color:#777;min-width:10px;padding:1px 5px;border-radius:5px}table{width:100%}table.striped tr{border-bottom:1px solid #ececec}th{padding:.4em}td{padding:0 4px}.dialog-error,.dialog-warning{width:70%;padding:1em 1em 1em 2.7em;text-align:left}tr:hover{background:#ececec}.dialog-error{position:relative;margin:0 8% 1em;border:1px solid #db3434;border-radius:4px;color:#db3434;background:#fae1e1}.dialog-error:before{position:absolute;top:.5em;left:.5em;font-size:1.5em;content:"\f110"}.dialog-error .close{float:right;position:relative;top:-3px;color:inherit;font-size:1.5em}.dialog-error ol,.dialog-error p,.dialog-error ul{margin:1px 0 0}.dialog-warning{position:relative;margin:0 8% 1em;border:1px solid #dbba34;border-radius:4px;color:#dbba34;background:#faf5e1}.dialog-warning:before{position:absolute;top:.5em;left:.5em;font-size:1.5em;content:"\f10f"}.dialog-warning .close{float:right;position:relative;top:-3px;color:inherit;font-size:1.5em}.dialog-warning ol,.dialog-warning p,.dialog-warning ul{margin:1px 0 0}.scrollx{overflow-x:auto;overflow-y:hidden;display:block;padding:0;margin:0;border:none}.tabs .tabs>label{font-size:90%}.tabs{display:-webkit-box;display:-moz-box;display:-webkit-flex;display:-ms-flexbox;display:flex;flex-wrap:wrap;width:100%;min-width:100%}.tabs>*{order:2}.tabs>input[type=radio]{display:none}.tabs>label{order:1;padding:.7em;margin:0 .7em;letter-spacing:.5px;text-transform:uppercase;border:solid #fff;border-width:0 0 2px;user-select:none}.tabs>label:hover{border-bottom:2px solid #084999}.tabs>section{min-width:100%;padding:.7rem 0;border-top:1px solid #000;display:none}.tabs>label:last-of-type{border-bottom:2px solid #084999;background:#3498DB;color:#FFF;font-weight:700;letter-spacing:-.1px}.tabs>section:last-of-type{display:block}html body .tabs>input:checked~section{display:none}html body .tabs>input:checked~label{position:inherited;background:inherit;border-bottom:2px solid transparent;font-weight:400;color:inherit}html body .tabs>input:checked~label:hover{border-bottom:2px solid #084999}html body .tabs>input:checked+label{border-bottom:2px solid #084999;background:#3498DB;color:#FFF;font-weight:700;letter-spacing:-.1px}html body .tabs>input:checked+label+section{display:block}select{height:28px;margin:0 1em 0 0;padding:2px 8px 2px 0!important;color:#222;font-size:12px;z-index:2}@supports ((background-position-x:100%) and ((appearance:none) or (-webkit-appearance:none) or (-moz-appearance:none))){select{appearance:none;-webkit-appearance:none;-moz-appearance:none;border:none;border-bottom:1px solid #d7d7d7;background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI1MTJweCIgaGVpZ2h0PSI1MTJweCIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDUxMiA1MTIiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTI4LDE5MiAyNTYsMzIwIDM4NCwxOTIiLz48L2c+PC9zdmc+Cg==) no-repeat;background-position-x:105%;background-size:2em;background-origin:content-box;outline:0}select:focus,select:hover{border-bottom:1px solid #3498DB}}@supports (border-radius:50px){.checkbox-onoff{display:inline-block;width:40px;height:10px;background:#dcdcdc;margin:8px auto;position:relative;border-radius:50px}.checkbox-onoff label{display:block;width:20px;height:20px;position:absolute;top:-5px;cursor:pointer;border-radius:50px;box-shadow:0 3px 5px 0 rgba(0,0,0,.3);transition:all .4s ease;left:27px;background-color:#3498DB}.checkbox-onoff input[type=checkbox]{visibility:hidden}.checkbox-onoff input[type=checkbox]:checked+label{left:-5px;background:#dcdcdc}}@supports (transform:rotate(-45deg)){.checkbox{width:20px;position:relative;margin:20px auto}.checkbox label{width:20px;height:20px;cursor:pointer;position:absolute;top:0;left:0;background:#fff;border-radius:4px;box-shadow:inset 0 1px 1px #fff,0 1px 4px rgba(0,0,0,.5)}.checkbox label:after{content:'';width:9px;height:5px;position:absolute;top:4px;left:4px;border:3px solid #333;border-top:none;border-right:none;background:0 0;opacity:0;transform:rotate(-45deg)}.checkbox input[type=checkbox]{visibility:hidden}.checkbox input[type=checkbox]:checked+label:after{border-color:#3498DB;opacity:1}.checkbox input[disabled]+label{background-color:transparent!important;box-shadow:none!important;cursor:inherit}.checkbox input:not(:checked):not([readonly]):not([disabled])+label:hover::after{opacity:.5}}#main_preferences form,.index .title,footer,main{width:100%}.autocomplete{position:absolute;max-height:0;overflow-y:hidden;text-align:left}#categories_container,#q,#send_search,.category{position:relative}.autocomplete:active,.autocomplete:focus,.autocomplete:hover{background-color:#fff}.autocomplete:empty{display:none}.autocomplete>ul{list-style-type:none;margin:0;padding:0}.autocomplete>ul>li{cursor:pointer;padding:5px 0 5px 10px}.autocomplete>ul>li.active,.autocomplete>ul>li:active,.autocomplete>ul>li:focus{background-color:#3498DB}.autocomplete>ul>li.active a:active,.autocomplete>ul>li.active a:focus,.autocomplete>ul>li.active a:hover,.autocomplete>ul>li:active a:active,.autocomplete>ul>li:active a:focus,.autocomplete>ul>li:active a:hover,.autocomplete>ul>li:focus a:active,.autocomplete>ul>li:focus a:focus,.autocomplete>ul>li:focus a:hover{text-decoration:none}.autocomplete>ul>li.locked{cursor:inherit}.autocomplete.open{display:block;background-color:#fff;border:1px solid #3498DB;max-height:500px;overflow-y:auto;z-index:100}.autocomplete.open:empty{display:none}.ion-icon,.ion-icon-big{display:inline-block;line-height:1;font-weight:400;font-style:normal;speak:none;text-decoration:inherit;text-transform:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:middle}@media screen and (max-width:50em){.tabs>label{width:100%}.autocomplete{bottom:0}.autocomplete>ul>li{padding:7px 0 7px 10px;border-bottom:1px solid #E8E7E6;text-align:left}}#main_preferences table td,.index{text-align:center}@font-face{font-family:ion;src:url(../fonts/ion.eot?94af7082ea096aefe3a7b6642834716e);src:url(../fonts/ion.eot?#iefix) format("embedded-opentype"),url(../fonts/ion.woff2?94af7082ea096aefe3a7b6642834716e) format("woff2"),url(../fonts/ion.woff?94af7082ea096aefe3a7b6642834716e) format("woff"),url(../fonts/ion.ttf?94af7082ea096aefe3a7b6642834716e) format("truetype"),url(../fonts/ion.svg?94af7082ea096aefe3a7b6642834716e#ion) format("svg");font-weight:400;font-style:normal}.ion-navicon-round:before{content:"\f101"}.ion-search:before{content:"\f102"}.ion-play:before{content:"\f103"}.ion-link:before{content:"\f104"}.ion-chevron-up:before{content:"\f105"}.ion-chevron-left:before{content:"\f106"}.ion-chevron-right:before{content:"\f107"}.ion-arrow-down-a:before{content:"\f108"}.ion-arrow-up-a:before{content:"\f109"}.ion-arrow-swap:before{content:"\f10a"}.ion-arrow-dropdown:before{content:"\f10b"}.ion-globe:before{content:"\f10c"}.ion-time:before{content:"\f10d"}.ion-location:before{content:"\f10e"}.ion-warning:before{content:"\f10f"}.ion-error:before{content:"\f110"}.ion-film-outline:before{content:"\f111"}.ion-music-note:before{content:"\f112"}.ion-more-vertical:before{content:"\f113"}.ion-magnet:before{content:"\f114"}.ion-icon-big{font-size:149%}.index .title{background:url(../img/searx.png) center no-repeat;min-height:80px}.index h1{font-size:5em;visibility:hidden}.index #search{margin:0 auto;background:inherit;border:inherit}.index .search_filters{display:block;margin:1em 0}.index .category label{padding:6px 10px;border-bottom:initial!important}@media screen and (max-width:75em){div.title h1{font-size:1em}.preferences_back{clear:both}}#main_preferences fieldset{margin:8px;border:none}#main_preferences legend{margin:0;padding:5px 0 0;display:block;float:left;width:300px}#main_preferences .value{margin:0;padding:0;float:left;width:15em}#main_preferences .description{margin:0;padding:5px 0 0;float:left;width:50%;color:#909090;font-size:90%}#main_preferences select{width:200px;font-size:inherit!important}#main_preferences table{border-collapse:collapse}#main_preferences .name,#main_preferences .shortcut{text-align:left}#main_preferences .preferences_back{background:#3498DB;color:#fff;border:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;cursor:pointer;display:inline-block;margin:2px 4px;padding:.5em}#main_preferences .preferences_back a{display:block;color:#FFF}#main_preferences .preferences_back a::first-letter{text-transform:uppercase}#search{padding:0 2em;margin:0;background:#f7f7f7;border-bottom:1px solid #d7d7d7}#search_wrapper{padding:10px 0}.search_box{margin:0 12px 0 0;display:inline-flex;flex-direction:row}#q,#send_search{display:block!important;border-collapse:separate;margin:0;padding:2px;height:2.2em;background:#FFF;border:1px solid #3498DB;border-radius:0;outline:0;color:#222;font-size:16px;z-index:2}#q{outline:0;padding-left:8px;padding-right:0!important;border-right:none;width:40em}#send_search{border-left:none;width:2.2em}#send_search:hover{cursor:pointer;background-color:#3498DB;color:#ECF0F1}.no-js #send_search{width:auto!important}.search_filters{display:inline-block;vertical-align:middle}@media screen and (max-width:75em){#categories{font-size:90%;clear:both}#categories .checkbox_container{margin:auto}html.touch #main_index #categories_container,html.touch #main_results #categories_container{width:1000px;width:-moz-max-content;width:-webkit-max-content;width:max-content}html.touch #main_index #categories_container .category,html.touch #main_results #categories_container .category{display:inline-block;width:auto}html.touch #main_index #categories,html.touch #main_results #categories{width:100%;margin:0;text-align:left;overflow-x:scroll;overflow-y:hidden;-webkit-overflow-scrolling:touch}}#search_url div,.result-videos .content{overflow:hidden}@media screen and (max-width:50em){#search{width:100%;margin:0;padding:.1em 0 0}#search_wrapper{width:100%;margin:0 0 .7em;padding:0}.search_box{width:99%;margin:.1em;padding:0 .1em 0 0;display:flex;flex-direction:row}#q{width:auto!important;flex:1}.search_filters{display:block;margin:.5em}.language,.time_range{width:45%}.category{display:block;width:90%}.category label{border-bottom:0}}#categories{margin:0 10px 0 0;user-select:none}#categories::-webkit-scrollbar{width:0;height:0}.category{display:inline-block;margin:0 3px;padding:0}.category input{display:none}.category label{cursor:pointer;padding:4px 10px;margin:0;display:block;text-transform:capitalize;font-size:.9em;border-bottom:2px solid transparent;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body,html,main{padding:0;margin:0}.category input[type=checkbox]:focus+label{box-shadow:0 0 8px #3498DB}.category input[type=checkbox]:checked+label{background:#3498DB;color:#FFF;border-bottom:2px solid #084999}#categories_container .help{position:absolute;width:100%;bottom:-20px;overflow:hidden;opacity:0;transition:opacity 1s ease;font-size:.8em;text-position:center;background:#fff}footer p,html{font-size:.9em}#categories_container:hover .help{opacity:.8;transition:opacity 1s ease}html{font-family:arial,sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;color:#444}#main_about,#main_preferences,#main_stats{margin:3em;width:auto}footer{bottom:0;height:3em;margin:1em 0;padding:1em 0;text-align:center}#main_preferences h1,#main_stats h1{background:url(../img/searx.png) no-repeat;background-size:auto 75%;min-height:40px;margin:0 auto}#main_preferences h1 span,#main_stats h1 span{visibility:hidden}#results button[type=submit],input[type=submit]{padding:.5rem;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}a{text-decoration:none;color:#29314d}a:visited,a:visited .highlight{color:#684898}article[data-vim-selected]{background:#f7f7f7}article[data-vim-selected]::before{position:absolute;left:1em;padding:2px;content:">";font-weight:700;color:#3498DB}article.result-images[data-vim-selected]{background:#3498DB}article.result-images[data-vim-selected]::before{display:none;content:""}.result{margin:19px 0 18px;padding:0}.result h3{font-size:1.1em;word-wrap:break-word;margin:5px 0 0;padding:0}.result h3 a{color:#084999;font-weight:400;font-size:1.1em}.result h3 a:visited{color:#684898}.result h3 a:focus,.result h3 a:hover{text-decoration:underline;border:none;-webkit-box-shadow:none;box-shadow:none;outline:0}.result .cache_link,.result .proxyfied_link{font-size:.9em!important}.result .altlink,.result .content,.result .stat,.result .url{font-size:.9em;padding:0;max-width:54em;word-wrap:break-word}.result .altlink,.result .content,.result .stat{margin:0;line-height:1.24}.result .altlink .highlight,.result .content .highlight,.result .stat .highlight{color:#000;background:inherit;font-weight:700}.result .codelines .highlight{color:inherit;background:inherit;font-weight:400}.result .url{margin:0 0 3px;color:#25a55b}.result .published_date{font-size:.8em;color:#888}.result img.thumbnail{float:left;padding:0 5px 10px 0;width:20em;min-width:20em;min-height:8em}.result img.image{float:left;padding:0 5px 10px 0;width:100px;max-height:100px;object-fit:scale-down;object-position:right top}.category-social .image{width:auto!important;min-width:48px;min-height:48px;padding:0 5px 25px 0!important}.engines{float:right;color:#888}.engines span{font-size:smaller;margin:0 .5em 0 0}.result-images,.result-images img{margin:0;padding:0;max-height:200px}.small_font{font-size:.8em}.highlight{color:#094089;background:inherit;font-weight:700}.result-images{display:inline-block;position:relative}.result-images img{float:inherit;border:none;background:#084999}.result-images span a{display:none;color:#FFF}.result-images:hover span a{display:block;position:absolute;bottom:0;right:0;padding:4px;margin:0 0 4px 4px;background-color:rgba(0,0,0,.6);font-size:.7em}.torrent_result{border-left:10px solid #d3d3d3;padding-left:3px}#answers,#backToTop,#sidebar .infobox{border:1px solid #ddd;box-shadow:0 0 5px #CCC}.torrent_result p{margin:3px;font-size:.8em}.torrent_result a{color:#084999}.torrent_result a:hover{text-decoration:underline}.torrent_result a:visited{color:#684898}#results{margin:2em 2em 20px;padding:0;width:50em}#suggestions .wrapper{display:flex;flex-flow:row wrap;justify-content:flex-end}#suggestions .wrapper form{display:inline-block;flex:1 1 50%}#answers,#corrections,#suggestions{max-width:50em}#answers input,#corrections input,#infoboxes input,#suggestions input{padding:0;margin:3px;font-size:.9em;display:inline-block;background:0 0;color:#444;cursor:pointer}#answers .infobox .url a,#answers input[type=submit],#corrections .infobox .url a,#corrections input[type=submit],#infoboxes .infobox .url a,#infoboxes input[type=submit],#suggestions .infobox .url a,#suggestions input[type=submit]{color:#084999;text-decoration:none;font-size:.9rem}#answers .infobox .url a:hover,#answers input[type=submit]:hover,#corrections .infobox .url a:hover,#corrections input[type=submit]:hover,#infoboxes .infobox .url a:hover,#infoboxes input[type=submit]:hover,#suggestions .infobox .url a:hover,#suggestions input[type=submit]:hover{text-decoration:underline}#corrections{display:flex;flex-flow:row wrap;margin:1em 0}#corrections h4,#corrections input[type=submit]{display:inline-block;margin:0 .5em 0 0}#corrections input[type=submit]::after{content:", "}#apis .title,#search_url .title,#suggestions .title{margin:2em 0 .5em;color:#444}#answers{margin:10px 8px;padding:.9em}#answers h4{display:none}#answers .answer{display:block;font-size:1.2em;font-weight:700}#answers form,#infoboxes form{min-width:210px}#sidebar{position:absolute;top:100px;left:57em;margin:0 2px 5px 5px;padding:0 2px 2px;max-width:25em;word-wrap:break-word}#sidebar .infobox{margin:10px 0;padding:.9em;font-size:.9em}#sidebar .infobox h2{margin:0 0 .5em}#sidebar .infobox img{max-width:100%;max-height:12em;display:block;margin:0;padding:0}#sidebar .infobox dl{margin:.5em 0}#sidebar .infobox dt{display:inline;margin:.5em .25em .5em 0;padding:0;font-weight:700}#sidebar .infobox dd{display:inline;margin:.5em 0;padding:0}#apis,#search_url{margin-top:8px}#sidebar .infobox input{font-size:1em}#search_url div{border:1px solid #888;padding:4px;color:#444;width:100%;display:block;margin:.1em;height:1.2em;line-height:1.2em}#search_url div pre{display:block;width:200em;font-size:.8em;word-break:break-all;margin:.1em;-webkit-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all}#linkto_preferences{position:absolute;right:10px;top:.9em;padding:0;border:0;display:block;font-size:1.2em;color:#222}#linkto_preferences a:active *,#linkto_preferences a:hover *,#linkto_preferences a:link *,#linkto_preferences a:visited *{color:#222}#backToTop{margin:0 0 0 2em;padding:0;font-size:1em;background:#fff;position:fixed;bottom:85px;left:50em;transition:opacity .5s;opacity:0}#backToTop a{display:block;margin:0;padding:.6em}@media screen and (max-width:75em){#main_about,#main_preferences,#main_stats{margin:.5em;width:auto}#answers,#suggestions{margin-top:1em}#infoboxes{position:inherit;max-width:inherit}#infoboxes .infobox{clear:both}#infoboxes .infobox img{float:left;max-width:10em;margin:.5em .5em .5em 0}#sidebar{position:static;max-width:50em;margin:0 0 2px;padding:0;float:none;border:none;width:auto}.image_result,.image_result img,.result .thumbnail{max-width:98%}#sidebar input{border:0}#apis,#search_url{display:none}.result{border-bottom:1px solid #E8E7E6;margin:0;padding-top:8px;padding-bottom:6px}.result h3{margin:0 0 1px}.result .url span.url{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;width:100%}.result .url a{float:right;padding:0 .5em}.result .engines{float:right;padding:0 0 3px}.result-images{border-bottom:none!important}}@media screen and (max-width:50em){article[data-vim-selected]::before{display:none;content:""}#linkto_preferences{display:none;postion:fixed!important;top:100px;right:0}#sidebar{margin:0 5px 2px}#corrections{margin:1em 5px}#results{margin:0;padding:0;width:initial}#backToTop{left:40em;bottom:35px}.result{padding:8px 10px 6px}.result-images{margin:0;padding:0;border:none}}@media screen and (max-width:35em){.result-videos img.thumbnail{float:none!important}.result-videos .content{overflow:inherit}} \ No newline at end of file diff --git a/searx/static/themes/simple/fonts/ion.css b/searx/static/themes/simple/fonts/ion.css new file mode 100644 index 00000000..b1b599a1 --- /dev/null +++ b/searx/static/themes/simple/fonts/ion.css @@ -0,0 +1,134 @@ +/* Generated by grunt-webfont */ + + +@font-face { + font-family:"ion"; + src:url("../fonts/ion.eot?94af7082ea096aefe3a7b6642834716e"); + src:url("../fonts/ion.eot?#iefix") format("embedded-opentype"), + url("../fonts/ion.woff2?94af7082ea096aefe3a7b6642834716e") format("woff2"), + url("../fonts/ion.woff?94af7082ea096aefe3a7b6642834716e") format("woff"), + url("../fonts/ion.ttf?94af7082ea096aefe3a7b6642834716e") format("truetype"), + url("../fonts/ion.svg?94af7082ea096aefe3a7b6642834716e#ion") format("svg"); + font-weight:normal; + font-style:normal; +} + +.ion-icon { + + font-family:"ion"; + + display:inline-block; + vertical-align:middle; + line-height:1; + font-weight:normal; + font-style:normal; + speak:none; + text-decoration:inherit; + text-transform:none; + text-rendering:auto; + -webkit-font-smoothing:antialiased; + -moz-osx-font-smoothing:grayscale; +} + + +/* Icons */ + + +.ion-navicon-round:before { + content:"\f101"; +} + + +.ion-search:before { + content:"\f102"; +} + + +.ion-play:before { + content:"\f103"; +} + + +.ion-link:before { + content:"\f104"; +} + + +.ion-chevron-up:before { + content:"\f105"; +} + + +.ion-chevron-left:before { + content:"\f106"; +} + + +.ion-chevron-right:before { + content:"\f107"; +} + + +.ion-arrow-down-a:before { + content:"\f108"; +} + + +.ion-arrow-up-a:before { + content:"\f109"; +} + + +.ion-arrow-swap:before { + content:"\f10a"; +} + + +.ion-arrow-dropdown:before { + content:"\f10b"; +} + + +.ion-globe:before { + content:"\f10c"; +} + + +.ion-time:before { + content:"\f10d"; +} + + +.ion-location:before { + content:"\f10e"; +} + + +.ion-warning:before { + content:"\f10f"; +} + + +.ion-error:before { + content:"\f110"; +} + + +.ion-film-outline:before { + content:"\f111"; +} + + +.ion-music-note:before { + content:"\f112"; +} + + +.ion-more-vertical:before { + content:"\f113"; +} + + +.ion-magnet:before { + content:"\f114"; +} diff --git a/searx/static/themes/simple/fonts/ion.eot b/searx/static/themes/simple/fonts/ion.eot new file mode 100644 index 0000000000000000000000000000000000000000..f4fc07ec6f741f338b544b79d36167537e910ec2 GIT binary patch literal 3796 zcmds4eP~F>q&b0*0U2wc~7z>=fjdBTawe-iQ=x_N0ZdBHkg51E4KW>Y)Qy+ zl7@u|l0OOyn_*-y*udK#>u5uo7zX(LrRmxPtPnDtKfO`N8%q)9h*5-H^7Hq1K@|KUzjhhRNHMr z0xd|qGQaf3+`Shc{FwR|hz%~3inGplZv27zKBAgiAOZg_{)4cXe(%C^{fzQ&eueno zvi_yYOflFM{uzxQCO*AfJX3`^xK90yH_FB3(g*+Y+yrobk7Vbnm6iG_^CyJu`jYst zwKv*d-F>wEx@Y7waCYo}=lJ2>G#;$h*WSeYxK6BMyN8C-z24r0WJe$GTS#okRuL?T z4j0LGtT08iWCb!cD*^}j2t*Pe#W~`?ZnvL7H(b~r15Ej`+lii-dvO+;5Ak6To9!kf zX>A6HnV+_b0Z0@27|SN6TA*v1Y7821-r@>GrC}eu2`06}a2W2wOBMk6hxrJ4Y|Ihj z7WIAqlA0$ zI99QNYq)_oxHq}0++7~{2w&wd^LGW6EXDlwQ+$=IEkp7eLTY3~7U0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{66%Y~ zC50WC>a=J1bg@=mEYFK2LaVvv7MGR>Dywx`MoC>>U0IwNC|Bww_j09H8aP#|)fZ=q eOVV<2zFg{@HtDb5vW{hwo1?$H#Z0pO-1J|G_(*yH literal 0 HcmV?d00001 diff --git a/searx/static/themes/simple/fonts/ion.html b/searx/static/themes/simple/fonts/ion.html new file mode 100644 index 00000000..defea264 --- /dev/null +++ b/searx/static/themes/simple/fonts/ion.html @@ -0,0 +1,261 @@ + + + + + ion + + + +

ion

+ +
+ +
ion-navicon-round
+ +
ion-search
+ +
ion-play
+ +
ion-link
+ +
ion-chevron-up
+ +
ion-chevron-left
+ +
ion-chevron-right
+ +
ion-arrow-down-a
+ +
ion-arrow-up-a
+ +
ion-arrow-swap
+ +
ion-arrow-dropdown
+ +
ion-globe
+ +
ion-time
+ +
ion-location
+ +
ion-warning
+ +
ion-error
+ +
ion-film-outline
+ +
ion-music-note
+ +
ion-more-vertical
+ +
ion-magnet
+ +
+ + + +

Usage

+
<i class="ion-icon ion-name"></i>
+ + + + + + + diff --git a/searx/static/themes/simple/fonts/ion.svg b/searx/static/themes/simple/fonts/ion.svg new file mode 100644 index 00000000..db43668d --- /dev/null +++ b/searx/static/themes/simple/fonts/ion.svg @@ -0,0 +1,97 @@ + + + + + +Created by FontForge 20120731 at Fri May 26 22:22:55 2017 + By alexandre,,, + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/searx/static/themes/simple/fonts/ion.ttf b/searx/static/themes/simple/fonts/ion.ttf new file mode 100644 index 0000000000000000000000000000000000000000..4631e91b85f4ffd56b9843d4d98bc3dcf145026c GIT binary patch literal 3640 zcmds4|7%;<6+h>F*OT=0UC(wLM^CaP$Bw0E$&#GbP84_bzO+pZYl9iMwPMR(m@Nre zcG562LGnXjVKa;j1{-+$VI6Hq6T@I%NT#x11`8znA#ErPF^oa!=txEjEp*b(eUeir z^e@=eyYHTF_jB((_uTWY00F=WHQ-@ta`KgzHa;*k0Ii#(-7kMPkv!4$+V=o(n)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QpNj{DA*dW*~oLZ zMX%`1<#JtiSy5y=&e&{?KbYp!))vige+=4Lp4*E-y^Yk0iH}UvZ12#`{{HD&jk?kd zMxg`$ic5qdQ?7S`kMjKiI7E3QM&I}Z(AU6ccnmh9rz^H);@9X#ajQ}O*63cr{@vYO z?B8QYaj9|5ZJN1#PZPGbw&~d?A~nqs;W*u--opdS4w=%aJt zB^rC|Ufy804W8~bA?&AbpiF-0B#CvhGf8i|&9XMlzE9Y%hxMl({I(@(d|@?H9$oiP zwQyg6IeZx}v^@=d=?vw9NLbd8eLg5*=ya$La*=dOq-2L0Dzeuwe3FvG1AQk>^mgZR zjsNDZPm4iC*Oj0+Jss;c5zXG%^vM%cXb{lgDtT_N?A^1FR%LI?>7ob++cZx*KHsJV zvbofzMT+^IHZ76-Z&Xp(yI;0wBpkYsSaJ>=(*oICXwxEuV5?0_B>xMW zL^i&-x}CfCm7%Uau{QYteuadD+|x*$}SR|^XJ%T%Q`%V+YH z;&O3OED&17v9P?dI#gP((liR{>iXL9+)%MpEjU+8mBP?Qp;BF*%dbeQ`Nd+PYB_*z T{g!tupWGV%^=&5I|G(*f)gL-F literal 0 HcmV?d00001 diff --git a/searx/static/themes/simple/fonts/ion.woff b/searx/static/themes/simple/fonts/ion.woff new file mode 100644 index 0000000000000000000000000000000000000000..767c1263a10e3d0adde8950391bf20a11b98fa00 GIT binary patch literal 4452 zcmZXYXHe5k*T(;VR6~=R(8N%shtR81MT%4r6hdzaf)qgrH6YSOnluFjDT1LF>0Lta zM0yixq1~W}^5lM=c|W~7bM4Oc+jDm3?3bP0=SJGvMrLM40Kn)7&;Z27DFl%GJO2Ns zp{;$BNKXNP&IAD1VwQv6KiAeaGXMa3T_T4N#p#ddr86>>fDxG^(d!X~xC6EcbU@j8 z5gC@~WdVTXE>$~S<>;e6d*Ha%~Vr}|F#!A%9t8M@i zkdtPK_BESkY?u4})~V*+fH*ed5w^1|<~@m;p*8vxSKm|5$`Ay1$B2GNMm9&kuS;{$ z6Twn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=>PU{4nu$`v?&;{B**NX!K@VIH-||v>VI`!UtNXs ztzTVTf*z!S;*nlkG30=rHAUn9@*EKeV6AjqFn;|Pstx8PEfv;bt`-z1FLrgsyN>Sr zr7liMW(fgUF*N-Dt%n$&L!64_W+J1KTyjA;s*~#jh_7U6#D_GoUVCD}_6RQo){{4flQoBM>Gx9&a zImqgUs(47sN2AwVn*&^LqDluXgr(dPy!TqPx@%X$e+ zFy}sD^3gu9#9o3=u4f<9Rxp^Y`O28@*VJPj!!_K1FugL^1sNbSV(uf8xAId`ytbXP zJUy}SgXxRHaY-?@B|q1*eXZsM^6w=olxgy$EH=#+@f1+X^i)yiI|LaKG$HXjYL*AW zcAGF`n2_3C{W!IAw){7V|1*NZpP-9v6D_WbDvyiFl@;`pK*HkUxviUlDEhx=<_tt$ UQL^)eGegOU{~;pXB#Qv>AAB+@h5!Hn literal 0 HcmV?d00001 diff --git a/searx/static/themes/simple/fonts/ion.woff2 b/searx/static/themes/simple/fonts/ion.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..377710b511c431f37aa107a9d5ff92fdc6d54c22 GIT binary patch literal 1880 zcmV-e2dDUVPew8T0RR9100&qA4FCWD01h|+00#pA0RR9100000000000000000000 z0000#Mn+Uk90p(jf1eFuUT8*d9E5jKNzf|312 zf(^!s4;A&5G}KE}$mPS?PN0Exh5DBt##w+{Hk*W8NRGpjKpi-frsmWIsJIhaht`pb zJG}bIi+d2*WX$T<*VMlCVeVreH(rS$1w6!*1^|333w1-&Xjpvb3+0FVrCy}ywcz0) z{-}5FqH9@}=>r>%qQY)K10Cqul!vsXJd?B&&V}$B-UNUE;Kg>wUIBorejOT^n>hyb zD>6WRXflBAaOQ9LSO+lR&3I3D1n6R?E&$eqow?LCv;sggfLZXAe}E&? zm=aYM3}}@(#)PRfO4%%-5XY4@`)%qJY~=MiJ0L4dl2{>sj9K9ALJr3X9F&R$L3CqD zVkIUhe5X+0k>6^U{6BxU_dCV2vQ6o%aC_sReI$lT*FdtcT#0t_PJ7ZQc3ijQk6&D7dw_Sh8$zkGiXJ~B z$6d-^1yK@+A96y}6A9(6lDI7+XXQBax}O;bwW1fi6|0F+Y z&#`$lkHu%1o8z!}a_l*_@;`=5JUrT-LWVMPE#90Qn(m`{zxR54-+AZOng-*mi>H<> z`Hr_#zHl{}e2NYb@j<9cpSrkY$@`Y)g~~)ih5DuMAra4@IE|addrPSzrvmBp+{}^8 zTo_?@P=_Ug@TWgKhPnKI;)-xObRxnA!eN}5N_(eA^&l%nFt2v#*csV@2YuCmeS6^Sp!dKE= zf7|x2yT7OLm>Csl2=R;W)*9Zeh54Add-LHhkL=;-Veh8-wGRDv_;*aU!@hV}q!l#` z>6(rfQ+5p4(cP-G)WX=c(Ae?ejt>sYwF(bseH>>Gn_mM~dgr8h_O8g3?U48MVU2l0jDD2^z%mOO!sQcTkcKLBwt_NIG)SncgEmbmJ3RMF+9gh;=GY{1}H9mm1$t zH6^eKprxe43*ryL9gGk0-bc_I6R1C}yGm%-_F5K)?;2m_P49YYmWkjhnBGXWl+x`8&*Aw_Q=z7;IU3`f(JW*zaQ`f z0IWETU=5cC^@Ti=wSn|JWrN)^(J-vSqwARo2rrn*jNjE(8QR~_PINmP9H0TuKaroE zkZLd9nlgQzi-Sp(+Cy4E8LF>J1gEKX=|hY6Ecs;r#dbC_{t;a%u7G`yD9MVd>4s_9 zj_a{=aFQu|Hgx2KpDLOCDj}#V7qNkH(Gb_WKo~pCO5}L(8Vwe9q~|Dw(hi_1{nJa& zPuM{)N7SVr;wj@*Vv&oNp^-l>j9T0@;=tx5tg)*yaadxp1N2Z((>^8J5I&E)HYajV S7Q', 'less/*.less'], + tasks: ['jshint', 'concat', 'uglify', 'webfont', 'less:development', 'less:production'] + } + }, + concat: { + options: { + separator: ';' + }, + dist: { + src: ['js/searx_src/*.js'], + dest: 'js/searx.js' + } + }, + uglify: { + options: { + banner: '/*! simple/searx.min.js | <%= grunt.template.today("dd-mm-yyyy") %> | https://github.com/asciimoo/searx */\n', + preserveComments: 'some', + sourceMap: true + }, + dist: { + files: { + 'js/searx.min.js': ['<%= concat.dist.dest %>'] + } + } + }, + jshint: { + files: ['js/searx_src/*.js'], + options: { + proto: true, + // options here to override JSHint defaults + globals: { + browser: true, + jQuery: false, + devel: true + } + } + }, + less: { + development: { + options: { + paths: ["less"], + banner: '/*! searx | <%= grunt.template.today("dd-mm-yyyy") %> | https://github.com/asciimoo/searx */\n' + }, + files: { + "css/searx.css": "less/style.less", + "css/searx-rtl.css": "less/style-rtl.less" + } + }, + production: { + options: { + paths: ["less"], + plugins: [ + new (require('less-plugin-clean-css'))({ + advanced: true, + compatibility: 'ie8' + }) + ], + banner: '/*! searx | <%= grunt.template.today("dd-mm-yyyy") %> | https://github.com/asciimoo/searx */\n' + }, + files: { + "css/searx.min.css": "less/style.less", + "css/searx-rtl.min.css": "less/style-rtl.less" + } + }, + }, + webfont: { + icons: { + // src: 'node_modules/ionicons-npm/src/*.svg', + src: [ + 'node_modules/ionicons-npm/src/navicon-round.svg', + 'node_modules/ionicons-npm/src/search.svg', + 'node_modules/ionicons-npm/src/play.svg', + 'node_modules/ionicons-npm/src/link.svg', + 'node_modules/ionicons-npm/src/chevron-up.svg', + 'node_modules/ionicons-npm/src/chevron-left.svg', + 'node_modules/ionicons-npm/src/chevron-right.svg', + 'node_modules/ionicons-npm/src/arrow-down-a.svg', + 'node_modules/ionicons-npm/src/arrow-up-a.svg', + 'node_modules/ionicons-npm/src/arrow-swap.svg', + 'node_modules/ionicons-npm/src/telephone.svg', + 'node_modules/ionicons-npm/src/android-arrow-dropdown.svg', + 'node_modules/ionicons-npm/src/android-globe.svg', + 'node_modules/ionicons-npm/src/android-time.svg', + 'node_modules/ionicons-npm/src/location.svg', + 'node_modules/ionicons-npm/src/alert-circled.svg', + 'node_modules/ionicons-npm/src/android-alert.svg', + 'node_modules/ionicons-npm/src/ios-film-outline.svg', + 'node_modules/ionicons-npm/src/music-note.svg', + 'node_modules/ionicons-npm/src/ion-close-round.svg', + 'node_modules/ionicons-npm/src/android-more-vertical.svg', + 'magnet.svg' + ], + dest: 'fonts', + destLess: 'less', + options: { + font: 'ion', + hashes : true, + syntax: 'bem', + styles : 'font,icon', + types : 'eot,woff2,woff,ttf,svg', + order : 'eot,woff2,woff,ttf,svg', + stylesheets : ['css', 'less'], + relativeFontPath : '../fonts/', + autoHint : false, + normalize : false, + // ligatures : true, + optimize : true, + // fontHeight : 400, + rename : function(name) { + basename = path.basename(name); + if (basename === 'android-alert.svg') { + return 'error.svg'; + } + if (basename === 'alert-circled.svg') { + return 'warning.svg'; + } + if (basename === 'ion-close-round.svg') { + return 'close.svg'; + } + return basename.replace(/(ios|md|android)-/i, ''); + }, + templateOptions: { + baseClass: 'ion-icon', + classPrefix: 'ion-' + } + } + } + } + }); + + grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-less'); + grunt.loadNpmTasks('grunt-contrib-cssmin'); + grunt.loadNpmTasks('grunt-webfont'); + + grunt.registerTask('test', ['jshint']); + + grunt.registerTask('default', ['jshint', 'concat', 'uglify', 'less:development', 'less:production']); +}; diff --git a/searx/static/themes/simple/img/favicon.png b/searx/static/themes/simple/img/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..36be5fc01a877d35009829d8e4d4248b9073b425 GIT binary patch literal 1474 zcmah}X)qfI6wXCL5>k?_tBSaas-xA^?z+|$N7S*@(KL=~XMbEqllv;T4d8Pvw!x-zM1#l_rCYdoA1}lJWFsuN-IeN001Q3 z(bhxUt-d7;EUx9Psh=)W2S0&ze>q0oP~2iVHWO3d87 zdsloPi9||EOUuZ}h#3?Lb)ZyLRTTp~9)B>ZsHos@I8#$oAP^`Li7*%p91fS0lM~Bi zWo4C=l(x3Ewzs!6G&EQ&*6QjikH=eBSZHo;-re2ha=C+pgZ=&e?d|Oo6BDDOqZ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J%Z}Lia-eti#oaYS9+_!50@smhLLWGGFANUx{$0S37LL z-<2bu@?G$T-o_`1+KWh`cL=D~=Pyxg&!N!F?cgIp*b~9hs#Cc>e=W1-l3xZ(ssJ2i z{KaIskO=Q@!XTg{`0$Em$MMxDDy*gjVc__JulLKyT*{w3dN0s`3&g{n^-c`cbvA`J zmuAHAK=$XNa&`WIE~rUQfr_DJok))Kou!;}O%wbbiS4%re;wMyzQBMGpnK$`)QY^f zW(6G?6(vKMpV?$yTfaj4i+#~j@x4wz$<>UMdZmqDNRB>`Iz$$3`^@F){Pn&enth<} za0hh&6w+d%U9!)}B0^G6zPuNf3W z&b25Rjn8%N-TL~oE@9Zf?~ArXwdi^~4dB@h%Q((wVbIYoYHq%3;KQ4|5vG3(wu(2= z?<=_OE|FBjmgU0~tRkB)B0?~1+W){DjyC%_u>6Bub(fnE)Qvjlx96|PmR(1cKYTE_ zX~cwRE13e52ZR0`f5*T#J)?#PS(^uykm;93N_4&Wm_Nqf=%WZp!V#LNm3b}@=Tg=K zAf!k!e?=Bl>9krN;VNQ5@{<#2Lh8&EK6Ug6^93K`&l0m?LtyJiM{e*^3(+y1 zKNJ290PgbWR?I)cUrkLq;{>paz9nu}X6xxDTGh6?NOXA<3>L%ciP8$QEzJZ^uNrSQ1@?H5O97r%g6-4b>NIWi1 zD_;ftk;0B?7`LMsI_H%)j#Zx~yLXV}4i*IV!2nK|*JtevHMW>Pxmk$yS9(mRs&%DN zf0W7G#pd^9CqOgi_W#e2WpO`sw|5`EPnU!F_weyL?|v=*0#iZso1elvRR91007*qo IM6N<$g1Q4Pc>n+a literal 0 HcmV?d00001 diff --git a/searx/static/themes/simple/img/searx_logo.svg b/searx/static/themes/simple/img/searx_logo.svg new file mode 100644 index 00000000..67a2d458 --- /dev/null +++ b/searx/static/themes/simple/img/searx_logo.svg @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/searx/static/themes/simple/js/searx.js b/searx/static/themes/simple/js/searx.js new file mode 100644 index 00000000..64329fde --- /dev/null +++ b/searx/static/themes/simple/js/searx.js @@ -0,0 +1,1534 @@ +/** +* searx is free software: you can redistribute it and/or modify +* it under the terms of the GNU Affero General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* searx is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Affero General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with searx. If not, see < http://www.gnu.org/licenses/ >. +* +* (C) 2017 by Alexandre Flament, +* +*/ +(function(w, d, searx) { + + 'use strict'; + + // not invented here tookit with bugs fixed elsewhere + // purposes : be just good enough and as small as possible + + // from https://plainjs.com/javascript/events/live-binding-event-handlers-14/ + if (w.Element) { + (function(ElementPrototype) { + ElementPrototype.matches = ElementPrototype.matches || + ElementPrototype.matchesSelector || + ElementPrototype.webkitMatchesSelector || + ElementPrototype.msMatchesSelector || + function(selector) { + var node = this, nodes = (node.parentNode || node.document).querySelectorAll(selector), i = -1; + while (nodes[++i] && nodes[i] != node); + return !!nodes[i]; + }; + })(Element.prototype); + } + + function callbackSafe(callback, el, e) { + try { + callback.call(el, e); + } catch (exception) { + console.log(exception); + } + } + + searx = searx || {}; + + searx.on = function(obj, eventType, callback, useCapture) { + useCapture = useCapture || false; + if (typeof obj !== 'string') { + // obj HTMLElement, HTMLDocument + obj.addEventListener(eventType, callback, useCapture); + } else { + // obj is a selector + d.addEventListener(eventType, function(e) { + var el = e.target || e.srcElement, found = false; + while (el && el.matches && el !== d && !(found = el.matches(obj))) el = el.parentElement; + if (found) callbackSafe(callback, el, e); + }, useCapture); + } + }; + + searx.ready = function(callback) { + if (document.readyState != 'loading') { + callback.call(w); + } else { + w.addEventListener('DOMContentLoaded', callback.bind(w)); + } + }; + + searx.http = function(method, url, callback) { + var req = new XMLHttpRequest(), + resolve = function() {}, + reject = function() {}, + promise = { + then: function(callback) { resolve = callback; return promise; }, + catch: function(callback) { reject = callback; return promise; } + }; + + try { + req.open(method, url, true); + + // On load + req.onload = function() { + if (req.status == 200) { + resolve(req.response, req.responseType); + } else { + reject(Error(req.statusText)); + } + }; + + // Handle network errors + req.onerror = function() { + reject(Error("Network Error")); + }; + + req.onabort = function() { + reject(Error("Transaction is aborted")); + }; + + // Make the request + req.send(); + } catch (ex) { + reject(ex); + } + + return promise; + }; + + searx.loadStyle = function(src) { + var path = searx.staticPath + src, + id = "style_" + src.replace('.', '_'), + s = d.getElementById(id); + if (s === null) { + s = d.createElement('link'); + s.setAttribute('id', id); + s.setAttribute('rel', 'stylesheet'); + s.setAttribute('type', 'text/css'); + s.setAttribute('href', path); + d.body.appendChild(s); + } + }; + + searx.loadScript = function(src, callback) { + var path = searx.staticPath + src, + id = "script_" + src.replace('.', '_'), + s = d.getElementById(id); + if (s === null) { + s = d.createElement('script'); + s.setAttribute('id', id); + s.setAttribute('src', path); + s.onload = callback; + s.onerror = function() { + s.setAttribute('error', '1'); + }; + d.body.appendChild(s); + } else if (!s.hasAttribute('error')) { + try { + callback.apply(s, []); + } catch (exception) { + console.log(exception); + } + } else { + console.log("callback not executed : script '" + path + "' not loaded."); + } + }; + + searx.on('.close', 'click', function(e) { + var el = e.target || e.srcElement; + this.parentNode.style.display="None"; + }); + return searx; +})(window, document, window.searx); +;(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.AutoComplete = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o @baptistedonaux + */ +var AutoComplete = (function () { + // Constructor + function AutoComplete(params, selector) { + if (params === void 0) { params = {}; } + if (selector === void 0) { selector = "[data-autocomplete]"; } + if (Array.isArray(selector)) { + selector.forEach(function (s) { + new AutoComplete(params, s); + }); + } + else if (typeof selector == "string") { + var elements = document.querySelectorAll(selector); + Array.prototype.forEach.call(elements, function (input) { + new AutoComplete(params, input); + }); + } + else { + var specificParams = AutoComplete.merge(AutoComplete.defaults, params, { + DOMResults: document.createElement("div") + }); + AutoComplete.prototype.create(specificParams, selector); + return specificParams; + } + } + AutoComplete.prototype.create = function (params, element) { + params.Input = element; + if (params.Input.nodeName.match(/^INPUT$/i) && (params.Input.hasAttribute("type") === false || params.Input.getAttribute("type").match(/^TEXT|SEARCH$/i))) { + params.Input.setAttribute("autocomplete", "off"); + params._Position(params); + params.Input.parentNode.appendChild(params.DOMResults); + params.$Listeners = { + blur: params._Blur.bind(params), + destroy: AutoComplete.prototype.destroy.bind(null, params), + focus: params._Focus.bind(params), + keyup: AutoComplete.prototype.event.bind(null, params, EventType.KEYUP), + keydown: AutoComplete.prototype.event.bind(null, params, EventType.KEYDOWN), + position: params._Position.bind(params) + }; + for (var event in params.$Listeners) { + params.Input.addEventListener(event, params.$Listeners[event]); + } + } + }; + AutoComplete.prototype.getEventsByType = function (params, type) { + var mappings = {}; + for (var key in params.KeyboardMappings) { + var event = EventType.KEYUP; + if (params.KeyboardMappings[key].Event !== undefined) { + event = params.KeyboardMappings[key].Event; + } + if (event == type) { + mappings[key] = params.KeyboardMappings[key]; + } + } + return mappings; + }; + AutoComplete.prototype.event = function (params, type, event) { + var eventIdentifier = function (condition) { + if ((match === true && mapping.Operator == ConditionOperator.AND) || (match === false && mapping.Operator == ConditionOperator.OR)) { + condition = AutoComplete.merge({ + Not: false + }, condition); + if (condition.hasOwnProperty("Is")) { + if (condition.Is == event.keyCode) { + match = !condition.Not; + } + else { + match = condition.Not; + } + } + else if (condition.hasOwnProperty("From") && condition.hasOwnProperty("To")) { + if (event.keyCode >= condition.From && event.keyCode <= condition.To) { + match = !condition.Not; + } + else { + match = condition.Not; + } + } + } + }; + for (var name in AutoComplete.prototype.getEventsByType(params, type)) { + var mapping = AutoComplete.merge({ + Operator: ConditionOperator.AND + }, params.KeyboardMappings[name]), match = ConditionOperator.AND == mapping.Operator; + mapping.Conditions.forEach(eventIdentifier); + if (match === true) { + mapping.Callback.call(params, event); + } + } + }; + AutoComplete.prototype.makeRequest = function (params, callback) { + var propertyHttpHeaders = Object.getOwnPropertyNames(params.HttpHeaders), request = new XMLHttpRequest(), method = params._HttpMethod(), url = params._Url(), queryParams = params._Pre(), queryParamsStringify = encodeURIComponent(params._QueryArg()) + "=" + encodeURIComponent(queryParams); + if (method.match(/^GET$/i)) { + if (url.indexOf("?") !== -1) { + url += "&" + queryParamsStringify; + } + else { + url += "?" + queryParamsStringify; + } + } + request.open(method, url, true); + for (var i = propertyHttpHeaders.length - 1; i >= 0; i--) { + request.setRequestHeader(propertyHttpHeaders[i], params.HttpHeaders[propertyHttpHeaders[i]]); + } + request.onreadystatechange = function () { + if (request.readyState == 4 && request.status == 200) { + params.$Cache[queryParams] = request.response; + callback(request.response); + } + }; + return request; + }; + AutoComplete.prototype.ajax = function (params, request, timeout) { + if (timeout === void 0) { timeout = true; } + if (params.$AjaxTimer) { + window.clearTimeout(params.$AjaxTimer); + } + if (timeout === true) { + params.$AjaxTimer = window.setTimeout(AutoComplete.prototype.ajax.bind(null, params, request, false), params.Delay); + } + else { + if (params.Request) { + params.Request.abort(); + } + params.Request = request; + params.Request.send(params._QueryArg() + "=" + params._Pre()); + } + }; + AutoComplete.prototype.cache = function (params, callback) { + var response = params._Cache(params._Pre()); + if (response === undefined) { + var request = AutoComplete.prototype.makeRequest(params, callback); + AutoComplete.prototype.ajax(params, request); + } + else { + callback(response); + } + }; + AutoComplete.prototype.destroy = function (params) { + for (var event in params.$Listeners) { + params.Input.removeEventListener(event, params.$Listeners[event]); + } + params.DOMResults.parentNode.removeChild(params.DOMResults); + }; + return AutoComplete; +}()); +AutoComplete.merge = function () { + var merge = {}, tmp; + for (var i = 0; i < arguments.length; i++) { + for (tmp in arguments[i]) { + merge[tmp] = arguments[i][tmp]; + } + } + return merge; +}; +AutoComplete.defaults = { + Delay: 150, + EmptyMessage: "No result here", + Highlight: { + getRegex: function (value) { + return new RegExp(value, "ig"); + }, + transform: function (value) { + return "" + value + ""; + } + }, + HttpHeaders: { + "Content-type": "application/x-www-form-urlencoded" + }, + Limit: 0, + MinChars: 0, + HttpMethod: "GET", + QueryArg: "q", + Url: null, + KeyboardMappings: { + "Enter": { + Conditions: [{ + Is: 13, + Not: false + }], + Callback: function (event) { + if (this.DOMResults.getAttribute("class").indexOf("open") != -1) { + var liActive = this.DOMResults.querySelector("li.active"); + if (liActive !== null) { + event.preventDefault(); + this._Select(liActive); + this.DOMResults.setAttribute("class", "autocomplete"); + } + } + }, + Operator: ConditionOperator.AND, + Event: EventType.KEYDOWN + }, + "KeyUpAndDown_down": { + Conditions: [{ + Is: 38, + Not: false + }, + { + Is: 40, + Not: false + }], + Callback: function (event) { + event.preventDefault(); + }, + Operator: ConditionOperator.OR, + Event: EventType.KEYDOWN + }, + "KeyUpAndDown_up": { + Conditions: [{ + Is: 38, + Not: false + }, + { + Is: 40, + Not: false + }], + Callback: function (event) { + event.preventDefault(); + var first = this.DOMResults.querySelector("li:first-child:not(.locked)"), last = this.DOMResults.querySelector("li:last-child:not(.locked)"), active = this.DOMResults.querySelector("li.active"); + if (active) { + var currentIndex = Array.prototype.indexOf.call(active.parentNode.children, active), position = currentIndex + (event.keyCode - 39), lisCount = this.DOMResults.getElementsByTagName("li").length; + if (position < 0) { + position = lisCount - 1; + } + else if (position >= lisCount) { + position = 0; + } + active.classList.remove("active"); + active.parentElement.children.item(position).classList.add("active"); + } + else if (last && event.keyCode == 38) { + last.classList.add("active"); + } + else if (first) { + first.classList.add("active"); + } + }, + Operator: ConditionOperator.OR, + Event: EventType.KEYUP + }, + "AlphaNum": { + Conditions: [{ + Is: 13, + Not: true + }, { + From: 35, + To: 40, + Not: true + }], + Callback: function () { + var oldValue = this.Input.getAttribute("data-autocomplete-old-value"), currentValue = this._Pre(); + if (currentValue !== "" && currentValue.length >= this._MinChars()) { + if (!oldValue || currentValue != oldValue) { + this.DOMResults.setAttribute("class", "autocomplete open"); + } + AutoComplete.prototype.cache(this, function (response) { + this._Render(this._Post(response)); + this._Open(); + }.bind(this)); + } + }, + Operator: ConditionOperator.AND, + Event: EventType.KEYUP + } + }, + DOMResults: null, + Request: null, + Input: null, + /** + * Return the message when no result returns + */ + _EmptyMessage: function () { + var emptyMessage = ""; + if (this.Input.hasAttribute("data-autocomplete-empty-message")) { + emptyMessage = this.Input.getAttribute("data-autocomplete-empty-message"); + } + else if (this.EmptyMessage !== false) { + emptyMessage = this.EmptyMessage; + } + else { + emptyMessage = ""; + } + return emptyMessage; + }, + /** + * Returns the maximum number of results + */ + _Limit: function () { + var limit = this.Input.getAttribute("data-autocomplete-limit"); + if (isNaN(limit) || limit === null) { + return this.Limit; + } + return parseInt(limit, 10); + }, + /** + * Returns the minimum number of characters entered before firing ajax + */ + _MinChars: function () { + var minchars = this.Input.getAttribute("data-autocomplete-minchars"); + if (isNaN(minchars) || minchars === null) { + return this.MinChars; + } + return parseInt(minchars, 10); + }, + /** + * Apply transformation on labels response + */ + _Highlight: function (label) { + return label.replace(this.Highlight.getRegex(this._Pre()), this.Highlight.transform); + }, + /** + * Returns the HHTP method to use + */ + _HttpMethod: function () { + if (this.Input.hasAttribute("data-autocomplete-method")) { + return this.Input.getAttribute("data-autocomplete-method"); + } + return this.HttpMethod; + }, + /** + * Returns the query param to use + */ + _QueryArg: function () { + if (this.Input.hasAttribute("data-autocomplete-param-name")) { + return this.Input.getAttribute("data-autocomplete-param-name"); + } + return this.QueryArg; + }, + /** + * Returns the URL to use for AJAX request + */ + _Url: function () { + if (this.Input.hasAttribute("data-autocomplete")) { + return this.Input.getAttribute("data-autocomplete"); + } + return this.Url; + }, + /** + * Manage the close + */ + _Blur: function (now) { + if (now === true) { + this.DOMResults.setAttribute("class", "autocomplete"); + this.Input.setAttribute("data-autocomplete-old-value", this.Input.value); + } + else { + var params = this; + setTimeout(function () { + params._Blur(true); + }, 150); + } + }, + /** + * Manage the cache + */ + _Cache: function (value) { + return this.$Cache[value]; + }, + /** + * Manage the open + */ + _Focus: function () { + var oldValue = this.Input.getAttribute("data-autocomplete-old-value"); + if ((!oldValue || this.Input.value != oldValue) && this._MinChars() <= this.Input.value.length) { + this.DOMResults.setAttribute("class", "autocomplete open"); + } + }, + /** + * Bind all results item if one result is opened + */ + _Open: function () { + var params = this; + Array.prototype.forEach.call(this.DOMResults.getElementsByTagName("li"), function (li) { + if (li.getAttribute("class") != "locked") { + li.onclick = function (event) { + params._Select(li); + }; + li.onmouseenter = function () { + var active = params.DOMResults.querySelector("li.active"); + if (active !== li) { + if (active !== null) { + active.classList.remove("active"); + } + li.classList.add("active"); + } + }; + } + }); + }, + /** + * Position the results HTML element + */ + _Position: function () { + this.DOMResults.setAttribute("class", "autocomplete"); + this.DOMResults.setAttribute("style", "top:" + (this.Input.offsetTop + this.Input.offsetHeight) + "px;left:" + this.Input.offsetLeft + "px;width:" + this.Input.clientWidth + "px;"); + }, + /** + * Execute the render of results DOM element + */ + _Render: function (response) { + var ul; + if (typeof response == "string") { + ul = this._RenderRaw(response); + } + else { + ul = this._RenderResponseItems(response); + } + if (this.DOMResults.hasChildNodes()) { + this.DOMResults.removeChild(this.DOMResults.childNodes[0]); + } + this.DOMResults.appendChild(ul); + }, + /** + * ResponseItems[] rendering + */ + _RenderResponseItems: function (response) { + var ul = document.createElement("ul"), li = document.createElement("li"), limit = this._Limit(); + // Order + if (limit < 0) { + response = response.reverse(); + } + else if (limit === 0) { + limit = response.length; + } + for (var item = 0; item < Math.min(Math.abs(limit), response.length); item++) { + li.innerHTML = response[item].Label; + li.setAttribute("data-autocomplete-value", response[item].Value); + ul.appendChild(li); + li = document.createElement("li"); + } + return ul; + }, + /** + * string response rendering (RAW HTML) + */ + _RenderRaw: function (response) { + var ul = document.createElement("ul"), li = document.createElement("li"); + if (response.length > 0) { + this.DOMResults.innerHTML = response; + } + else { + var emptyMessage = this._EmptyMessage(); + if (emptyMessage !== "") { + li.innerHTML = emptyMessage; + li.setAttribute("class", "locked"); + ul.appendChild(li); + } + } + return ul; + }, + /** + * Deal with request response + */ + _Post: function (response) { + try { + var returnResponse = []; + //JSON return + var json = JSON.parse(response); + if (Object.keys(json).length === 0) { + return ""; + } + if (Array.isArray(json)) { + for (var i = 0; i < Object.keys(json).length; i++) { + returnResponse[returnResponse.length] = { "Value": json[i], "Label": this._Highlight(json[i]) }; + } + } + else { + for (var value in json) { + returnResponse.push({ + "Value": value, + "Label": this._Highlight(json[value]) + }); + } + } + return returnResponse; + } + catch (event) { + //HTML return + return response; + } + }, + /** + * Return the autocomplete value to send (before request) + */ + _Pre: function () { + return this.Input.value; + }, + /** + * Choice one result item + */ + _Select: function (item) { + console.log('test test test'); + if (item.hasAttribute("data-autocomplete-value")) { + this.Input.value = item.getAttribute("data-autocomplete-value"); + } + else { + this.Input.value = item.innerHTML; + } + this.Input.setAttribute("data-autocomplete-old-value", this.Input.value); + }, + $AjaxTimer: null, + $Cache: {}, + $Listeners: {} +}; +module.exports = AutoComplete; + +},{}]},{},[1])(1) +}); +;/** +* +* Google Image Layout v0.0.1 +* Description, by Anh Trinh. +* Heavily modified for searx +* http://trinhtrunganh.com +* +* @license Free to use under the MIT License. +* +*/ +(function(w, d) { + 'use strict'; + + function ImageLayout(container_selector, results_selector, img_selector, maxHeight) { + this.container_selector = container_selector; + this.results_selector = results_selector; + this.img_selector = img_selector; + this.margin = 10; + this.maxHeight = maxHeight; + this._alignAllDone = true; + } + + /** + * Get the height that make all images fit the container + * + * width = w1 + w2 + w3 + ... = r1*h + r2*h + r3*h + ... + * + * @param {[type]} images the images to be calculated + * @param {[type]} width the container witdth + * @param {[type]} margin the margin between each image + * + * @return {[type]} the height + */ + ImageLayout.prototype._getHeigth = function(images, width) { + var r = 0, + img; + + width -= images.length * this.margin; + for (var i = 0; i < images.length; i++) { + img = images[i]; + if ((img.naturalWidth > 0) && (img.naturalHeight > 0)) { + r += img.naturalWidth / img.naturalHeight; + } else { + // assume that not loaded images are square + r += 1; + } + } + + return width / r; //have to round down because Firefox will automatically roundup value with number of decimals > 3 + }; + + ImageLayout.prototype._setSize = function(images, height) { + var img, imgWidth, imagesLength = images.length; + for (var i = 0; i < imagesLength; i++) { + img = images[i]; + if ((img.naturalWidth > 0) && (img.naturalHeight > 0)) { + imgWidth = height * img.naturalWidth / img.naturalHeight; + } else { + // not loaded image : make it square as _getHeigth said it + imgWidth = height; + } + img.style.width = imgWidth + 'px'; + img.style.height = height + 'px'; + img.style.marginLeft = '3px'; + img.style.marginTop = '3px'; + img.style.marginRight = this.margin - 7 + 'px'; // -4 is the negative margin of the inline element + img.style.marginBottom = this.margin - 7 + 'px'; + } + }; + + ImageLayout.prototype._alignImgs = function(imgGroup) { + var slice, h, + containerWidth = d.querySelector(this.container_selector).clientWidth; + + w: while (imgGroup.length > 0) { + for (var i = 1; i <= imgGroup.length; i++) { + slice = imgGroup.slice(0, i); + h = this._getHeigth(slice, containerWidth); + if (h < this.maxHeight) { + this._setSize(slice, h); + imgGroup = imgGroup.slice(i); + continue w; + } + } + this._setSize(slice, Math.min(this.maxHeight, h)); + break; + } + }; + + ImageLayout.prototype.align = function(results_selector) { + var results_selectorNode = d.querySelectorAll(this.results_selector), + results_length = results_selectorNode.length, + previous = null, + current = null, + imgGroup = []; + for (var i = 0; i < results_length; i++) { + current = results_selectorNode[i]; + if (current.previousElementSibling !== previous && imgGroup.length > 0) { + // the current image is not conected to previous one + // so the current image is the start of a new group of images. + // so call _alignImgs to align the current group + this._alignImgs(imgGroup); + // and start a new empty group of images + imgGroup = []; + } + // add the current image to the group (only the img tag) + imgGroup.push(current.querySelector(this.img_selector)); + // update the previous variable + previous = current; + } + // align the remaining images + if (imgGroup.length > 0) { + this._alignImgs(imgGroup); + } + }; + + ImageLayout.prototype.watch = function() { + var i, img, imgGroup, imgNodeLength, + obj = this, + results_nodes = d.querySelectorAll(this.results_selector), + results_length = results_nodes.length; + + function align(e) { + obj.align(); + } + + function throttleAlign(e) { + if (obj._alignAllDone) { + obj._alignAllDone = false; + setTimeout(function() { + obj.align(); + obj._alignAllDone = true; + }, 100); + } + } + + w.addEventListener('resize', throttleAlign); + w.addEventListener('pageshow', align); + + for (i = 0; i < results_length; i++) { + img = results_nodes[i].querySelector(this.img_selector); + if (typeof img !== 'undefined') { + img.addEventListener('load', throttleAlign); + img.addEventListener('error', throttleAlign); + } + } + }; + + w.searx.ImageLayout = ImageLayout; + +})(window, document); +;searx.ready(function() { + + searx.on('.result', 'click', function() { + highlightResult(this)(true); + }); + + searx.on('.result a', 'focus', function(e) { + var el = e.target; + while (el !== undefined) { + if (el.classList.contains('result')) { + if (el.getAttribute("data-vim-selected") === null) { + highlightResult(el)(true); + } + break; + } + el = el.parentNode; + } + }, true); + + var vimKeys = { + 27: { + key: 'Escape', + fun: removeFocus, + des: 'remove focus from the focused input', + cat: 'Control' + }, + 73: { + key: 'i', + fun: searchInputFocus, + des: 'focus on the search input', + cat: 'Control' + }, + 66: { + key: 'b', + fun: scrollPage(-window.innerHeight), + des: 'scroll one page up', + cat: 'Navigation' + }, + 70: { + key: 'f', + fun: scrollPage(window.innerHeight), + des: 'scroll one page down', + cat: 'Navigation' + }, + 85: { + key: 'u', + fun: scrollPage(-window.innerHeight / 2), + des: 'scroll half a page up', + cat: 'Navigation' + }, + 68: { + key: 'd', + fun: scrollPage(window.innerHeight / 2), + des: 'scroll half a page down', + cat: 'Navigation' + }, + 71: { + key: 'g', + fun: scrollPageTo(-document.body.scrollHeight, 'top'), + des: 'scroll to the top of the page', + cat: 'Navigation' + }, + 86: { + key: 'v', + fun: scrollPageTo(document.body.scrollHeight, 'bottom'), + des: 'scroll to the bottom of the page', + cat: 'Navigation' + }, + 75: { + key: 'k', + fun: highlightResult('up'), + des: 'select previous search result', + cat: 'Results' + }, + 74: { + key: 'j', + fun: highlightResult('down'), + des: 'select next search result', + cat: 'Results' + }, + 80: { + key: 'p', + fun: pageButtonClick(0), + des: 'go to previous page', + cat: 'Results' + }, + 78: { + key: 'n', + fun: pageButtonClick(1), + des: 'go to next page', + cat: 'Results' + }, + 79: { + key: 'o', + fun: openResult(false), + des: 'open search result', + cat: 'Results' + }, + 84: { + key: 't', + fun: openResult(true), + des: 'open the result in a new tab', + cat: 'Results' + }, + 82: { + key: 'r', + fun: reloadPage, + des: 'reload page from the server', + cat: 'Control' + }, + 72: { + key: 'h', + fun: toggleHelp, + des: 'toggle help window', + cat: 'Other' + } + }; + + searx.on(document, "keyup", function(e) { + // check for modifiers so we don't break browser's hotkeys + if (vimKeys.hasOwnProperty(e.keyCode) && !e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey) { + var tagName = e.target.tagName.toLowerCase(); + if (e.keyCode === 27) { + if (tagName === 'input' || tagName === 'select' || tagName === 'textarea') { + vimKeys[e.keyCode].fun(); + } + } else { + if (e.target === document.body || tagName === 'a' || tagName === 'button') { + vimKeys[e.keyCode].fun(); + } + } + } + }); + + function highlightResult(which) { + return function(noScroll) { + var current = document.querySelector('.result[data-vim-selected]'), + effectiveWhich = which; + if (current === null) { + // no selection : choose the first one + current = document.querySelector('.result'); + if (current === null) { + // no first one : there are no results + return; + } + // replace up/down actions by selecting first one + if (which === "down" || which === "up") { + effectiveWhich = current; + } + } + + var next, results = document.querySelectorAll('.result'); + + if (typeof effectiveWhich !== 'string') { + next = effectiveWhich; + } else { + switch (effectiveWhich) { + case 'visible': + var top = document.documentElement.scrollTop || document.body.scrollTop; + var bot = top + document.documentElement.clientHeight; + + for (var i = 0; i < results.length; i++) { + next = results[i]; + var etop = next.offsetTop; + var ebot = etop + next.clientHeight; + + if ((ebot <= bot) && (etop > top)) { + break; + } + } + break; + case 'down': + next = current.nextElementSibling; + if (next === null) { + next = results[0]; + } + break; + case 'up': + next = current.previousElementSibling; + if (next === null) { + next = results[results.length - 1]; + } + break; + case 'bottom': + next = results[results.length - 1]; + break; + case 'top': + /* falls through */ + default: + next = results[0]; + } + } + + if (next) { + current.removeAttribute('data-vim-selected'); + next.setAttribute('data-vim-selected', 'true'); + var link = next.querySelector('h3 a') || next.querySelector('a'); + if (link !== null) { + link.focus(); + } + if (!noScroll) { + scrollPageToSelected(); + } + } + }; + } + + function reloadPage() { + document.location.reload(true); + } + + function removeFocus() { + if (document.activeElement) { + document.activeElement.blur(); + } + } + + function pageButtonClick(num) { + return function() { + var buttons = $('div#pagination button[type="submit"]'); + if (buttons.length !== 2) { + console.log('page navigation with this theme is not supported'); + return; + } + if (num >= 0 && num < buttons.length) { + buttons[num].click(); + } else { + console.log('pageButtonClick(): invalid argument'); + } + }; + } + + function scrollPageToSelected() { + var sel = document.querySelector('.result[data-vim-selected]'); + if (sel === null) { + return; + } + var wtop = document.documentElement.scrollTop || document.body.scrollTop, + wheight = document.documentElement.clientHeight, + etop = sel.offsetTop, + ebot = etop + sel.clientHeight, + offset = 120; + // first element ? + if ((sel.previousElementSibling === null) && (ebot < wheight)) { + // set to the top of page if the first element + // is fully included in the viewport + window.scroll(window.scrollX, 0); + return; + } + if (wtop > (etop - offset)) { + window.scroll(window.scrollX, etop - offset); + } else { + var wbot = wtop + wheight; + if (wbot < (ebot + offset)) { + window.scroll(window.scrollX, ebot - wheight + offset); + } + } + } + + function scrollPage(amount) { + return function() { + window.scrollBy(0, amount); + highlightResult('visible')(); + }; + } + + function scrollPageTo(position, nav) { + return function() { + window.scrollTo(0, position); + highlightResult(nav)(); + }; + } + + function searchInputFocus() { + window.scrollTo(0, 0); + document.querySelector('#q').focus(); + } + + function openResult(newTab) { + return function() { + var link = document.querySelector('.result[data-vim-selected] h3 a'); + if (link !== null) { + var url = link.getAttribute('href'); + if (newTab) { + window.open(url); + } else { + window.location.href = url; + } + } + }; + } + + function toggleHelp() { + var helpPanel = document.querySelector('#vim-hotkeys-help'); + if (helpPanel.length) { + helpPanel.classList.toggle('hidden'); + return; + } + + var categories = {}; + + for (var k in vimKeys) { + var key = vimKeys[k]; + categories[key.cat] = categories[key.cat] || []; + categories[key.cat].push(key); + } + + var sorted = Object.keys(categories).sort(function(a, b) { + return categories[b].length - categories[a].length; + }); + + if (sorted.length === 0) { + return; + } + + var html = '
'; + html += '
'; + + html += '
'; + html += '
'; + html += '

How to navigate searx with Vim-like hotkeys

'; + html += '
'; // col-sm-12 + html += '
'; // row + + for (var i = 0; i < sorted.length; i++) { + var cat = categories[sorted[i]]; + + var lastCategory = i === (sorted.length - 1); + var first = i % 2 === 0; + + if (first) { + html += '
'; + } + html += '
'; + + html += '
'; + html += '
' + cat[0].cat + '
'; + html += '
'; + html += '
    '; + + for (var cj in cat) { + html += '
  • ' + cat[cj].key + ' ' + cat[cj].des + '
  • '; + } + + html += '
'; + html += '
'; // panel-body + html += '
'; // panel + html += '
'; // col-sm-* + + if (!first || lastCategory) { + html += '
'; // row + } + } + + html += '
'; // container-fluid + html += '
'; // vim-hotkeys-help + + $('body').append(html); + } +}); +;/** +* searx is free software: you can redistribute it and/or modify +* it under the terms of the GNU Affero General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* searx is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Affero General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with searx. If not, see < http://www.gnu.org/licenses/ >. +* +* (C) 2014 by Thomas Pointhuber, +* (C) 2017 by Alexandre Flament, +*/ +(function (w, d, searx) { + 'use strict'; + + searx.ready(function () { + searx.on('.searx_overpass_request', 'click', function(event) { + // no more request + this.classList.remove("searx_overpass_request"); + + // + var overpass_url = "https://overpass-api.de/api/interpreter?data="; + var query_start = overpass_url + "[out:json][timeout:25];("; + var query_end = ");out meta;"; + + var osm_id = this.dataset.osmId; + var osm_type = this.dataset.osmType; + var result_table = d.querySelector("#" + this.dataset.resultTable); + var result_table_loadicon = d.querySelector("#" + this.dataset.resultTableLoadicon); + + // tags which can be ignored + var osm_ignore_tags = [ "addr:city", "addr:country", "addr:housenumber", "addr:postcode", "addr:street" ]; + + if(osm_id && osm_type && result_table) { + var query = null; + switch(osm_type) { + case 'node': + query = query_start + "node(" + osm_id + ");" + query_end; + break; + case 'way': + query = query_start + "way(" + osm_id + ");" + query_end; + break; + case 'relation': + query = query_start + "relation(" + osm_id + ");" + query_end; + break; + default: + break; + } + if(query) { + // console.log(query); + searx.http( 'GET', query ).then(function(html, contentType) { + html = JSON.parse(html); + if(html && html.elements && html.elements[0]) { + var element = html.elements[0]; + var newHtml = ""; + for (var row in element.tags) { + if(element.tags.name === null || osm_ignore_tags.indexOf(row) == -1) { + newHtml += "" + row + ""; + switch(row) { + case "phone": + case "fax": + newHtml += "" + element.tags[row] + ""; + break; + case "email": + newHtml += "" + element.tags[row] + ""; + break; + case "website": + case "url": + newHtml += "" + element.tags[row] + ""; + break; + case "wikidata": + newHtml += "" + element.tags[row] + ""; + break; + case "wikipedia": + if(element.tags[row].indexOf(":") != -1) { + newHtml += "" + element.tags[row] + ""; + break; + } + /* jshint ignore:start */ + default: + /* jshint ignore:end */ + newHtml += element.tags[row]; + break; + } + newHtml += ""; + } + } + result_table_loadicon.classList.add('invisible'); + result_table.classList.remove('invisible'); + result_table.querySelector("tbody").innerHTML = newHtml; + } + }) + .catch(function() { + result_table_loadicon.innerHTML = result_table_loadicon.innerHTML + "

could not load data!

"; + }); + } + } + + // this event occour only once per element + event.preventDefault(); + }); + + searx.on('.searx_init_map', 'click', function(event) { + // no more request + this.classList.remove("searx_init_map"); + + // + var leaflet_target = this.dataset.leafletTarget; + var map_lon = parseFloat(this.dataset.mapLon); + var map_lat = parseFloat(this.dataset.mapLat); + var map_zoom = parseFloat(this.dataset.mapZoom); + var map_boundingbox = JSON.parse(this.dataset.mapBoundingbox); + var map_geojson = JSON.parse(this.dataset.mapGeojson); + + searx.loadStyle('leaflet/leaflet.css'); + searx.loadScript('leaflet/leaflet.js', function() { + var map_bounds = null; + if(map_boundingbox) { + var southWest = L.latLng(map_boundingbox[0], map_boundingbox[2]); + var northEast = L.latLng(map_boundingbox[1], map_boundingbox[3]); + map_bounds = L.latLngBounds(southWest, northEast); + } + + // init map + var map = L.map(leaflet_target); + // create the tile layer with correct attribution + var osmMapnikUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'; + var osmMapnikAttrib='Map data © OpenStreetMap contributors'; + var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib}); + var osmWikimediaUrl='https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png'; + var osmWikimediaAttrib = 'Wikimedia maps beta | Maps data © OpenStreetMap contributors'; + var osmWikimedia = new L.TileLayer(osmWikimediaUrl, {minZoom: 1, maxZoom: 19, attribution: osmWikimediaAttrib}); + // init map view + if(map_bounds) { + // TODO hack: https://github.com/Leaflet/Leaflet/issues/2021 + // Still useful ? + setTimeout(function () { + map.fitBounds(map_bounds, { + maxZoom:17 + }); + }, 0); + } else if (map_lon && map_lat) { + if(map_zoom) { + map.setView(new L.latLng(map_lat, map_lon),map_zoom); + } else { + map.setView(new L.latLng(map_lat, map_lon),8); + } + } + + map.addLayer(osmMapnik); + + var baseLayers = { + "OSM Mapnik": osmMapnik/*, + "OSM Wikimedia": osmWikimedia*/ + }; + + L.control.layers(baseLayers).addTo(map); + + if(map_geojson) { + L.geoJson(map_geojson).addTo(map); + } /*else if(map_bounds) { + L.rectangle(map_bounds, {color: "#ff7800", weight: 3, fill:false}).addTo(map); + }*/ + }); + + // this event occour only once per element + event.preventDefault(); + }); + }); +})(window, document, window.searx); +;/** +* searx is free software: you can redistribute it and/or modify +* it under the terms of the GNU Affero General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* searx is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Affero General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with searx. If not, see < http://www.gnu.org/licenses/ >. +* +* (C) 2017 by Alexandre Flament, +*/ +(function(w, d, searx) { + 'use strict'; + + searx.ready(function() { + searx.image_thumbnail_layout = new searx.ImageLayout('#urls', '#urls .result-images', 'img.image_thumbnail', 200); + searx.image_thumbnail_layout.watch(); + + searx.on('.btn-collapse', 'click', function(event) { + var btnLabelCollapsed = this.getAttribute('data-btn-text-collapsed'); + var btnLabelNotCollapsed = this.getAttribute('data-btn-text-not-collapsed'); + var target = this.getAttribute('data-target'); + var targetElement = d.querySelector(target); + var html = this.innerHTML; + if (this.classList.contains('collapsed')) { + html = html.replace(btnLabelCollapsed, btnLabelNotCollapsed); + } else { + html = html.replace(btnLabelNotCollapsed, btnLabelCollapsed); + } + this.innerHTML = html; + this.classList.toggle('collapsed'); + targetElement.classList.toggle('invisible'); + }); + + searx.on('.media-loader', 'click', function(event) { + var target = this.getAttribute('data-target'); + var iframe_load = d.querySelector(target + ' > iframe'); + var srctest = iframe_load.getAttribute('src'); + if (srctest === null || srctest === undefined || srctest === false) { + iframe_load.setAttribute('src', iframe_load.getAttribute('data-src')); + } + }); + + w.addEventListener('scroll', function() { + var e = d.getElementById('backToTop'), + scrollTop = document.documentElement.scrollTop || document.body.scrollTop; + if (e !== null) { + if (scrollTop >= 200) { + e.style.opacity = 1; + } else { + e.style.opacity = 0; + } + } + }); + + }); + +})(window, document, window.searx); +;/** +* searx is free software: you can redistribute it and/or modify +* it under the terms of the GNU Affero General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* searx is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Affero General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with searx. If not, see < http://www.gnu.org/licenses/ >. +* +* (C) 2017 by Alexandre Flament, +*/ +(function(w, d, searx) { + 'use strict'; + + var firstFocus = true, qinput_id = "q", qinput; + + function placeCursorAtEnd(element) { + if (element.setSelectionRange) { + var len = element.value.length; + element.setSelectionRange(len, len); + } + } + + function submitIfQuery() { + if (qinput.value.length > 0) { + var search = document.getElementById('search'); + setTimeout(search.submit.bind(search), 0); + } + } + + searx.ready(function() { + qinput = d.getElementById(qinput_id); + + function placeCursorAtEndOnce(e) { + if (firstFocus) { + placeCursorAtEnd(qinput); + firstFocus = false; + } else { + // e.preventDefault(); + } + } + + if (qinput !== null) { + // autocompleter + if (searx.autocompleter) { + searx.autocomplete = AutoComplete.call(w, { + Url: "./autocompleter", + EmptyMessage: searx.noItemFound, + HttpMethod: searx.method, + MinChars: 4, + Delay: 300, + }, "#" + qinput_id); + + // hack, see : https://github.com/autocompletejs/autocomplete.js/issues/37 + w.addEventListener('resize', function() { + var event = new CustomEvent("position"); + qinput.dispatchEvent(event); + }); + } + + qinput.addEventListener('focus', placeCursorAtEndOnce, false); + qinput.focus(); + } + + // vanilla js version of search_on_category_select.js + if (qinput !== null && searx.search_on_category_select) { + d.querySelector('.help').className='invisible'; + + searx.on('#categories input', 'change', function(e) { + var i, categories = d.querySelectorAll('#categories input[type="checkbox"]'); + for(i=0; i=e.From&&a.keyCode<=e.To?!e.Not:e.Not))}),!0===s&&r.Callback.call(e,a)}},t.prototype.makeRequest=function(t,e){var n=Object.getOwnPropertyNames(t.HttpHeaders),o=new XMLHttpRequest,a=t._HttpMethod(),i=t._Url(),r=t._Pre(),s=encodeURIComponent(t._QueryArg())+"="+encodeURIComponent(r);a.match(/^GET$/i)&&(-1!==i.indexOf("?")?i+="&"+s:i+="?"+s),o.open(a,i,!0);for(var l=n.length-1;l>=0;l--)o.setRequestHeader(n[l],t.HttpHeaders[n[l]]);return o.onreadystatechange=function(){4==o.readyState&&200==o.status&&(t.$Cache[r]=o.response,e(o.response))},o},t.prototype.ajax=function(e,n,o){void 0===o&&(o=!0),e.$AjaxTimer&&window.clearTimeout(e.$AjaxTimer),!0===o?e.$AjaxTimer=window.setTimeout(t.prototype.ajax.bind(null,e,n,!1),e.Delay):(e.Request&&e.Request.abort(),e.Request=n,e.Request.send(e._QueryArg()+"="+e._Pre()))},t.prototype.cache=function(e,n){var o=e._Cache(e._Pre());if(void 0===o){var a=t.prototype.makeRequest(e,n);t.prototype.ajax(e,a)}else n(o)},t.prototype.destroy=function(t){for(var e in t.$Listeners)t.Input.removeEventListener(e,t.$Listeners[e]);t.DOMResults.parentNode.removeChild(t.DOMResults)},t}();i.merge=function(){for(var t,e={},n=0;n"+t+""}},HttpHeaders:{"Content-type":"application/x-www-form-urlencoded"},Limit:0,MinChars:0,HttpMethod:"GET",QueryArg:"q",Url:null,KeyboardMappings:{Enter:{Conditions:[{Is:13,Not:!1}],Callback:function(t){if(-1!=this.DOMResults.getAttribute("class").indexOf("open")){var e=this.DOMResults.querySelector("li.active");null!==e&&(t.preventDefault(),this._Select(e),this.DOMResults.setAttribute("class","autocomplete"))}},Operator:o.AND,Event:a.KEYDOWN},KeyUpAndDown_down:{Conditions:[{Is:38,Not:!1},{Is:40,Not:!1}],Callback:function(t){t.preventDefault()},Operator:o.OR,Event:a.KEYDOWN},KeyUpAndDown_up:{Conditions:[{Is:38,Not:!1},{Is:40,Not:!1}],Callback:function(t){t.preventDefault();var e=this.DOMResults.querySelector("li:first-child:not(.locked)"),n=this.DOMResults.querySelector("li:last-child:not(.locked)"),o=this.DOMResults.querySelector("li.active");if(o){var a=Array.prototype.indexOf.call(o.parentNode.children,o)+(t.keyCode-39),i=this.DOMResults.getElementsByTagName("li").length;a<0?a=i-1:a>=i&&(a=0),o.classList.remove("active"),o.parentElement.children.item(a).classList.add("active")}else n&&38==t.keyCode?n.classList.add("active"):e&&e.classList.add("active")},Operator:o.OR,Event:a.KEYUP},AlphaNum:{Conditions:[{Is:13,Not:!0},{From:35,To:40,Not:!0}],Callback:function(){var t=this.Input.getAttribute("data-autocomplete-old-value"),e=this._Pre();""!==e&&e.length>=this._MinChars()&&(t&&e==t||this.DOMResults.setAttribute("class","autocomplete open"),i.prototype.cache(this,function(t){this._Render(this._Post(t)),this._Open()}.bind(this)))},Operator:o.AND,Event:a.KEYUP}},DOMResults:null,Request:null,Input:null,_EmptyMessage:function(){return this.Input.hasAttribute("data-autocomplete-empty-message")?this.Input.getAttribute("data-autocomplete-empty-message"):!1!==this.EmptyMessage?this.EmptyMessage:""},_Limit:function(){var t=this.Input.getAttribute("data-autocomplete-limit");return isNaN(t)||null===t?this.Limit:parseInt(t,10)},_MinChars:function(){var t=this.Input.getAttribute("data-autocomplete-minchars");return isNaN(t)||null===t?this.MinChars:parseInt(t,10)},_Highlight:function(t){return t.replace(this.Highlight.getRegex(this._Pre()),this.Highlight.transform)},_HttpMethod:function(){return this.Input.hasAttribute("data-autocomplete-method")?this.Input.getAttribute("data-autocomplete-method"):this.HttpMethod},_QueryArg:function(){return this.Input.hasAttribute("data-autocomplete-param-name")?this.Input.getAttribute("data-autocomplete-param-name"):this.QueryArg},_Url:function(){return this.Input.hasAttribute("data-autocomplete")?this.Input.getAttribute("data-autocomplete"):this.Url},_Blur:function(t){if(!0===t)this.DOMResults.setAttribute("class","autocomplete"),this.Input.setAttribute("data-autocomplete-old-value",this.Input.value);else{var e=this;setTimeout(function(){e._Blur(!0)},150)}},_Cache:function(t){return this.$Cache[t]},_Focus:function(){var t=this.Input.getAttribute("data-autocomplete-old-value");(!t||this.Input.value!=t)&&this._MinChars()<=this.Input.value.length&&this.DOMResults.setAttribute("class","autocomplete open")},_Open:function(){var t=this;Array.prototype.forEach.call(this.DOMResults.getElementsByTagName("li"),function(e){"locked"!=e.getAttribute("class")&&(e.onclick=function(n){t._Select(e)},e.onmouseenter=function(){var n=t.DOMResults.querySelector("li.active");n!==e&&(null!==n&&n.classList.remove("active"),e.classList.add("active"))})})},_Position:function(){this.DOMResults.setAttribute("class","autocomplete"),this.DOMResults.setAttribute("style","top:"+(this.Input.offsetTop+this.Input.offsetHeight)+"px;left:"+this.Input.offsetLeft+"px;width:"+this.Input.clientWidth+"px;")},_Render:function(t){var e;e="string"==typeof t?this._RenderRaw(t):this._RenderResponseItems(t),this.DOMResults.hasChildNodes()&&this.DOMResults.removeChild(this.DOMResults.childNodes[0]),this.DOMResults.appendChild(e)},_RenderResponseItems:function(t){var e=document.createElement("ul"),n=document.createElement("li"),o=this._Limit();o<0?t=t.reverse():0===o&&(o=t.length);for(var a=0;a0)this.DOMResults.innerHTML=t;else{var o=this._EmptyMessage();""!==o&&(n.innerHTML=o,n.setAttribute("class","locked"),e.appendChild(n))}return e},_Post:function(t){try{var e=[],n=JSON.parse(t);if(0===Object.keys(n).length)return"";if(Array.isArray(n))for(var o=0;o0&&n.naturalHeight>0?o+=n.naturalWidth/n.naturalHeight:o+=1;return e/o},n.prototype._setSize=function(t,e){for(var n,o,a=t.length,i=0;i0&&n.naturalHeight>0?e*n.naturalWidth/n.naturalHeight:e,n.style.width=o+"px",n.style.height=e+"px",n.style.marginLeft="3px",n.style.marginTop="3px",n.style.marginRight=this.margin-7+"px",n.style.marginBottom=this.margin-7+"px"},n.prototype._alignImgs=function(t){var n,o,a=e.querySelector(this.container_selector).clientWidth;t:for(;t.length>0;){for(var i=1;i<=t.length;i++)if(n=t.slice(0,i),(o=this._getHeigth(n,a))0&&(this._alignImgs(r),r=[]),r.push(i.querySelector(this.img_selector)),a=i;r.length>0&&this._alignImgs(r)},n.prototype.watch=function(){function n(t){i._alignAllDone&&(i._alignAllDone=!1,setTimeout(function(){i.align(),i._alignAllDone=!0},100))}var o,a,i=this,r=e.querySelectorAll(this.results_selector),s=r.length;for(t.addEventListener("resize",n),t.addEventListener("pageshow",function(t){i.align()}),o=0;os)break}break;case"down":null===(i=o.nextElementSibling)&&(i=r[0]);break;case"up":null===(i=o.previousElementSibling)&&(i=r[r.length-1]);break;case"bottom":i=r[r.length-1];break;case"top":default:i=r[0]}if(i){o.removeAttribute("data-vim-selected"),i.setAttribute("data-vim-selected","true");var d=i.querySelector("h3 a")||i.querySelector("a");null!==d&&d.focus(),e||n()}}}function e(t){return function(){var e=$('div#pagination button[type="submit"]');2===e.length?t>=0&&to-120?window.scroll(window.scrollX,o-120):e+n'),i+='
',i+='
',i+='
'+l[0].cat+"
",i+='
',i+='
    ';for(var d in l)i+="
  • "+l[d].key+" "+l[d].des+"
  • ";i+="
",i+="
",i+="
",i+="
",c&&!u||(i+="")}i+="",i+="",$("body").append(i)}}},des:"toggle help window",cat:"Other"}};searx.on(document,"keyup",function(t){if(r.hasOwnProperty(t.keyCode)&&!t.ctrlKey&&!t.altKey&&!t.shiftKey&&!t.metaKey){var e=t.target.tagName.toLowerCase();27===t.keyCode?"input"!==e&&"select"!==e&&"textarea"!==e||r[t.keyCode].fun():t.target!==document.body&&"a"!==e&&"button"!==e||r[t.keyCode].fun()}})}),function(t,e,n){"use strict";n.ready(function(){n.on(".searx_overpass_request","click",function(t){this.classList.remove("searx_overpass_request");var o="https://overpass-api.de/api/interpreter?data=[out:json][timeout:25];(",a=this.dataset.osmId,i=this.dataset.osmType,r=e.querySelector("#"+this.dataset.resultTable),s=e.querySelector("#"+this.dataset.resultTableLoadicon),l=["addr:city","addr:country","addr:housenumber","addr:postcode","addr:street"];if(a&&i&&r){var u=null;switch(i){case"node":u=o+"node("+a+"););out meta;";break;case"way":u=o+"way("+a+"););out meta;";break;case"relation":u=o+"relation("+a+"););out meta;"}u&&n.http("GET",u).then(function(t,e){if((t=JSON.parse(t))&&t.elements&&t.elements[0]){var n=t.elements[0],o="";for(var a in n.tags)if(null===n.tags.name||-1==l.indexOf(a)){switch(o+=""+a+"",a){case"phone":case"fax":o+=''+n.tags[a]+"";break;case"email":o+=''+n.tags[a]+"";break;case"website":case"url":o+=''+n.tags[a]+"";break;case"wikidata":o+=''+n.tags[a]+"";break;case"wikipedia":if(-1!=n.tags[a].indexOf(":")){o+=''+n.tags[a]+"";break}default:o+=n.tags[a]}o+=""}s.classList.add("invisible"),r.classList.remove("invisible"),r.querySelector("tbody").innerHTML=o}}).catch(function(){s.innerHTML=s.innerHTML+'

could not load data!

'})}t.preventDefault()}),n.on(".searx_init_map","click",function(t){this.classList.remove("searx_init_map");var e=this.dataset.leafletTarget,o=parseFloat(this.dataset.mapLon),a=parseFloat(this.dataset.mapLat),i=parseFloat(this.dataset.mapZoom),r=JSON.parse(this.dataset.mapBoundingbox),s=JSON.parse(this.dataset.mapGeojson);n.loadStyle("leaflet/leaflet.css"),n.loadScript("leaflet/leaflet.js",function(){var t=null;if(r){var n=L.latLng(r[0],r[2]),l=L.latLng(r[1],r[3]);t=L.latLngBounds(n,l)}var u=L.map(e),c=new L.TileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{minZoom:1,maxZoom:19,attribution:'Map data © OpenStreetMap contributors'});new L.TileLayer("https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png",{minZoom:1,maxZoom:19,attribution:'Wikimedia maps beta | Maps data © OpenStreetMap contributors'});t?setTimeout(function(){u.fitBounds(t,{maxZoom:17})},0):o&&a&&(i?u.setView(new L.latLng(a,o),i):u.setView(new L.latLng(a,o),8)),u.addLayer(c);var d={"OSM Mapnik":c};L.control.layers(d).addTo(u),s&&L.geoJson(s).addTo(u)}),t.preventDefault()})})}(window,document,window.searx),function(t,e,n){"use strict";n.ready(function(){n.image_thumbnail_layout=new n.ImageLayout("#urls","#urls .result-images","img.image_thumbnail",200),n.image_thumbnail_layout.watch(),n.on(".btn-collapse","click",function(t){var n=this.getAttribute("data-btn-text-collapsed"),o=this.getAttribute("data-btn-text-not-collapsed"),a=this.getAttribute("data-target"),i=e.querySelector(a),r=this.innerHTML;r=this.classList.contains("collapsed")?r.replace(n,o):r.replace(o,n),this.innerHTML=r,this.classList.toggle("collapsed"),i.classList.toggle("invisible")}),n.on(".media-loader","click",function(t){var n=this.getAttribute("data-target"),o=e.querySelector(n+" > iframe"),a=o.getAttribute("src");null!==a&&void 0!==a&&!1!==a||o.setAttribute("src",o.getAttribute("data-src"))}),t.addEventListener("scroll",function(){var t=e.getElementById("backToTop"),n=document.documentElement.scrollTop||document.body.scrollTop;null!==t&&(t.style.opacity=n>=200?1:0)})})}(window,document,window.searx),function(t,e,n){"use strict";function o(t){if(t.setSelectionRange){var e=t.value.length;t.setSelectionRange(e,e)}}function a(){if(i.value.length>0){var t=document.getElementById("search");setTimeout(t.submit.bind(t),0)}}var i,r=!0;n.ready(function(){null!==(i=e.getElementById("q"))&&(n.autocompleter&&(n.autocomplete=AutoComplete.call(t,{Url:"./autocompleter",EmptyMessage:n.noItemFound,HttpMethod:n.method,MinChars:4,Delay:300},"#q"),t.addEventListener("resize",function(){var t=new CustomEvent("position");i.dispatchEvent(t)})),i.addEventListener("focus",function(t){r&&(o(i),r=!1)},!1),i.focus()),null!==i&&n.search_on_category_select&&(e.querySelector(".help").className="invisible",n.on("#categories input","change",function(t){var n,o=e.querySelectorAll('#categories input[type="checkbox"]');for(n=0;n. +* +* (C) 2017 by Alexandre Flament, +* +*/ +(function(w, d, searx) { + + 'use strict'; + + // not invented here tookit with bugs fixed elsewhere + // purposes : be just good enough and as small as possible + + // from https://plainjs.com/javascript/events/live-binding-event-handlers-14/ + if (w.Element) { + (function(ElementPrototype) { + ElementPrototype.matches = ElementPrototype.matches || + ElementPrototype.matchesSelector || + ElementPrototype.webkitMatchesSelector || + ElementPrototype.msMatchesSelector || + function(selector) { + var node = this, nodes = (node.parentNode || node.document).querySelectorAll(selector), i = -1; + while (nodes[++i] && nodes[i] != node); + return !!nodes[i]; + }; + })(Element.prototype); + } + + function callbackSafe(callback, el, e) { + try { + callback.call(el, e); + } catch (exception) { + console.log(exception); + } + } + + searx = searx || {}; + + searx.on = function(obj, eventType, callback, useCapture) { + useCapture = useCapture || false; + if (typeof obj !== 'string') { + // obj HTMLElement, HTMLDocument + obj.addEventListener(eventType, callback, useCapture); + } else { + // obj is a selector + d.addEventListener(eventType, function(e) { + var el = e.target || e.srcElement, found = false; + while (el && el.matches && el !== d && !(found = el.matches(obj))) el = el.parentElement; + if (found) callbackSafe(callback, el, e); + }, useCapture); + } + }; + + searx.ready = function(callback) { + if (document.readyState != 'loading') { + callback.call(w); + } else { + w.addEventListener('DOMContentLoaded', callback.bind(w)); + } + }; + + searx.http = function(method, url, callback) { + var req = new XMLHttpRequest(), + resolve = function() {}, + reject = function() {}, + promise = { + then: function(callback) { resolve = callback; return promise; }, + catch: function(callback) { reject = callback; return promise; } + }; + + try { + req.open(method, url, true); + + // On load + req.onload = function() { + if (req.status == 200) { + resolve(req.response, req.responseType); + } else { + reject(Error(req.statusText)); + } + }; + + // Handle network errors + req.onerror = function() { + reject(Error("Network Error")); + }; + + req.onabort = function() { + reject(Error("Transaction is aborted")); + }; + + // Make the request + req.send(); + } catch (ex) { + reject(ex); + } + + return promise; + }; + + searx.loadStyle = function(src) { + var path = searx.staticPath + src, + id = "style_" + src.replace('.', '_'), + s = d.getElementById(id); + if (s === null) { + s = d.createElement('link'); + s.setAttribute('id', id); + s.setAttribute('rel', 'stylesheet'); + s.setAttribute('type', 'text/css'); + s.setAttribute('href', path); + d.body.appendChild(s); + } + }; + + searx.loadScript = function(src, callback) { + var path = searx.staticPath + src, + id = "script_" + src.replace('.', '_'), + s = d.getElementById(id); + if (s === null) { + s = d.createElement('script'); + s.setAttribute('id', id); + s.setAttribute('src', path); + s.onload = callback; + s.onerror = function() { + s.setAttribute('error', '1'); + }; + d.body.appendChild(s); + } else if (!s.hasAttribute('error')) { + try { + callback.apply(s, []); + } catch (exception) { + console.log(exception); + } + } else { + console.log("callback not executed : script '" + path + "' not loaded."); + } + }; + + searx.on('.close', 'click', function(e) { + var el = e.target || e.srcElement; + this.parentNode.style.display="None"; + }); + return searx; +})(window, document, window.searx); diff --git a/searx/static/themes/simple/js/searx_src/autocomplete.js b/searx/static/themes/simple/js/searx_src/autocomplete.js new file mode 100644 index 00000000..b95fbcfb --- /dev/null +++ b/searx/static/themes/simple/js/searx_src/autocomplete.js @@ -0,0 +1,536 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.AutoComplete = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o @baptistedonaux + */ +var AutoComplete = (function () { + // Constructor + function AutoComplete(params, selector) { + if (params === void 0) { params = {}; } + if (selector === void 0) { selector = "[data-autocomplete]"; } + if (Array.isArray(selector)) { + selector.forEach(function (s) { + new AutoComplete(params, s); + }); + } + else if (typeof selector == "string") { + var elements = document.querySelectorAll(selector); + Array.prototype.forEach.call(elements, function (input) { + new AutoComplete(params, input); + }); + } + else { + var specificParams = AutoComplete.merge(AutoComplete.defaults, params, { + DOMResults: document.createElement("div") + }); + AutoComplete.prototype.create(specificParams, selector); + return specificParams; + } + } + AutoComplete.prototype.create = function (params, element) { + params.Input = element; + if (params.Input.nodeName.match(/^INPUT$/i) && (params.Input.hasAttribute("type") === false || params.Input.getAttribute("type").match(/^TEXT|SEARCH$/i))) { + params.Input.setAttribute("autocomplete", "off"); + params._Position(params); + params.Input.parentNode.appendChild(params.DOMResults); + params.$Listeners = { + blur: params._Blur.bind(params), + destroy: AutoComplete.prototype.destroy.bind(null, params), + focus: params._Focus.bind(params), + keyup: AutoComplete.prototype.event.bind(null, params, EventType.KEYUP), + keydown: AutoComplete.prototype.event.bind(null, params, EventType.KEYDOWN), + position: params._Position.bind(params) + }; + for (var event in params.$Listeners) { + params.Input.addEventListener(event, params.$Listeners[event]); + } + } + }; + AutoComplete.prototype.getEventsByType = function (params, type) { + var mappings = {}; + for (var key in params.KeyboardMappings) { + var event = EventType.KEYUP; + if (params.KeyboardMappings[key].Event !== undefined) { + event = params.KeyboardMappings[key].Event; + } + if (event == type) { + mappings[key] = params.KeyboardMappings[key]; + } + } + return mappings; + }; + AutoComplete.prototype.event = function (params, type, event) { + var eventIdentifier = function (condition) { + if ((match === true && mapping.Operator == ConditionOperator.AND) || (match === false && mapping.Operator == ConditionOperator.OR)) { + condition = AutoComplete.merge({ + Not: false + }, condition); + if (condition.hasOwnProperty("Is")) { + if (condition.Is == event.keyCode) { + match = !condition.Not; + } + else { + match = condition.Not; + } + } + else if (condition.hasOwnProperty("From") && condition.hasOwnProperty("To")) { + if (event.keyCode >= condition.From && event.keyCode <= condition.To) { + match = !condition.Not; + } + else { + match = condition.Not; + } + } + } + }; + for (var name in AutoComplete.prototype.getEventsByType(params, type)) { + var mapping = AutoComplete.merge({ + Operator: ConditionOperator.AND + }, params.KeyboardMappings[name]), match = ConditionOperator.AND == mapping.Operator; + mapping.Conditions.forEach(eventIdentifier); + if (match === true) { + mapping.Callback.call(params, event); + } + } + }; + AutoComplete.prototype.makeRequest = function (params, callback) { + var propertyHttpHeaders = Object.getOwnPropertyNames(params.HttpHeaders), request = new XMLHttpRequest(), method = params._HttpMethod(), url = params._Url(), queryParams = params._Pre(), queryParamsStringify = encodeURIComponent(params._QueryArg()) + "=" + encodeURIComponent(queryParams); + if (method.match(/^GET$/i)) { + if (url.indexOf("?") !== -1) { + url += "&" + queryParamsStringify; + } + else { + url += "?" + queryParamsStringify; + } + } + request.open(method, url, true); + for (var i = propertyHttpHeaders.length - 1; i >= 0; i--) { + request.setRequestHeader(propertyHttpHeaders[i], params.HttpHeaders[propertyHttpHeaders[i]]); + } + request.onreadystatechange = function () { + if (request.readyState == 4 && request.status == 200) { + params.$Cache[queryParams] = request.response; + callback(request.response); + } + }; + return request; + }; + AutoComplete.prototype.ajax = function (params, request, timeout) { + if (timeout === void 0) { timeout = true; } + if (params.$AjaxTimer) { + window.clearTimeout(params.$AjaxTimer); + } + if (timeout === true) { + params.$AjaxTimer = window.setTimeout(AutoComplete.prototype.ajax.bind(null, params, request, false), params.Delay); + } + else { + if (params.Request) { + params.Request.abort(); + } + params.Request = request; + params.Request.send(params._QueryArg() + "=" + params._Pre()); + } + }; + AutoComplete.prototype.cache = function (params, callback) { + var response = params._Cache(params._Pre()); + if (response === undefined) { + var request = AutoComplete.prototype.makeRequest(params, callback); + AutoComplete.prototype.ajax(params, request); + } + else { + callback(response); + } + }; + AutoComplete.prototype.destroy = function (params) { + for (var event in params.$Listeners) { + params.Input.removeEventListener(event, params.$Listeners[event]); + } + params.DOMResults.parentNode.removeChild(params.DOMResults); + }; + return AutoComplete; +}()); +AutoComplete.merge = function () { + var merge = {}, tmp; + for (var i = 0; i < arguments.length; i++) { + for (tmp in arguments[i]) { + merge[tmp] = arguments[i][tmp]; + } + } + return merge; +}; +AutoComplete.defaults = { + Delay: 150, + EmptyMessage: "No result here", + Highlight: { + getRegex: function (value) { + return new RegExp(value, "ig"); + }, + transform: function (value) { + return "" + value + ""; + } + }, + HttpHeaders: { + "Content-type": "application/x-www-form-urlencoded" + }, + Limit: 0, + MinChars: 0, + HttpMethod: "GET", + QueryArg: "q", + Url: null, + KeyboardMappings: { + "Enter": { + Conditions: [{ + Is: 13, + Not: false + }], + Callback: function (event) { + if (this.DOMResults.getAttribute("class").indexOf("open") != -1) { + var liActive = this.DOMResults.querySelector("li.active"); + if (liActive !== null) { + event.preventDefault(); + this._Select(liActive); + this.DOMResults.setAttribute("class", "autocomplete"); + } + } + }, + Operator: ConditionOperator.AND, + Event: EventType.KEYDOWN + }, + "KeyUpAndDown_down": { + Conditions: [{ + Is: 38, + Not: false + }, + { + Is: 40, + Not: false + }], + Callback: function (event) { + event.preventDefault(); + }, + Operator: ConditionOperator.OR, + Event: EventType.KEYDOWN + }, + "KeyUpAndDown_up": { + Conditions: [{ + Is: 38, + Not: false + }, + { + Is: 40, + Not: false + }], + Callback: function (event) { + event.preventDefault(); + var first = this.DOMResults.querySelector("li:first-child:not(.locked)"), last = this.DOMResults.querySelector("li:last-child:not(.locked)"), active = this.DOMResults.querySelector("li.active"); + if (active) { + var currentIndex = Array.prototype.indexOf.call(active.parentNode.children, active), position = currentIndex + (event.keyCode - 39), lisCount = this.DOMResults.getElementsByTagName("li").length; + if (position < 0) { + position = lisCount - 1; + } + else if (position >= lisCount) { + position = 0; + } + active.classList.remove("active"); + active.parentElement.children.item(position).classList.add("active"); + } + else if (last && event.keyCode == 38) { + last.classList.add("active"); + } + else if (first) { + first.classList.add("active"); + } + }, + Operator: ConditionOperator.OR, + Event: EventType.KEYUP + }, + "AlphaNum": { + Conditions: [{ + Is: 13, + Not: true + }, { + From: 35, + To: 40, + Not: true + }], + Callback: function () { + var oldValue = this.Input.getAttribute("data-autocomplete-old-value"), currentValue = this._Pre(); + if (currentValue !== "" && currentValue.length >= this._MinChars()) { + if (!oldValue || currentValue != oldValue) { + this.DOMResults.setAttribute("class", "autocomplete open"); + } + AutoComplete.prototype.cache(this, function (response) { + this._Render(this._Post(response)); + this._Open(); + }.bind(this)); + } + }, + Operator: ConditionOperator.AND, + Event: EventType.KEYUP + } + }, + DOMResults: null, + Request: null, + Input: null, + /** + * Return the message when no result returns + */ + _EmptyMessage: function () { + var emptyMessage = ""; + if (this.Input.hasAttribute("data-autocomplete-empty-message")) { + emptyMessage = this.Input.getAttribute("data-autocomplete-empty-message"); + } + else if (this.EmptyMessage !== false) { + emptyMessage = this.EmptyMessage; + } + else { + emptyMessage = ""; + } + return emptyMessage; + }, + /** + * Returns the maximum number of results + */ + _Limit: function () { + var limit = this.Input.getAttribute("data-autocomplete-limit"); + if (isNaN(limit) || limit === null) { + return this.Limit; + } + return parseInt(limit, 10); + }, + /** + * Returns the minimum number of characters entered before firing ajax + */ + _MinChars: function () { + var minchars = this.Input.getAttribute("data-autocomplete-minchars"); + if (isNaN(minchars) || minchars === null) { + return this.MinChars; + } + return parseInt(minchars, 10); + }, + /** + * Apply transformation on labels response + */ + _Highlight: function (label) { + return label.replace(this.Highlight.getRegex(this._Pre()), this.Highlight.transform); + }, + /** + * Returns the HHTP method to use + */ + _HttpMethod: function () { + if (this.Input.hasAttribute("data-autocomplete-method")) { + return this.Input.getAttribute("data-autocomplete-method"); + } + return this.HttpMethod; + }, + /** + * Returns the query param to use + */ + _QueryArg: function () { + if (this.Input.hasAttribute("data-autocomplete-param-name")) { + return this.Input.getAttribute("data-autocomplete-param-name"); + } + return this.QueryArg; + }, + /** + * Returns the URL to use for AJAX request + */ + _Url: function () { + if (this.Input.hasAttribute("data-autocomplete")) { + return this.Input.getAttribute("data-autocomplete"); + } + return this.Url; + }, + /** + * Manage the close + */ + _Blur: function (now) { + if (now === true) { + this.DOMResults.setAttribute("class", "autocomplete"); + this.Input.setAttribute("data-autocomplete-old-value", this.Input.value); + } + else { + var params = this; + setTimeout(function () { + params._Blur(true); + }, 150); + } + }, + /** + * Manage the cache + */ + _Cache: function (value) { + return this.$Cache[value]; + }, + /** + * Manage the open + */ + _Focus: function () { + var oldValue = this.Input.getAttribute("data-autocomplete-old-value"); + if ((!oldValue || this.Input.value != oldValue) && this._MinChars() <= this.Input.value.length) { + this.DOMResults.setAttribute("class", "autocomplete open"); + } + }, + /** + * Bind all results item if one result is opened + */ + _Open: function () { + var params = this; + Array.prototype.forEach.call(this.DOMResults.getElementsByTagName("li"), function (li) { + if (li.getAttribute("class") != "locked") { + li.onclick = function (event) { + params._Select(li); + }; + li.onmouseenter = function () { + var active = params.DOMResults.querySelector("li.active"); + if (active !== li) { + if (active !== null) { + active.classList.remove("active"); + } + li.classList.add("active"); + } + }; + } + }); + }, + /** + * Position the results HTML element + */ + _Position: function () { + this.DOMResults.setAttribute("class", "autocomplete"); + this.DOMResults.setAttribute("style", "top:" + (this.Input.offsetTop + this.Input.offsetHeight) + "px;left:" + this.Input.offsetLeft + "px;width:" + this.Input.clientWidth + "px;"); + }, + /** + * Execute the render of results DOM element + */ + _Render: function (response) { + var ul; + if (typeof response == "string") { + ul = this._RenderRaw(response); + } + else { + ul = this._RenderResponseItems(response); + } + if (this.DOMResults.hasChildNodes()) { + this.DOMResults.removeChild(this.DOMResults.childNodes[0]); + } + this.DOMResults.appendChild(ul); + }, + /** + * ResponseItems[] rendering + */ + _RenderResponseItems: function (response) { + var ul = document.createElement("ul"), li = document.createElement("li"), limit = this._Limit(); + // Order + if (limit < 0) { + response = response.reverse(); + } + else if (limit === 0) { + limit = response.length; + } + for (var item = 0; item < Math.min(Math.abs(limit), response.length); item++) { + li.innerHTML = response[item].Label; + li.setAttribute("data-autocomplete-value", response[item].Value); + ul.appendChild(li); + li = document.createElement("li"); + } + return ul; + }, + /** + * string response rendering (RAW HTML) + */ + _RenderRaw: function (response) { + var ul = document.createElement("ul"), li = document.createElement("li"); + if (response.length > 0) { + this.DOMResults.innerHTML = response; + } + else { + var emptyMessage = this._EmptyMessage(); + if (emptyMessage !== "") { + li.innerHTML = emptyMessage; + li.setAttribute("class", "locked"); + ul.appendChild(li); + } + } + return ul; + }, + /** + * Deal with request response + */ + _Post: function (response) { + try { + var returnResponse = []; + //JSON return + var json = JSON.parse(response); + if (Object.keys(json).length === 0) { + return ""; + } + if (Array.isArray(json)) { + for (var i = 0; i < Object.keys(json).length; i++) { + returnResponse[returnResponse.length] = { "Value": json[i], "Label": this._Highlight(json[i]) }; + } + } + else { + for (var value in json) { + returnResponse.push({ + "Value": value, + "Label": this._Highlight(json[value]) + }); + } + } + return returnResponse; + } + catch (event) { + //HTML return + return response; + } + }, + /** + * Return the autocomplete value to send (before request) + */ + _Pre: function () { + return this.Input.value; + }, + /** + * Choice one result item + */ + _Select: function (item) { + console.log('test test test'); + if (item.hasAttribute("data-autocomplete-value")) { + this.Input.value = item.getAttribute("data-autocomplete-value"); + } + else { + this.Input.value = item.innerHTML; + } + this.Input.setAttribute("data-autocomplete-old-value", this.Input.value); + }, + $AjaxTimer: null, + $Cache: {}, + $Listeners: {} +}; +module.exports = AutoComplete; + +},{}]},{},[1])(1) +}); diff --git a/searx/static/themes/simple/js/searx_src/searx_imageresult.js b/searx/static/themes/simple/js/searx_src/searx_imageresult.js new file mode 100644 index 00000000..7bbfc145 --- /dev/null +++ b/searx/static/themes/simple/js/searx_src/searx_imageresult.js @@ -0,0 +1,151 @@ +/** +* +* Google Image Layout v0.0.1 +* Description, by Anh Trinh. +* Heavily modified for searx +* http://trinhtrunganh.com +* +* @license Free to use under the MIT License. +* +*/ +(function(w, d) { + 'use strict'; + + function ImageLayout(container_selector, results_selector, img_selector, maxHeight) { + this.container_selector = container_selector; + this.results_selector = results_selector; + this.img_selector = img_selector; + this.margin = 10; + this.maxHeight = maxHeight; + this._alignAllDone = true; + } + + /** + * Get the height that make all images fit the container + * + * width = w1 + w2 + w3 + ... = r1*h + r2*h + r3*h + ... + * + * @param {[type]} images the images to be calculated + * @param {[type]} width the container witdth + * @param {[type]} margin the margin between each image + * + * @return {[type]} the height + */ + ImageLayout.prototype._getHeigth = function(images, width) { + var r = 0, + img; + + width -= images.length * this.margin; + for (var i = 0; i < images.length; i++) { + img = images[i]; + if ((img.naturalWidth > 0) && (img.naturalHeight > 0)) { + r += img.naturalWidth / img.naturalHeight; + } else { + // assume that not loaded images are square + r += 1; + } + } + + return width / r; //have to round down because Firefox will automatically roundup value with number of decimals > 3 + }; + + ImageLayout.prototype._setSize = function(images, height) { + var img, imgWidth, imagesLength = images.length; + for (var i = 0; i < imagesLength; i++) { + img = images[i]; + if ((img.naturalWidth > 0) && (img.naturalHeight > 0)) { + imgWidth = height * img.naturalWidth / img.naturalHeight; + } else { + // not loaded image : make it square as _getHeigth said it + imgWidth = height; + } + img.style.width = imgWidth + 'px'; + img.style.height = height + 'px'; + img.style.marginLeft = '3px'; + img.style.marginTop = '3px'; + img.style.marginRight = this.margin - 7 + 'px'; // -4 is the negative margin of the inline element + img.style.marginBottom = this.margin - 7 + 'px'; + } + }; + + ImageLayout.prototype._alignImgs = function(imgGroup) { + var slice, h, + containerWidth = d.querySelector(this.container_selector).clientWidth; + + w: while (imgGroup.length > 0) { + for (var i = 1; i <= imgGroup.length; i++) { + slice = imgGroup.slice(0, i); + h = this._getHeigth(slice, containerWidth); + if (h < this.maxHeight) { + this._setSize(slice, h); + imgGroup = imgGroup.slice(i); + continue w; + } + } + this._setSize(slice, Math.min(this.maxHeight, h)); + break; + } + }; + + ImageLayout.prototype.align = function(results_selector) { + var results_selectorNode = d.querySelectorAll(this.results_selector), + results_length = results_selectorNode.length, + previous = null, + current = null, + imgGroup = []; + for (var i = 0; i < results_length; i++) { + current = results_selectorNode[i]; + if (current.previousElementSibling !== previous && imgGroup.length > 0) { + // the current image is not conected to previous one + // so the current image is the start of a new group of images. + // so call _alignImgs to align the current group + this._alignImgs(imgGroup); + // and start a new empty group of images + imgGroup = []; + } + // add the current image to the group (only the img tag) + imgGroup.push(current.querySelector(this.img_selector)); + // update the previous variable + previous = current; + } + // align the remaining images + if (imgGroup.length > 0) { + this._alignImgs(imgGroup); + } + }; + + ImageLayout.prototype.watch = function() { + var i, img, imgGroup, imgNodeLength, + obj = this, + results_nodes = d.querySelectorAll(this.results_selector), + results_length = results_nodes.length; + + function align(e) { + obj.align(); + } + + function throttleAlign(e) { + if (obj._alignAllDone) { + obj._alignAllDone = false; + setTimeout(function() { + obj.align(); + obj._alignAllDone = true; + }, 100); + } + } + + w.addEventListener('resize', throttleAlign); + w.addEventListener('pageshow', align); + + for (i = 0; i < results_length; i++) { + img = results_nodes[i].querySelector(this.img_selector); + if (typeof img !== 'undefined') { + img.addEventListener('load', throttleAlign); + img.addEventListener('error', throttleAlign); + } + } + }; + + w.searx.ImageLayout = ImageLayout; + +})(window, document); diff --git a/searx/static/themes/simple/js/searx_src/searx_keyboard.js b/searx/static/themes/simple/js/searx_src/searx_keyboard.js new file mode 100644 index 00000000..6365b524 --- /dev/null +++ b/searx/static/themes/simple/js/searx_src/searx_keyboard.js @@ -0,0 +1,360 @@ +searx.ready(function() { + + searx.on('.result', 'click', function() { + highlightResult(this)(true); + }); + + searx.on('.result a', 'focus', function(e) { + var el = e.target; + while (el !== undefined) { + if (el.classList.contains('result')) { + if (el.getAttribute("data-vim-selected") === null) { + highlightResult(el)(true); + } + break; + } + el = el.parentNode; + } + }, true); + + var vimKeys = { + 27: { + key: 'Escape', + fun: removeFocus, + des: 'remove focus from the focused input', + cat: 'Control' + }, + 73: { + key: 'i', + fun: searchInputFocus, + des: 'focus on the search input', + cat: 'Control' + }, + 66: { + key: 'b', + fun: scrollPage(-window.innerHeight), + des: 'scroll one page up', + cat: 'Navigation' + }, + 70: { + key: 'f', + fun: scrollPage(window.innerHeight), + des: 'scroll one page down', + cat: 'Navigation' + }, + 85: { + key: 'u', + fun: scrollPage(-window.innerHeight / 2), + des: 'scroll half a page up', + cat: 'Navigation' + }, + 68: { + key: 'd', + fun: scrollPage(window.innerHeight / 2), + des: 'scroll half a page down', + cat: 'Navigation' + }, + 71: { + key: 'g', + fun: scrollPageTo(-document.body.scrollHeight, 'top'), + des: 'scroll to the top of the page', + cat: 'Navigation' + }, + 86: { + key: 'v', + fun: scrollPageTo(document.body.scrollHeight, 'bottom'), + des: 'scroll to the bottom of the page', + cat: 'Navigation' + }, + 75: { + key: 'k', + fun: highlightResult('up'), + des: 'select previous search result', + cat: 'Results' + }, + 74: { + key: 'j', + fun: highlightResult('down'), + des: 'select next search result', + cat: 'Results' + }, + 80: { + key: 'p', + fun: pageButtonClick(0), + des: 'go to previous page', + cat: 'Results' + }, + 78: { + key: 'n', + fun: pageButtonClick(1), + des: 'go to next page', + cat: 'Results' + }, + 79: { + key: 'o', + fun: openResult(false), + des: 'open search result', + cat: 'Results' + }, + 84: { + key: 't', + fun: openResult(true), + des: 'open the result in a new tab', + cat: 'Results' + }, + 82: { + key: 'r', + fun: reloadPage, + des: 'reload page from the server', + cat: 'Control' + }, + 72: { + key: 'h', + fun: toggleHelp, + des: 'toggle help window', + cat: 'Other' + } + }; + + searx.on(document, "keyup", function(e) { + // check for modifiers so we don't break browser's hotkeys + if (vimKeys.hasOwnProperty(e.keyCode) && !e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey) { + var tagName = e.target.tagName.toLowerCase(); + if (e.keyCode === 27) { + if (tagName === 'input' || tagName === 'select' || tagName === 'textarea') { + vimKeys[e.keyCode].fun(); + } + } else { + if (e.target === document.body || tagName === 'a' || tagName === 'button') { + vimKeys[e.keyCode].fun(); + } + } + } + }); + + function highlightResult(which) { + return function(noScroll) { + var current = document.querySelector('.result[data-vim-selected]'), + effectiveWhich = which; + if (current === null) { + // no selection : choose the first one + current = document.querySelector('.result'); + if (current === null) { + // no first one : there are no results + return; + } + // replace up/down actions by selecting first one + if (which === "down" || which === "up") { + effectiveWhich = current; + } + } + + var next, results = document.querySelectorAll('.result'); + + if (typeof effectiveWhich !== 'string') { + next = effectiveWhich; + } else { + switch (effectiveWhich) { + case 'visible': + var top = document.documentElement.scrollTop || document.body.scrollTop; + var bot = top + document.documentElement.clientHeight; + + for (var i = 0; i < results.length; i++) { + next = results[i]; + var etop = next.offsetTop; + var ebot = etop + next.clientHeight; + + if ((ebot <= bot) && (etop > top)) { + break; + } + } + break; + case 'down': + next = current.nextElementSibling; + if (next === null) { + next = results[0]; + } + break; + case 'up': + next = current.previousElementSibling; + if (next === null) { + next = results[results.length - 1]; + } + break; + case 'bottom': + next = results[results.length - 1]; + break; + case 'top': + /* falls through */ + default: + next = results[0]; + } + } + + if (next) { + current.removeAttribute('data-vim-selected'); + next.setAttribute('data-vim-selected', 'true'); + var link = next.querySelector('h3 a') || next.querySelector('a'); + if (link !== null) { + link.focus(); + } + if (!noScroll) { + scrollPageToSelected(); + } + } + }; + } + + function reloadPage() { + document.location.reload(true); + } + + function removeFocus() { + if (document.activeElement) { + document.activeElement.blur(); + } + } + + function pageButtonClick(num) { + return function() { + var buttons = $('div#pagination button[type="submit"]'); + if (buttons.length !== 2) { + console.log('page navigation with this theme is not supported'); + return; + } + if (num >= 0 && num < buttons.length) { + buttons[num].click(); + } else { + console.log('pageButtonClick(): invalid argument'); + } + }; + } + + function scrollPageToSelected() { + var sel = document.querySelector('.result[data-vim-selected]'); + if (sel === null) { + return; + } + var wtop = document.documentElement.scrollTop || document.body.scrollTop, + wheight = document.documentElement.clientHeight, + etop = sel.offsetTop, + ebot = etop + sel.clientHeight, + offset = 120; + // first element ? + if ((sel.previousElementSibling === null) && (ebot < wheight)) { + // set to the top of page if the first element + // is fully included in the viewport + window.scroll(window.scrollX, 0); + return; + } + if (wtop > (etop - offset)) { + window.scroll(window.scrollX, etop - offset); + } else { + var wbot = wtop + wheight; + if (wbot < (ebot + offset)) { + window.scroll(window.scrollX, ebot - wheight + offset); + } + } + } + + function scrollPage(amount) { + return function() { + window.scrollBy(0, amount); + highlightResult('visible')(); + }; + } + + function scrollPageTo(position, nav) { + return function() { + window.scrollTo(0, position); + highlightResult(nav)(); + }; + } + + function searchInputFocus() { + window.scrollTo(0, 0); + document.querySelector('#q').focus(); + } + + function openResult(newTab) { + return function() { + var link = document.querySelector('.result[data-vim-selected] h3 a'); + if (link !== null) { + var url = link.getAttribute('href'); + if (newTab) { + window.open(url); + } else { + window.location.href = url; + } + } + }; + } + + function toggleHelp() { + var helpPanel = document.querySelector('#vim-hotkeys-help'); + if (helpPanel.length) { + helpPanel.classList.toggle('hidden'); + return; + } + + var categories = {}; + + for (var k in vimKeys) { + var key = vimKeys[k]; + categories[key.cat] = categories[key.cat] || []; + categories[key.cat].push(key); + } + + var sorted = Object.keys(categories).sort(function(a, b) { + return categories[b].length - categories[a].length; + }); + + if (sorted.length === 0) { + return; + } + + var html = '
'; + html += '
'; + + html += '
'; + html += '
'; + html += '

How to navigate searx with Vim-like hotkeys

'; + html += '
'; // col-sm-12 + html += '
'; // row + + for (var i = 0; i < sorted.length; i++) { + var cat = categories[sorted[i]]; + + var lastCategory = i === (sorted.length - 1); + var first = i % 2 === 0; + + if (first) { + html += '
'; + } + html += '
'; + + html += '
'; + html += '
' + cat[0].cat + '
'; + html += '
'; + html += '
    '; + + for (var cj in cat) { + html += '
  • ' + cat[cj].key + ' ' + cat[cj].des + '
  • '; + } + + html += '
'; + html += '
'; // panel-body + html += '
'; // panel + html += '
'; // col-sm-* + + if (!first || lastCategory) { + html += '
'; // row + } + } + + html += '
'; // container-fluid + html += '
'; // vim-hotkeys-help + + $('body').append(html); + } +}); diff --git a/searx/static/themes/simple/js/searx_src/searx_mapresult.js b/searx/static/themes/simple/js/searx_src/searx_mapresult.js new file mode 100644 index 00000000..823f6481 --- /dev/null +++ b/searx/static/themes/simple/js/searx_src/searx_mapresult.js @@ -0,0 +1,175 @@ +/** +* searx is free software: you can redistribute it and/or modify +* it under the terms of the GNU Affero General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* searx is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Affero General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with searx. If not, see < http://www.gnu.org/licenses/ >. +* +* (C) 2014 by Thomas Pointhuber, +* (C) 2017 by Alexandre Flament, +*/ +(function (w, d, searx) { + 'use strict'; + + searx.ready(function () { + searx.on('.searx_overpass_request', 'click', function(event) { + // no more request + this.classList.remove("searx_overpass_request"); + + // + var overpass_url = "https://overpass-api.de/api/interpreter?data="; + var query_start = overpass_url + "[out:json][timeout:25];("; + var query_end = ");out meta;"; + + var osm_id = this.dataset.osmId; + var osm_type = this.dataset.osmType; + var result_table = d.querySelector("#" + this.dataset.resultTable); + var result_table_loadicon = d.querySelector("#" + this.dataset.resultTableLoadicon); + + // tags which can be ignored + var osm_ignore_tags = [ "addr:city", "addr:country", "addr:housenumber", "addr:postcode", "addr:street" ]; + + if(osm_id && osm_type && result_table) { + var query = null; + switch(osm_type) { + case 'node': + query = query_start + "node(" + osm_id + ");" + query_end; + break; + case 'way': + query = query_start + "way(" + osm_id + ");" + query_end; + break; + case 'relation': + query = query_start + "relation(" + osm_id + ");" + query_end; + break; + default: + break; + } + if(query) { + // console.log(query); + searx.http( 'GET', query ).then(function(html, contentType) { + html = JSON.parse(html); + if(html && html.elements && html.elements[0]) { + var element = html.elements[0]; + var newHtml = ""; + for (var row in element.tags) { + if(element.tags.name === null || osm_ignore_tags.indexOf(row) == -1) { + newHtml += "" + row + ""; + switch(row) { + case "phone": + case "fax": + newHtml += "" + element.tags[row] + ""; + break; + case "email": + newHtml += "" + element.tags[row] + ""; + break; + case "website": + case "url": + newHtml += "" + element.tags[row] + ""; + break; + case "wikidata": + newHtml += "" + element.tags[row] + ""; + break; + case "wikipedia": + if(element.tags[row].indexOf(":") != -1) { + newHtml += "" + element.tags[row] + ""; + break; + } + /* jshint ignore:start */ + default: + /* jshint ignore:end */ + newHtml += element.tags[row]; + break; + } + newHtml += ""; + } + } + result_table_loadicon.classList.add('invisible'); + result_table.classList.remove('invisible'); + result_table.querySelector("tbody").innerHTML = newHtml; + } + }) + .catch(function() { + result_table_loadicon.innerHTML = result_table_loadicon.innerHTML + "

could not load data!

"; + }); + } + } + + // this event occour only once per element + event.preventDefault(); + }); + + searx.on('.searx_init_map', 'click', function(event) { + // no more request + this.classList.remove("searx_init_map"); + + // + var leaflet_target = this.dataset.leafletTarget; + var map_lon = parseFloat(this.dataset.mapLon); + var map_lat = parseFloat(this.dataset.mapLat); + var map_zoom = parseFloat(this.dataset.mapZoom); + var map_boundingbox = JSON.parse(this.dataset.mapBoundingbox); + var map_geojson = JSON.parse(this.dataset.mapGeojson); + + searx.loadStyle('leaflet/leaflet.css'); + searx.loadScript('leaflet/leaflet.js', function() { + var map_bounds = null; + if(map_boundingbox) { + var southWest = L.latLng(map_boundingbox[0], map_boundingbox[2]); + var northEast = L.latLng(map_boundingbox[1], map_boundingbox[3]); + map_bounds = L.latLngBounds(southWest, northEast); + } + + // init map + var map = L.map(leaflet_target); + // create the tile layer with correct attribution + var osmMapnikUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'; + var osmMapnikAttrib='Map data © OpenStreetMap contributors'; + var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib}); + var osmWikimediaUrl='https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png'; + var osmWikimediaAttrib = 'Wikimedia maps beta | Maps data © OpenStreetMap contributors'; + var osmWikimedia = new L.TileLayer(osmWikimediaUrl, {minZoom: 1, maxZoom: 19, attribution: osmWikimediaAttrib}); + // init map view + if(map_bounds) { + // TODO hack: https://github.com/Leaflet/Leaflet/issues/2021 + // Still useful ? + setTimeout(function () { + map.fitBounds(map_bounds, { + maxZoom:17 + }); + }, 0); + } else if (map_lon && map_lat) { + if(map_zoom) { + map.setView(new L.latLng(map_lat, map_lon),map_zoom); + } else { + map.setView(new L.latLng(map_lat, map_lon),8); + } + } + + map.addLayer(osmMapnik); + + var baseLayers = { + "OSM Mapnik": osmMapnik/*, + "OSM Wikimedia": osmWikimedia*/ + }; + + L.control.layers(baseLayers).addTo(map); + + if(map_geojson) { + L.geoJson(map_geojson).addTo(map); + } /*else if(map_bounds) { + L.rectangle(map_bounds, {color: "#ff7800", weight: 3, fill:false}).addTo(map); + }*/ + }); + + // this event occour only once per element + event.preventDefault(); + }); + }); +})(window, document, window.searx); diff --git a/searx/static/themes/simple/js/searx_src/searx_results.js b/searx/static/themes/simple/js/searx_src/searx_results.js new file mode 100644 index 00000000..b13da839 --- /dev/null +++ b/searx/static/themes/simple/js/searx_src/searx_results.js @@ -0,0 +1,63 @@ +/** +* searx is free software: you can redistribute it and/or modify +* it under the terms of the GNU Affero General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* searx is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Affero General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with searx. If not, see < http://www.gnu.org/licenses/ >. +* +* (C) 2017 by Alexandre Flament, +*/ +(function(w, d, searx) { + 'use strict'; + + searx.ready(function() { + searx.image_thumbnail_layout = new searx.ImageLayout('#urls', '#urls .result-images', 'img.image_thumbnail', 200); + searx.image_thumbnail_layout.watch(); + + searx.on('.btn-collapse', 'click', function(event) { + var btnLabelCollapsed = this.getAttribute('data-btn-text-collapsed'); + var btnLabelNotCollapsed = this.getAttribute('data-btn-text-not-collapsed'); + var target = this.getAttribute('data-target'); + var targetElement = d.querySelector(target); + var html = this.innerHTML; + if (this.classList.contains('collapsed')) { + html = html.replace(btnLabelCollapsed, btnLabelNotCollapsed); + } else { + html = html.replace(btnLabelNotCollapsed, btnLabelCollapsed); + } + this.innerHTML = html; + this.classList.toggle('collapsed'); + targetElement.classList.toggle('invisible'); + }); + + searx.on('.media-loader', 'click', function(event) { + var target = this.getAttribute('data-target'); + var iframe_load = d.querySelector(target + ' > iframe'); + var srctest = iframe_load.getAttribute('src'); + if (srctest === null || srctest === undefined || srctest === false) { + iframe_load.setAttribute('src', iframe_load.getAttribute('data-src')); + } + }); + + w.addEventListener('scroll', function() { + var e = d.getElementById('backToTop'), + scrollTop = document.documentElement.scrollTop || document.body.scrollTop; + if (e !== null) { + if (scrollTop >= 200) { + e.style.opacity = 1; + } else { + e.style.opacity = 0; + } + } + }); + + }); + +})(window, document, window.searx); diff --git a/searx/static/themes/simple/js/searx_src/searx_search.js b/searx/static/themes/simple/js/searx_src/searx_search.js new file mode 100644 index 00000000..1b93f903 --- /dev/null +++ b/searx/static/themes/simple/js/searx_src/searx_search.js @@ -0,0 +1,94 @@ +/** +* searx is free software: you can redistribute it and/or modify +* it under the terms of the GNU Affero General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* searx is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Affero General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with searx. If not, see < http://www.gnu.org/licenses/ >. +* +* (C) 2017 by Alexandre Flament, +*/ +(function(w, d, searx) { + 'use strict'; + + var firstFocus = true, qinput_id = "q", qinput; + + function placeCursorAtEnd(element) { + if (element.setSelectionRange) { + var len = element.value.length; + element.setSelectionRange(len, len); + } + } + + function submitIfQuery() { + if (qinput.value.length > 0) { + var search = document.getElementById('search'); + setTimeout(search.submit.bind(search), 0); + } + } + + searx.ready(function() { + qinput = d.getElementById(qinput_id); + + function placeCursorAtEndOnce(e) { + if (firstFocus) { + placeCursorAtEnd(qinput); + firstFocus = false; + } else { + // e.preventDefault(); + } + } + + if (qinput !== null) { + // autocompleter + if (searx.autocompleter) { + searx.autocomplete = AutoComplete.call(w, { + Url: "./autocompleter", + EmptyMessage: searx.noItemFound, + HttpMethod: searx.method, + MinChars: 4, + Delay: 300, + }, "#" + qinput_id); + + // hack, see : https://github.com/autocompletejs/autocomplete.js/issues/37 + w.addEventListener('resize', function() { + var event = new CustomEvent("position"); + qinput.dispatchEvent(event); + }); + } + + qinput.addEventListener('focus', placeCursorAtEndOnce, false); + qinput.focus(); + } + + // vanilla js version of search_on_category_select.js + if (qinput !== null && searx.search_on_category_select) { + d.querySelector('.help').className='invisible'; + + searx.on('#categories input', 'change', function(e) { + var i, categories = d.querySelectorAll('#categories input[type="checkbox"]'); + for(i=0; iFhCYNy;#0irRPomHqW|G1C*;4?@4#E?jH>?v@U%cy?3dQAc-DchXVErpOh~ z-jbon+tNbnl6hoEb;)TVk+%hTDDi_G%i3*RZ&15!$Fjr^f;Ke&A@|?=`2&+{zr+3a z{D*=t(`AXyS%X7N z%a#RZw6vD^t_rnM`L4E>m=U&R!A-&}nZIi$BOPvkhrCuUe@BN~-lRD)f44;J%TwgE zcze8u!PQ_NR7?o(NylLXVTfDO zxs5=@|GsYEsNo4M#nT%N!UE(?dnS)t2+{ELYAFp*3=iF=|EQnTp`#vlSXuGVraYo? z+RCzXo6h3qA8{KG?S4nE(lM+;Eb4nT3XV;7gcAxUi5m)`k5tv}cPy()8ZR3TLW3I- zAS^}cq-IJvL7a4RgR!yk@~RT%$lA7{L5ES*hyx)M4(yxI$Ub(4f)K|^v1>zvwQY!_ zIrWw8q9GS^!Dp~}+?mbnB6jDF8mVlbQ!jFKDY;w=7;XO{9bq7>LXGK24WA`;rL)_Z z)&j}pbV(;6gY;VMhbxgvn`X;6x}VUEE-7 z%)7j-%t8S=ZL3yc)HbXDAqJZvBTPoiW_A-+a8m3_Z?v{DN7Tnr#O_VUMT0UBt$;p` zDh6JbGHN8JJ*JN%y2%msb97@_S>9!%Egwk;?PEkU9ntz&3uR}%Fj5d$JHQbQb3}a{ zSzFT^#n=VInPpcAS}CNxj?_ zVscANk5Cfz(51EI1pz};AWWb|kgbYNb4wCEGUn3+eMUMV?1-{=I4TlmLJMot@rd07 zZuo2hk1ccu{YmGkcYdWAVdk{Z4Nm?^cTD&}jGm+Q1SYIXMwmG*oO*83&#>l%nbR`G zhh=lZ%xIb7kU3#;TBbfECrnC9P=-XpL|TG2BoZdj61*XiFbW8?1Z_wp%#;>${SUIy V$8qr;L*)Pf002ovPDHLkV1hYLS~36t literal 0 HcmV?d00001 diff --git a/searx/static/themes/simple/leaflet/images/layers.png b/searx/static/themes/simple/leaflet/images/layers.png new file mode 100644 index 0000000000000000000000000000000000000000..1a72e5784b2b456eac5d7670738db80697af3377 GIT binary patch literal 696 zcmV;p0!RIcP)*@&l2<6p=!C&s@#ZL+%BQvF&b?w6S%wp=I>1QHj7AP5C)IWy#b znXXB;g;j=$a-tW89K%FbDceHVq&unY*Wx3L#=EGWH=rjqnp|4c_Ulec!ql3#G-5ZF zVlbBA@XP=)C8U&+Lrc)S4O5%1$&{(;7R^K(CSnvSr$v;+B$8q&7Bf|h$#PARo1^%M zf1H^nG-EiXVXr07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+<9?e%KyhE?lL)pPc>|j*mq-G8xR3#>j`vMnmLy)`4zKq=Q_I zukwAZe>bd8V$-!jGMr;v>(iWhh%_fYE*hdAGz-|}LPwwBtW=|Lm1@hdKT@9a!o>T? z`Bel^9jfMe(weRj4O<=*ja$Z<1Y~fV2|Cpg$~OIrlII`0SB%6%{QB9chLt{DszybayNL}pub8d{y5=n8Klt=MCG1gvWXiK{ap=GDW^N z^4#zpHLoTiqsS}*L#8oL^g6XTw{@&I7kR$~`X9$|t}Mh>uEvM>4RchzV?`Zoh4FU3 zXiQP_5Nb)BK$Z9-0~O*Smtf!hX4{LS?qxA#mNt9u^G&^tDh|3;XRiz^{EuTeXC!fH z$Ns^4VQf&}c%!O3r`*&_w&UPY6#)O^m~wk(g=*=jeSOb(tF?n~>IJH#Ds)3>utK6u zeqMLfzK2LV<3-9%y+m7u1pb$g(++pusDGi-*p6Ee@PPmu+Pc^=_WLUnyz!2BGt{^< z_Ev7{C8$JwysE2HEuTE&jv->K%DV`Bub%`XkyCffySm*v*pzPTg>=2K!rJ4GBVxRp zf3zEk+B@p)>05|sx~&_UJC=xXt{evLxcAw6tSieVseqyO^FN`9cY_M;|A7Di002ov JPDHLkV1k7n3itp3 literal 0 HcmV?d00001 diff --git a/searx/static/themes/simple/leaflet/images/marker-icon-2x-red.png b/searx/static/themes/simple/leaflet/images/marker-icon-2x-red.png new file mode 100644 index 0000000000000000000000000000000000000000..1d2e197c645f015344f6471c90b8cbd68b0608d7 GIT binary patch literal 3692 zcmV-y4wLbTP)C~BOYg?-%fPjLWh9!`jBODRPwO2^6j#Z}2SZvi%@x+6Fzu))X+XO;3ySeGk{4$&O zzU%jW|Nr;@zqjv22_d5XA28|$o7K)+nv$J~jY-*gO*+@=My>PdX07utgf;YkQFBsu za&w|%+U}x1TsOIhO!@1SMs1F+LFf7t1$ves!o>T84Ma5ah{=Bagb_KIV!xGwf0l5L zAo_!?p+S@V zc)iy789^vO(Cs-(#OZmz6tCa=a7gqld`NWWEfq)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_3Bkqh zqsr*iAC2pi*mQ01G@Nf%r3+7zorg&0ES+e(Eha2rmkS*aL8-<%mHx4Df292RnW;CE z^9u-|k+#~HCti)2f{YjK)8aw`GPunIokn$rQjPaF&d9h)OvFR}w6%T`K_H`2RUBNE z_G!@}0U5}4=`#7Qp}fO=WWwH7_`5dq2Nc8yQdKg7RpG4vY|hm|!^)$zuxwqtNvX#9 zb?W3BCiJz7O1?WO-81eY5YS?r=OEK5--wopte)`qN03Phdz0dg9%NLhN(WU1L#K0wb^sAn1Lq*KK6nXh zST<>1O+rSISpEhJX+2YhKvn0@W9K*Sq*x<(SE&PT#sot@o4z?7*A=B+@ z6Az)T=^D}Y(^-tp85(KG#hdwVy1X4(IO$#%LuP5S_a@)eQ-KI&pSqGVtneMj_V!Ki z*LVM>=sGbO-+H5}%#$-M+T#oyJgNfVJB}&UAksyX_VqpaSFawvsfVh>Uk-OnnnJ>_ zJg+-x-$SIGalTTOld<|B34B*>V9*XXd(yv9DYxS;1YAw<#7WrQcQ?KLns_r*-Wg{F zZ|bSiM5`*T??&_-z2%xAB3I=#1iq7o*v??PH6FWW-qr2b!3_O=oRO|Kq7C|Mj);6W z|3E(y&DYf1(^nAD1b-Hw@7F95d9LgOuDSQw2dpczjVfTQ{rnF@?Qrq1+nfFX0000< KMNUMnLSTZ2%@Obb literal 0 HcmV?d00001 diff --git a/searx/static/themes/simple/leaflet/images/marker-icon-2x.png b/searx/static/themes/simple/leaflet/images/marker-icon-2x.png new file mode 100644 index 0000000000000000000000000000000000000000..e4abba3b511d14752426e8cbadae03c1e5fe15fb GIT binary patch literal 2586 zcmY+F2{e@Z8^=d(p&CX}#B^hnvdqF*GGuA230LC!lc?y*GDh~o80#=n_I())O7`vI zB1@JTX6#9*+_BV^ixA0s->Luqp7Vds@BKcX=lOk~^Pb;%&wG9p3o}FL;Zuhp5D3)R z2yY2yCGfH2=LJmOkQw^9n>daF6?Fz>oOD64$CM+_T`j0x%{zb|G zWolt{H|diO#S`|$6RM$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UNwV z01+e{DcnsPPIth+gTfMc34NrqGRM-T5f0=)<0vZ6?K`I0Z1Y3GdqxI|$iyh%qoeNX UQO-*oc+)|Q_08}VdXD6O0C*xx%>V!Z literal 0 HcmV?d00001 diff --git a/searx/static/themes/simple/leaflet/images/marker-icon-green.png b/searx/static/themes/simple/leaflet/images/marker-icon-green.png new file mode 100644 index 0000000000000000000000000000000000000000..f48ef41df0a84632da8c7f67c8125d006e9a7ef9 GIT binary patch literal 1696 zcmV;R24DG!P)P001cn1^@s6z>|W`00009a7bBm000XU z000XU0RWnu7ytkO2XskIMF-ss3J(AtIcm~s00006VoOIv0RI600RN!9r;`8x1}#ZM zK~z}7wO46uR8}Fd@wp%8ub}t_sg~zb77>@3?o?{|0wjy*`_+ivu7KX9z}#*RJkjGd#wWW} z&`;ugvpb4{y-E#VtnAVzBqbu(uyfose7Cnw3g(@4L*4~9B`>Y7w4kvg|IE|5> zX+E!80kXpgDY~zwdL2A9qS5MCus>*`JF*_IUxVPu|K!kY~|N zMdWH`5-wiV+f>NymIesgh2(+uITtXpBPyWK4RM<=JyB!}*Q(cRk=!m6I3|n;BeGG} z$zR{CQ8XuqiAbB+7u{QgaMn2)JSVY=j`G7`M0H+-+zT@3XhUPp`GGS^uton|v{65D zhNR8x5<>*jG*PT_1ogvi$U5T!^$0f%TBi&2P6hIJdcnI@0(2w-czk;n=w}q;JQO64 z_aPqQ!_9|@-z02evfNcd$biv@t2|by8v9e`V$=b;Q+kV zvDBC+GWE1`m>=;FAMyr?-z2VgypvlahiJzt8pJ?`SY0{QZdmn20ffV0h(sa==yxa- zg7rOX!Mhn#*C`pPiuWfz;w65QYXfsYZ_vPvd6!zb7^q_O78U0C@*x}zLNpqM-rn9A zNQ{IQ?41YtKFv6bcz@y}Ug9^oDw$uhS{0CwaUdRIV=z)xuffuzuNs6z+}GC^1Bp^Z z@1J@Xaz56Kl*RiKAMp~uN%+uyEvrp2@+cl;V=#7t&db}E-Be^Kn$>4M0KH~VB+j4s zh}T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Nk&#Zz#1~M%Cs~8F-~)|cvX%Wi*-HC;|IUT6dd3X&x);44 z_9dyHfukJ8dC!0H&o~;NbCkwi9MwQOM*%nvq7lP?Ze--T@l__uDGF~adNCQn+9(k8 kQd0bHMn+n?ELNR=0NQ0KP?C_nbN~PV07*qoM6N<$f|Lms;{X5v literal 0 HcmV?d00001 diff --git a/searx/static/themes/simple/leaflet/images/marker-icon.png b/searx/static/themes/simple/leaflet/images/marker-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..950edf24677ded147df13b26f91baa2b0fa70513 GIT binary patch literal 1466 zcmV;r1x5OaP)P001cn1^@s6z>|W`000GnNklGNuHDcIX17Zdjl&3`L?0sTjIws<{((Dh&g-s0<@jYQyl?D*X^?%13;ml^gy> ziMrY_^1WI=(g@LMizu=zCoA>C`6|QEq1eV92k*7m>G65*&@&6)aC&e}G zI)pf-Za|N`DT&Cn1J|o`19mumxW~hiKiKyc-P`S@q)rdTo84@QI@;0yXrG%9uhI>A zG5QHb6s4=<6xy{1 z@NMxEkryp{LS44%z$3lP^cX!9+2-;CTt3wM4(k*#C{aiIiLuB>jJj;KPhPzIC00bL zU3a#;aJld94lCW=`4&aAy8M7PY=HQ>O%$YEP4c4UY#CRxfgbE~(|uiI=YS8q;O9y6 zmIkXzR`}p7ti|PrM3a}WMnR=3NVnWdAAR>b9X@)DKL6=YsvmH%?I24wdq?Gh54_;# z$?_LvgjEdspdQlft#4CQ z`2Zyvy?*)N1Ftw|{_hakhG9WjS?Az@I@+IZ8JbWewR!XUK4&6346+d#~gsE0SY(LX8&JfY>Aj)RxGy96nwhs2rv zzW6pTnMpFkDSkT*a*6Dx|u@ds6ISVn0@^RmIsKZ5Y;bazbc;tTSq(kg(=481ODrPyNB6n z-$+U}(w$m6U6H$w17Bw+wDaFIe~GvNMYvnw31MpY0eQKT9l>SU``8k7w4)z!GZKMI z#_cEKq7k~i%nlK@6c-K?+R;B#5$?T#YpKD`t_4bAs^#E+@5QW$@OX3*`;(#{U^d-vY)&xEE>n5lYl&T?Amke9$Lam@{1K@O ze*LXqlKQHiv=gx+V^Cbb2?z@ISBQ*3amF;9UJ3SBg(N|710TLamQmYZ&Qjn2LuO<* zCZlB4n%@pc&7NNnY1}x+NWpHlq`OJEo|`aYN9<`RBUB+79g;>dgb6YlfN#kGL?lO_ z!6~M^7sOnbsUkKk<@Ysie&`G>ruxH&Mgy&8;i=A zB9OO!xR{AyODw>DS-q5YM{0ExFEAzt zm>RdS+ssW(-8|?xr0(?$vBVB*%(xDLtq3Hf0I5yFm<_g=W2`QWAax{1rWVH=I!VrP zs(rTFX@W#t$hXNvbgX`gK&^w_YD;CQ!B@e0QbLIWaKAXQe2-kkloo;{iF#6}z!4=W zi$giRj1{ zt;2w`VSCF#WE&*ev7jpsC=6175@(~nTE2;7M-L((0bH@yG}-TB$R~WXd?tA$s3|%y zA`9$sA(>F%J3ioz<-LJl*^o1|w84l>HBR`>3l9c8$5Xr@xCiIQ7{x$fMCzOk_-M=% z+{a_Q#;42`#KfUte@$NT77uaTz?b-fBe)1s5XE$yA79fm?KqM^VgLXD07*qoM6N<$ Ef<_J(9smFU literal 0 HcmV?d00001 diff --git a/searx/static/themes/simple/leaflet/leaflet.css b/searx/static/themes/simple/leaflet/leaflet.css new file mode 100644 index 00000000..72998d00 --- /dev/null +++ b/searx/static/themes/simple/leaflet/leaflet.css @@ -0,0 +1,624 @@ +/* required styles */ + +.leaflet-pane, +.leaflet-tile, +.leaflet-marker-icon, +.leaflet-marker-shadow, +.leaflet-tile-container, +.leaflet-pane > svg, +.leaflet-pane > canvas, +.leaflet-zoom-box, +.leaflet-image-layer, +.leaflet-layer { + position: absolute; + left: 0; + top: 0; + } +.leaflet-container { + overflow: hidden; + } +.leaflet-tile, +.leaflet-marker-icon, +.leaflet-marker-shadow { + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-user-drag: none; + } +/* Safari renders non-retina tile on retina better with this, but Chrome is worse */ +.leaflet-safari .leaflet-tile { + image-rendering: -webkit-optimize-contrast; + } +/* hack that prevents hw layers "stretching" when loading new tiles */ +.leaflet-safari .leaflet-tile-container { + width: 1600px; + height: 1600px; + -webkit-transform-origin: 0 0; + } +.leaflet-marker-icon, +.leaflet-marker-shadow { + display: block; + } +/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */ +/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */ +.leaflet-container .leaflet-overlay-pane svg, +.leaflet-container .leaflet-marker-pane img, +.leaflet-container .leaflet-shadow-pane img, +.leaflet-container .leaflet-tile-pane img, +.leaflet-container img.leaflet-image-layer { + max-width: none !important; + } + +.leaflet-container.leaflet-touch-zoom { + -ms-touch-action: pan-x pan-y; + touch-action: pan-x pan-y; + } +.leaflet-container.leaflet-touch-drag { + -ms-touch-action: pinch-zoom; + } +.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom { + -ms-touch-action: none; + touch-action: none; +} +.leaflet-tile { + filter: inherit; + visibility: hidden; + } +.leaflet-tile-loaded { + visibility: inherit; + } +.leaflet-zoom-box { + width: 0; + height: 0; + -moz-box-sizing: border-box; + box-sizing: border-box; + z-index: 800; + } +/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ +.leaflet-overlay-pane svg { + -moz-user-select: none; + } + +.leaflet-pane { z-index: 400; } + +.leaflet-tile-pane { z-index: 200; } +.leaflet-overlay-pane { z-index: 400; } +.leaflet-shadow-pane { z-index: 500; } +.leaflet-marker-pane { z-index: 600; } +.leaflet-tooltip-pane { z-index: 650; } +.leaflet-popup-pane { z-index: 700; } + +.leaflet-map-pane canvas { z-index: 100; } +.leaflet-map-pane svg { z-index: 200; } + +.leaflet-vml-shape { + width: 1px; + height: 1px; + } +.lvml { + behavior: url(#default#VML); + display: inline-block; + position: absolute; + } + + +/* control positioning */ + +.leaflet-control { + position: relative; + z-index: 800; + pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ + pointer-events: auto; + } +.leaflet-top, +.leaflet-bottom { + position: absolute; + z-index: 1000; + pointer-events: none; + } +.leaflet-top { + top: 0; + } +.leaflet-right { + right: 0; + } +.leaflet-bottom { + bottom: 0; + } +.leaflet-left { + left: 0; + } +.leaflet-control { + float: left; + clear: both; + } +.leaflet-right .leaflet-control { + float: right; + } +.leaflet-top .leaflet-control { + margin-top: 10px; + } +.leaflet-bottom .leaflet-control { + margin-bottom: 10px; + } +.leaflet-left .leaflet-control { + margin-left: 10px; + } +.leaflet-right .leaflet-control { + margin-right: 10px; + } + + +/* zoom and fade animations */ + +.leaflet-fade-anim .leaflet-tile { + will-change: opacity; + } +.leaflet-fade-anim .leaflet-popup { + opacity: 0; + -webkit-transition: opacity 0.2s linear; + -moz-transition: opacity 0.2s linear; + -o-transition: opacity 0.2s linear; + transition: opacity 0.2s linear; + } +.leaflet-fade-anim .leaflet-map-pane .leaflet-popup { + opacity: 1; + } +.leaflet-zoom-animated { + -webkit-transform-origin: 0 0; + -ms-transform-origin: 0 0; + transform-origin: 0 0; + } +.leaflet-zoom-anim .leaflet-zoom-animated { + will-change: transform; + } +.leaflet-zoom-anim .leaflet-zoom-animated { + -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); + -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); + -o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1); + transition: transform 0.25s cubic-bezier(0,0,0.25,1); + } +.leaflet-zoom-anim .leaflet-tile, +.leaflet-pan-anim .leaflet-tile { + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + transition: none; + } + +.leaflet-zoom-anim .leaflet-zoom-hide { + visibility: hidden; + } + + +/* cursors */ + +.leaflet-interactive { + cursor: pointer; + } +.leaflet-grab { + cursor: -webkit-grab; + cursor: -moz-grab; + } +.leaflet-crosshair, +.leaflet-crosshair .leaflet-interactive { + cursor: crosshair; + } +.leaflet-popup-pane, +.leaflet-control { + cursor: auto; + } +.leaflet-dragging .leaflet-grab, +.leaflet-dragging .leaflet-grab .leaflet-interactive, +.leaflet-dragging .leaflet-marker-draggable { + cursor: move; + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + } + +/* marker & overlays interactivity */ +.leaflet-marker-icon, +.leaflet-marker-shadow, +.leaflet-image-layer, +.leaflet-pane > svg path, +.leaflet-tile-container { + pointer-events: none; + } + +.leaflet-marker-icon.leaflet-interactive, +.leaflet-image-layer.leaflet-interactive, +.leaflet-pane > svg path.leaflet-interactive { + pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ + pointer-events: auto; + } + +/* visual tweaks */ + +.leaflet-container { + background: #ddd; + outline: 0; + } +.leaflet-container a { + color: #0078A8; + } +.leaflet-container a.leaflet-active { + outline: 2px solid orange; + } +.leaflet-zoom-box { + border: 2px dotted #38f; + background: rgba(255,255,255,0.5); + } + + +/* general typography */ +.leaflet-container { + font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; + } + + +/* general toolbar styles */ + +.leaflet-bar { + box-shadow: 0 1px 5px rgba(0,0,0,0.65); + border-radius: 4px; + } +.leaflet-bar a, +.leaflet-bar a:hover { + background-color: #fff; + border-bottom: 1px solid #ccc; + width: 26px; + height: 26px; + line-height: 26px; + display: block; + text-align: center; + text-decoration: none; + color: black; + } +.leaflet-bar a, +.leaflet-control-layers-toggle { + background-position: 50% 50%; + background-repeat: no-repeat; + display: block; + } +.leaflet-bar a:hover { + background-color: #f4f4f4; + } +.leaflet-bar a:first-child { + border-top-left-radius: 4px; + border-top-right-radius: 4px; + } +.leaflet-bar a:last-child { + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + border-bottom: none; + } +.leaflet-bar a.leaflet-disabled { + cursor: default; + background-color: #f4f4f4; + color: #bbb; + } + +.leaflet-touch .leaflet-bar a { + width: 30px; + height: 30px; + line-height: 30px; + } + + +/* zoom control */ + +.leaflet-control-zoom-in, +.leaflet-control-zoom-out { + font: bold 18px 'Lucida Console', Monaco, monospace; + text-indent: 1px; + } +.leaflet-control-zoom-out { + font-size: 20px; + } + +.leaflet-touch .leaflet-control-zoom-in { + font-size: 22px; + } +.leaflet-touch .leaflet-control-zoom-out { + font-size: 24px; + } + + +/* layers control */ + +.leaflet-control-layers { + box-shadow: 0 1px 5px rgba(0,0,0,0.4); + background: #fff; + border-radius: 5px; + } +.leaflet-control-layers-toggle { + background-image: url(images/layers.png); + width: 36px; + height: 36px; + } +.leaflet-retina .leaflet-control-layers-toggle { + background-image: url(images/layers-2x.png); + background-size: 26px 26px; + } +.leaflet-touch .leaflet-control-layers-toggle { + width: 44px; + height: 44px; + } +.leaflet-control-layers .leaflet-control-layers-list, +.leaflet-control-layers-expanded .leaflet-control-layers-toggle { + display: none; + } +.leaflet-control-layers-expanded .leaflet-control-layers-list { + display: block; + position: relative; + } +.leaflet-control-layers-expanded { + padding: 6px 10px 6px 6px; + color: #333; + background: #fff; + } +.leaflet-control-layers-scrollbar { + overflow-y: scroll; + padding-right: 5px; + } +.leaflet-control-layers-selector { + margin-top: 2px; + position: relative; + top: 1px; + } +.leaflet-control-layers label { + display: block; + } +.leaflet-control-layers-separator { + height: 0; + border-top: 1px solid #ddd; + margin: 5px -10px 5px -6px; + } + +/* Default icon URLs */ +.leaflet-default-icon-path { + background-image: url(images/marker-icon.png); + } + + +/* attribution and scale controls */ + +.leaflet-container .leaflet-control-attribution { + background: #fff; + background: rgba(255, 255, 255, 0.7); + margin: 0; + } +.leaflet-control-attribution, +.leaflet-control-scale-line { + padding: 0 5px; + color: #333; + } +.leaflet-control-attribution a { + text-decoration: none; + } +.leaflet-control-attribution a:hover { + text-decoration: underline; + } +.leaflet-container .leaflet-control-attribution, +.leaflet-container .leaflet-control-scale { + font-size: 11px; + } +.leaflet-left .leaflet-control-scale { + margin-left: 5px; + } +.leaflet-bottom .leaflet-control-scale { + margin-bottom: 5px; + } +.leaflet-control-scale-line { + border: 2px solid #777; + border-top: none; + line-height: 1.1; + padding: 2px 5px 1px; + font-size: 11px; + white-space: nowrap; + overflow: hidden; + -moz-box-sizing: border-box; + box-sizing: border-box; + + background: #fff; + background: rgba(255, 255, 255, 0.5); + } +.leaflet-control-scale-line:not(:first-child) { + border-top: 2px solid #777; + border-bottom: none; + margin-top: -2px; + } +.leaflet-control-scale-line:not(:first-child):not(:last-child) { + border-bottom: 2px solid #777; + } + +.leaflet-touch .leaflet-control-attribution, +.leaflet-touch .leaflet-control-layers, +.leaflet-touch .leaflet-bar { + box-shadow: none; + } +.leaflet-touch .leaflet-control-layers, +.leaflet-touch .leaflet-bar { + border: 2px solid rgba(0,0,0,0.2); + background-clip: padding-box; + } + + +/* popup */ + +.leaflet-popup { + position: absolute; + text-align: center; + margin-bottom: 20px; + } +.leaflet-popup-content-wrapper { + padding: 1px; + text-align: left; + border-radius: 12px; + } +.leaflet-popup-content { + margin: 13px 19px; + line-height: 1.4; + } +.leaflet-popup-content p { + margin: 18px 0; + } +.leaflet-popup-tip-container { + width: 40px; + height: 20px; + position: absolute; + left: 50%; + margin-left: -20px; + overflow: hidden; + pointer-events: none; + } +.leaflet-popup-tip { + width: 17px; + height: 17px; + padding: 1px; + + margin: -10px auto 0; + + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); + } +.leaflet-popup-content-wrapper, +.leaflet-popup-tip { + background: white; + color: #333; + box-shadow: 0 3px 14px rgba(0,0,0,0.4); + } +.leaflet-container a.leaflet-popup-close-button { + position: absolute; + top: 0; + right: 0; + padding: 4px 4px 0 0; + border: none; + text-align: center; + width: 18px; + height: 14px; + font: 16px/14px Tahoma, Verdana, sans-serif; + color: #c3c3c3; + text-decoration: none; + font-weight: bold; + background: transparent; + } +.leaflet-container a.leaflet-popup-close-button:hover { + color: #999; + } +.leaflet-popup-scrolled { + overflow: auto; + border-bottom: 1px solid #ddd; + border-top: 1px solid #ddd; + } + +.leaflet-oldie .leaflet-popup-content-wrapper { + zoom: 1; + } +.leaflet-oldie .leaflet-popup-tip { + width: 24px; + margin: 0 auto; + + -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; + filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); + } +.leaflet-oldie .leaflet-popup-tip-container { + margin-top: -1px; + } + +.leaflet-oldie .leaflet-control-zoom, +.leaflet-oldie .leaflet-control-layers, +.leaflet-oldie .leaflet-popup-content-wrapper, +.leaflet-oldie .leaflet-popup-tip { + border: 1px solid #999; + } + + +/* div icon */ + +.leaflet-div-icon { + background: #fff; + border: 1px solid #666; + } + + +/* Tooltip */ +/* Base styles for the element that has a tooltip */ +.leaflet-tooltip { + position: absolute; + padding: 6px; + background-color: #fff; + border: 1px solid #fff; + border-radius: 3px; + color: #222; + white-space: nowrap; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + pointer-events: none; + box-shadow: 0 1px 3px rgba(0,0,0,0.4); + } +.leaflet-tooltip.leaflet-clickable { + cursor: pointer; + pointer-events: auto; + } +.leaflet-tooltip-top:before, +.leaflet-tooltip-bottom:before, +.leaflet-tooltip-left:before, +.leaflet-tooltip-right:before { + position: absolute; + pointer-events: none; + border: 6px solid transparent; + background: transparent; + content: ""; + } + +/* Directions */ + +.leaflet-tooltip-bottom { + margin-top: 6px; +} +.leaflet-tooltip-top { + margin-top: -6px; +} +.leaflet-tooltip-bottom:before, +.leaflet-tooltip-top:before { + left: 50%; + margin-left: -6px; + } +.leaflet-tooltip-top:before { + bottom: 0; + margin-bottom: -12px; + border-top-color: #fff; + } +.leaflet-tooltip-bottom:before { + top: 0; + margin-top: -12px; + margin-left: -6px; + border-bottom-color: #fff; + } +.leaflet-tooltip-left { + margin-left: -6px; +} +.leaflet-tooltip-right { + margin-left: 6px; +} +.leaflet-tooltip-left:before, +.leaflet-tooltip-right:before { + top: 50%; + margin-top: -6px; + } +.leaflet-tooltip-left:before { + right: 0; + margin-right: -12px; + border-left-color: #fff; + } +.leaflet-tooltip-right:before { + left: 0; + margin-left: -12px; + border-right-color: #fff; + } diff --git a/searx/static/themes/simple/leaflet/leaflet.js b/searx/static/themes/simple/leaflet/leaflet.js new file mode 100644 index 00000000..24042d12 --- /dev/null +++ b/searx/static/themes/simple/leaflet/leaflet.js @@ -0,0 +1,9 @@ +/* + Leaflet 1.0.3+ed36a04, a JS library for interactive maps. http://leafletjs.com + (c) 2010-2016 Vladimir Agafonkin, (c) 2010-2011 CloudMade +*/ +!function(t,e,i){function n(){var e=t.L;o.noConflict=function(){return t.L=e,this},t.L=o}var o={version:"1.0.3+ed36a04"};"object"==typeof module&&"object"==typeof module.exports?module.exports=o:"function"==typeof define&&define.amd&&define(o),"undefined"!=typeof t&&n(),o.Util={extend:function(t){var e,i,n,o;for(i=1,n=arguments.length;i1}}(),o.Point=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e},o.Point.prototype={clone:function(){return new o.Point(this.x,this.y)},add:function(t){return this.clone()._add(o.point(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(o.point(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new o.Point(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new o.Point(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},distanceTo:function(t){t=o.point(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=o.point(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=o.point(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+o.Util.formatNum(this.x)+", "+o.Util.formatNum(this.y)+")"}},o.point=function(t,e,n){return t instanceof o.Point?t:o.Util.isArray(t)?new o.Point(t[0],t[1]):t===i||null===t?t:"object"==typeof t&&"x"in t&&"y"in t?new o.Point(t.x,t.y):new o.Point(t,e,n)},o.Bounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=o.bounds(t);var e=this.min,i=this.max,n=t.min,s=t.max,r=s.x>=e.x&&n.x<=i.x,a=s.y>=e.y&&n.y<=i.y;return r&&a},overlaps:function(t){t=o.bounds(t);var e=this.min,i=this.max,n=t.min,s=t.max,r=s.x>e.x&&n.xe.y&&n.y0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)},addClass:function(t,e){if(t.classList!==i)for(var n=o.Util.splitWords(e),s=0,r=n.length;s=n.lat&&i.lat<=s.lat&&e.lng>=n.lng&&i.lng<=s.lng},intersects:function(t){t=o.latLngBounds(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),r=s.lat>=e.lat&&n.lat<=i.lat,a=s.lng>=e.lng&&n.lng<=i.lng;return r&&a},overlaps:function(t){t=o.latLngBounds(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),r=s.lat>e.lat&&n.late.lng&&n.lngthis.options.maxZoom?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,o.latLngBounds(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},invalidateSize:function(t){if(!this._loaded)return this;t=o.extend({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),s=i.divideBy(2).round(),r=n.subtract(s);return r.x||r.y?(t.animate&&t.pan?this.panBy(r):(t.pan&&this._rawPanBy(r),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=o.extend({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o.bind(this._handleGeolocationResponse,this),i=o.bind(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,i=t.coords.longitude,n=new o.LatLng(e,i),s=n.toBounds(t.coords.accuracy),r=this._locateOptions;if(r.setView){var a=this.getBoundsZoom(s);this.setView(n,r.maxZoom?Math.min(a,r.maxZoom):a)}var h={latlng:n,bounds:s,timestamp:t.timestamp};for(var l in t.coords)"number"==typeof t.coords[l]&&(h[l]=t.coords[l]);this.fire("locationfound",h)},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=i,this._containerId=i}o.DomUtil.remove(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this._loaded&&this.fire("unload");for(var t in this._layers)this._layers[t].remove();return this},createPane:function(t,e){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),n=o.DomUtil.create("div",i,e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new o.LatLngBounds(e,i)},getMinZoom:function(){return this.options.minZoom===i?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===i?this._layersMaxZoom===i?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=o.latLngBounds(t),i=o.point(i||[0,0]);var n=this.getZoom()||0,s=this.getMinZoom(),r=this.getMaxZoom(),a=t.getNorthWest(),h=t.getSouthEast(),l=this.getSize().subtract(i),u=o.bounds(this.project(h,n),this.project(a,n)).getSize(),c=o.Browser.any3d?this.options.zoomSnap:1,d=Math.min(l.x/u.x,l.y/u.y);return n=this.getScaleZoom(d,n),c&&(n=Math.round(n/(c/100))*(c/100),n=e?Math.ceil(n/c)*c:Math.floor(n/c)*c),Math.max(s,Math.min(r,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new o.Point(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new o.Bounds(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===i?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=e===i?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=e===i?this._zoom:e;var o=n.zoom(t*n.scale(e));return isNaN(o)?1/0:o},project:function(t,e){return e=e===i?this._zoom:e,this.options.crs.latLngToPoint(o.latLng(t),e)},unproject:function(t,e){return e=e===i?this._zoom:e,this.options.crs.pointToLatLng(o.point(t),e)},layerPointToLatLng:function(t){var e=o.point(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(o.latLng(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(o.latLng(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(o.latLngBounds(t))},distance:function(t,e){return this.options.crs.distance(o.latLng(t),o.latLng(e))},containerPointToLayerPoint:function(t){return o.point(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return o.point(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(o.point(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(o.latLng(t)))},mouseEventToContainerPoint:function(t){return o.DomEvent.getMousePosition(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=o.DomUtil.get(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");o.DomEvent.addListener(e,"scroll",this._onScroll,this),this._containerId=o.Util.stamp(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&o.Browser.any3d, +o.DomUtil.addClass(t,"leaflet-container"+(o.Browser.touch?" leaflet-touch":"")+(o.Browser.retina?" leaflet-retina":"")+(o.Browser.ielt9?" leaflet-oldie":"")+(o.Browser.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=o.DomUtil.getStyle(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),o.DomUtil.setPosition(this._mapPane,new o.Point(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(o.DomUtil.addClass(t.markerPane,"leaflet-zoom-hide"),o.DomUtil.addClass(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){o.DomUtil.setPosition(this._mapPane,new o.Point(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n)._move(t,e)._moveEnd(n),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t){return t&&this.fire("zoomstart"),this.fire("movestart")},_move:function(t,e,n){e===i&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(o||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return o.Util.cancelAnimFrame(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){o.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){if(o.DomEvent){this._targets={},this._targets[o.stamp(this._container)]=this;var i=e?"off":"on";o.DomEvent[i](this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this._handleDOMEvent,this),this.options.trackResize&&o.DomEvent[i](t,"resize",this._onResize,this),o.Browser.any3d&&this.options.transform3DLimit&&this[i]("moveend",this._onMoveEnd)}},_onResize:function(){o.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=o.Util.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],s="mouseout"===e||"mouseover"===e,r=t.target||t.srcElement,a=!1;r;){if(i=this._targets[o.stamp(r)],i&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(i)){a=!0;break}if(i&&i.listens(e,!0)){if(s&&!o.DomEvent._isExternalTarget(r,t))break;if(n.push(i),s)break}if(r===this._container)break;r=r.parentNode}return n.length||a||s||!o.DomEvent._isExternalTarget(r,t)||(n=[this]),n},_handleDOMEvent:function(t){if(this._loaded&&!o.DomEvent._skipped(t)){var e="keypress"===t.type&&13===t.keyCode?"click":t.type;"mousedown"===e&&o.DomUtil.preventOutline(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_fireDOMEvent:function(t,e,i){if("click"===t.type){var n=o.Util.extend({},t);n.type="preclick",this._fireDOMEvent(n,n.type,i)}if(!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,e)),i.length)){var s=i[0];"contextmenu"===e&&s.listens(e,!0)&&o.DomEvent.preventDefault(t);var r={originalEvent:t};if("keypress"!==t.type){var a=s instanceof o.Marker;r.containerPoint=a?this.latLngToContainerPoint(s.getLatLng()):this.mouseEventToContainerPoint(t),r.layerPoint=this.containerPointToLayerPoint(r.containerPoint),r.latlng=a?s.getLatLng():this.layerPointToLatLng(r.layerPoint)}for(var h=0;h0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=o.Browser.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){o.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._floor();return!((e&&e.animate)!==!0&&!this.getSize().contains(i))&&(this.panBy(i,e),!0)},_createAnimProxy:function(){var t=this._proxy=o.DomUtil.create("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(e){var i=o.DomUtil.TRANSFORM,n=t.style[i];o.DomUtil.setTransform(t,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===t.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",function(){var e=this.getCenter(),i=this.getZoom();o.DomUtil.setTransform(t,this.project(e,i),this.getZoomScale(i,1))},this)},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),s=this._getCenterOffset(t)._divideBy(1-1/n);return!(i.animate!==!0&&!this.getSize().contains(s))&&(o.Util.requestAnimFrame(function(){this._moveStart(!0)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,i,n){i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,o.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),setTimeout(o.bind(this._onZoomTransitionEnd,this),250)},_onZoomTransitionEnd:function(){this._animatingZoom&&(o.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),o.Util.requestAnimFrame(function(){this._moveEnd(!0)},this))}}),o.map=function(t,e){return new o.Map(t,e)},o.Layer=o.Evented.extend({options:{pane:"overlayPane",nonBubblingEvents:[],attribution:null},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[o.stamp(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[o.stamp(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}}),o.Map.include({addLayer:function(t){var e=o.stamp(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=o.stamp(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&o.stamp(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){t=t?o.Util.isArray(t)?t:[t]:[];for(var e=0,i=t.length;ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===i&&this._layersMinZoom&&this.getZoom()100&&n<500||t.target._simulatedClick&&!t._simulated?void o.DomEvent.stop(t):(o.DomEvent._lastClick=i,void e(t))}},o.DomEvent.addListener=o.DomEvent.on,o.DomEvent.removeListener=o.DomEvent.off,o.PosAnimation=o.Evented.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=o.DomUtil.getPosition(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=o.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e1e-7;l++)e=r*Math.sin(h),e=Math.pow((1-e)/(1+e),r/2),u=Math.PI/2-2*Math.atan(a*e)-h,h+=u;return new o.LatLng(h*i,t.x*i/n)}},o.CRS.EPSG3395=o.extend({},o.CRS.Earth,{code:"EPSG:3395",projection:o.Projection.Mercator,transformation:function(){var t=.5/(Math.PI*o.Projection.Mercator.R);return new o.Transformation(t,.5,-t,.5)}()}),o.GridLayer=o.Layer.extend({options:{tileSize:256,opacity:1,updateWhenIdle:o.Browser.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:i,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){o.setOptions(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),o.DomUtil.remove(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=null},bringToFront:function(){return this._map&&(o.DomUtil.toFront(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(o.DomUtil.toBack(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=o.Util.throttle(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return e.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof o.Point?t:new o.Point(t,t)},_updateZIndex:function(){this._container&&this.options.zIndex!==i&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,n=-t(-(1/0),1/0),o=0,s=i.length;othis.options.maxZoom||in&&this._retainParent(s,r,a,n))},_retainChildren:function(t,e,i,n){for(var s=2*t;s<2*t+2;s++)for(var r=2*e;r<2*e+2;r++){var a=new o.Point(s,r);a.z=i+1;var h=this._tileCoordsToKey(a),l=this._tiles[h];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),i+1this.options.maxZoom||this.options.minZoom!==i&&s1)return void this._setView(t,s);for(var m=a.min.y;m<=a.max.y;m++)for(var p=a.min.x;p<=a.max.x;p++){var f=new o.Point(p,m);if(f.z=this._tileZoom,this._isValidTile(f)){var g=this._tiles[this._tileCoordsToKey(f)];g?g.current=!0:l.push(f)}}if(l.sort(function(t,e){return t.distanceTo(h)-e.distanceTo(h)}),0!==l.length){this._loading||(this._loading=!0,this.fire("loading"));var v=e.createDocumentFragment();for(p=0;pi.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return o.latLngBounds(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToBounds:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),s=n.add(i),r=e.unproject(n,t.z),a=e.unproject(s,t.z),h=new o.LatLngBounds(r,a);return this.options.noWrap||e.wrapLatLngBounds(h),h},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new o.Point(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(o.DomUtil.remove(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){o.DomUtil.addClass(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=o.Util.falseFn,t.onmousemove=o.Util.falseFn,o.Browser.ielt9&&this.options.opacity<1&&o.DomUtil.setOpacity(t,this.options.opacity),o.Browser.android&&!o.Browser.android23&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),s=this.createTile(this._wrapCoords(t),o.bind(this._tileReady,this,t));this._initTile(s),this.createTile.length<2&&o.Util.requestAnimFrame(o.bind(this._tileReady,this,t,null,s)),o.DomUtil.setPosition(s,i),this._tiles[n]={el:s,coords:t,current:!0},e.appendChild(s),this.fire("tileloadstart",{tile:s,coords:t})},_tileReady:function(t,e,i){if(this._map){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);i=this._tiles[n],i&&(i.loaded=+new Date,this._map._fadeAnimated?(o.DomUtil.setOpacity(i.el,0),o.Util.cancelAnimFrame(this._fadeFrame),this._fadeFrame=o.Util.requestAnimFrame(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(o.DomUtil.addClass(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),o.Browser.ielt9||!this._map._fadeAnimated?o.Util.requestAnimFrame(this._pruneTiles,this):setTimeout(o.bind(this._pruneTiles,this),250)))}},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new o.Point(this._wrapX?o.Util.wrapNum(t.x,this._wrapX):t.x,this._wrapY?o.Util.wrapNum(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new o.Bounds(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),o.gridLayer=function(t){return new o.GridLayer(t)},o.TileLayer=o.GridLayer.extend({options:{minZoom:0,maxZoom:18,maxNativeZoom:null,minNativeZoom:null,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,e=o.setOptions(this,e),e.detectRetina&&o.Browser.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),o.Browser.android||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},createTile:function(t,i){var n=e.createElement("img");return o.DomEvent.on(n,"load",o.bind(this._tileOnLoad,this,i,n)),o.DomEvent.on(n,"error",o.bind(this._tileOnError,this,i,n)),this.options.crossOrigin&&(n.crossOrigin=""),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:o.Browser.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return o.Util.template(this._url,o.extend(e,this.options))},_tileOnLoad:function(t,e){o.Browser.ielt9?setTimeout(o.bind(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.src!==n&&(e.src=n),t(i,e)},getTileSize:function(){var t=this._map,e=o.GridLayer.prototype.getTileSize.call(this),i=this._tileZoom+this.options.zoomOffset,n=this.options.minNativeZoom,s=this.options.maxNativeZoom;return null!==n&&is?e.divideBy(t.getZoomScale(s,i)).round():e},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset,o=this.options.minNativeZoom,s=this.options.maxNativeZoom;return i&&(t=e-t),t+=n,null!==o&&ts?s:t},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=o.Util.falseFn,e.onerror=o.Util.falseFn,e.complete||(e.src=o.Util.emptyImageUrl,o.DomUtil.remove(e)))}}),o.tileLayer=function(t,e){return new o.TileLayer(t,e)},o.TileLayer.WMS=o.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=o.extend({},this.defaultWmsParams);for(var n in e)n in this.options||(i[n]=e[n]);e=o.setOptions(this,e),i.width=i.height=e.tileSize*(e.detectRetina&&o.Browser.retina?2:1),this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,o.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToBounds(t),i=this._crs.project(e.getNorthWest()),n=this._crs.project(e.getSouthEast()),s=(this._wmsVersion>=1.3&&this._crs===o.CRS.EPSG4326?[n.y,i.x,i.y,n.x]:[i.x,n.y,n.x,i.y]).join(","),r=o.TileLayer.prototype.getTileUrl.call(this,t);return r+o.Util.getParamString(this.wmsParams,r,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+s},setParams:function(t,e){return o.extend(this.wmsParams,t),e||this.redraw(),this}}),o.tileLayer.wms=function(t,e){return new o.TileLayer.WMS(t,e)},o.ImageOverlay=o.Layer.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1},initialize:function(t,e,i){this._url=t,this._bounds=o.latLngBounds(e),o.setOptions(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(o.DomUtil.addClass(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){o.DomUtil.remove(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&o.DomUtil.toFront(this._image),this},bringToBack:function(){return this._map&&o.DomUtil.toBack(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=t,this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._image=o.DomUtil.create("img","leaflet-image-layer "+(this._zoomAnimated?"leaflet-zoom-animated":""));t.onselectstart=o.Util.falseFn,t.onmousemove=o.Util.falseFn,t.onload=o.bind(this.fire,this,"load"),this.options.crossOrigin&&(t.crossOrigin=""),t.src=this._url,t.alt=this.options.alt},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min; +o.DomUtil.setTransform(this._image,i,e)},_reset:function(){var t=this._image,e=new o.Bounds(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();o.DomUtil.setPosition(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){o.DomUtil.setOpacity(this._image,this.options.opacity)}}),o.imageOverlay=function(t,e,i){return new o.ImageOverlay(t,e,i)},o.Icon=o.Class.extend({initialize:function(t){o.setOptions(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];"number"==typeof n&&(n=[n,n]);var s=o.point(n),r=o.point("shadow"===e&&i.shadowAnchor||i.iconAnchor||s&&s.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),r&&(t.style.marginLeft=-r.x+"px",t.style.marginTop=-r.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,i){return i=i||e.createElement("img"),i.src=t,i},_getIconUrl:function(t){return o.Browser.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),o.icon=function(t){return new o.Icon(t)},o.Icon.Default=o.Icon.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return o.Icon.Default.imagePath||(o.Icon.Default.imagePath=this._detectIconPath()),(this.options.imagePath||o.Icon.Default.imagePath)+o.Icon.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=o.DomUtil.create("div","leaflet-default-icon-path",e.body),i=o.DomUtil.getStyle(t,"background-image")||o.DomUtil.getStyle(t,"backgroundImage");return e.body.removeChild(t),0===i.indexOf("url")?i.replace(/^url\([\"\']?/,"").replace(/marker-icon\.png[\"\']?\)$/,""):""}}),o.Marker=o.Layer.extend({options:{icon:new o.Icon.Default,interactive:!0,draggable:!1,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",nonBubblingEvents:["click","dblclick","mouseover","mouseout","contextmenu"]},initialize:function(t,e){o.setOptions(this,e),this._latlng=o.latLng(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=o.latLng(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),t.alt&&(i.alt=t.alt)),o.DomUtil.addClass(i,e),t.keyboard&&(i.tabIndex="0"),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var s=t.icon.createShadow(this._shadow),r=!1;s!==this._shadow&&(this._removeShadow(),r=!0),s&&(o.DomUtil.addClass(s,e),s.alt=""),this._shadow=s,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),s&&r&&this.getPane("shadowPane").appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),o.DomUtil.remove(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&o.DomUtil.remove(this._shadow),this._shadow=null},_setPos:function(t){o.DomUtil.setPosition(this._icon,t),this._shadow&&o.DomUtil.setPosition(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(o.DomUtil.addClass(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),o.Handler.MarkerDrag)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new o.Handler.MarkerDrag(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;o.DomUtil.setOpacity(this._icon,t),this._shadow&&o.DomUtil.setOpacity(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor||[0,0]},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor||[0,0]}}),o.marker=function(t,e){return new o.Marker(t,e)},o.DivIcon=o.Icon.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var i=t&&"DIV"===t.tagName?t:e.createElement("div"),n=this.options;if(i.innerHTML=n.html!==!1?n.html:"",n.bgPos){var s=o.point(n.bgPos);i.style.backgroundPosition=-s.x+"px "+-s.y+"px"}return this._setIconStyles(i,"icon"),i},createShadow:function(){return null}}),o.divIcon=function(t){return new o.DivIcon(t)},o.DivOverlay=o.Layer.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){o.setOptions(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&o.DomUtil.setOpacity(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&o.DomUtil.setOpacity(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(o.DomUtil.setOpacity(this._container,0),this._removeTimeout=setTimeout(o.bind(o.DomUtil.remove,o.DomUtil,this._container),200)):o.DomUtil.remove(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=o.latLng(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&o.DomUtil.toFront(this._container),this},bringToBack:function(){return this._map&&o.DomUtil.toBack(this._container),this},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=o.point(this.options.offset),i=this._getAnchor();this._zoomAnimated?o.DomUtil.setPosition(this._container,t.add(i)):e=e.add(t).add(i);var n=this._containerBottom=-e.y,s=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=n+"px",this._container.style.left=s+"px"}},_getAnchor:function(){return[0,0]}}),o.Popup=o.DivOverlay.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){o.DivOverlay.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof o.Path||this._source.on("preclick",o.DomEvent.stopPropagation))},onRemove:function(t){o.DivOverlay.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof o.Path||this._source.off("preclick",o.DomEvent.stopPropagation))},getEvents:function(){var t=o.DivOverlay.prototype.getEvents.call(this);return("closeOnClick"in this.options?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=o.DomUtil.create("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated");if(this.options.closeButton){var i=this._closeButton=o.DomUtil.create("a",t+"-close-button",e);i.href="#close",i.innerHTML="×",o.DomEvent.on(i,"click",this._onCloseButtonClick,this)}var n=this._wrapper=o.DomUtil.create("div",t+"-content-wrapper",e);this._contentNode=o.DomUtil.create("div",t+"-content",n),o.DomEvent.disableClickPropagation(n).disableScrollPropagation(this._contentNode).on(n,"contextmenu",o.DomEvent.stopPropagation),this._tipContainer=o.DomUtil.create("div",t+"-tip-container",e),this._tip=o.DomUtil.create("div",t+"-tip",this._tipContainer)},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,s=this.options.maxHeight,r="leaflet-popup-scrolled";s&&n>s?(e.height=s+"px",o.DomUtil.addClass(t,r)):o.DomUtil.removeClass(t,r),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();o.DomUtil.setPosition(this._container,e.add(i))},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress)){var t=this._map,e=parseInt(o.DomUtil.getStyle(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,s=new o.Point(this._containerLeft,-i-this._containerBottom);s._add(o.DomUtil.getPosition(this._container));var r=t.layerPointToContainerPoint(s),a=o.point(this.options.autoPanPadding),h=o.point(this.options.autoPanPaddingTopLeft||a),l=o.point(this.options.autoPanPaddingBottomRight||a),u=t.getSize(),c=0,d=0;r.x+n+l.x>u.x&&(c=r.x+n-u.x+l.x),r.x-c-h.x<0&&(c=r.x-h.x),r.y+i+l.y>u.y&&(d=r.y+i-u.y+l.y),r.y-d-h.y<0&&(d=r.y-h.y),(c||d)&&t.fire("autopanstart").panBy([c,d])}},_onCloseButtonClick:function(t){this._close(),o.DomEvent.stop(t)},_getAnchor:function(){return o.point(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),o.popup=function(t,e){return new o.Popup(t,e)},o.Map.mergeOptions({closePopupOnClick:!0}),o.Map.include({openPopup:function(t,e,i){return t instanceof o.Popup||(t=new o.Popup(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),o.Layer.include({bindPopup:function(t,e){return t instanceof o.Popup?(o.setOptions(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new o.Popup(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){if(t instanceof o.Layer||(e=t,t=this),t instanceof o.FeatureGroup)for(var i in this._layers){t=this._layers[i];break}return e||(e=t.getCenter?t.getCenter():t.getLatLng()),this._popup&&this._map&&(this._popup._source=t,this._popup.update(),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;if(this._popup&&this._map)return o.DomEvent.stop(t),e instanceof o.Path?void this.openPopup(t.layer||t.target,t.latlng):void(this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)}}),o.Tooltip=o.DivOverlay.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){o.DivOverlay.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){o.DivOverlay.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=o.DivOverlay.prototype.getEvents.call(this);return o.Browser.touch&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip",e=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=o.DomUtil.create("div",e)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,i=this._container,n=e.latLngToContainerPoint(e.getCenter()),s=e.layerPointToContainerPoint(t),r=this.options.direction,a=i.offsetWidth,h=i.offsetHeight,l=o.point(this.options.offset),u=this._getAnchor();"top"===r?t=t.add(o.point(-a/2+l.x,-h+l.y+u.y,!0)):"bottom"===r?t=t.subtract(o.point(a/2-l.x,-l.y,!0)):"center"===r?t=t.subtract(o.point(a/2+l.x,h/2-u.y+l.y,!0)):"right"===r||"auto"===r&&s.xh&&(s=r,h=a);h>i&&(e[s]=1,this._simplifyDPStep(t,e,i,n,s),this._simplifyDPStep(t,e,i,s,o))},_reducePoints:function(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;ne&&(i.push(t[n]),o=n);return oe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},_sqClosestPointOnSegment:function(t,e,i,n){var s,r=e.x,a=e.y,h=i.x-r,l=i.y-a,u=h*h+l*l;return u>0&&(s=((t.x-r)*h+(t.y-a)*l)/u,s>1?(r=i.x,a=i.y):s>0&&(r+=h*s,a+=l*s)),h=t.x-r,l=t.y-a,n?h*h+l*l:new o.Point(r,a)}},o.Polyline=o.Path.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){o.setOptions(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,i,n=1/0,s=null,r=o.LineUtil._sqClosestPointOnSegment,a=0,h=this._parts.length;ae)return r=(n-e)/i,this._map.layerPointToLatLng([s.x-r*(s.x-o.x),s.y-r*(s.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=o.latLng(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new o.LatLngBounds,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return o.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=o.Polyline._flat(t),n=0,s=t.length;n=2&&e[0]instanceof o.LatLng&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){o.Polyline.prototype._setLatLngs.call(this,t),o.Polyline._flat(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return o.Polyline._flat(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new o.Point(e,e);if(t=new o.Bounds(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t)){if(this.options.noClip)return void(this._parts=this._rings);for(var n,s=0,r=this._rings.length;s';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}(),o.SVG.include(o.Browser.vml?{_initContainer:function(){this._container=o.DomUtil.create("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(o.Renderer.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=o.SVG.create("shape");o.DomUtil.addClass(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=o.SVG.create("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[o.stamp(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;o.DomUtil.remove(e),t.removeInteractiveTarget(e),delete this._layers[o.stamp(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,s=t._container;s.stroked=!!n.stroke,s.filled=!!n.fill,n.stroke?(e||(e=t._stroke=o.SVG.create("stroke")),s.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=o.Util.isArray(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(s.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=o.SVG.create("fill")),s.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(s.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){o.DomUtil.toFront(t._container)},_bringToBack:function(t){o.DomUtil.toBack(t._container)}}:{}),o.Browser.vml&&(o.SVG.create=function(){try{return e.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return e.createElement("')}}catch(t){return function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}()),o.Canvas=o.Renderer.extend({getEvents:function(){var t=o.Renderer.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){o.Renderer.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=e.createElement("canvas");o.DomEvent.on(t,"mousemove",o.Util.throttle(this._onMouseMove,32,this),this).on(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this).on(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var e in this._layers)t=this._layers[e],t._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){this._drawnLayers={},o.Renderer.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=o.Browser.retina?2:1;o.DomUtil.setPosition(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",o.Browser.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){o.Renderer.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[o.stamp(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[o.stamp(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(t.options.dashArray){var e,i=t.options.dashArray.split(","),n=[];for(e=0;et.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(u=!u);return u||o.Polyline.prototype._containsPoint.call(this,t,!0)},o.CircleMarker.prototype._containsPoint=function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()},o.GeoJSON=o.FeatureGroup.extend({initialize:function(t,e){o.setOptions(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,s=o.Util.isArray(t)?t:t.features;if(s){for(e=0,i=s.length;e1)return void(this._moved=!0);var n=i.touches&&1===i.touches.length?i.touches[0]:i,s=new o.Point(n.clientX,n.clientY),r=s.subtract(this._startPoint);(r.x||r.y)&&(Math.abs(r.x)+Math.abs(r.y)50&&(this._positions.shift(),this._times.shift())}this._map.fire("move",t).fire("drag",t)},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.xe.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,r=Math.abs(o+i)0?s:-s))-e;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}}),o.Map.addInitHook("addHandler","scrollWheelZoom",o.Map.ScrollWheelZoom),o.extend(o.DomEvent,{_touchstart:o.Browser.msPointer?"MSPointerDown":o.Browser.pointer?"pointerdown":"touchstart",_touchend:o.Browser.msPointer?"MSPointerUp":o.Browser.pointer?"pointerup":"touchend",addDoubleTapListener:function(t,e,i){function n(t){var e;if(o.Browser.pointer){if(!o.Browser.edge||"mouse"===t.pointerType)return;e=o.DomEvent._pointersCount}else e=t.touches.length;if(!(e>1)){var i=Date.now(),n=i-(r||i);a=t.touches?t.touches[0]:t,h=n>0&&n<=l,r=i}}function s(t){if(h&&!a.cancelBubble){if(o.Browser.pointer){if(!o.Browser.edge||"mouse"===t.pointerType)return;var i,n,s={};for(n in a)i=a[n],s[n]=i&&i.bind?i.bind(a):i;a=s}a.type="dblclick",e(a),r=null}}var r,a,h=!1,l=250,u="_leaflet_",c=this._touchstart,d=this._touchend;return t[u+c+i]=n,t[u+d+i]=s,t[u+"dblclick"+i]=e,t.addEventListener(c,n,!1),t.addEventListener(d,s,!1),t.addEventListener("dblclick",e,!1),this},removeDoubleTapListener:function(t,e){var i="_leaflet_",n=t[i+this._touchstart+e],s=t[i+this._touchend+e],r=t[i+"dblclick"+e];return t.removeEventListener(this._touchstart,n,!1),t.removeEventListener(this._touchend,s,!1),o.Browser.edge||t.removeEventListener("dblclick",r,!1),this}}),o.extend(o.DomEvent,{POINTER_DOWN:o.Browser.msPointer?"MSPointerDown":"pointerdown",POINTER_MOVE:o.Browser.msPointer?"MSPointerMove":"pointermove",POINTER_UP:o.Browser.msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL:o.Browser.msPointer?"MSPointerCancel":"pointercancel",TAG_WHITE_LIST:["INPUT","SELECT","OPTION"],_pointers:{},_pointersCount:0,addPointerListener:function(t,e,i,n){return"touchstart"===e?this._addPointerStart(t,i,n):"touchmove"===e?this._addPointerMove(t,i,n):"touchend"===e&&this._addPointerEnd(t,i,n),this},removePointerListener:function(t,e,i){var n=t["_leaflet_"+e+i];return"touchstart"===e?t.removeEventListener(this.POINTER_DOWN,n,!1):"touchmove"===e?t.removeEventListener(this.POINTER_MOVE,n,!1):"touchend"===e&&(t.removeEventListener(this.POINTER_UP,n,!1),t.removeEventListener(this.POINTER_CANCEL,n,!1)),this},_addPointerStart:function(t,i,n){var s=o.bind(function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(this.TAG_WHITE_LIST.indexOf(t.target.tagName)<0))return;o.DomEvent.preventDefault(t)}this._handlePointer(t,i)},this);if(t["_leaflet_touchstart"+n]=s,t.addEventListener(this.POINTER_DOWN,s,!1),!this._pointerDocListener){var r=o.bind(this._globalPointerUp,this);e.documentElement.addEventListener(this.POINTER_DOWN,o.bind(this._globalPointerDown,this),!0),e.documentElement.addEventListener(this.POINTER_MOVE,o.bind(this._globalPointerMove,this),!0),e.documentElement.addEventListener(this.POINTER_UP,r,!0),e.documentElement.addEventListener(this.POINTER_CANCEL,r,!0),this._pointerDocListener=!0}},_globalPointerDown:function(t){this._pointers[t.pointerId]=t,this._pointersCount++},_globalPointerMove:function(t){this._pointers[t.pointerId]&&(this._pointers[t.pointerId]=t)},_globalPointerUp:function(t){delete this._pointers[t.pointerId],this._pointersCount--},_handlePointer:function(t,e){t.touches=[];for(var i in this._pointers)t.touches.push(this._pointers[i]);t.changedTouches=[t],e(t)},_addPointerMove:function(t,e,i){var n=o.bind(function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&this._handlePointer(t,e)},this);t["_leaflet_touchmove"+i]=n,t.addEventListener(this.POINTER_MOVE,n,!1)},_addPointerEnd:function(t,e,i){var n=o.bind(function(t){this._handlePointer(t,e)},this);t["_leaflet_touchend"+i]=n,t.addEventListener(this.POINTER_UP,n,!1),t.addEventListener(this.POINTER_CANCEL,n,!1)}}),o.Map.mergeOptions({touchZoom:o.Browser.touch&&!o.Browser.android23,bounceAtZoomLimits:!0}),o.Map.TouchZoom=o.Handler.extend({addHooks:function(){o.DomUtil.addClass(this._map._container,"leaflet-touch-zoom"),o.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){o.DomUtil.removeClass(this._map._container,"leaflet-touch-zoom"),o.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var n=i.mouseEventToContainerPoint(t.touches[0]),s=i.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=i.getSize()._divideBy(2),this._startLatLng=i.containerPointToLatLng(this._centerPoint),"center"!==i.options.touchZoom&&(this._pinchStartLatLng=i.containerPointToLatLng(n.add(s)._divideBy(2))),this._startDist=n.distanceTo(s),this._startZoom=i.getZoom(),this._moved=!1,this._zooming=!0,i._stop(),o.DomEvent.on(e,"touchmove",this._onTouchMove,this).on(e,"touchend",this._onTouchEnd,this),o.DomEvent.preventDefault(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),s=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(s,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&s>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{var r=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1===s&&0===r.x&&0===r.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(e._moveStart(!0),this._moved=!0),o.Util.cancelAnimFrame(this._animRequest);var a=o.bind(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=o.Util.requestAnimFrame(a,this,!0),o.DomEvent.preventDefault(t)}},_onTouchEnd:function(){return this._moved&&this._zooming?(this._zooming=!1,o.Util.cancelAnimFrame(this._animRequest),o.DomEvent.off(e,"touchmove",this._onTouchMove).off(e,"touchend",this._onTouchEnd),void(this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom)))):void(this._zooming=!1)}}),o.Map.addInitHook("addHandler","touchZoom",o.Map.TouchZoom),o.Map.mergeOptions({tap:!0,tapTolerance:15}),o.Map.Tap=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(o.DomEvent.preventDefault(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var i=t.touches[0],n=i.target;this._startPos=this._newPos=new o.Point(i.clientX,i.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.addClass(n,"leaflet-active"),this._holdTimeout=setTimeout(o.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3),this._simulateEvent("mousedown",i),o.DomEvent.on(e,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),o.DomEvent.off(e,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var i=t.changedTouches[0],n=i.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.removeClass(n,"leaflet-active"),this._simulateEvent("mouseup",i), +this._isTapValid()&&this._simulateEvent("click",i)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new o.Point(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(i,n){var o=e.createEvent("MouseEvents");o._simulated=!0,n.target._simulatedClick=!0,o.initMouseEvent(i,!0,!0,t,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(o)}}),o.Browser.touch&&!o.Browser.pointer&&o.Map.addInitHook("addHandler","tap",o.Map.Tap),o.Map.mergeOptions({boxZoom:!0}),o.Map.BoxZoom=o.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},addHooks:function(){o.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){o.DomEvent.off(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_resetState:function(){this._moved=!1},_onMouseDown:function(t){return!(!t.shiftKey||1!==t.which&&1!==t.button)&&(this._resetState(),o.DomUtil.disableTextSelection(),o.DomUtil.disableImageDrag(),this._startPoint=this._map.mouseEventToContainerPoint(t),void o.DomEvent.on(e,{contextmenu:o.DomEvent.stop,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this))},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=o.DomUtil.create("div","leaflet-zoom-box",this._container),o.DomUtil.addClass(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new o.Bounds(this._point,this._startPoint),i=e.getSize();o.DomUtil.setPosition(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(o.DomUtil.remove(this._box),o.DomUtil.removeClass(this._container,"leaflet-crosshair")),o.DomUtil.enableTextSelection(),o.DomUtil.enableImageDrag(),o.DomEvent.off(e,{contextmenu:o.DomEvent.stop,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){setTimeout(o.bind(this._resetState,this),0);var e=new o.LatLngBounds(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}}),o.Map.addInitHook("addHandler","boxZoom",o.Map.BoxZoom),o.Map.mergeOptions({keyboard:!0,keyboardPanDelta:80}),o.Map.Keyboard=o.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),o.DomEvent.on(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),o.DomEvent.off(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var i=e.body,n=e.documentElement,o=i.scrollTop||n.scrollTop,s=i.scrollLeft||n.scrollLeft;this._map._container.focus(),t.scrollTo(s,o)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;e0&&t.screenY>0&&this._map.getContainer().focus()}}),o.control=function(t){return new o.Control(t)},o.Map.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){function t(t,s){var r=i+t+" "+i+s;e[t+s]=o.DomUtil.create("div",r,n)}var e=this._controlCorners={},i="leaflet-",n=this._controlContainer=o.DomUtil.create("div",i+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){o.DomUtil.remove(this._controlContainer)}}),o.Control.Zoom=o.Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=o.DomUtil.create("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,s){var r=o.DomUtil.create("a",i,n);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),o.DomEvent.on(r,"mousedown dblclick",o.DomEvent.stopPropagation).on(r,"click",o.DomEvent.stop).on(r,"click",s,this).on(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";o.DomUtil.removeClass(this._zoomInButton,e),o.DomUtil.removeClass(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&o.DomUtil.addClass(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&o.DomUtil.addClass(this._zoomInButton,e)}}),o.Map.mergeOptions({zoomControl:!0}),o.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new o.Control.Zoom,this.addControl(this.zoomControl))}),o.control.zoom=function(t){return new o.Control.Zoom(t)},o.Control.Attribution=o.Control.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(t){o.setOptions(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=o.DomUtil.create("div","leaflet-control-attribution"),o.DomEvent&&o.DomEvent.disableClickPropagation(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}}}),o.Map.mergeOptions({attributionControl:!0}),o.Map.addInitHook(function(){this.options.attributionControl&&(new o.Control.Attribution).addTo(this)}),o.control.attribution=function(t){return new o.Control.Attribution(t)},o.Control.Scale=o.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=o.DomUtil.create("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=o.DomUtil.create("div",e,i)),t.imperial&&(this._iScale=o.DomUtil.create("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e,i,n,o=3.2808399*t;o>5280?(e=o/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),o.control.scale=function(t){return new o.Control.Scale(t)},o.Control.Layers=o.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(o.stamp(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,i){var n='",o=e.createElement("div");return o.innerHTML=n,o.firstChild},_addItem:function(t){var i,n=e.createElement("label"),s=this._map.hasLayer(t.layer);t.overlay?(i=e.createElement("input"),i.type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=s):i=this._createRadioElement("leaflet-base-layers",s),i.layerId=o.stamp(t.layer),o.DomEvent.on(i,"click",this._onInputClick,this);var r=e.createElement("span");r.innerHTML=" "+t.name;var a=e.createElement("div");n.appendChild(a),a.appendChild(i),a.appendChild(r);var h=t.overlay?this._overlaysList:this._baseLayersList;return h.appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,i,n=this._form.getElementsByTagName("input"),o=[],s=[];this._handlingClick=!0;for(var r=n.length-1;r>=0;r--)t=n[r],e=this._getLayer(t.layerId).layer,i=this._map.hasLayer(e),t.checked&&!i?o.push(e):!t.checked&&i&&s.push(e);for(r=0;r=0;s--)t=n[s],e=this._getLayer(t.layerId).layer,t.disabled=e.options.minZoom!==i&&oe.options.maxZoom},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),o.control.layers=function(t,e,i){return new o.Control.Layers(t,e,i)}}(window,document); \ No newline at end of file diff --git a/searx/static/themes/simple/less/autocomplete.less b/searx/static/themes/simple/less/autocomplete.less new file mode 100644 index 00000000..0a90d0df --- /dev/null +++ b/searx/static/themes/simple/less/autocomplete.less @@ -0,0 +1,67 @@ +@background_color: white; + +.autocomplete { + position: absolute; + max-height: 0; + overflow-y: hidden; + text-align: left; + + &:active, &:focus, &:hover { + background-color: @background_color; + } + + &:empty { + display: none; + } + + > ul { + list-style-type: none; + margin: 0; + padding: 0; + + > li { + cursor: pointer; + padding: 5px 0 5px 10px; + + &.active, &:active, &:focus { + background-color: @color-base; + + a:active, a:focus, a:hover { + text-decoration: none; + } + } + + &.locked { + cursor: inherit; + } + } + } + + &.open { + display: block; + background-color: @background_color; + border: 1px solid @color-base; + max-height: 500px; + overflow-y: auto; + z-index:100; + + &:empty { + display: none; + } + } +} + + +@media screen and (max-width: @results-width) { + + .autocomplete { + bottom: 0; + } + + .autocomplete > ul > li { + padding: 7px 0 7px 10px; + border-bottom: 1px solid @color-result-top-border; + text-align: left; + } + +} diff --git a/searx/static/themes/simple/less/code.less b/searx/static/themes/simple/less/code.less new file mode 100644 index 00000000..a688dd98 --- /dev/null +++ b/searx/static/themes/simple/less/code.less @@ -0,0 +1,83 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #f8f8f8; } +.highlight .c { color: #408080; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { color: #008000; font-weight: bold } /* Keyword */ +.highlight .o { color: #666666 } /* Operator */ +.highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #BC7A00 } /* Comment.Preproc */ +.highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #408080; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #008000 } /* Keyword.Pseudo */ +.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #B00040 } /* Keyword.Type */ +.highlight .m { color: #666666 } /* Literal.Number */ +.highlight .s { color: #BA2121 } /* Literal.String */ +.highlight .na { color: #7D9029 } /* Name.Attribute */ +.highlight .nb { color: #008000 } /* Name.Builtin */ +.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ +.highlight .no { color: #880000 } /* Name.Constant */ +.highlight .nd { color: #AA22FF } /* Name.Decorator */ +.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0000FF } /* Name.Function */ +.highlight .nl { color: #A0A000 } /* Name.Label */ +.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #19177C } /* Name.Variable */ +.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mf { color: #666666 } /* Literal.Number.Float */ +.highlight .mh { color: #666666 } /* Literal.Number.Hex */ +.highlight .mi { color: #666666 } /* Literal.Number.Integer */ +.highlight .mo { color: #666666 } /* Literal.Number.Oct */ +.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ +.highlight .sc { color: #BA2121 } /* Literal.String.Char */ +.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #BA2121 } /* Literal.String.Double */ +.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ +.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ +.highlight .sx { color: #008000 } /* Literal.String.Other */ +.highlight .sr { color: #BB6688 } /* Literal.String.Regex */ +.highlight .s1 { color: #BA2121 } /* Literal.String.Single */ +.highlight .ss { color: #19177C } /* Literal.String.Symbol */ +.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ +.highlight .vc { color: #19177C } /* Name.Variable.Class */ +.highlight .vg { color: #19177C } /* Name.Variable.Global */ +.highlight .vi { color: #19177C } /* Name.Variable.Instance */ +.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ + +.highlight pre { + overflow: auto; +} + +.highlight .lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: default; + + &::selection { + background: transparent; /* WebKit/Blink Browsers */ + } + &::-moz-selection { + background: transparent; /* Gecko Browsers */ + } +} diff --git a/searx/static/themes/simple/less/definitions.less b/searx/static/themes/simple/less/definitions.less new file mode 100644 index 00000000..7a43720b --- /dev/null +++ b/searx/static/themes/simple/less/definitions.less @@ -0,0 +1,135 @@ +/* + * searx, A privacy-respecting, hackable metasearch engine + * + * To change the colors of the site, simple edit this variables + */ + +/// Basic Colors + +@color-base: #3498DB; +@color-base-dark: #084999; +@color-base-light: #ECF0F1; +@color-highlight: #094089; +@color-black: #000000; + +/// +@color-error: #db3434; +@color-error-background: lighten(@color-error, 40%); + +@color-warning: #dbba34; +@color-warning-background: lighten(@color-warning, 40%); + +/// General + +@color-font: #444; +@color-font-light: #888; + +@color-red: #25a55b; + +@color-url-font: #29314d; +@color-url-visited-font: #684898; +@results-width: 50em; +@search-width: 40em; + +// +@color-a-font: @color-base; +@color-a-font-hover: @color-base; + + +/// Start-Screen + + + +/// Search-Input + +@color-search-border: @color-base; +@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; + +/// Answers +@color-answers-border: @color-base-dark; + +// Selected +@color-autocompleter-selected-background: #444; +@color-autocompleter-selected-font: #FFF; +@color-autocompleter-selected-queried-font: #9FCFFF; + +/// Categories + +@color-categories-item-selected: @color-base; +@color-categories-item-selected-font: #FFF; + +@color-categories-item-border-selected: @color-base-dark; +@color-categories-item-border-unselected: #E8E7E6; +@color-categories-item-border-unselected-hover: @color-base; + + +/// Results + +@color-suggestions-button-background: @color-base; +@color-suggestions-button-font: #FFF; + +@color-download-button-background: @color-base; +@color-download-button-font: #FFF; + +@color-result-search-background: @color-base-light; + +@color-result-definition-border: gray; +@color-result-torrent-border: lightgray; +@color-result-top-border: #E8E7E6; + +// Link to result +@color-result-link-font: @color-base-dark; +@color-result-link-visited-font: @color-url-visited-font; + +// Url to result +@color-result-url-font: @color-red; + +// Publish Date +@color-result-publishdate-font: @color-font-light; + +// Images +@color-result-image-span-background-hover: rgba(0, 0, 0, 0.6); +@color-result-image-span-font: #FFF; + +// Search-URL +@color-result-search-url-border: #888; +@color-result-search-url-font: #444; + + +/// Settings + +@color-settings-fieldset: @color-base; +@color-settings-table-striped: #dbdbdb; +@color-settings-tr-hover: #ececec; + +// Labels +@color-settings-label-allowed-background: #E74C3C; +@color-settings-label-allowed-font: #FFF; + +@color-settings-label-deny-background: #2ECC71; +@color-settings-label-deny-font: @color-font; + +@color-settings-return-background: @color-base; +@color-settings-return-font: #FFF; + +/// Other + +@color-engines-font: @color-font-light; +@color-percentage-div-background: #444; + +/// Load fonts from this directory. +@icon-font-path: "../../../fonts/"; +//** File name for all font files. +@icon-font-name: "glyphicons-halflings-regular"; +//** Element ID within SVG icon file. +@icon-font-svg-id: "glyphicons_halflingsregular"; diff --git a/searx/static/themes/simple/less/index.less b/searx/static/themes/simple/less/index.less new file mode 100644 index 00000000..e1efdac9 --- /dev/null +++ b/searx/static/themes/simple/less/index.less @@ -0,0 +1,43 @@ +.index { + + text-align: center; + + .title { + background: url('../img/searx.png') no-repeat; + width: 100%; + min-height: 80px; + background-position: center; + } + + h1 { + font-size: 5em; + visibility: hidden; + } + + #search { + margin: 0 auto; + background: inherit; + border: inherit; + } + + .search_filters { + display: block; + margin: 1em 0; + } + + .category label { + padding: 6px 10px; + border-bottom: initial !important; + } + +} + +@media screen and (max-width: 75em) { + + div.title { + h1 { + font-size: 1em; + } + } + +} diff --git a/searx/static/themes/simple/less/ion.less b/searx/static/themes/simple/less/ion.less new file mode 100644 index 00000000..9ec6b995 --- /dev/null +++ b/searx/static/themes/simple/less/ion.less @@ -0,0 +1,174 @@ +// Generated by grunt-webfont + + +@font-face { + font-family:"ion"; + src:url("../fonts/ion.eot?94af7082ea096aefe3a7b6642834716e"); + src:url("../fonts/ion.eot?#iefix") format("embedded-opentype"), + url("../fonts/ion.woff2?94af7082ea096aefe3a7b6642834716e") format("woff2"), + url("../fonts/ion.woff?94af7082ea096aefe3a7b6642834716e") format("woff"), + url("../fonts/ion.ttf?94af7082ea096aefe3a7b6642834716e") format("truetype"), + url("../fonts/ion.svg?94af7082ea096aefe3a7b6642834716e#ion") format("svg"); + font-weight:normal; + font-style:normal; +} + +.ion-icon { + &:before { + font-family:"ion"; + } + display:inline-block; + vertical-align:middle; + line-height:1; + font-weight:normal; + font-style:normal; + speak:none; + text-decoration:inherit; + text-transform:none; + text-rendering:auto; + -webkit-font-smoothing:antialiased; + -moz-osx-font-smoothing:grayscale; +} + + +// Icons + +.ion-navicon-round { + &:before { + content:"\f101"; + } +} + + +.ion-search { + &:before { + content:"\f102"; + } +} + + +.ion-play { + &:before { + content:"\f103"; + } +} + + +.ion-link { + &:before { + content:"\f104"; + } +} + + +.ion-chevron-up { + &:before { + content:"\f105"; + } +} + + +.ion-chevron-left { + &:before { + content:"\f106"; + } +} + + +.ion-chevron-right { + &:before { + content:"\f107"; + } +} + + +.ion-arrow-down-a { + &:before { + content:"\f108"; + } +} + + +.ion-arrow-up-a { + &:before { + content:"\f109"; + } +} + + +.ion-arrow-swap { + &:before { + content:"\f10a"; + } +} + + +.ion-arrow-dropdown { + &:before { + content:"\f10b"; + } +} + + +.ion-globe { + &:before { + content:"\f10c"; + } +} + + +.ion-time { + &:before { + content:"\f10d"; + } +} + + +.ion-location { + &:before { + content:"\f10e"; + } +} + + +.ion-warning { + &:before { + content:"\f10f"; + } +} + + +.ion-error { + &:before { + content:"\f110"; + } +} + + +.ion-film-outline { + &:before { + content:"\f111"; + } +} + + +.ion-music-note { + &:before { + content:"\f112"; + } +} + + +.ion-more-vertical { + &:before { + content:"\f113"; + } +} + + +.ion-magnet { + &:before { + content:"\f114"; + } +} + diff --git a/searx/static/themes/simple/less/mixins.less b/searx/static/themes/simple/less/mixins.less new file mode 100644 index 00000000..097ab496 --- /dev/null +++ b/searx/static/themes/simple/less/mixins.less @@ -0,0 +1,62 @@ +/* +* searx, A privacy-respecting, hackable metasearch engine +*/ + +// Mixins +.text-size-adjust (@property: 100%) { + -webkit-text-size-adjust: @property; + -ms-text-size-adjust: @property; + -moz-text-size-adjust: @property; + text-size-adjust: @property; +} + +.rounded-corners (@radius: 4px) { + -webkit-border-radius: @radius; + -moz-border-radius: @radius; + border-radius: @radius; +} + +// disable user selection +.disable-user-select () { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +// select all on focus +.select-all-on-focus() { + -webkit-user-select: all; + -moz-user-select: all; + -ms-user-select: all; + user-select: all; +} + +// see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Advanced_layouts_with_flexbox +.flexbox() { + display: -webkit-box; + display: -moz-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; +} + +.inline-flex() { + display: -webkit-inline-box; + display: -moz-inline-box; + display: -webkit-inline-flex; + display: -ms-inline-flexbox; + display: inline-flex; +} + +.flex-direction-row() { + -webkit-box-direction: normal; + -webkit-box-orient: horizontal; + -moz-box-direction: normal; + -moz-box-orient: horizontal; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; +} diff --git a/searx/static/themes/simple/less/normalize.less b/searx/static/themes/simple/less/normalize.less new file mode 100644 index 00000000..fa4e73dd --- /dev/null +++ b/searx/static/themes/simple/less/normalize.less @@ -0,0 +1,447 @@ +/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */ + +/* Document + ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in + * IE on Windows Phone and in iOS. + */ + +html { + line-height: 1.15; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/* Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers (opinionated). + */ + +body { + margin: 0; +} + +/** + * Add the correct display in IE 9-. + */ + +article, +aside, +footer, +header, +nav, +section { + display: block; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/* Grouping content + ========================================================================== */ + +/** + * Add the correct display in IE 9-. + * 1. Add the correct display in IE. + */ + +figcaption, +figure, +main { /* 1 */ + display: block; +} + +/** + * Add the correct margin in IE 8. + */ + +figure { + margin: 1em 40px; +} + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/* Text-level semantics + ========================================================================== */ + +/** + * 1. Remove the gray background on active links in IE 10. + * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. + */ + +a { + background-color: transparent; /* 1 */ + -webkit-text-decoration-skip: objects; /* 2 */ +} + +/** + * 1. Remove the bottom border in Chrome 57- and Firefox 39-. + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} + +/** + * Prevent the duplicate application of `bolder` by the next rule in Safari 6. + */ + +b, +strong { + font-weight: inherit; +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, +strong { + font-weight: bolder; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, +kbd, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * Add the correct font style in Android 4.3-. + */ + +dfn { + font-style: italic; +} + +/** + * Add the correct background and color in IE 9-. + */ + +mark { + background-color: #ff0; + color: #000; +} + +/** + * Add the correct font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Add the correct display in IE 9-. + */ + +audio, +video { + display: inline-block; +} + +/** + * Add the correct display in iOS 4-7. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Remove the border on images inside links in IE 10-. + */ + +img { + border-style: none; +} + +/** + * Hide the overflow in IE. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* Forms + ========================================================================== */ + +/** + * 1. Change the font styles in all browsers (opinionated). + * 2. Remove the margin in Firefox and Safari. + */ + +button, +input, +optgroup, +select, +textarea { + font-family: sans-serif; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} + +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + +button, +input { /* 1 */ + overflow: visible; +} + +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + +button, +select { /* 1 */ + text-transform: none; +} + +/** + * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` + * controls in Android 4. + * 2. Correct the inability to style clickable types in iOS and Safari. + */ + +button, +html [type="button"], /* 1 */ +[type="reset"], +[type="submit"] { + -webkit-appearance: button; /* 2 */ +} + +/** + * Remove the inner border and padding in Firefox. + */ + +button::-moz-focus-inner, +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ + +button:-moz-focusring, +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; +} + +/** + * Correct the padding in Firefox. + */ + +fieldset { + padding: 0.35em 0.75em 0.625em; +} + +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ + +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} + +/** + * 1. Add the correct display in IE 9-. + * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ +} + +/** + * Remove the default vertical scrollbar in IE. + */ + +textarea { + overflow: auto; +} + +/** + * 1. Add the correct box sizing in IE 10-. + * 2. Remove the padding in IE 10-. + */ + +[type="checkbox"], +[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + +[type="search"] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/** + * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. + */ + +[type="search"]::-webkit-search-cancel-button, +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* Interactive + ========================================================================== */ + +/* + * Add the correct display in IE 9-. + * 1. Add the correct display in Edge, IE, and Firefox. + */ + +details, /* 1 */ +menu { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Scripting + ========================================================================== */ + +/** + * Add the correct display in IE 9-. + */ + +canvas { + display: inline-block; +} + +/** + * Add the correct display in IE. + */ + +template { + display: none; +} + +/* Hidden + ========================================================================== */ + +/** + * Add the correct display in IE 10-. + */ + +[hidden] { + display: none; +} diff --git a/searx/static/themes/simple/less/preferences.less b/searx/static/themes/simple/less/preferences.less new file mode 100644 index 00000000..b8e096cd --- /dev/null +++ b/searx/static/themes/simple/less/preferences.less @@ -0,0 +1,78 @@ +#main_preferences { + form { + width: 100%; + } + + fieldset { + margin: 8px; + border: none; + } + + legend { + margin: 0; + padding: 5px 0 0 0; + display: block; + float:left; + width: 300px; + } + + .value { + margin: 0; + padding: 0; + float:left; + width: 15em; + } + + .description { + margin: 0; + padding: 5px 0 0 0; + float:left; + width: 50%; + color: darken(#dcdcdc, 30%); + font-size: 90%; + } + + select { + width: 200px; + font-size: inherit !important; + } + + table { + border-collapse: collapse; + } + + table td { + text-align: center; + } + + .name, .shortcut { + text-align: left; + } + + .preferences_back { + background: none repeat scroll 0 0 @color-settings-return-background; + color: white; + border: 0 none; + .rounded-corners; + cursor: pointer; + display: inline-block; + margin: 2px 4px; + padding: 0.5em; + + a { + display: block; + color: @color-settings-return-font; + } + + a::first-letter { + text-transform: uppercase; + } + } + +} + +@media screen and (max-width: 75em) { + .preferences_back { + clear: both; + } +} diff --git a/searx/static/themes/simple/less/search.less b/searx/static/themes/simple/less/search.less new file mode 100644 index 00000000..beeac3e8 --- /dev/null +++ b/searx/static/themes/simple/less/search.less @@ -0,0 +1,232 @@ +/* +* searx, A privacy-respecting, hackable metasearch engine +*/ + +#search { + padding: 0 2em; + margin: 0; + background: #f7f7f7; + border-bottom: 1px solid #d7d7d7; +} + +#search_wrapper { + padding: 10px 0; +} + +.search_box { + margin: 0 12px 0 0; + display: inline-flex; + flex-direction: row; + + white-space: nowrap; + /* + &:has(q:focus) { + box-shadow: 0px 0px 5px #CCC; +} +*/ +} + +#q, #send_search { + display: block !important; + border-collapse: separate; + box-sizing: border-box; + position: relative; + + margin: 0; + padding: 2px; + height: 2.2em; + background: none repeat scroll 0 0 @color-search-background; + border: 1px solid @color-search-border; + border-radius: 0px; + outline: none; + color: @color-search-font; + font-size: 16px; + z-index: 2; +} + +#q { + outline: medium none; + padding-left: 8px; + padding-right: 0px !important; + border-right: none; + width: @search-width; +} + +#send_search { + border-left: none; + width: 2.2em; + + &:hover { + cursor: pointer; + background-color: @color-search-border; + color: @color-base-light; + } +} + +.no-js #send_search { + width: auto !important; +} + +.search_filters { + display: inline-block; + vertical-align: middle; +} + +@media screen and (max-width: 75em) { + + #categories { + font-size: 90%; + clear: both; + + .checkbox_container { + margin-top: 2px; + margin: auto; + } + } + + html.touch { + #main_index, #main_results { + + #categories_container { + width: 1000px; + width: -moz-max-content; + width: -webkit-max-content; + width: max-content; + + .category { + display: inline-block; + width: auto; + } + } + + #categories { + width: 100%; + margin: 0; + text-align: left; + overflow-x: scroll; + overflow-y: hidden; + -webkit-overflow-scrolling: touch; + } + } + } + +} + +@media screen and (max-width: @results-width) { + + #search { + width: 100%; + margin: 0; + padding: 0.1em 0 0 0; + } + + #search_wrapper { + width: 100%; + margin: 0 0 0.7em 0; + padding: 0; + } + + .search_box { + // hack, should bew 100% ? + width: 99%; + margin: 0.1em; + padding: 0 0.1em 0 0; + display: flex; + flex-direction: row; + } + + #q { + width: auto !important; + flex: 1; + } + + .search_filters { + display: block; + margin: 0.5em; + } + + .language, .time_range { + width: 45%; + } + + .category { + display: block; + width: 90%; + + label { + border-bottom: 0; + } + } + +} + +#categories { + margin: 0 10px 0 0; + .disable-user-select; + + &::-webkit-scrollbar { + width: 0; + height: 0; + } +} + +.category { + display: inline-block; + position: relative; + margin: 0 3px; + padding: 0px; + + input { + display: none; + } + + label { + cursor: pointer; + padding: 4px 10px; + margin: 0; + display: block; + text-transform: capitalize; + font-size: 0.9em; + border-bottom: 2px solid transparent; + .disable-user-select; + } + + input[type="checkbox"]:focus + label { + box-shadow: 0px 0px 8px #3498DB; + } + + /*label:hover { + border-bottom: 2px solid @color-categories-item-border-unselected-hover; + }*/ + + input[type="checkbox"]:checked + label { + background: @color-categories-item-selected; + color: @color-categories-item-selected-font; + border-bottom: 2px solid @color-categories-item-border-selected; + } +} + +#categories_container { + + position: relative; + + .help { + position: absolute; + width: 100%; + bottom: -20px; + overflow: hidden; + + opacity: 0; + transition: opacity 1s ease; + + font-size: 0.8em; + text-position: center; + background: white; + } + + &:hover .help { + opacity: 0.8; + transition: opacity 1s ease; + } + +} diff --git a/searx/static/themes/simple/less/stats.less b/searx/static/themes/simple/less/stats.less new file mode 100644 index 00000000..c134bd0e --- /dev/null +++ b/searx/static/themes/simple/less/stats.less @@ -0,0 +1,8 @@ +.percentage { + position: relative; + width: 300px; + + div { + background: @color-percentage-div-background; + } +} diff --git a/searx/static/themes/simple/less/style-rtl.less b/searx/static/themes/simple/less/style-rtl.less new file mode 100644 index 00000000..2b68bcfd --- /dev/null +++ b/searx/static/themes/simple/less/style-rtl.less @@ -0,0 +1,6 @@ +@import "style.less"; + +#search_submit { + left: 1px; + right:auto; +} diff --git a/searx/static/themes/simple/less/style.less b/searx/static/themes/simple/less/style.less new file mode 100644 index 00000000..b79b3eb2 --- /dev/null +++ b/searx/static/themes/simple/less/style.less @@ -0,0 +1,709 @@ +/* +* searx, A privacy-respecting, hackable metasearch engine +* +* To convert "style.less" to "style.css" run: $make styles +*/ + +@import "normalize.less"; + +@import "definitions.less"; + +@import "mixins.less"; + +@import "code.less"; + +@import "toolkit.less"; + +@import "autocomplete.less"; + +// ion-icon +@import "ion.less"; + +.ion-icon-big { + .ion-icon; + font-size: 149%; +} + +// for index.html template +@import "index.less"; + +// for preferences.html template +@import "preferences.less"; + +// Search-Field +@import "search.less"; + +// Main LESS-Code +html { + font-family: arial, sans-serif; + font-size: 0.9em; + .text-size-adjust; + color: @color-font; + padding: 0; + margin: 0; +} + +body, main { + padding: 0; + margin: 0; +} + +main { + width: 100%; + // position: absolute; +} + +footer { + // position:absolute; + bottom:0; + width:100%; + height:50px; +} + +#main_preferences, #main_about, #main_stats { + margin: 3em; + width: auto; +} + +footer { + bottom: 0; + height: 3em; + margin: 1em 0; + padding: 1em 0; + clear: both; + width: 100%; + text-align: center; + + p { + font-size: 0.9em; + } +} + +#main_preferences h1, #main_stats h1 { + background: url('../img/searx.png') no-repeat; + background-size: auto 75%; + min-height: 40px; + margin: 0 auto; + + span { + visibility: hidden; + } +} + +input[type="submit"], #results button[type="submit"] { + padding: 0.5rem; + margin: 2px 4px; + display: inline-block; + background: @color-download-button-background; + color: @color-download-button-font; + .rounded-corners; + border: 0; + cursor: pointer; +} + +a { + text-decoration: none; + color: @color-url-font; + + &:visited { + color: @color-url-visited-font; + + .highlight { + color: @color-url-visited-font; + } + } +} + +article[data-vim-selected] { + background: #f7f7f7; +} + +article[data-vim-selected]::before { + position: absolute; + left: 1em; + padding: 2px; + content: ">"; + font-weight: bold; + color: @color-base; +} + +article.result-images[data-vim-selected] { + background: @color-base; +} + +article.result-images[data-vim-selected]::before { + display: none; + content: ""; +} + +.result { + margin: 19px 0 18px 0; + padding: 0; + + h3 { + font-size: 1.1em; + word-wrap:break-word; + margin: 5px 0 1px 0; + padding: 0; + margin-bottom: 0; + + a { + color: @color-result-link-font; + font-weight: normal; + font-size: 1.1em; + + &:visited { + color: @color-result-link-visited-font; + } + + &:focus, &:hover { + text-decoration: underline; + border: none; + -webkit-box-shadow: none; + box-shadow: none; + outline:none; + } + } + } + + .cache_link, .proxyfied_link { + font-size: 0.9em !important; + } + + .content, .stat, .altlink { + font-size: 0.9em; + margin: 0; + padding: 0; + max-width: 54em; + word-wrap:break-word; + line-height: 1.24; + + .highlight { + color: @color-black; + background: inherit; + font-weight: bold; + } + } + + .codelines { + .highlight { + color: inherit; + background: inherit; + font-weight: normal; + } + } + + .url { + font-size: 0.9em; + margin: 0 0 3px 0; + padding: 0; + max-width: 54em; + word-wrap:break-word; + color: @color-result-url-font; + } + + .published_date { + font-size: 0.8em; + color: @color-result-publishdate-font; + } + + img { + + &.thumbnail { + float: left; + padding: 0 5px 10px 0; + width: 20em; + min-width: 20em; + min-height: 8em; + // background: @color-base-light; + } + + &.image { + float: left; + padding: 0 5px 10px 0; + width: 100px; + max-height: 100px; + object-fit: scale-down; + object-position: right top; + } + + } + + .break { + clear: both; + } + +} + +.category-social .image { + width: auto !important; + min-width: 48px; + min-height: 48px; + padding: 0 5px 25px 0 !important; +} + +.result-videos .content { + overflow: hidden; +} + +.engines { + float: right; + color: @color-engines-font; + + span { + font-size: smaller; + margin: 0 0.5em 0 0; + } +} + +.small_font { + font-size: 0.8em; +} + +.highlight { + color: @color-highlight; + background: inherit; + font-weight: bold; +} + +.result-images { + display: inline-block; + margin: 0; + padding: 0; + position: relative; + max-height: 200px; + + img { + float: inherit; + margin: 0; + padding: 0; + border: none; + max-height: 200px; + background: @color-base-dark; + } + + span a { + display: none; + color: @color-result-image-span-font; + } + + &:hover span a { + display: block; + position: absolute; + bottom: 0; + right: 0; + padding: 4px; + margin: 0 0 4px 4px; + background-color: @color-result-image-span-background-hover; + font-size: 0.7em; + } +} + +.torrent_result { + border-left: 10px solid @color-result-torrent-border; + padding-left: 3px; + + p { + margin: 3px; + font-size: 0.8em; + } + + a { + color: @color-result-link-font; + + &:hover { + text-decoration: underline; + } + + &:visited { + color: @color-result-link-visited-font; + } + } +} + +#results { + margin: 2em 2em 20px 2em; + padding: 0; + width: @results-width; +} + +#suggestions { + + .wrapper { + display: flex; + flex-flow: row wrap; + justify-content: flex-end; + + form { + display: inline-block; + flex: 1 1 50%; + } + } +} + +#suggestions, #answers, #corrections { + max-width: @results-width; +} + +#suggestions, #answers, #infoboxes, #corrections { + + input { + padding: 0; + margin: 3px; + font-size: 0.9em; + display: inline-block; + background: transparent; + color: @color-result-search-url-font; + cursor: pointer; + } + + input[type="submit"], .infobox .url a { + color: @color-result-link-font; + text-decoration: none; + font-size: 0.9rem; + + &:hover { + text-decoration: underline; + } + } + +} + +#corrections { + display: flex; + flex-flow: row wrap; + margin: 1em 0; + + h4, input[type="submit"] { + display: inline-block; + margin: 0 0.5em 0 0; + } + + input[type="submit"]::after { + content: ", " + } + +} + +#suggestions .title, #search_url .title, #apis .title { + margin: 2em 0 0.5em 0; + color: @color-font; +} + +#answers { + margin: 10px 8px 10px 8px; + border: 1px solid #ddd; + padding: 0.9em; + box-shadow: 0px 0px 5px #CCC; + + h4 { + display: none; + } + + .answer { + display: block; + font-size: 1.2em; + font-weight: bold; + } +} + +#answers, #infoboxes { + form { + min-width: 210px; + } +} + +#sidebar { + position: absolute; + top: 100px; + left: 57em; + + margin: 0px 2px 5px 5px; + padding: 0px 2px 2px; + max-width: 25em; + word-wrap: break-word; + + .infobox { + margin: 10px 0 10px; + border: 1px solid #ddd; + padding: 0.9em; + font-size: 0.9em; + box-shadow: 0px 0px 5px #CCC; + + h2 { + margin: 0 0 .5em 0; + } + + img { + max-width: 100%; + max-height: 12em; + display: block; + margin: 0; + padding: 0; + } + + dl { + margin: 0.5em 0; + } + + dt { + display: inline; + margin: 0.5em 0.25em 0.5em 0; + padding: 0; + font-weight: bold; + } + + dd { + display: inline; + margin: 0.5em 0; + padding: 0; + } + + input { + font-size: 1em; + } + + br { + clear: both; + } + + .attributes, .urls { + clear: both; + } + + } +} + +#search_url { + margin-top: 8px; + + div { + display: block; + border: 1px solid @color-result-search-url-border; + padding: 4px; + color: @color-result-search-url-font; + width: 100%; + display: block; + margin: 0.1em; + overflow: hidden; + height: 1.2em; + line-height: 1.2em; + + pre { + display: block; + width: 200em; + font-size: 0.8em; + word-break: break-all; + margin: 0.1em; + .select-all-on-focus(); + } + } +} + +#linkto_preferences { + position: absolute; + right: 10px; + top: 0.9em; + padding: 0; + border: 0; + display: block; + + font-size: 1.2em; + color: @color-search-font; + + a:link *, a:hover *, a:visited *, a:active * { + color: @color-search-font; + } +} + +#pagination { + clear: both; + + br { + clear: both; + } +} + +#apis { + margin-top: 8px; + clear: both; +} + +#backToTop { + border: 1px solid #ddd; + margin: 0 0 0 2em; + padding: 0; + font-size: 1em; + box-shadow: 0px 0px 5px #CCC; + background: white; + position: fixed; + bottom: 85px; + left: @results-width; + transition: opacity 0.5s; + opacity: 0; + + a { + display: block; + margin: 0; + padding: 0.6em; + } +} + +@media screen and (max-width: 75em) { + + #main_preferences, #main_about, #main_stats { + margin: 0.5em; + width: auto; + } + + #suggestions, #answers { + margin-top: 1em; + } + + #infoboxes { + position: inherit; + max-width: inherit; + + .infobox { + clear:both; + + img { + float: left; + max-width: 10em; + margin: 0.5em 0.5em 0.5em 0; + } + } + + } + + #sidebar { + position: static; + max-width: @results-width; + margin: 0 0 2px 0; + padding: 0; + float: none; + border: none; + width: auto; + + input { + border: 0; + } + } + + #apis { + display: none; + } + + #search_url { + display: none; + } + + .result { + border-bottom: 1px solid @color-result-top-border; + margin: 0; + padding-top: 8px; + padding-bottom: 6px; + + h3 { + margin: 0 0 1px 0; + } + + .thumbnail { + max-width: 98%; + } + + .url { + + span.url { + display: block; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + width: 100%; + } + + a { + float: right; + padding: 0 0.5em; + } + + } + + .engines { + float: right; + padding: 0 0 3px 0; + } + } + + .result-images { + border-bottom: none !important; + } + + .image_result { + max-width: 98%; + img { + max-width: 98%; + } + } +} + + +@media screen and (max-width: @results-width) { + + article[data-vim-selected]::before { + display: none; + content: ""; + } + + #linkto_preferences { + display: none; + postion: fixed !important; + top: 100px; + right: 0px; + } + + #sidebar { + margin: 0 5px 2px 5px; + } + + #corrections { + margin: 1em 5px 1em 5px; + } + + #results { + margin: 0; + padding: 0; + width: initial; + } + + #backToTop { + left: 40em; + bottom: 35px; + } + + .result { + padding: 8px 10px 6px 10px; + } + + .result-images { + margin: 0; + padding: 0; + border: none; + } + +} + +@media screen and (max-width: 35em) { + + .result-videos { + + img.thumbnail { + float: none !important; + } + .content { + overflow: inherit; + } + + } + +} diff --git a/searx/static/themes/simple/less/toolkit.less b/searx/static/themes/simple/less/toolkit.less new file mode 100644 index 00000000..641747c6 --- /dev/null +++ b/searx/static/themes/simple/less/toolkit.less @@ -0,0 +1,346 @@ +// other solution : http://stackoverflow.com/questions/1577598/how-to-hide-parts-of-html-when-javascript-is-disabled/13857783#13857783 +html.no-js .hide_if_nojs { + display: none; +} + +html.js .show_if_nojs { + display: none; +} + +.center { + text-align: center; +} + +.right { + float: right ; +} + +.left { + float: left; +} + +.invisible { + display: none; +} + +.danger { + background-color: @color-error-background; +} + +.badge { + display: inline-block; + color: #fff; + background-color: #777; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + min-width: 10px; + padding: 1px 5px; + border-radius: 5px; +} + +// table +table { + + width: 100%; + + &.striped { + tr { + border-bottom: 1px solid @color-settings-tr-hover; + } + } +} + +th { + padding: 0.4em; +} + +td { + padding: 0 4px; +} + +tr { + &:hover { + background: @color-settings-tr-hover; + } +} + +// dialog +.dialog() { + position: relative; + width: 70%; + padding: 1em 1em 1em 2.7em; + margin: 0em 8% 1em 8%; + border: 1px solid black; + border-radius: 4px; + text-align: left; + + &:before { + position: absolute; + top: 0.5em; + left: 0.5em; + font-family:"ion"; + font-size: 1.5em; + } + + .close { + float:right; + position: relative; + top: -3px; + color: inherit; + font-size: 1.5em; + } + + ul, ol, p { + margin: 1px 0 0 0; + } + +} + +.dialog-error { + .dialog(); + color: @color-error; + background: @color-error-background; + border-color: @color-error; + .ion-error(); +} + +.dialog-warning { + .dialog(); + color: @color-warning; + background: @color-warning-background; + border-color: @color-warning; + .ion-warning(); +} + +// btn-collapse +.btn-collapse { + cursor: pointer; +} + +// +.scrollx { + overflow-x: auto; + overflow-y: hidden; + display: block; + padding: 0; + margin: 0; + border: none; +} + +// tabs +.tabs .tabs > label { + font-size: 90%; +} + +.tabs { + .flexbox(); + flex-wrap: wrap; + width: 100%; + min-width: 100%; + + & > * { + order: 2; + } + + & > input[type=radio] { + display: none; + } + + & > label { + order: 1; + padding: 0.7em; + margin: 0 0.7em; + letter-spacing:0.5px; + text-transform: uppercase; + + border: solid white; + border-width: 0px 0px 2px 0; + + .disable-user-select(); + cursor: pointer; + } + + & > label:hover { + border-bottom: 2px solid @color-categories-item-border-selected; + } + + & > section { + min-width: 100%; + padding: 0.7rem 0; + box-sizing: border-box; + border-top: 1px solid black; + display: none; + } + + // default selection + & > label:last-of-type { + border-bottom: 2px solid @color-categories-item-border-selected; + background: @color-categories-item-selected; + color: @color-categories-item-selected-font; + font-weight: bold; + letter-spacing:-0.1px; + } + + & > section:last-of-type { + display: block; + } + +} + +html body .tabs > input:checked { + ~ section { + display: none; + } + ~ label { + position: inherited; + background: inherit; + border-bottom: 2px solid transparent; + font-weight: normal; + color: inherit; + + &:hover { + border-bottom: 2px solid @color-categories-item-border-selected; + } + } + + label { + border-bottom: 2px solid @color-categories-item-border-selected; + background: @color-categories-item-selected; + color: @color-categories-item-selected-font; + font-weight: bold; + letter-spacing:-0.1px; + } + + label + section { + display: block; + } +} + +// select +select { + height: 28px; + margin: 0 1em 0 0; + padding: 2px 8px 2px 0 !important; + color: @color-search-font; + font-size: 12px; + z-index: 2; + + &:hover, &:focus { + cursor: pointer; + } +} + +@supports ((background-position-x: 100%) and ((appearance: none) or (-webkit-appearance: none) or (-moz-appearance: none))) { + + select { + appearance: none; + -webkit-appearance: none; + -moz-appearance: none; + border: none; + border-bottom: 1px solid #d7d7d7; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI1MTJweCIgaGVpZ2h0PSI1MTJweCIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDUxMiA1MTIiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTI4LDE5MiAyNTYsMzIwIDM4NCwxOTIiLz48L2c+PC9zdmc+Cg==) no-repeat; + background-position-x: 105%; + background-size: 2em; + background-origin: content-box; + outline: medium none; + + &:hover, &:focus { + border-bottom: 1px solid @color-search-border; + } + + } + +} + +// checkbox-onoff +@supports (border-radius: 50px) { + .checkbox-onoff { + display: inline-block; + width: 40px; + height: 10px; + background: #dcdcdc; + margin: 8px auto; + position: relative; + border-radius: 50px; + label { + display: block; + width: 20px; + height: 20px; + position: absolute; + top: -5px; + cursor: pointer; + border-radius: 50px; + box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.3); + transition: all 0.4s ease; + + left: 27px; + background-color: #3498DB; + } + input[type=checkbox] { + visibility: hidden; + &:checked + label { + left: -5px; + background: #dcdcdc; + } + } + } +} + +// checkbox +@supports (transform: rotate(-45deg)) { + .checkbox { + width: 20px; + position: relative; + margin: 20px auto; + label { + width: 20px; + height: 20px; + cursor: pointer; + position: absolute; + top: 0; + left: 0; + background: white; + border-radius: 4px; + box-shadow: inset 0px 1px 1px white, 0px 1px 4px rgba(0,0,0,0.5); + &:after { + content: ''; + width: 9px; + height: 5px; + position: absolute; + top: 4px; + left: 4px; + border: 3px solid #333; + border-top: none; + border-right: none; + background: transparent; + opacity: 0; + transform: rotate(-45deg); + } + } + + input[type=checkbox] { + visibility: hidden; + &:checked + label:after { + border-color: #3498DB; + opacity: 1; + } + } + + // disabled : can't be focused, show only the check mark + input[disabled] + label { + background-color: transparent !important; + box-shadow: none !important; + cursor: inherit;; + } + + // if not checked and possible to checked then display a "light" check mark on hover + input:not(:checked):not([readonly]):not([disabled]) + label:hover::after { + opacity: 0.5; + } + } +} + +@media screen and (max-width: 50em) { + .tabs > label { + width: 100%; + } +} diff --git a/searx/static/themes/simple/magnet.svg b/searx/static/themes/simple/magnet.svg new file mode 100644 index 00000000..5a7a1632 --- /dev/null +++ b/searx/static/themes/simple/magnet.svg @@ -0,0 +1 @@ +Created by Dmitry Baranovskiyfrom the Noun Project \ No newline at end of file diff --git a/searx/static/themes/simple/package.json b/searx/static/themes/simple/package.json new file mode 100644 index 00000000..f3d6bbfe --- /dev/null +++ b/searx/static/themes/simple/package.json @@ -0,0 +1,20 @@ +{ + "devDependencies": { + "grunt": "~1.0.1", + "grunt-contrib-concat": "~1.0.1", + "grunt-contrib-cssmin": "^2.2.1", + "grunt-contrib-jshint": "~1.1.0", + "grunt-contrib-less": "^1.4.1", + "grunt-contrib-uglify": "~3.0.1", + "grunt-contrib-watch": "~1.0.0", + "grunt-webfont": "^1.6.0", + "ionicons-npm": "^2.0.1", + "jslint": "^0.10.3", + "less-plugin-clean-css": "^1.5.1" + }, + "scripts": { + "build": "npm install && grunt", + "start": "grunt watch", + "test": "grunt" + } +} diff --git a/searx/templates/oscar/preferences.html b/searx/templates/oscar/preferences.html index 49f67bcd..afb389e4 100644 --- a/searx/templates/oscar/preferences.html +++ b/searx/templates/oscar/preferences.html @@ -171,7 +171,7 @@ {{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) }} {{ search_engine.name }} - {{ shortcuts[search_engine.name] }} + {{ shortcuts[search_engine.name] }} diff --git a/searx/templates/simple/404.html b/searx/templates/simple/404.html new file mode 100644 index 00000000..1843c989 --- /dev/null +++ b/searx/templates/simple/404.html @@ -0,0 +1,9 @@ +{% extends "simple/base.html" %} +{% block content %} +
+

{{ _('Page not found') }}

+ {% autoescape false %} +

{{ _('Go to %(search_page)s.', search_page='{}'.decode('utf-8').format(url_for('index'), _('search page'))) }}

+ {% endautoescape %} +
+{% endblock %} diff --git a/searx/templates/simple/about.html b/searx/templates/simple/about.html new file mode 100644 index 00000000..1913879d --- /dev/null +++ b/searx/templates/simple/about.html @@ -0,0 +1,4 @@ +{% extends 'simple/base.html' %} +{% block content %} +{% include '__common__/about.html' %} +{% endblock %} diff --git a/searx/templates/simple/base.html b/searx/templates/simple/base.html new file mode 100644 index 00000000..0003f113 --- /dev/null +++ b/searx/templates/simple/base.html @@ -0,0 +1,61 @@ + + + + + + + + + + + + + {% block title %}{% endblock %}searx + {% if rtl %} + + {% else %} + + {% endif %} + {% block styles %}{% endblock %} + {% block meta %}{% endblock %} + {% block head %} + + {% endblock %} + + + + +
+ {% if errors %} + + {% endif %} + + {% block content %} + {% endblock %} +
+
+

{{ _('Powered by') }} searx - {{ searx_version }} - {{ _('a privacy-respecting, hackable metasearch engine') }}

+
+ + + + + diff --git a/searx/templates/simple/categories.html b/searx/templates/simple/categories.html new file mode 100644 index 00000000..127d55b2 --- /dev/null +++ b/searx/templates/simple/categories.html @@ -0,0 +1,8 @@ +
{{- '' -}} +
+ {%- for category in categories -%} +
+ {%- endfor -%} + {%- if display_tooltip %}
{{ _('Click on the magnifier to perform search') }}
{% endif -%} +
{{- '' -}} +
diff --git a/searx/templates/simple/index.html b/searx/templates/simple/index.html new file mode 100644 index 00000000..4e8e76cc --- /dev/null +++ b/searx/templates/simple/index.html @@ -0,0 +1,12 @@ +{% extends "simple/base.html" %} +{% from 'simple/macros.html' import icon %} +{% block meta %} + +{% endblock %} +{% block content %} + +
+

searx

+ {% include 'simple/search.html' %} +
+{% endblock %} diff --git a/searx/templates/simple/infobox.html b/searx/templates/simple/infobox.html new file mode 100644 index 00000000..d99806ac --- /dev/null +++ b/searx/templates/simple/infobox.html @@ -0,0 +1,46 @@ + diff --git a/searx/templates/simple/languages.html b/searx/templates/simple/languages.html new file mode 100644 index 00000000..dd928ff6 --- /dev/null +++ b/searx/templates/simple/languages.html @@ -0,0 +1,8 @@ + diff --git a/searx/templates/simple/macros.html b/searx/templates/simple/macros.html new file mode 100644 index 00000000..76c53a63 --- /dev/null +++ b/searx/templates/simple/macros.html @@ -0,0 +1,86 @@ + +{% macro icon(action) -%} + +{%- endmacro %} + +{% macro icon_small(action) -%} + +{%- endmacro %} + + + +{% macro draw_favicon(favicon) -%} + {{ favicon }} +{%- endmacro %} + +{% macro result_open_link(url, classes='') -%} + +{%- endmacro %} + +{%- macro result_close_link() -%} + +{%- endmacro %} + +{%- macro result_link(url, title, classes='') -%} + {{ result_open_link(url, classes) }}{{ title }}{{ result_close_link() }} +{%- endmacro -%} + + +{% macro result_header(result, favicons, image_proxify) -%} +
+ {%- if result.img_src %}{{ result_open_link(result.url) }}{{ result.title|striptags }}{{ result_close_link() }}{% endif -%} + {%- if result.thumbnail %}{{ result_open_link(result.url) }}{{ result.title|striptags }}{{ result_close_link() }}{% endif -%} +

{{ result_link(result.url, result.title|safe) }}

+{%- endmacro -%} + + +{%- macro result_sub_header(result) -%} + {% if result.publishedDate %}{% endif %} +{%- endmacro -%} + + +{%- macro result_sub_footer(result, proxify) -%} +
{% for engine in result.engines %}{{ engine }}{% endfor %}
{{- '' -}} +

{{ result.pretty_url }}{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "cache_link") }}‎ {% if proxify %} {{ result_link(proxify(result.url), icon('link') + _('proxied'), "proxyfied_link") }} {% endif %}

{{- '' -}} +
{{- '' -}} +{%- endmacro -%} + + +{%- macro result_footer(result) -%} +
+{%- endmacro -%} + + +{%- macro tabs_open() -%} +
+{%- endmacro -%} + +{%- macro tab_header(name, id, label) -%} + + +
+{%- endmacro -%} + +{%- macro tab_footer() -%} +
+{%- endmacro -%} + +{%- macro tabs_close() -%} +
+{%- endmacro -%} + +{%- macro checkbox_onoff(name, checked) -%} +
{{- '' -}} + {{- '' -}} + {{- '' -}} +
+{%- endmacro -%} + +{%- macro checkbox(name, checked, readonly, disabled) -%} +
{{- '' -}} + {{- '' -}} + {{- '' -}} +
+{%- endmacro -%} diff --git a/searx/templates/simple/preferences.html b/searx/templates/simple/preferences.html new file mode 100644 index 00000000..4529fea8 --- /dev/null +++ b/searx/templates/simple/preferences.html @@ -0,0 +1,190 @@ +{% from 'simple/macros.html' import tabs_open, tabs_close, tab_header, tab_footer, checkbox_onoff, checkbox %} + +{% extends "simple/base.html" %} + +{%- macro plugin_preferences(section) -%} +{%- for plugin in plugins -%} +{%- if plugin.preference_section == section -%} +
{{- '' -}} + {{ _(plugin.name) }}{{- '' -}} +
+ {{- checkbox_onoff('plugin_' + plugin.id, plugin.id not in allowed_plugins) -}} +
{{- '' -}} +
+ {{- _(plugin.description) -}} +
{{- '' -}} +
+{%- endif -%} +{%- endfor -%} +{%- endmacro -%} + +{% block head %} {% endblock %} +{% block content %} + +

searx

+ +

{{ _('Preferences') }}

+ +
+ +{{ tabs_open() }} + +{{ tab_header('maintab', 'general', _('General')) }} +
+ {{ _('Default categories') }} + {% set display_tooltip = false %} + {% include 'simple/categories.html' %} +
+
+ {{ _('Search language') }} +

{{- '' -}} + {{- '' -}} +

+
{{ _('What language do you prefer for search?') }}
+
+
+ {{ _('Autocomplete') }} +

+ +

+
{{ _('Find stuff as you type') }}
+
+
+ {{ _('SafeSearch') }} +

+ +

+
{{ _('Filter content') }}

+
+ {{ plugin_preferences('general') }} + {{ tab_footer() }} + + {{ tab_header('maintab', 'engines', _('Engines')) }} +

{{ _('Currently used search engines') }}

+ + {{ tabs_open() }} + {% for categ in all_categories %} + + {{ tab_header('enginetab', 'category' + categ, _(categ)) }} +
+ + + + + + + + + + + + {% for search_engine in engines_by_category[categ] %} + + {% if not search_engine.private %} + {% set engine_id = 'engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_') %} + + + + + + + + + + + {% endif %} + {% endfor %} +
{{ _("Allow") }}{{ _("Engine name") }}{{ _("Shortcut") }}{{ _("Supports selected language") }}{{ _("SafeSearch") }}{{ _("Time range") }}{{ _("Avg. time") }}{{ _("Max time") }}
{{ checkbox_onoff(engine_id, (search_engine.name, categ) in disabled_engines) }}{{ search_engine.name }}{{ shortcuts[search_engine.name] }}{{ checkbox(engine_id + '_supported_languages', current_language == 'all' or current_language in search_engine.supported_languages or current_language.split('-')[0] in search_engine.supported_languages, true, true) }}{{ checkbox(engine_id + '_safesearch', search_engine.safesearch==True, true, true) }}{{ checkbox(engine_id + '_time_range_support', search_engine.time_range_support==True, true, true) }}{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}{{ search_engine.timeout }}
+
+ {{ tab_footer() }} + {% endfor %} + {{ tabs_close() }} + {{ tab_footer() }} + + {{ tab_header('maintab', 'ui', _('User interface')) }} +
+ {{ _('Interface language') }} +

+ +

+
{{ _('Change the language of the layout') }}
+
+
+ {{ _('Themes') }} +

+ +

+
{{ _('Change searx layout') }}
+
+
+ {{ _('Results on new tabs') }} +

+ +

+
{{_('Open result links on new browser tabs') }}
+
+ {{ plugin_preferences('ui') }} + {{ tab_footer() }} + + {{ tab_header('maintab', 'privacy', _('Privacy')) }} +
+ {{ _('Method') }} +

+ +

+
{{ _('Search language') }}
+
+
+ {{ _('Image proxy') }} +

+ +

+
{{ _('Proxying image results through searx') }}
+
+ {{ plugin_preferences('privacy') }} + {{ tab_footer() }} + + {{ tabs_close() }} + +

{{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }} +
+ {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }} +

+ + + + + + +{% endblock %} diff --git a/searx/templates/simple/result_templates/code.html b/searx/templates/simple/result_templates/code.html new file mode 100644 index 00000000..9db05311 --- /dev/null +++ b/searx/templates/simple/result_templates/code.html @@ -0,0 +1,13 @@ +{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_footer_rtl %} + +{{ result_header(result, favicons, image_proxify) -}} +{{- result_sub_header(result) -}} +{%- if result.content %}{{ result.content|safe }}{% endif %}

+{%- if result.repository -%} +

{{ result.repository }}

+{%- endif -%} +
+ {{- result.codelines|code_highlighter(result.code_language)|safe -}} +
{{- '' -}} +{{- result_sub_footer(result, proxify) -}} +{{ result_footer(result) }} diff --git a/searx/templates/simple/result_templates/default.html b/searx/templates/simple/result_templates/default.html new file mode 100644 index 00000000..b29ca550 --- /dev/null +++ b/searx/templates/simple/result_templates/default.html @@ -0,0 +1,17 @@ +{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_footer_rtl %} + +{{ result_header(result, favicons, image_proxify) -}} +{{- result_sub_header(result) -}} +{% if result.embedded -%} + +{%- endif %} +

+ {%- if result.content %}{{ result.content|safe }}{% endif -%} +

+{{- result_sub_footer(result, proxify) -}} +{% if result.embedded -%} + +{%- endif %} +{{- result_footer(result) }} diff --git a/searx/templates/simple/result_templates/images.html b/searx/templates/simple/result_templates/images.html new file mode 100644 index 00000000..f756acbe --- /dev/null +++ b/searx/templates/simple/result_templates/images.html @@ -0,0 +1,4 @@ + diff --git a/searx/templates/simple/result_templates/map.html b/searx/templates/simple/result_templates/map.html new file mode 100644 index 00000000..1fe0c86a --- /dev/null +++ b/searx/templates/simple/result_templates/map.html @@ -0,0 +1,71 @@ +{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_footer_rtl, icon %} + +{{ result_header(result, favicons, image_proxify) -}} +{{- result_sub_header(result) -}} + +{%- if (result.latitude and result.longitude) or result.boundingbox -%} + +{%- endif -%} + +{%- if result.osm and (result.osm.type and result.osm.id) -%} + +{%- endif -%} +{#- +{% if (result.latitude and result.longitude) %} + {{ icon('location') }} {{ _('show geodata') }} +{% endif %} +-#} + +{%- if result.address -%} +

+ {%- if result.address.name -%} + {{ result.address.name }}
+ {%- endif -%} + {% if result.address.road -%} + + {% if result.address.house_number %}{{ result.address.house_number }}, {% endif %} + {{ result.address.road }} +
+ {%- endif %} + {%- if result.address.locality -%} + {{ result.address.locality }} + {% if result.address.postcode %}, {{ result.address.postcode }}{% endif %} +
+ {%- endif -%} + {%- if result.address.country -%} + {{ result.address.country }} + {%- endif -%} +

+{%- endif -%} + +{%- if result.content %}

{{ result.content|safe }}

{% endif -%} + +{{- result_sub_footer(result, proxify) -}} + +{% if result.osm and (result.osm.type and result.osm.id) -%} + +{%- endif %} + +{#- +{% if (result.latitude and result.longitude) -%} + +{%- endif %} +-#} + +{% if (result.latitude and result.longitude) or result.boundingbox -%} + +{%- endif %} + +{{- result_footer(result) }} diff --git a/searx/templates/simple/result_templates/torrent.html b/searx/templates/simple/result_templates/torrent.html new file mode 100644 index 00000000..3c7fd15e --- /dev/null +++ b/searx/templates/simple/result_templates/torrent.html @@ -0,0 +1,24 @@ +{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_footer_rtl, result_link %} + +{{ result_header(result, favicons, image_proxify) -}} +{{- result_sub_header(result) -}} + +{% if result.magnetlink %}{% endif %} +{% if result.torrentfile %}{% endif %} + +{% if result.seed %}

• {{ icon('arrow-swap') }} {{ _('Seeder') }} {{ result.seed }} • {{ _('Leecher') }} {{ result.leech }}

{% endif %} + +{%- if result.filesize %}

{{ icon('floppy-disk') }} {{ _('Filesize') }} + {%- if result.filesize < 1024 %}{{ result.filesize }} {{ _('Bytes') }} + {%- elif result.filesize < 1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024) }} {{ _('kiB') }} + {%- elif result.filesize < 1024*1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024) }} {{ _('MiB') }} + {%- elif result.filesize < 1024*1024*1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024/1024) }} {{ _('GiB') }} + {%- else %}{{ '{0:0.2f}'.format(result.filesize/1024/1024/1024/1024) }} {{ _('TiB') }}{% endif -%} +

+{%- endif -%} + +{%- if result.files %}

{{ icon('file') }} {{ _('Number of Files') }} {{ result.files }}

{% endif -%} + +{%- if result.content %}

{{ result.content|safe }}

{% endif -%} +{{- result_sub_footer(result, proxify) -}} +{{- result_footer(result) }} diff --git a/searx/templates/simple/result_templates/videos.html b/searx/templates/simple/result_templates/videos.html new file mode 100644 index 00000000..be270e93 --- /dev/null +++ b/searx/templates/simple/result_templates/videos.html @@ -0,0 +1,15 @@ +{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_footer_rtl %} + +{{ result_header(result, favicons, image_proxify) }} +{{ result_sub_header(result) }} +{% if result.embedded -%} + +{%- endif %} +{% if result.content %}

{{ result.content|safe }}

{% endif %} +{{- result_sub_footer(result, proxify) -}} +{% if result.embedded -%} + +{%- endif %} +{{ result_footer(result) }} diff --git a/searx/templates/simple/results.html b/searx/templates/simple/results.html new file mode 100644 index 00000000..081118ea --- /dev/null +++ b/searx/templates/simple/results.html @@ -0,0 +1,151 @@ +{% extends "simple/base.html" %} +{% from 'simple/macros.html' import icon, icon_small %} +{% block title %}{{ q|e }} - {% endblock %} +{% block meta %}{% endblock %} +{% block content %} + +{% include 'simple/search.html' %} +
+ {% if answers %} +

{{ _('Answers') }} :

+ {% for answer in answers -%} +
{{ answer }}
+ {%- endfor %} +
+ {% endif %} + + + + {% if corrections %} +
+

{{ _('Try searching for:') }}

+ {% for correction in corrections %} +
+
+ + + + + + +
+
+ {% endfor %} +
+ {% endif %} + +
+ {% for result in results %} + {% set index = loop.index %} + {% if result['template'] %} + {% include get_result_template('simple', result['template']) %} + {% else %} + {% include 'simple/result_templates/default.html' %} + {% endif %} + {% endfor %} + {% if not results and not answers %} + {% include 'simple/messages/no_results.html' %} + {% endif %} +
+ + {% if paging %} + + {% endif %} +
+{% endblock %} diff --git a/searx/templates/simple/search.html b/searx/templates/simple/search.html new file mode 100644 index 00000000..3f48d7fc --- /dev/null +++ b/searx/templates/simple/search.html @@ -0,0 +1,16 @@ + diff --git a/searx/templates/simple/simple.spec.txt b/searx/templates/simple/simple.spec.txt new file mode 100644 index 00000000..a9724f8e --- /dev/null +++ b/searx/templates/simple/simple.spec.txt @@ -0,0 +1,40 @@ +#container + .search + #search_form + +#results + + #sidebar + #result-count + .title + .content + + .infobox + h2 + img + p + div#attributes + table + tbody + tr + td + td + div#urls + ul + li + + #suggestions + .title + .suggestion + + #search_url + .title + input + + #apis + .title + .api-link + + .result + + diff --git a/searx/templates/simple/stats.html b/searx/templates/simple/stats.html new file mode 100644 index 00000000..462ab4aa --- /dev/null +++ b/searx/templates/simple/stats.html @@ -0,0 +1,25 @@ +{% extends "simple/base.html" %} +{% block head %} {% endblock %} +{% block content %} + +

searx

+ +

{{ _('Engine stats') }}

+ +{% for stat_name,stat_category in stats %} +
+ + + + + {% for engine in stat_category %} + + + + + + {% endfor %} +
{{ stat_name }}
{{ engine.name }}{{ '%.02f'|format(engine.avg) }}
 
+
+{% endfor %} +{% endblock %} diff --git a/searx/templates/simple/time-range.html b/searx/templates/simple/time-range.html new file mode 100644 index 00000000..a9fc9f16 --- /dev/null +++ b/searx/templates/simple/time-range.html @@ -0,0 +1,17 @@ +