1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-17 18:00:12 +01:00

[mod] rename "default" theme to "legacy"

This commit is contained in:
Adam Tauber 2016-09-22 23:51:07 +02:00
parent aaf5d506e5
commit bee7b497a3
68 changed files with 24 additions and 24 deletions

View File

@ -53,8 +53,8 @@ build_style() {
styles() {
echo '[!] Building styles'
build_style themes/default/less/style.less themes/default/css/style.css
build_style themes/default/less/style-rtl.less themes/default/css/style-rtl.css
build_style themes/legacy/less/style.less themes/legacy/css/style.css
build_style themes/legacy/less/style-rtl.less themes/legacy/css/style-rtl.css
build_style themes/courgette/less/style.less themes/courgette/css/style.css
build_style themes/courgette/less/style-rtl.less themes/courgette/css/style-rtl.css
build_style less/bootstrap/bootstrap.less css/bootstrap.min.css

View File

@ -15,7 +15,7 @@ server:
ui:
themes_path : ""
default_theme : default
default_theme : legacy
default_locale : ""
outgoing:

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 532 B

After

Width:  |  Height:  |  Size: 532 B

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@ -1,4 +1,4 @@
{% extends "default/base.html" %}
{% extends "legacy/base.html" %}
{% block content %}
<div class="center">
<h1>{{ _('Page not found') }}</h1>

View File

@ -1,6 +1,6 @@
{% extends 'default/base.html' %}
{% extends 'legacy/base.html' %}
{% block content %}
{% include 'default/github_ribbon.html' %}
{% include 'legacy/github_ribbon.html' %}
<div class="row"{% if rtl %} dir="ltr"{% endif %}>
<h1>About <a href="{{ url_for('index') }}">searx</a></h1>

View File

@ -1,8 +1,8 @@
{% extends "default/base.html" %}
{% extends "legacy/base.html" %}
{% block content %}
<div class="center">
<div class="title"><h1>searx</h1></div>
{% include 'default/search.html' %}
{% include 'legacy/search.html' %}
<p class="top_margin">
{% if rtl %}
<a href="{{ url_for('preferences') }}" class="hmarg">{{ _('preferences') }}</a>
@ -13,6 +13,6 @@
{% endif %}
</p>
</div>
{% include 'default/github_ribbon.html' %}
{% include 'legacy/github_ribbon.html' %}
{% endblock %}

View File

@ -1,4 +1,4 @@
{% extends "default/base.html" %}
{% extends "legacy/base.html" %}
{% block head %} {% endblock %}
{% block content %}
<div class="row">
@ -8,7 +8,7 @@
<fieldset>
<legend>{{ _('Default categories') }}</legend>
{% set display_tooltip = false %}
{% include 'default/categories.html' %}
{% include 'legacy/categories.html' %}
</fieldset>
<fieldset>
<legend>{{ _('Search language') }}</legend>

View File

@ -1,10 +1,10 @@
{% extends "default/base.html" %}
{% extends "legacy/base.html" %}
{% block title %}{{ q }} - {% endblock %}
{% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q }}" href="{{ url_for('index') }}?q={{ q|urlencode }}&amp;format=rss&amp;{% for category in selected_categories %}category_{{ category }}=1&amp;{% endfor %}pageno={{ pageno }}">{% endblock %}
{% block content %}
<div class="preferences_container right"><a href="{{ url_for('preferences') }}" id="preferences"><span>preferences</span></a></div>
<div class="small search center">
{% include 'default/search.html' %}
{% include 'legacy/search.html' %}
</div>
<div id="results">
<div id="sidebar">
@ -55,16 +55,16 @@
{% if infoboxes %}
<div id="infoboxes">
{% for infobox in infoboxes %}
{% include 'default/infobox.html' %}
{% include 'legacy/infobox.html' %}
{% endfor %}
</div>
{% endif %}
{% for result in results %}
{% if result['template'] %}
{% include get_result_template('default', result['template']) %}
{% include get_result_template('legacy', result['template']) %}
{% else %}
{% include 'default/result_templates/default.html' %}
{% include 'legacy/result_templates/default.html' %}
{% endif %}
{% endfor %}

View File

@ -4,5 +4,5 @@
<input type="submit" value="search" id="search_submit" />
</div>
{% set display_tooltip = true %}
{% include 'default/categories.html' %}
{% include 'legacy/categories.html' %}
</form>

View File

@ -1,4 +1,4 @@
{% extends "default/base.html" %}
{% extends "legacy/base.html" %}
{% block head %} {% endblock %}
{% block content %}
<h2>{{ _('Engine stats') }}</h2>

View File

@ -1,4 +1,4 @@
{% extends "default/base.html" %}
{% extends "legacy/base.html" %}
{% block head %} {% endblock %}
{% block content %}
<div class="row">

View File

@ -1,4 +1,4 @@
{% extends "default/base.html" %}
{% extends "legacy/base.html" %}
{% block head %} {% endblock %}
{% block content %}
<h2>{{ _('Engine stats') }}</h2>

View File

@ -67,7 +67,7 @@ Change theme
Page Should Contain about
Page Should Contain preferences
Go To http://localhost:11111/preferences
List Selection Should Be theme default
List Selection Should Be theme legacy
Select From List theme oscar
Submit Form id=search_form
Location Should Be http://localhost:11111/
@ -139,7 +139,7 @@ Block a plugin
Page Should Contain about
Page Should Contain preferences
Go To http://localhost:11111/preferences
List Selection Should Be theme default
List Selection Should Be theme legacy
Select From List theme oscar
Submit Form id=search_form
Location Should Be http://localhost:11111/

View File

@ -44,7 +44,7 @@ class ViewsTestCase(SearxTestCase):
webapp.Search.search = search_mock
def get_current_theme_name_mock(override=None):
return 'default'
return 'legacy'
webapp.get_current_theme_name = get_current_theme_name_mock
@ -58,7 +58,7 @@ class ViewsTestCase(SearxTestCase):
def test_index_html(self):
result = self.app.post('/', data={'q': 'test'})
self.assertIn(
'<h3 class="result_title"><img width="14" height="14" class="favicon" src="/static/themes/default/img/icons/icon_youtube.ico" alt="youtube" /><a href="http://second.test.xyz" rel="noreferrer">Second <span class="highlight">Test</span></a></h3>', # noqa
'<h3 class="result_title"><img width="14" height="14" class="favicon" src="/static/themes/legacy/img/icons/icon_youtube.ico" alt="youtube" /><a href="http://second.test.xyz" rel="noreferrer">Second <span class="highlight">Test</span></a></h3>', # noqa
result.data
)
self.assertIn(