Commit 87574704 authored by Daniel J. Ramirez's avatar Daniel J. Ramirez

Cleanup and template improvements.

- Moved template components to their own folder
- Added a better 404 page
- Removed stats page (since stats are included in the engines preferences where they are more useful)
parent 9cc4db9e
......@@ -69,12 +69,14 @@ a {
max-width: 600px;
margin: auto;
}
#no_results_msg {
#no_results_msg,
#page_not_found_404 {
text-align: center;
margin-top: 64px;
margin-bottom: 64px;
}
#no_results_msg img {
#no_results_msg img,
#page_not_found_404 img {
max-width: 70%;
}
.inline {
......
This diff is collapsed.
This diff is collapsed.
......@@ -48,7 +48,7 @@
max-width: @size-content;
margin: auto;
}
#no_results_msg {
#no_results_msg, #page_not_found_404 {
text-align: center;
margin-top: @spacing_xx-huge;
margin-bottom: @spacing_xx-huge;
......
{% extends "eelo/base.html" %}
{% block content %}
<div class="text-center">
<h1>{{ _('Page not found') }}</h1>
{% autoescape false %}
<p>{{ _('Go to %(search_page)s.', search_page=unicode('<a href="{}">{}</a>').format(url_for('index'), _('search page'))) }}</p>
{% endautoescape %}
<div class="container contents full">
<div>
<div id="page_not_found_404" class="content-small-centered">
<img src="{{ url_for('static', filename='img/not_found.svg') }}" alt="">
<h2>{{_("Page not found")}}</h2>
{% autoescape false %}
<p>{{ _('Go to %(search_page)s.', search_page=unicode('<a href="{}">{}</a>').format(url_for('index'), _('search page'))) }}</p>
{% endautoescape %}
</div>
</div>
</div>
{% endblock %}
......@@ -12,9 +12,6 @@
{% block meta %}{% endblock %}
<title>{% block title %}{% endblock %}{{ instance_name }}</title>
<!-- <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}" type="text/css" /> -->
<!-- <link rel="stylesheet" href="{{ url_for('static', filename='css/logicodev.min.css') }}" type="text/css" /> -->
<!-- <link rel="stylesheet" href="{{ url_for('static', filename='css/leaflet.min.css') }}" type="text/css" /> -->
<link rel="stylesheet" href="{{ url_for('static', filename='css/eelo.min.css') }}" type="text/css" />
{% for css in styles %}
......@@ -53,8 +50,8 @@
<body>
{% include 'eelo/icons.html' %}
{% include 'eelo/navbar.html' %}
{% include 'eelo/components/icons.html' %}
{% include 'eelo/components/navbar.html' %}
{% set inline_search_form = true %}
<main>
......@@ -108,7 +105,7 @@
{% endblock %}
<p class="text-muted">
<small>
e Foundation 2018,
e Foundation 2019,
{{ _('Powered by') }} <a href="https://asciimoo.github.io/searx/">searx</a><br/>
<span class="links">
<a href="https://e.foundation">{{ _('About') }}</a>
......
......@@ -2,11 +2,11 @@
{% call search_bar(q, true, rtl) %}
<div id="search_params">
{% include 'eelo/categories.html' %}
{% include 'eelo/components/categories.html' %}
<span id="time_and_lang">
{% set flat_lang_selector = True %}
{% include 'eelo/languages.html' %}
{% include 'eelo/time-range.html' %}
{% include 'eelo/components/languages.html' %}
{% include 'eelo/components/time-range.html' %}
</span>
</div>
{% endcall %}
......@@ -3,6 +3,6 @@
<div id="index">
<img src="{{ url_for('static', filename='img/logo_searx_a.png') }}" alt="searx logo" />
<img id="logo_inline" src="{{ url_for('static', filename='img/logo_eelo_inline.png') }}" alt="e logo" />
{% include 'eelo/search.html' %}
{% include 'eelo/components/search.html' %}
</div>
{% endblock %}
<div class="alert alert-info fade in" role="alert">
<button class="close" data-dismiss="alert" type="button">
<span aria-hidden="true">×</span>
<span class="sr-only">{{ _('Close') }}</span>
</button>
<strong class="lead">{{ icon('info-sign') }} {{ _('Heads up!') }}</strong>
{{ _('It look like you are using searx first time.') }}
</div>
{% from 'eelo/macros.html' import icon %}
<div class="alert alert-info fade in" role="alert">
<strong class="lead">{{ icon('info-sign') }} {{ _('Information!') }}</strong>
<strong class="lead">{{ _('Information!') }}</strong>
{{ _('currently, there are no cookies defined.') }}
</div>
{% from 'eelo/macros.html' import icon %}
<div class="alert alert-info fade in" role="alert">
<strong class="lead">{{ icon('info-sign') }} {{ _('Heads up!') }}</strong>
{{ _('There is currently no data available. ') }}
</div>
......@@ -29,7 +29,7 @@
{% set language_label = _('Search language') %}
{% set language_info = _('What language do you prefer for search?') %}
{% call preferences_item(language_info, language_label, rtl) %}
{% include 'eelo/languages.html' %}
{% include 'eelo/components/languages.html' %}
{% endcall %}
{% set locale_label = _('Interface language') %}
......
......@@ -8,7 +8,7 @@
{% block content %}
<div id="search_bar_area">
{% include 'eelo/search_full.html' %}
{% include 'eelo/components/search_full.html' %}
</div>
{% set use_gallery_layout = selected_category == 'images' or selected_category == 'videos'%}
......@@ -125,7 +125,7 @@
<div>
{% if infoboxes %}
{% for infobox in infoboxes %}
{% include 'eelo/infobox.html' %}
{% include 'eelo/components/infobox.html' %}
{% endfor %}
{% endif %}
......
{% extends "eelo/base.html" %}
{% block title %}{{ _('stats') }} - {% endblock %}
{% block content %}
<div class="container">
<h1>{{ _('Engine stats') }}</h1>
<div class="row">
{% for stat_name,stat_category in stats %}
<div class="col-xs-12 col-sm-12 col-md-6">
<h3>{{ stat_name }}</h3>
<div class="container-fluid">
{% for engine in stat_category %}
<div class="row">
<div class="col-sm-4 col-md-4">{{ engine.name }}</div>
<div class="col-sm-8 col-md-8">
<div class="progress">
<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="{{ '%i'|format(engine.avg) }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ engine.percentage }}%;">
{{ '%.02f'|format(engine.avg) }}
</div>
</div>
</div>
</div>
{% endfor %}
{% if not stat_category %}
<div class="col-sm-12 col-md-12">
{% include 'eelo/messages/no_data_available.html' %}
</div>
{% endif %}
</div>
</div>
{% endfor %}
</div>
</div>
{% endblock %}
......@@ -722,16 +722,6 @@ def image_proxy():
return Response(img, mimetype=resp.headers['content-type'], headers=headers)
@app.route('/stats', methods=['GET'])
def stats():
"""Render engine statistics page."""
stats = get_engines_stats()
return render(
'stats.html',
stats=stats,
)
@app.route('/robots.txt', methods=['GET'])
def robots():
return Response("""User-agent: *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment