Commit b4f58da3 authored by Israel Yago Pereira's avatar Israel Yago Pereira Committed by Arnau Vàzquez
Browse files

Renaming theme, folder name and templates

parent dfc5b6c3
......@@ -6,7 +6,7 @@ SEARX_MORTY_URL=https://localhost:8089
SEARX_SECRET=":@)%NN0+OqNdy:{prWQlZ{p9|oO9p-UyJq@%V!~G:arrSx6fXz.{jd%=XF44ncj"
SEARX_MORTY_KEY="taKB1WGTa63LEI6RdjWWKshS4oYSHQWGu9Eyjr1OlpQ="
SEARX_REDIS_HOST=redis
SEARX_UI_DEFAULT_THEME=eelo
SEARX_UI_DEFAULT_THEME=etheme
SEARX_PROXY_HTTP=socks5h://tor-socks-proxy:9150
SEARX_PROXY_HTTPS=socks5h://tor-socks-proxy:9150
FILTRON_PORT=8088
......
......@@ -6,7 +6,7 @@ SEARX_MORTY_URL=https://localhost:8089
SEARX_SECRET="SECRET2BEREPLACED"
SEARX_MORTY_KEY="KEY2BEREPLACED"
SEARX_REDIS_HOST=redis
SEARX_UI_DEFAULT_THEME=eelo
SEARX_UI_DEFAULT_THEME=etheme
SEARX_PROXY_HTTP=http://proxy01.ecloud.global:1099
SEARX_PROXY_HTTPS=http://proxy01.ecloud.global:1099
WIREGUARD_IP=127.0.0.1
......
......@@ -24,7 +24,7 @@ build:web:
- ./manage.sh update_dev_packages
script:
- ./manage.sh locales
- make V=1 themes.eelo
- make V=1 themes.etheme
.build:docker:
stage: build
......
......@@ -121,14 +121,14 @@ node.clean:
./searx/static/themes/oscar/node_modules \
./searx/static/themes/simple/package-lock.json \
./searx/static/themes/simple/node_modules \
./searx/static/themes/eelo/package-lock.json \
./searx/static/themes/eelo/node_modules
./searx/static/themes/etheme/package-lock.json \
./searx/static/themes/etheme/node_modules
# build themes
# ------------
PHONY += themes themes.oscar themes.simple themes.eelo
themes: buildenv themes.oscar themes.simple themes.eelo
PHONY += themes themes.oscar themes.simple themes.etheme
themes: buildenv themes.oscar themes.simple themes.etheme
quiet_cmd_lessc = LESSC $3
cmd_lessc = PATH="$$(npm bin):$$PATH" \
......@@ -146,9 +146,9 @@ themes.simple: node.env
$(Q)echo '[!] build simple theme'
$(call cmd,grunt,searx/static/themes/simple/gruntfile.js)
themes.eelo: node.env
$(Q)echo '[!] build eelo theme'
$(call cmd,grunt,searx/static/themes/eelo/gruntfile.js)
themes.etheme: node.env
$(Q)echo '[!] build etheme theme'
$(call cmd,grunt,searx/static/themes/etheme/gruntfile.js)
# docker
# ------
......
# spot for [/e/](https://e.foundation)
![logo](searx/static/themes/eelo/img/favicon.png)
![logo](searx/static/themes/etheme/img/favicon.png)
A privacy-respecting, hackable [metasearch engine](https://en.wikipedia.org/wiki/Metasearch_engine).
......@@ -8,7 +8,7 @@ Spot was forked from searx: read [documentation](https://asciimoo.github.io/sear
## Changes between Spot and Searx
* eelo theme
* /e/ theme
* redis cache on http requests (TTL 1 day)
* docker packaging thinking to be production ready
......
......@@ -98,8 +98,8 @@ npm_packages() {
cd -- "$BASE_DIR/searx/static/themes/simple"
npm install
echo '[!] install NPM packages for eelo theme'
cd -- "$BASE_DIR/searx/static/themes/eelo"
echo '[!] install NPM packages for etheme theme'
cd -- "$BASE_DIR/searx/static/themes/etheme"
npm install
}
......
......@@ -82,7 +82,8 @@ class EnumStringSetting(Setting):
def _validate_selection(self, selection):
if selection not in self.choices: # pylint: disable=no-member
raise ValidationException('Invalid value: "{0}"'.format(selection))
message = f"Invalid value '{selection}' was not found in {self.choices}" # pylint: disable=no-member
raise ValidationException(message)
def parse(self, data):
"""Parse and validate ``data`` and store the result at ``self.value``
......@@ -445,6 +446,8 @@ class Preferences:
def parse_dict(self, input_data):
"""parse preferences from request (``flask.request.form``)"""
for user_setting_name, user_setting in input_data.items():
if user_setting_name == 'theme' and user_setting == 'eelo': # Fix theme name for old cookies
user_setting = settings['ui'].get('default_theme', 'oscar')
if user_setting_name in self.key_value_settings:
if self.key_value_settings[user_setting_name].locked:
continue
......
......@@ -419,7 +419,7 @@ nav a {
nav a:hover {
color: #5068dd;
}
nav #eelo_links > * {
nav #etheme_links > * {
margin-right: 32px;
}
#nav_toggle_btn {
......
......@@ -5,12 +5,12 @@ module.exports = function(grunt) {
uglify: {
dist: {
files: {
'js/eelo.min.js': ['js/eelo.js']
'js/etheme.min.js': ['js/etheme.js']
}
}
},
jshint: {
files: ['gruntfile.js', 'js/eelo.js'],
files: ['gruntfile.js', 'js/etheme.js'],
options: {
reporterOutput: "",
// options here to override JSHint defaults
......@@ -25,18 +25,18 @@ module.exports = function(grunt) {
less: {
development: {
options: {
paths: ["less/eelo"]
//banner: '/*! less/eelo/oscar.css | <%= grunt.template.today("dd-mm-yyyy") %> | https://github.com/asciimoo/searx */\n'
paths: ["less/etheme"]
//banner: '/*! less/etheme/oscar.css | <%= grunt.template.today("dd-mm-yyyy") %> | https://github.com/asciimoo/searx */\n'
},
files: {"css/eelo.css": "less/eelo/eelo.less"}
files: {"css/etheme.css": "less/etheme/etheme.less"}
},
production: {
options: {
paths: ["less/eelo"],
//banner: '/*! less/eelo/oscar.css | <%= grunt.template.today("dd-mm-yyyy") %> | https://github.com/asciimoo/searx */\n',
paths: ["less/etheme"],
//banner: '/*! less/etheme/oscar.css | <%= grunt.template.today("dd-mm-yyyy") %> | https://github.com/asciimoo/searx */\n',
cleancss: true
},
files: {"css/eelo.min.css": "less/eelo/eelo.less"}
files: {"css/etheme.min.css": "less/etheme/etheme.less"}
},
/*
// built with ./manage.sh styles
......@@ -54,8 +54,8 @@ module.exports = function(grunt) {
files: ['<%= jshint.files %>'],
tasks: ['jshint', 'uglify']
},
eelo_styles: {
files: ['less/eelo/**/*.less'],
etheme_styles: {
files: ['less/etheme/**/*.less'],
tasks: ['less:development', 'less:production']
},
bootstrap_styles: {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment