summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVipul <finn02@disroot.org>2019-12-20 23:34:22 +0000
committerVipul <finn02@disroot.org>2019-12-22 02:27:42 +0000
commit36ca2dcc56651688cd7ca8b8d925a9370bdc1dec (patch)
treec3401725bc73a89bc8ea1f337591c6825b150cee
parentda56bda26542de5697691ff80dac6df876fb366b (diff)
downloadsearxng-36ca2dcc56651688cd7ca8b8d925a9370bdc1dec.tar.gz
searxng-36ca2dcc56651688cd7ca8b8d925a9370bdc1dec.zip
[Fix] oscar: move info box at top of the page
In low width devices like mobile, tablet etc, info box is present at bottom of the page. This change addresses the issue by rearranging column grids for low width devices and move side bar at top of the page. See - https://getbootstrap.com/docs/3.3/css/#grid-column-ordering. - and Searx issue tracker (issue#1777), for more information. Effect: Along with Info, Suggestion and Link boxes also move to top of the page. Resolves: #1777
-rw-r--r--searx/templates/oscar/results.html124
1 files changed, 62 insertions, 62 deletions
diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html
index 9cf942695..43e3e26d9 100644
--- a/searx/templates/oscar/results.html
+++ b/searx/templates/oscar/results.html
@@ -15,7 +15,68 @@
{% include 'oscar/search.html' %}
<div class="row">
- <div class="col-sm-8" id="main_results">
+ <div class="col-sm-4 col-sm-push-8" id="sidebar_results">
+ {% if number_of_results != '0' -%}
+ <p><small>{{ _('Number of results') }}: {{ number_of_results }}</small></p>
+ {%- endif %}
+
+ {% if unresponsive_engines and results|length >= 1 -%}
+ <div class="alert alert-danger fade in" role="alert">
+ <p>{{ _('Engines cannot retrieve results') }}:</p>
+ {%- for engine_name, error_type in unresponsive_engines -%}
+ {{- engine_name }} ({{ error_type }}){% if not loop.last %}, {% endif %}{{- "" -}}
+ {%- endfor -%}
+ </div>
+ {%- endif %}
+
+ {% if infoboxes -%}
+ {% for infobox in infoboxes %}
+ {% include 'oscar/infobox.html' %}{{- "\n\n" -}}
+ {% endfor %}
+ {%- endif %}
+
+ {% if suggestions %}
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <h4 class="panel-title">{{ _('Suggestions') }}</h4>
+ </div>
+ <div class="panel-body">
+ {% for suggestion in suggestions %}
+ <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" role="navigation" class="form-inline pull-{% if rtl %}right{% else %}left{% endif %} suggestion_item">
+ <input type="hidden" name="q" value="{{ suggestion.url }}">
+ <button type="submit" class="btn btn-default btn-xs">{{ suggestion.title }}</button>
+ </form>
+ {% endfor %}
+ </div>
+ </div>
+ {%- endif %}
+
+ <div class="panel panel-default">
+ <div class="panel-heading">{{- "" -}}
+ <h4 class="panel-title">{{ _('Links') }}</h4>{{- "" -}}
+ </div>
+ <div class="panel-body">
+ <form role="form">{{- "" -}}
+ <div class="form-group">{{- "" -}}
+ <label for="search_url">{{ _('Search URL') }}</label>{{- "" -}}
+ <input id="search_url" type="url" class="form-control select-all-on-click cursor-text" name="search_url" value="{{ search_url() }}" readonly>{{- "" -}}
+ </div>{{- "" -}}
+ </form>
+ <label>{{ _('Download results') }}</label>
+ <div class="clearfix"></div>
+ {% for output_type in ('csv', 'json', 'rss') %}
+ <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" class="form-inline pull-{% if rtl %}right{% else %}left{% endif %} result_download">
+ {{- search_form_attrs(pageno) -}}
+ <input type="hidden" name="format" value="{{ output_type }}">{{- "" -}}
+ <button type="submit" class="btn btn-default">{{ output_type }}</button>{{- "" -}}
+ </form>
+ {% endfor %}
+ <div class="clearfix"></div>
+ </div>
+ </div>
+ </div><!-- /#sidebar_results -->
+
+ <div class="col-sm-8 col-sm-pull-4" id="main_results">
<h1 class="sr-only">{{ _('Search results') }}</h1>
{% if corrections -%}
@@ -91,66 +152,5 @@
{% endif %}
{% endif %}
</div><!-- /#main_results -->
-
- <div class="col-sm-4" id="sidebar_results">
- {% if number_of_results != '0' -%}
- <p><small>{{ _('Number of results') }}: {{ number_of_results }}</small></p>
- {%- endif %}
-
- {% if unresponsive_engines and results|length >= 1 -%}
- <div class="alert alert-danger fade in" role="alert">
- <p>{{ _('Engines cannot retrieve results') }}:</p>
- {%- for engine_name, error_type in unresponsive_engines -%}
- {{- engine_name }} ({{ error_type }}){% if not loop.last %}, {% endif %}{{- "" -}}
- {%- endfor -%}
- </div>
- {%- endif %}
-
- {% if infoboxes -%}
- {% for infobox in infoboxes %}
- {% include 'oscar/infobox.html' %}{{- "\n\n" -}}
- {% endfor %}
- {%- endif %}
-
- {% if suggestions %}
- <div class="panel panel-default">
- <div class="panel-heading">
- <h4 class="panel-title">{{ _('Suggestions') }}</h4>
- </div>
- <div class="panel-body">
- {% for suggestion in suggestions %}
- <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" role="navigation" class="form-inline pull-{% if rtl %}right{% else %}left{% endif %} suggestion_item">
- <input type="hidden" name="q" value="{{ suggestion.url }}">
- <button type="submit" class="btn btn-default btn-xs">{{ suggestion.title }}</button>
- </form>
- {% endfor %}
- </div>
- </div>
- {%- endif %}
-
- <div class="panel panel-default">
- <div class="panel-heading">{{- "" -}}
- <h4 class="panel-title">{{ _('Links') }}</h4>{{- "" -}}
- </div>
- <div class="panel-body">
- <form role="form">{{- "" -}}
- <div class="form-group">{{- "" -}}
- <label for="search_url">{{ _('Search URL') }}</label>{{- "" -}}
- <input id="search_url" type="url" class="form-control select-all-on-click cursor-text" name="search_url" value="{{ search_url() }}" readonly>{{- "" -}}
- </div>{{- "" -}}
- </form>
- <label>{{ _('Download results') }}</label>
- <div class="clearfix"></div>
- {% for output_type in ('csv', 'json', 'rss') %}
- <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" class="form-inline pull-{% if rtl %}right{% else %}left{% endif %} result_download">
- {{- search_form_attrs(pageno) -}}
- <input type="hidden" name="format" value="{{ output_type }}">{{- "" -}}
- <button type="submit" class="btn btn-default">{{ output_type }}</button>{{- "" -}}
- </form>
- {% endfor %}
- <div class="clearfix"></div>
- </div>
- </div>
- </div><!-- /#sidebar_results -->
</div>
{% endblock %}