Loading searx/engines/currency_convert.py +11 −10 Original line number Diff line number Diff line Loading @@ -36,19 +36,20 @@ def response(resp): conversion_rate = float(json.loads(json_resp)['conversion']['converted-amount']) except: return results answer = '{0} {1} = {2} {3}, 1 {1} ({5}) = {4} {3} ({6})'.format( resp.search_params['amount'], resp.search_params['from'], resp.search_params['amount'] * conversion_rate, resp.search_params['to'], conversion_rate, resp.search_params['from_name'], resp.search_params['to_name'], ) url = 'https://duckduckgo.com/js/spice/currency/1/{0}/{1}'.format( resp.search_params['from'].upper(), resp.search_params['to']) results.append({'answer': answer, 'url': url}) source_url = 'https://www.xe.com/currencyconverter/convert/?Amount=1&From={0}&To={1}'.format( resp.search_params['from'], resp.search_params['to'] ) results.append({'template': 'currency.html', 'amount': resp.search_params['amount'], 'from': resp.search_params['from'], 'to': resp.search_params['to'], 'value': round(resp.search_params['amount'] * conversion_rate, 2), 'conversion_rate': round(conversion_rate, 2), 'source_url': source_url, 'url': url}) return results searx/settings.yml +1 −1 Original line number Diff line number Diff line Loading @@ -341,7 +341,7 @@ engines: engine : currency_convert categories : general shortcut : cc disabled: True disabled: False - name : deezer engine : deezer Loading searx/static/themes/etheme/css/etheme.css +22 −1 Original line number Diff line number Diff line Loading @@ -731,7 +731,7 @@ input:checked + .slider:before { justify-content: space-between; font-size: 14px; padding-bottom: 16px; padding-top: 16px; padding-top: 24px; padding-left: 24px; padding-right: 24px; } Loading Loading @@ -996,6 +996,27 @@ input:checked + .slider:before { .result.result-torrent { margin-bottom: 32px; } .result .currency-value { font-family: 'Noto Sans'; color: var(--color-currency-value); font-style: normal; font-weight: 700; font-size: 30px; padding-bottom: 15px; } .result .currency-info { font-family: 'Noto Sans'; color: var(--color-currency-value); font-style: normal; font-weight: 400; font-size: 18px; } .conversion { margin-right: 15%; } .source { display: inline-block; } .result.result-images { display: inline; } Loading searx/static/themes/etheme/css/etheme.min.css +0 −0 File changed.Preview suppressed by a .gitattributes entry or the file's encoding is unsupported. View original file View changed file searx/static/themes/etheme/less/etheme/defs.less +1 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ @fontsize_large: 18px; @fontsize_x-large: 22px; @fontsize_xx-large: 22px; @fontsize_xxx-large: 30px; @spacing_xx-small: 2px; @spacing_x-small: 4px; Loading Loading
searx/engines/currency_convert.py +11 −10 Original line number Diff line number Diff line Loading @@ -36,19 +36,20 @@ def response(resp): conversion_rate = float(json.loads(json_resp)['conversion']['converted-amount']) except: return results answer = '{0} {1} = {2} {3}, 1 {1} ({5}) = {4} {3} ({6})'.format( resp.search_params['amount'], resp.search_params['from'], resp.search_params['amount'] * conversion_rate, resp.search_params['to'], conversion_rate, resp.search_params['from_name'], resp.search_params['to_name'], ) url = 'https://duckduckgo.com/js/spice/currency/1/{0}/{1}'.format( resp.search_params['from'].upper(), resp.search_params['to']) results.append({'answer': answer, 'url': url}) source_url = 'https://www.xe.com/currencyconverter/convert/?Amount=1&From={0}&To={1}'.format( resp.search_params['from'], resp.search_params['to'] ) results.append({'template': 'currency.html', 'amount': resp.search_params['amount'], 'from': resp.search_params['from'], 'to': resp.search_params['to'], 'value': round(resp.search_params['amount'] * conversion_rate, 2), 'conversion_rate': round(conversion_rate, 2), 'source_url': source_url, 'url': url}) return results
searx/settings.yml +1 −1 Original line number Diff line number Diff line Loading @@ -341,7 +341,7 @@ engines: engine : currency_convert categories : general shortcut : cc disabled: True disabled: False - name : deezer engine : deezer Loading
searx/static/themes/etheme/css/etheme.css +22 −1 Original line number Diff line number Diff line Loading @@ -731,7 +731,7 @@ input:checked + .slider:before { justify-content: space-between; font-size: 14px; padding-bottom: 16px; padding-top: 16px; padding-top: 24px; padding-left: 24px; padding-right: 24px; } Loading Loading @@ -996,6 +996,27 @@ input:checked + .slider:before { .result.result-torrent { margin-bottom: 32px; } .result .currency-value { font-family: 'Noto Sans'; color: var(--color-currency-value); font-style: normal; font-weight: 700; font-size: 30px; padding-bottom: 15px; } .result .currency-info { font-family: 'Noto Sans'; color: var(--color-currency-value); font-style: normal; font-weight: 400; font-size: 18px; } .conversion { margin-right: 15%; } .source { display: inline-block; } .result.result-images { display: inline; } Loading
searx/static/themes/etheme/css/etheme.min.css +0 −0 File changed.Preview suppressed by a .gitattributes entry or the file's encoding is unsupported. View original file View changed file
searx/static/themes/etheme/less/etheme/defs.less +1 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ @fontsize_large: 18px; @fontsize_x-large: 22px; @fontsize_xx-large: 22px; @fontsize_xxx-large: 30px; @spacing_xx-small: 2px; @spacing_x-small: 4px; Loading