Skip to content
Permalink
Browse files

[enh] add simple theme (WIP)

  • Loading branch information...
dalf committed Feb 12, 2017
1 parent 4f6586d commit 10a24bdc2c3870f07ec62dd710841628d325aaf6
Showing with 11,902 additions and 6 deletions.
  1. +10 −0 .gitattributes
  2. +3 −2 .travis.yml
  3. +7 −3 manage.sh
  4. +1 −0 searx/plugins/doai_rewrite.py
  5. +1 −0 searx/plugins/https_rewrite.py
  6. +1 −0 searx/plugins/infinite_scroll.py
  7. +1 −0 searx/plugins/search_on_category_select.py
  8. +1 −0 searx/plugins/tracker_url_remover.py
  9. +1 −0 searx/static/themes/simple/.jshintignore
  10. +2,049 −0 searx/static/themes/simple/css/searx-rtl.css
  11. +1 −0 searx/static/themes/simple/css/searx-rtl.min.css
  12. +2,045 −0 searx/static/themes/simple/css/searx.css
  13. +1 −0 searx/static/themes/simple/css/searx.min.css
  14. +134 −0 searx/static/themes/simple/fonts/ion.css
  15. BIN searx/static/themes/simple/fonts/ion.eot
  16. +261 −0 searx/static/themes/simple/fonts/ion.html
  17. +97 −0 searx/static/themes/simple/fonts/ion.svg
  18. BIN searx/static/themes/simple/fonts/ion.ttf
  19. BIN searx/static/themes/simple/fonts/ion.woff
  20. BIN searx/static/themes/simple/fonts/ion.woff2
  21. +150 −0 searx/static/themes/simple/gruntfile.js
  22. BIN searx/static/themes/simple/img/favicon.png
  23. BIN searx/static/themes/simple/img/loader.gif
  24. BIN searx/static/themes/simple/img/logo_searx_a.png
  25. BIN searx/static/themes/simple/img/searx.png
  26. +203 −0 searx/static/themes/simple/img/searx_logo.svg
  27. +1,534 −0 searx/static/themes/simple/js/searx.js
  28. +4 −0 searx/static/themes/simple/js/searx.min.js
  29. +1 −0 searx/static/themes/simple/js/searx.min.js.map
  30. +155 −0 searx/static/themes/simple/js/searx_src/00_searx_toolkit.js
  31. +536 −0 searx/static/themes/simple/js/searx_src/autocomplete.js
  32. +151 −0 searx/static/themes/simple/js/searx_src/searx_imageresult.js
  33. +360 −0 searx/static/themes/simple/js/searx_src/searx_keyboard.js
  34. +175 −0 searx/static/themes/simple/js/searx_src/searx_mapresult.js
  35. +63 −0 searx/static/themes/simple/js/searx_src/searx_results.js
  36. +94 −0 searx/static/themes/simple/js/searx_src/searx_search.js
  37. BIN searx/static/themes/simple/leaflet/images/layers-2x.png
  38. BIN searx/static/themes/simple/leaflet/images/layers.png
  39. BIN searx/static/themes/simple/leaflet/images/marker-icon-2x-green.png
  40. BIN searx/static/themes/simple/leaflet/images/marker-icon-2x-orange.png
  41. BIN searx/static/themes/simple/leaflet/images/marker-icon-2x-red.png
  42. BIN searx/static/themes/simple/leaflet/images/marker-icon-2x.png
  43. BIN searx/static/themes/simple/leaflet/images/marker-icon-green.png
  44. BIN searx/static/themes/simple/leaflet/images/marker-icon-orange.png
  45. BIN searx/static/themes/simple/leaflet/images/marker-icon-red.png
  46. BIN searx/static/themes/simple/leaflet/images/marker-icon.png
  47. BIN searx/static/themes/simple/leaflet/images/marker-shadow.png
  48. +624 −0 searx/static/themes/simple/leaflet/leaflet.css
  49. +9 −0 searx/static/themes/simple/leaflet/leaflet.js
  50. +67 −0 searx/static/themes/simple/less/autocomplete.less
  51. +83 −0 searx/static/themes/simple/less/code.less
  52. +135 −0 searx/static/themes/simple/less/definitions.less
  53. +43 −0 searx/static/themes/simple/less/index.less
  54. +174 −0 searx/static/themes/simple/less/ion.less
  55. +62 −0 searx/static/themes/simple/less/mixins.less
  56. +447 −0 searx/static/themes/simple/less/normalize.less
  57. +78 −0 searx/static/themes/simple/less/preferences.less
  58. +232 −0 searx/static/themes/simple/less/search.less
  59. +8 −0 searx/static/themes/simple/less/stats.less
  60. +6 −0 searx/static/themes/simple/less/style-rtl.less
  61. +709 −0 searx/static/themes/simple/less/style.less
  62. +346 −0 searx/static/themes/simple/less/toolkit.less
  63. +1 −0 searx/static/themes/simple/magnet.svg
  64. +20 −0 searx/static/themes/simple/package.json
  65. +1 −1 searx/templates/oscar/preferences.html
  66. +9 −0 searx/templates/simple/404.html
  67. +4 −0 searx/templates/simple/about.html
  68. +61 −0 searx/templates/simple/base.html
  69. +8 −0 searx/templates/simple/categories.html
  70. +12 −0 searx/templates/simple/index.html
  71. +46 −0 searx/templates/simple/infobox.html
  72. +8 −0 searx/templates/simple/languages.html
  73. +86 −0 searx/templates/simple/macros.html
  74. +190 −0 searx/templates/simple/preferences.html
  75. +13 −0 searx/templates/simple/result_templates/code.html
  76. +17 −0 searx/templates/simple/result_templates/default.html
  77. +4 −0 searx/templates/simple/result_templates/images.html
  78. +71 −0 searx/templates/simple/result_templates/map.html
  79. +24 −0 searx/templates/simple/result_templates/torrent.html
  80. +15 −0 searx/templates/simple/result_templates/videos.html
  81. +151 −0 searx/templates/simple/results.html
  82. +16 −0 searx/templates/simple/search.html
  83. +40 −0 searx/templates/simple/simple.spec.txt
  84. +25 −0 searx/templates/simple/stats.html
  85. +17 −0 searx/templates/simple/time-range.html
@@ -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
@@ -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
@@ -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() {
@@ -7,6 +7,7 @@
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):
@@ -31,6 +31,7 @@
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']
@@ -3,6 +3,7 @@
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',)
@@ -19,5 +19,6 @@
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',)
@@ -26,6 +26,7 @@
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):
@@ -0,0 +1 @@
js/searx_src/autocomplete.js
Oops, something went wrong.

0 comments on commit 10a24bd

Please sign in to comment.
You can’t perform that action at this time.