forked from Ponysearch/Ponysearch
Merge branch 'master' into new-readme
This commit is contained in:
commit
3f660e1ff0
17 changed files with 23 additions and 17 deletions
|
@ -1,4 +1,4 @@
|
||||||
<div class="result {{ result.class }}">
|
<div class="result {{ result.class }}{% for e in result.engines %} {{ e }}{% endfor %}">
|
||||||
<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>
|
<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 %}
|
{% 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>
|
<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>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="result {{ result.class }}">
|
<div class="result {{ result.class }}{% for e in result.engines %} {{ e }}{% endfor %}">
|
||||||
|
|
||||||
{% if "icon_"~result.engine~".ico" in favicons %}
|
{% if "icon_"~result.engine~".ico" in favicons %}
|
||||||
<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
|
<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="image_result">
|
<div class="image_result{% for e in result.engines %} {{ e }}{% endfor %}">
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ result.img_src }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}><img src="{% if result.thumbnail_src %}{{ image_proxify(result.thumbnail_src) }}{% else %}{{ image_proxify(result.img_src) }}{% endif %}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/></a>
|
<a href="{{ result.img_src }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}><img src="{% if result.thumbnail_src %}{{ image_proxify(result.thumbnail_src) }}{% else %}{{ image_proxify(result.img_src) }}{% endif %}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/></a>
|
||||||
<span class="url"><a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} class="small_font">{{ _('original context') }}</a></span>
|
<span class="url"><a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} class="small_font">{{ _('original context') }}</a></span>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="result">
|
<div class="result{% for e in result.engines %} {{ e }}{% endfor %}">
|
||||||
<table>
|
<table>
|
||||||
{% for key, value in result.items() %}
|
{% for key, value in result.items() %}
|
||||||
{% if key in ['engine', 'engines', 'template', 'score', 'category', 'positions'] %}
|
{% if key in ['engine', 'engines', 'template', 'score', 'category', 'positions'] %}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="result {{ result.class }}">
|
<div class="result {{ result.class }}{% for e in result.engines %} {{ e }}{% endfor %}">
|
||||||
|
|
||||||
{% if "icon_"~result.engine~".ico" in favicons %}
|
{% if "icon_"~result.engine~".ico" in favicons %}
|
||||||
<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
|
<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="result torrent_result">
|
<div class="result torrent_result{% for e in result.engines %} {{ e }}{% endfor %}">
|
||||||
{% if "icon_"~result.engine~".ico" in favicons %}
|
{% if "icon_"~result.engine~".ico" in favicons %}
|
||||||
<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
|
<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="result">
|
<div class="result{% for e in result.engines %} {{ e }}{% endfor %}">
|
||||||
{% if "icon_"~result.engine~".ico" in favicons %}
|
{% if "icon_"~result.engine~".ico" in favicons %}
|
||||||
<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
|
<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="result {{ result.class }}">
|
<div class="result {{ result.class }}{% for e in result.engines %} {{ e }}{% endfor %}">
|
||||||
<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>
|
<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>
|
<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 %}
|
{% if result.publishedDate %}<p class="published_date">{{ result.publishedDate }}</p>{% endif %}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="result {{ result.class }}">
|
<div class="result {{ result.class }}{% for e in result.engines %} {{ e }}{% endfor %}">
|
||||||
<h3 class="result_title">{% if "icon_"~result.engine~".ico" in favicons %}<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />{% 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">{% if "icon_"~result.engine~".ico" in favicons %}<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />{% endif %}<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 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>
|
||||||
{% if result.publishedDate %}<span class="published_date">{{ result.publishedDate }}</span>{% endif %}</p>
|
{% if result.publishedDate %}<span class="published_date">{{ result.publishedDate }}</span>{% endif %}</p>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="image_result">
|
<div class="image_result{% for e in result.engines %} {{ e }}{% endfor %}">
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ result.img_src }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}><img src="{% if result.thumbnail_src %}{{ image_proxify(result.thumbnail_src) }}{% else %}{{ image_proxify(result.img_src) }}{% endif %}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}" /></a>
|
<a href="{{ result.img_src }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}><img src="{% if result.thumbnail_src %}{{ image_proxify(result.thumbnail_src) }}{% else %}{{ image_proxify(result.img_src) }}{% endif %}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}" /></a>
|
||||||
<span class="url"><a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} class="small_font">{{ _('original context') }}</a></span>
|
<span class="url"><a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} class="small_font">{{ _('original context') }}</a></span>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<table class="result-table">
|
<table class="result-table{% for e in result.engines %} {{ e }}{% endfor %}">
|
||||||
{% for key, value in result.items() %}
|
{% for key, value in result.items() %}
|
||||||
{% if key in ['engine', 'engines', 'template', 'score', 'category', 'positions'] %}
|
{% if key in ['engine', 'engines', 'template', 'score', 'category', 'positions'] %}
|
||||||
{% continue %}
|
{% continue %}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="result {{ result.class }}">
|
<div class="result {{ result.class }}{% for e in result.engines %} {{ e }}{% endfor %}">
|
||||||
|
|
||||||
{% if "icon_"~result.engine~".ico" in favicons %}
|
{% if "icon_"~result.engine~".ico" in favicons %}
|
||||||
<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
|
<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="result torrent_result">
|
<div class="result torrent_result{% for e in result.engines %} {{ e }}{% endfor %}">
|
||||||
{% if "icon_"~result.engine~".ico" in favicons %}
|
{% if "icon_"~result.engine~".ico" in favicons %}
|
||||||
<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
|
<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="result">
|
<div class="result{% for e in result.engines %} {{ e }}{% endfor %}">
|
||||||
<h3 class="result_title">{% if "icon_"~result.engine~".ico" in favicons %}<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />{% 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">{% if "icon_"~result.engine~".ico" in favicons %}<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='img/icons/icon_'+result.engine+'.ico') }}" alt="{{result.engine}}" />{% endif %}<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><br />{% endif %}
|
{% if result.publishedDate %}<span class="published_date">{{ result.publishedDate }}</span><br />{% endif %}
|
||||||
<a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}><img class="thumbnail" src="{{ image_proxify(result.thumbnail) }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/></a>
|
<a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}><img class="thumbnail" src="{{ image_proxify(result.thumbnail) }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/></a>
|
||||||
|
|
|
@ -16,8 +16,12 @@
|
||||||
{%- if attribute.image -%}
|
{%- if attribute.image -%}
|
||||||
<td><img class="img-responsive" src="{{ image_proxify(attribute.image.src) }}" alt="{{ attribute.image.alt }}" /></td>
|
<td><img class="img-responsive" src="{{ image_proxify(attribute.image.src) }}" alt="{{ attribute.image.alt }}" /></td>
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
|
{% if attribute.label == 'Instance of' %}
|
||||||
|
<td><bdi><a href="https://wikidata.org/wiki/{{ attribute.value.id }}">{{ attribute.value.id }}</a></bdi></td>
|
||||||
|
{% else %}
|
||||||
<td><bdi>{{ attribute.value }}</bdi></td>
|
<td><bdi>{{ attribute.value }}</bdi></td>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor -%}
|
{% endfor -%}
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -72,6 +72,8 @@
|
||||||
</form>
|
</form>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
|
<br /><label><a href="{{ search_url() }}&format=rss">{{ _('RSS subscription') }}</a></label>
|
||||||
|
<div class="clearfix"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- /#sidebar_results -->
|
</div><!-- /#sidebar_results -->
|
||||||
|
@ -100,7 +102,7 @@
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
{% for result in results -%}
|
{% for result in results -%}
|
||||||
<div class="result {% if result['template'] %}result-{{ result.template|replace('.html', '') }}{% else %}result-default{% endif %}">
|
<div class="result {% if result['template'] %}result-{{ result.template|replace('.html', '') }}{% else %}result-default{% endif %}{% for e in result.engines %} {{ e }}{% endfor %}">
|
||||||
{%- set index = loop.index -%}
|
{%- set index = loop.index -%}
|
||||||
{%- if result.template -%}
|
{%- if result.template -%}
|
||||||
{% include get_result_template('oscar', result['template']) %}
|
{% include get_result_template('oscar', result['template']) %}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
<!-- Draw result header -->
|
<!-- Draw result header -->
|
||||||
{% macro result_header(result, favicons, image_proxify) -%}
|
{% macro result_header(result, favicons, image_proxify) -%}
|
||||||
<article class="result {% if result['template'] %}result-{{ result.template|replace('.html', '') }}{% else %}result-default{% endif %} {% if result['category'] %}category-{{ result['category'] }}{% endif %}">
|
<article class="result {% if result['template'] %}result-{{ result.template|replace('.html', '') }}{% else %}result-default{% endif %} {% if result['category'] %}category-{{ result['category'] }}{% endif %}{% for e in result.engines %} {{ e }}{% endfor %}">
|
||||||
{%- if result.img_src %}{{ result_open_link(result.url) }}<img class="image" src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}" title="{{ result.title|striptags }}" class="image" />{{ result_close_link() }}{% endif -%}
|
{%- if result.img_src %}{{ result_open_link(result.url) }}<img class="image" src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}" title="{{ result.title|striptags }}" class="image" />{{ result_close_link() }}{% endif -%}
|
||||||
{%- if result.thumbnail %}{{ result_open_link(result.url) }}<img class="thumbnail" src="{{ image_proxify(result.thumbnail) }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/>{{ result_close_link() }}{% endif -%}
|
{%- if result.thumbnail %}{{ result_open_link(result.url) }}<img class="thumbnail" src="{{ image_proxify(result.thumbnail) }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/>{{ result_close_link() }}{% endif -%}
|
||||||
<h3>{{ result_link(result.url, result.title|safe) }}</h3>
|
<h3>{{ result_link(result.url, result.title|safe) }}</h3>
|
||||||
|
|
Loading…
Reference in a new issue