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
a538bed7
Commit
a538bed7
authored
Sep 27, 2014
by
Thomas Pointhuber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oscar template: implement search input, index page,...
parent
ef1ead9c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
9 deletions
+48
-9
searx.png
searx/static/oscar/img/searx.png
+0
-0
searx_logo.png
searx/static/oscar/img/searx_logo.png
+0
-0
scripts.js
searx/static/oscar/js/scripts.js
+17
-7
index.html
searx/templates/oscar/index.html
+11
-2
macros.html
searx/templates/oscar/macros.html
+3
-0
search.html
searx/templates/oscar/search.html
+17
-0
No files found.
searx/static/oscar/img/searx.png
deleted
100644 → 0
View file @
ef1ead9c
7.47 KB
searx/static/oscar/img/searx_logo.png
0 → 100644
View file @
a538bed7
22.9 KB
searx/static/oscar/js/scripts.js
View file @
a538bed7
...
...
@@ -12,15 +12,11 @@ $(document).ready(function(){
var
btnClass
=
'btn-'
+
$
(
this
).
data
(
'btn-class'
);
var
btnLabelDefault
=
$
(
this
).
data
(
'btn-label-default'
);
var
btnLabelToggled
=
$
(
this
).
data
(
'btn-label-toggled'
);
if
(
btnLabelToggled
!=
''
)
{
if
(
$
(
this
).
hasClass
(
'btn-default'
))
{
if
(
btnLabelToggled
!=
''
)
{
if
(
$
(
this
).
hasClass
(
'btn-default'
))
{
var
html
=
$
(
this
).
html
().
replace
(
btnLabelDefault
,
btnLabelToggled
);
}
else
{
}
else
{
var
html
=
$
(
this
).
html
().
replace
(
btnLabelToggled
,
btnLabelDefault
);
}
$
(
this
).
html
(
html
);
...
...
@@ -28,4 +24,18 @@ $(document).ready(function(){
$
(
this
).
toggleClass
(
btnClass
);
$
(
this
).
toggleClass
(
'btn-default'
);
});
$
(
'.btn-collapse'
).
click
(
function
()
{
var
btnTextCollapsed
=
$
(
this
).
data
(
'btn-text-collapsed'
);
var
btnTextNotCollapsed
=
$
(
this
).
data
(
'btn-text-not-collapsed'
);
if
(
btnTextCollapsed
!=
''
&&
btnTextNotCollapsed
!=
''
)
{
if
(
$
(
this
).
hasClass
(
'collapsed'
))
{
var
html
=
$
(
this
).
html
().
replace
(
btnTextCollapsed
,
btnTextNotCollapsed
);
}
else
{
var
html
=
$
(
this
).
html
().
replace
(
btnTextNotCollapsed
,
btnTextCollapsed
);
}
$
(
this
).
html
(
html
);
}
});
});
searx/templates/oscar/index.html
View file @
a538bed7
{% extends "oscar/base.html" %}
{% block content %}
<div
class=
"center"
>
<div
class=
"title"
><h1>
searx
</h1></div>
<div
class=
"container-fluid"
>
<div
class=
"row"
>
<div
class=
"text-center col-sm-12 col-md-12"
>
<h1
class=
"text-hide center-block"
><img
class=
"center-block img-responsive"
src=
"{{ url_for('static', filename='img/searx_logo.png') }}"
alt=
"searx logo"
/>
searx
</h1>
</div>
</div>
<div
class=
"row"
>
<div
class=
"text-center col-sm-12 col-md-12"
>
{% include 'oscar/search.html' %}
</div>
</div>
</div>
{% endblock %}
searx/templates/oscar/macros.html
0 → 100644
View file @
a538bed7
{% macro icon(action) -%}
<span
class=
"glyphicon glyphicon-{{ action }}"
></span>
{%- endmacro %}
searx/templates/oscar/search.html
0 → 100644
View file @
a538bed7
{% from 'oscar/macros.html' import icon %}
<form
method=
"{{ method or 'POST' }}"
action=
"{{ url_for('index') }}"
id=
"search_form"
role=
"search"
>
<div
class=
"input-group col-md-8 col-md-offset-2"
>
<input
type=
"search"
name=
"q"
class=
"form-control input-lg"
id=
"q"
placeholder=
"{{ _('Search for...') }}"
autocomplete=
"off"
value=
"{{ q }}"
>
<span
class=
"input-group-btn"
>
<button
type=
"submit"
class=
"btn btn-default input-lg"
>
{{ icon('search') }}
<span
class=
"sr-only"
>
{{ _('Start search') }}
</span></button>
</span>
</div>
<button
type=
"button"
class=
"btn btn-link btn-collapse center-block collapsed"
data-toggle=
"collapse"
data-target=
"#search_categories"
data-btn-text-collapsed=
"{{ _('Show search filters') }}"
data-btn-text-not-collapsed=
"{{ _('Hide search filters') }}"
>
{{ _('Show search filters') }}
</button>
<div
class=
"row collapse"
id=
"search_categories"
>
<div
class=
"col-md-12 text-center"
>
{% include 'oscar/categories.html' %}
</div>
</div>
<!-- / #search_categories -->
</form>
<!-- / #search_form_full -->
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