mirror of https://github.com/searx/searx
Merge pull request #1031 from misnyo/static_path
[fix] static path fixed in templates and webapp, line endings fixed
This commit is contained in:
commit
9804ab7a1b
|
@ -1,5 +1,5 @@
|
|||
<div class="result {{ result.class }}">
|
||||
<h3 class="result_title">{% if result['favicon'] %}<img width="14" height="14" class="favicon" src="static/{{theme}}/img/icon_{{result['favicon']}}.ico" alt="{{result['favicon']}}" />{% endif %}<a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.title|safe }}</a></h3>
|
||||
<h3 class="result_title"><a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.title|safe }}</a></h3>
|
||||
{% if result.publishedDate %}<span class="published_date">{{ result.publishedDate }}</span>{% endif %}
|
||||
<p class="content">{% if result.img_src %}<img src="{{ image_proxify(result.img_src) }}" class="image" />{% endif %}{% if result.content %}{{ result.content|safe }}<br class="last"/>{% endif %}</p>
|
||||
{% if result.repository %}<p class="content"><a href="{{ result.repository|safe }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.repository }}</a></p>{% endif %}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="result {{ result.class }}">
|
||||
<h3 class="result_title"> {% if result['favicon'] %}<img width="14" height="14" class="favicon" src="static/{{theme}}/img/icon_{{result['favicon']}}.ico" alt="{{result['favicon']}}" />{% endif %}<a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.title|safe }}</a></h3>
|
||||
<h3 class="result_title"><a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.title|safe }}</a></h3>
|
||||
<p class="url">{{ result.pretty_url }}‎ <a class="cache_link" href="https://web.archive.org/web/{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ _('cached') }}</a></p>
|
||||
{% if result.publishedDate %}<p class="published_date">{{ result.publishedDate }}</p>{% endif %}
|
||||
<p class="content">{% if result.img_src %}<img src="{{ image_proxify(result.img_src) }}" class="image" />{% endif %}{% if result.content %}{{ result.content|safe }}<br class="last"/>{% endif %}</p>
|
||||
|
|
|
@ -4,9 +4,8 @@
|
|||
{%- endmacro %}
|
||||
|
||||
<!-- Draw favicon -->
|
||||
<!-- TODO: using url_for methode -->
|
||||
{% macro draw_favicon(favicon) -%}
|
||||
<img width="32" height="32" class="favicon" src="static/themes/oscar/img/icons/{{ favicon }}.png" alt="{{ favicon }}" />
|
||||
<img width="32" height="32" class="favicon" src="{{ url_for('static', filename='/themes/oscar/img/icons/' + favicon + '.png') }}" alt="{{ favicon }}" />
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro result_link(url, title, classes='') -%}
|
||||
|
|
|
@ -8,9 +8,8 @@
|
|||
{%- endmacro %}
|
||||
|
||||
<!-- Draw favicon -->
|
||||
<!-- TODO: using url_for methode -->
|
||||
{% macro draw_favicon(favicon) -%}
|
||||
<img width="14" height="14" class="favicon" src="static/themes/simple/img/icons/{{ favicon }}.png" alt="{{ favicon }}" />
|
||||
<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='/themes/simple/img/icons/' + favicon + '.png') }}" alt="{{ favicon }}" />
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro result_open_link(url, classes='') -%}
|
||||
|
|
|
@ -792,7 +792,8 @@ def opensearch():
|
|||
@app.route('/favicon.ico')
|
||||
def favicon():
|
||||
return send_from_directory(os.path.join(app.root_path,
|
||||
'static/themes',
|
||||
static_path,
|
||||
'themes',
|
||||
get_current_theme_name(),
|
||||
'img'),
|
||||
'favicon.png',
|
||||
|
|
Loading…
Reference in New Issue