Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
searx-engine
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
searx-engine
Commits
df9cf9d0
Commit
df9cf9d0
authored
Feb 10, 2015
by
Adam Tauber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge branch 'rtl' of github.com:Cqoicebordel/searx
parent
c7112126
Changes
28
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
293 additions
and
99 deletions
+293
-99
Makefile
Makefile
+2
-0
style-rtl.css
searx/static/themes/courgette/css/style-rtl.css
+1
-0
style.css
searx/static/themes/courgette/css/style.css
+1
-1
style-rtl.less
searx/static/themes/courgette/less/style-rtl.less
+38
-0
style.less
searx/static/themes/courgette/less/style.less
+1
-1
style-rtl.css
searx/static/themes/default/css/style-rtl.css
+1
-0
style-rtl.less
searx/static/themes/default/less/style-rtl.less
+11
-0
base.html
searx/templates/courgette/base.html
+4
-1
index.html
searx/templates/courgette/index.html
+5
-0
preferences.html
searx/templates/courgette/preferences.html
+1
-1
results.html
searx/templates/courgette/results.html
+0
-1
base.html
searx/templates/default/base.html
+4
-1
index.html
searx/templates/default/index.html
+5
-0
preferences.html
searx/templates/default/preferences.html
+2
-2
results.html
searx/templates/default/results.html
+2
-2
base.html
searx/templates/oscar/base.html
+1
-1
categories.html
searx/templates/oscar/categories.html
+21
-1
macros.html
searx/templates/oscar/macros.html
+31
-0
navbar.html
searx/templates/oscar/navbar.html
+19
-0
preferences.html
searx/templates/oscar/preferences.html
+83
-80
code.html
searx/templates/oscar/result_templates/code.html
+5
-1
default.html
searx/templates/oscar/result_templates/default.html
+5
-1
map.html
searx/templates/oscar/result_templates/map.html
+5
-1
torrent.html
searx/templates/oscar/result_templates/torrent.html
+5
-1
videos.html
searx/templates/oscar/result_templates/videos.html
+4
-0
results.html
searx/templates/oscar/results.html
+22
-0
search_full.html
searx/templates/oscar/search_full.html
+4
-0
webapp.py
searx/webapp.py
+10
-3
No files found.
Makefile
View file @
df9cf9d0
...
...
@@ -46,7 +46,9 @@ minimal: bin/buildout minimal.cfg setup.py
styles
:
@
lessc
-x
searx/static/themes/default/less/style.less
>
searx/static/themes/default/css/style.css
@
lessc
-x
searx/static/themes/default/less/style-rtl.less
>
searx/static/themes/default/css/style-rtl.css
@
lessc
-x
searx/static/themes/courgette/less/style.less
>
searx/static/themes/courgette/css/style.css
@
lessc
-x
searx/static/themes/courgette/less/style-rtl.less
>
searx/static/themes/courgette/css/style-rtl.css
@
lessc
-x
searx/static/less/bootstrap/bootstrap.less
>
searx/static/css/bootstrap.min.css
@
lessc
-x
searx/static/themes/oscar/less/oscar/oscar.less
>
searx/static/themes/oscar/css/oscar.min.css
...
...
searx/static/themes/courgette/css/style-rtl.css
0 → 100644
View file @
df9cf9d0
.q
{
padding
:
.5em
1em
.5em
3em
}
#search_submit
{
left
:
0
;
right
:
auto
}
.result
.favicon
{
float
:
right
;
margin-left
:
.5em
;
margin-right
:
0
}
#sidebar
{
right
:
auto
;
left
:
0
}
#results
{
padding
:
0
32px
0
272px
}
.search.center
{
padding-right
:
0
;
padding-left
:
17em
}
.right
{
right
:
auto
;
left
:
0
}
#pagination
form
+
form
{
float
:
left
;
margin-top
:
-2em
}
\ No newline at end of file
searx/static/themes/courgette/css/style.css
View file @
df9cf9d0
This diff is collapsed.
Click to expand it.
searx/static/themes/courgette/less/style-rtl.less
0 → 100644
View file @
df9cf9d0
.q {
padding: 0.5em 1em 0.5em 3em;
}
#search_submit {
left: 0;
right:auto;
}
.result .favicon {
float: right;
margin-left: 0.5em;
margin-right: 0;
}
#sidebar {
right: auto;
left: 0;
}
#results {
padding: 0px 32px 0px 272px;
}
.search.center {
padding-right: 0;
padding-left: 17em;
}
.right {
right: auto;
left: 0;
}
#pagination form + form {
float: left;
margin-top: -2em;
}
\ No newline at end of file
searx/static/themes/courgette/less/style.less
View file @
df9cf9d0
...
...
@@ -278,7 +278,7 @@ a {
}
#preferences {
background: url(
../img/preference-icon.png) no-repeat right 0
/ 12% auto;
background: url(
"../img/preference-icon.png") no-repeat right center
/ 12% auto;
padding-right: 1.8em;
}
...
...
searx/static/themes/default/css/style-rtl.css
0 → 100644
View file @
df9cf9d0
#search_submit
{
left
:
1px
;
right
:
auto
}
.result
.favicon
{
float
:
right
;
margin-left
:
.5em
;
margin-right
:
0
}
\ No newline at end of file
searx/static/themes/default/less/style-rtl.less
0 → 100644
View file @
df9cf9d0
#search_submit {
left: 1px;
right:auto;
}
.result .favicon {
float: right;
margin-left: 0.5em;
margin-right: 0;
}
searx/templates/courgette/base.html
View file @
df9cf9d0
<!DOCTYPE html>
<html
xmlns=
"http://www.w3.org/1999/xhtml"
lang=
"en"
xml:lang=
"en"
>
<html
xmlns=
"http://www.w3.org/1999/xhtml"
lang=
"en"
xml:lang=
"en"
{%
if
rtl
%}
dir=
"rtl"
{%
endif
%}
>
<head>
<meta
charset=
"UTF-8"
/>
<meta
name=
"description"
content=
"Searx - a privacy-respecting, hackable metasearch engine"
/>
...
...
@@ -8,6 +8,9 @@
<meta
name=
"viewport"
content=
"width=device-width, maximum-scale=1.0, user-scalable=1"
/>
<title>
{% block title %}{% endblock %}searx
</title>
<link
rel=
"stylesheet"
href=
"{{ url_for('static', filename='css/style.css') }}"
type=
"text/css"
media=
"screen"
/>
{% if rtl %}
<link
rel=
"stylesheet"
href=
"{{ url_for('static', filename='css/style-rtl.css') }}"
type=
"text/css"
media=
"screen"
/>
{% endif %}
{% if cookies['courgette-color'] %}
<style
type=
"text/css"
>
{
%
include
'courgette/color.css'
%
}
...
...
searx/templates/courgette/index.html
View file @
df9cf9d0
...
...
@@ -5,8 +5,13 @@
<div
class=
"title"
><h1>
searx
</h1></div>
{% include 'courgette/search.html' %}
<p
class=
"top_margin"
>
{% if rtl %}
<a
href=
"{{ url_for('preferences') }}"
class=
"hmarg"
>
{{ _('preferences') }}
</a>
{% endif %}
<a
href=
"{{ url_for('about') }}"
class=
"hmarg"
>
{{ _('about') }}
</a>
{% if not rtl %}
<a
href=
"{{ url_for('preferences') }}"
class=
"hmarg"
>
{{ _('preferences') }}
</a>
{% endif %}
</p>
</div>
{% endblock %}
\ No newline at end of file
searx/templates/courgette/preferences.html
View file @
df9cf9d0
...
...
@@ -106,7 +106,7 @@
{% if not search_engine.private %}
<tr>
<td>
{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})
</td>
<td>
{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})
‎
</td>
<td>
{{ _(categ) }}
</td>
<td
class=
"engine_checkbox"
>
<input
type=
"checkbox"
id=
"engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}"
name=
"engine_{{ search_engine.name }}__{{ categ }}"
{%
if
(
search_engine
.
name
,
categ
)
in
blocked_engines
%}
checked=
"checked"
{%
endif
%}
/>
...
...
searx/templates/courgette/results.html
View file @
df9cf9d0
...
...
@@ -8,7 +8,6 @@
</div>
<div
id=
"results"
>
<div
id=
"sidebar"
>
<div
id=
"search_url"
>
{{ _('Search URL') }}:
<input
type=
"text"
value=
"{{ base_url }}?q={{ q|urlencode }}&pageno={{ pageno }}{% if selected_categories %}&category_{{ selected_categories|join("
&
category_
")|
replace
('
','+')
}}{%
endif
%}"
readonly
/>
...
...
searx/templates/default/base.html
View file @
df9cf9d0
<!DOCTYPE html>
<html
xmlns=
"http://www.w3.org/1999/xhtml"
lang=
"en"
xml:lang=
"en"
>
<html
xmlns=
"http://www.w3.org/1999/xhtml"
lang=
"en"
xml:lang=
"en"
{%
if
rtl
%}
dir=
"rtl"
{%
endif
%}
>
<head>
<meta
charset=
"UTF-8"
/>
<meta
name=
"description"
content=
"Searx - a privacy-respecting, hackable metasearch engine"
/>
...
...
@@ -8,6 +8,9 @@
<meta
name=
"viewport"
content=
"width=device-width, maximum-scale=1.0, user-scalable=1"
/>
<title>
{% block title %}{% endblock %}searx
</title>
<link
rel=
"stylesheet"
href=
"{{ url_for('static', filename='css/style.css') }}"
type=
"text/css"
media=
"screen"
/>
{% if rtl %}
<link
rel=
"stylesheet"
href=
"{{ url_for('static', filename='css/style-rtl.css') }}"
type=
"text/css"
media=
"screen"
/>
{% endif %}
<link
rel=
"shortcut icon"
href=
"{{ url_for('static', filename='img/favicon.png') }}?v=2"
/>
{% block styles %}
{% endblock %}
...
...
searx/templates/default/index.html
View file @
df9cf9d0
...
...
@@ -4,8 +4,13 @@
<div
class=
"title"
><h1>
searx
</h1></div>
{% include 'default/search.html' %}
<p
class=
"top_margin"
>
{% if rtl %}
<a
href=
"{{ url_for('preferences') }}"
class=
"hmarg"
>
{{ _('preferences') }}
</a>
{% endif %}
<a
href=
"{{ url_for('about') }}"
class=
"hmarg"
>
{{ _('about') }}
</a>
{% if not rtl %}
<a
href=
"{{ url_for('preferences') }}"
class=
"hmarg"
>
{{ _('preferences') }}
</a>
{% endif %}
</p>
</div>
{% include 'default/github_ribbon.html' %}
...
...
searx/templates/default/preferences.html
View file @
df9cf9d0
...
...
@@ -94,7 +94,7 @@
{% if not search_engine.private %}
<tr>
<td>
{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})
</td>
<td>
{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})
‎
</td>
<td>
{{ _(categ) }}
</td>
<td
class=
"engine_checkbox"
>
<input
type=
"checkbox"
id=
"engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}"
name=
"engine_{{ search_engine.name }}__{{ categ }}"
{%
if
(
search_engine
.
name
,
categ
)
in
blocked_engines
%}
checked=
"checked"
{%
endif
%}
/>
...
...
@@ -113,7 +113,7 @@
</p>
<input
type=
"submit"
value=
"{{ _('save') }}"
/>
<div
class=
"
right
preferences_back"
><a
href=
"{{ url_for('index') }}"
>
{{ _('back') }}
</a></div>
<div
class=
"
{% if rtl %}left{% else %}right{% endif %}
preferences_back"
><a
href=
"{{ url_for('index') }}"
>
{{ _('back') }}
</a></div>
</form>
</div>
{% endblock %}
searx/templates/default/results.html
View file @
df9cf9d0
...
...
@@ -72,7 +72,7 @@
<div
id=
"pagination"
>
{% if pageno > 1 %}
<form
method=
"{{ method or 'POST' }}"
action=
"{{ url_for('index') }}"
>
<div
class=
"
left
"
>
<div
class=
"
{% if rtl %}right{% else %}left{% endif %}
"
>
<input
type=
"hidden"
name=
"q"
value=
"{{ q }}"
/>
{% for category in selected_categories %}
<input
type=
"hidden"
name=
"category_{{ category }}"
value=
"1"
/>
...
...
@@ -83,7 +83,7 @@
</form>
{% endif %}
<form
method=
"{{ method or 'POST' }}"
action=
"{{ url_for('index') }}"
>
<div
class=
"
right
"
>
<div
class=
"
{% if rtl %}left{% else %}right{% endif %}
"
>
{% for category in selected_categories %}
<input
type=
"hidden"
name=
"category_{{ category }}"
value=
"1"
/>
{% endfor %}
...
...
searx/templates/oscar/base.html
View file @
df9cf9d0
<!DOCTYPE html>
<html
xmlns=
"http://www.w3.org/1999/xhtml"
lang=
"en"
xml:lang=
"en"
>
<html
xmlns=
"http://www.w3.org/1999/xhtml"
lang=
"en"
xml:lang=
"en"
{%
if
rtl
%}
dir=
"rtl"
{%
endif
%}
>
<head>
<meta
charset=
"UTF-8"
/>
<meta
name=
"description"
content=
"Searx - a privacy-respecting, hackable metasearch engine"
/>
...
...
searx/templates/oscar/categories.html
View file @
df9cf9d0
<!-- used if scripts are disabled -->
<noscript>
<div
id=
"categories"
class=
"btn-group btn-toggle"
>
{% if rtl %}
{% for category in categories | reverse %}
<!--<div class="checkbox">-->
<input
class=
"hidden"
type=
"checkbox"
id=
"checkbox_{{ category|replace(' ', '_') }}_nojs"
name=
"category_{{ category }}"
{%
if
category
in
selected_categories
%}
checked=
"checked"
{%
endif
%}
/>
<label
class=
"btn btn-sm btn-primary active label_hide_if_not_checked"
for=
"checkbox_{{ category|replace(' ', '_') }}_nojs"
>
{{ _(category) }}
</label>
<label
class=
"btn btn-sm btn-default label_hide_if_checked"
for=
"checkbox_{{ category|replace(' ', '_') }}_nojs"
>
{{ _(category) }}
</label>
<!--</div>-->
{% if category in selected_categories %}
<input
class=
"hidden"
type=
"checkbox"
id=
"checkbox_{{ category|replace(' ', '_') }}_dis_activation"
name=
"category_{{ category }}"
value=
"off"
checked=
"checked"
/>
{% endif %}
{% endfor %}
{% else %}
{% for category in categories %}
<!--<div class="checkbox">-->
<input
class=
"hidden"
type=
"checkbox"
id=
"checkbox_{{ category|replace(' ', '_') }}_nojs"
name=
"category_{{ category }}"
{%
if
category
in
selected_categories
%}
checked=
"checked"
{%
endif
%}
/>
...
...
@@ -9,14 +19,24 @@
<!--</div>-->
{% if category in selected_categories %}
<input
class=
"hidden"
type=
"checkbox"
id=
"checkbox_{{ category|replace(' ', '_') }}_dis_activation"
name=
"category_{{ category }}"
value=
"off"
checked=
"checked"
/>
{% endif %}
{% endfor %}
{% endif %}
</div>
</noscript>
<div
id=
"categories"
class=
"btn-group btn-toggle hide_if_nojs"
data-toggle=
"buttons"
>
{% if rtl %}
{% for category in categories | reverse %}
<label
class=
"btn btn-sm {% if category in selected_categories %}btn-primary active{% else %}btn-default{% endif %}"
data-btn-class=
"primary"
>
<input
class=
"hidden"
type=
"checkbox"
id=
"checkbox_{{ category|replace(' ', '_') }}"
name=
"category_{{ category }}"
{%
if
category
in
selected_categories
%}
checked=
"checked"
{%
endif
%}
/>
{{ _(category) }}
</label>
{% endfor %}
{% else %}
{% for category in categories %}
<label
class=
"btn btn-sm {% if category in selected_categories %}btn-primary active{% else %}btn-default{% endif %}"
data-btn-class=
"primary"
>
<input
class=
"hidden"
type=
"checkbox"
id=
"checkbox_{{ category|replace(' ', '_') }}"
name=
"category_{{ category }}"
{%
if
category
in
selected_categories
%}
checked=
"checked"
{%
endif
%}
/>
{{ _(category) }}
</label>
<input
class=
"hidden"
type=
"checkbox"
id=
"checkbox_{{ category|replace(' ', '_') }}"
name=
"category_{{ category }}"
{%
if
category
in
selected_categories
%}
checked=
"checked"
{%
endif
%}
/>
{{ _(category) }}
</label>
{% endfor %}
{% endif %}
</div>
searx/templates/oscar/macros.html
View file @
df9cf9d0
...
...
@@ -28,3 +28,34 @@
<span
class=
"label label-default pull-right"
>
{{ result.engine }}
</span>
<p
class=
"text-muted"
>
{{ result.pretty_url }}
</p>
{%- endmacro %}
<!-- Draw result footer -->
{% macro result_footer_rtl(result) -%}
<div
class=
"clearfix"
></div>
<span
class=
"label label-default pull-left"
>
{{ result.engine }}
</span>
<p
class=
"text-muted"
>
{{ result.pretty_url }}
</p>
{%- endmacro %}
{% macro preferences_item_header(info, label) -%}
{% if not rtl %}
<div
class=
"row form-group"
>
<label
class=
"col-sm-3 col-md-2"
>
{{ label }}
</label>
<div
class=
"col-sm-4 col-md-4"
>
{% else %}
<div
class=
"row form-group"
>
<span
class=
"col-sm-5 col-md-6 help-block"
>
{{ info }}
</span>
<div
class=
"col-sm-4 col-md-4"
>
{% endif %}
{%- endmacro %}
{% macro preferences_item_footer(info, label) -%}
{% if not rtl %}
</div>
<span
class=
"col-sm-5 col-md-6 help-block"
>
{{ info }}
</span>
</div>
{% else %}
</div>
<label
class=
"col-sm-3 col-md-2"
>
{{ label }}
</label>
</div>
{% endif %}
{%- endmacro %}
searx/templates/oscar/navbar.html
View file @
df9cf9d0
<!-- Static navbar -->
<div
class=
"navbar navbar-default"
role=
"navigation"
>
<div
class=
"container-fluid"
>
{% if rtl %}
<div
class=
"navbar-collapse collapse navbar-left"
>
<ul
class=
"nav navbar-nav navbar-left"
>
<!-- results.html -->
<li
{%
if
template_name =
=
'
preferences
.
html
'
%}
class=
"active"
{%
endif
%}
><a
href=
"{{ url_for('preferences') }}"
class=
"hmarg"
>
{{ _('preferences') }}
</a></li>
<li
{%
if
template_name =
=
'
about
.
html
'
%}
class=
"active"
{%
endif
%}
><a
href=
"{{ url_for('about') }}"
class=
"hmarg"
>
{{ _('about') }}
</a></li>
<li
{%
if
template_name =
=
'
index
.
html
'
%}
class=
"active"
{%
endif
%}
><a
href=
"{{ url_for('index') }}"
class=
"hmarg"
>
{{ _('home') }}
</a></li>
</ul>
</div>
<div
class=
"navbar-header navbar-right"
>
<button
type=
"button"
class=
"navbar-toggle collapsed"
data-toggle=
"collapse"
data-target=
".navbar-collapse"
>
<span
class=
"sr-only"
>
{{ _('Toggle navigation') }}
</span>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
</button>
<a
class=
"navbar-brand"
href=
"{{ url_for('index') }}"
>
searx
</a>
</div>
{% else %}
<div
class=
"navbar-header"
>
<button
type=
"button"
class=
"navbar-toggle collapsed"
data-toggle=
"collapse"
data-target=
".navbar-collapse"
>
<span
class=
"sr-only"
>
{{ _('Toggle navigation') }}
</span>
...
...
@@ -17,5 +35,6 @@
<li
{%
if
template_name =
=
'
preferences
.
html
'
%}
class=
"active"
{%
endif
%}
><a
href=
"{{ url_for('preferences') }}"
class=
"hmarg"
>
{{ _('preferences') }}
</a></li>
</ul>
</div>
<!--/.nav-collapse -->
{% endif %}
</div>
<!--/.container-fluid -->
</div>
searx/templates/oscar/preferences.html
View file @
df9cf9d0
This diff is collapsed.
Click to expand it.
searx/templates/oscar/result_templates/code.html
View file @
df9cf9d0
{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, icon %}
{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer,
result_footer_rtl,
icon %}
{{ result_header(result, favicons) }}
{{ result_sub_header(result) }}
...
...
@@ -9,4 +9,8 @@
{{ result.codelines|code_highlighter(result.code_language)|safe }}
{% if rtl %}
{{ result_footer_rtl(result) }}
{% else %}
{{ result_footer(result) }}
{% endif %}
searx/templates/oscar/result_templates/default.html
View file @
df9cf9d0
{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, icon %}
{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer,
result_footer_rtl,
icon %}
{{ result_header(result, favicons) }}
{{ result_sub_header(result) }}
...
...
@@ -15,4 +15,8 @@
{% if result.content %}
<p
class=
"result-content"
>
{{ result.content|safe }}
</p>
{% endif %}
{% if rtl %}
{{ result_footer_rtl(result) }}
{% else %}
{{ result_footer(result) }}
{% endif %}
searx/templates/oscar/result_templates/map.html
View file @
df9cf9d0
{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, icon %}
{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer,
result_footer_rtl,
icon %}
{{ result_header(result, favicons) }}
{{ result_sub_header(result) }}
...
...
@@ -65,4 +65,8 @@
</div>
{% endif %}
{% if rtl %}
{{ result_footer_rtl(result) }}
{% else %}
{{ result_footer(result) }}
{% endif %}
searx/templates/oscar/result_templates/torrent.html
View file @
df9cf9d0
{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, icon %}
{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer,
result_footer_rtl,
icon %}
{{ result_header(result, favicons) }}
{{ result_sub_header(result) }}
...
...
@@ -18,4 +18,8 @@
</p>
{% if rtl %}
{{ result_footer_rtl(result) }}
{% else %}
{{ result_footer(result) }}
{% endif %}
searx/templates/oscar/result_templates/videos.html
View file @
df9cf9d0
...
...
@@ -20,4 +20,8 @@
</div>
</div>
{% if rtl %}
{{ result_footer_rtl(result) }}
{% else %}
{{ result_footer(result) }}
{% endif %}
searx/templates/oscar/results.html
View file @
df9cf9d0
...
...
@@ -33,6 +33,27 @@
<div
class=
"clearfix"
></div>
{% if paging %}
{% if rtl %}
<div
id=
"pagination"
>
<div
class=
"pull-left"
>
<form
method=
"{{ method or 'POST' }}"
action=
"{{ url_for('index') }}"
class=
"pull-left"
>
<input
type=
"hidden"
name=
"q"
value=
"{{ q }}"
/>
{% for category in selected_categories %}
<input
type=
"hidden"
name=
"category_{{ category }}"
value=
"1"
/>
{% endfor %}
<input
type=
"hidden"
name=
"q"
value=
"{{ q }}"
/>
<input
type=
"hidden"
name=
"pageno"
value=
"{{ pageno+1 }}"
/>
<button
type=
"submit"
class=
"btn btn-default"
><span
class=
"glyphicon glyphicon-backward"
></span>
{{ _('next page') }}
</button>
</form>
</div>
<div
class=
"pull-right"
>
<form
method=
"{{ method or 'POST' }}"
action=
"{{ url_for('index') }}"
class=
"pull-left"
>
{% for category in selected_categories %}
<input
type=
"hidden"
name=
"category_{{ category }}"
value=
"1"
/>
{% endfor %}
<input
type=
"hidden"
name=
"pageno"
value=
"{{ pageno-1 }}"
/>
<button
type=
"submit"
class=
"btn btn-default"
{%
if
pageno =
=
1
%}
disabled
{%
endif
%}
><span
class=
"glyphicon glyphicon-forward"
></span>
{{ _('previous page') }}
</button>
</form>
</div>
</div>
<!-- /#pagination -->
<div
class=
"clearfix"
></div>
{% else %}
<div
id=
"pagination"
>
<div
class=
"pull-left"
>
<form
method=
"{{ method or 'POST' }}"
action=
"{{ url_for('index') }}"
class=
"pull-left"
>
...
...
@@ -53,6 +74,7 @@
</div>
<!-- /#pagination -->
<div
class=
"clearfix"
></div>
{% endif %}
{% endif %}
</div>
<!-- /#main_results -->
<div
class=
"col-sm-4"
id=
"sidebar_results"
>
...
...
searx/templates/oscar/search_full.html
View file @
df9cf9d0
{% from 'oscar/macros.html' import icon %}
<form
method=
"{{ method or 'POST' }}"
action=
"{{ url_for('index') }}"
id=
"search_form"
role=
"search"
>
{% if rtl %}
<div
class=
"input-group"
>
{% else %}
<div
class=
"input-group col-md-8 col-md-offset-2"
>
{% endif %}
<input
type=
"search"
name=
"q"
class=
"form-control input-lg autofocus"
id=
"q"
placeholder=
"{{ _('Search for...') }}"
autocomplete=
"off"
value=
"{{ q }}"
>
<span
class=
"input-group-btn"
>
<button
type=
"submit"
class=
"btn btn-default input-lg"
><span
class=
"hide_if_nojs"
>
{{ icon('search') }}
</span><span
class=
"hidden active_if_nojs"
>
{{ _('Start search') }}
</span></button>
...
...
searx/webapp.py
View file @
df9cf9d0
...
...
@@ -20,7 +20,7 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.
if
__name__
==
'__main__'
:
from
sys
import
path
from
os.path
import
realpath
,
dirname
path
.
append
(
realpath
(
dirname
(
realpath
(
__file__
))
+
'/../'
))
path
.
append
(
realpath
(
dirname
(
realpath
(
__file__
))
+
'/../'
))
import
json
import
cStringIO
...
...
@@ -85,10 +85,13 @@ app.secret_key = settings['server']['secret_key']
babel
=
Babel
(
app
)
rtl_locales
=
[
'ar'
,
'arc'
,
'bcc'
,
'bqi'
,
'ckb'
,
'dv'
,
'fa'
,
'glk'
,
'he'
,
'ku'
,
'mzn'
,
'pnb'', ''ps'
,
'sd'
,
'ug'
,
'ur'
,
'yi'
]
global_favicons
=
[]
for
indice
,
theme
in
enumerate
(
themes
):
global_favicons
.
append
([])
theme_img_path
=
searx_dir
+
"/static/themes/"
+
theme
+
"/img/icons/"
theme_img_path
=
searx_dir
+
"/static/themes/"
+
theme
+
"/img/icons/"
for
(
dirpath
,
dirnames
,
filenames
)
in
os
.
walk
(
theme_img_path
):
global_favicons
[
indice
]
.
extend
(
filenames
)
...
...
@@ -262,6 +265,9 @@ def render(template_name, override_theme=None, **kwargs):
if
'autocomplete'
not
in
kwargs
:
kwargs
[
'autocomplete'
]
=
autocomplete
if
get_locale
()
in
rtl_locales
and
'rtl'
not
in
kwargs
:
kwargs
[
'rtl'
]
=
True
kwargs
[
'searx_version'
]
=
VERSION_STRING
kwargs
[
'method'
]
=
request
.
cookies
.
get
(
'method'
,
'POST'
)
...
...
@@ -396,6 +402,7 @@ def about():
"""Render about page"""
return
render
(
'about.html'
,
rtl
=
False
,
)
...
...
@@ -592,7 +599,7 @@ def image_proxy():
img
=
''
chunk_counter
=
0
for
chunk
in
resp
.
iter_content
(
1024
*
1024
):
for
chunk
in
resp
.
iter_content
(
1024
*
1024
):
chunk_counter
+=
1
if
chunk_counter
>
5
:
return
''
,
502
# Bad gateway - file is too big (>5M)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment