summaryrefslogtreecommitdiff
path: root/searx/templates/oscar/result_templates/map.html
blob: 2c1e549e3cdbe10b6a8682056499ec0d4d673997 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{% from 'oscar/macros.html' import icon %}

<h4 class="result_header">{% if result['favicon'] %}<img width="32" height="32" class="favicon" src="static/{{ theme }}/img/icons/{{ result['favicon'] }}.png" /> {% endif %}<a href="{{ result.url }}">{{ result.title|safe }}</a></h4>

{% if result.publishedDate %}<time class="text-muted" datetime="{{ result.publishedDate }}" pubdate>{{ result.publishedDate }}</time>{% endif %}
<small><a class="text-info" href="https://web.archive.org/web/{{ result.pretty_url }}">{{ icon('link') }} {{ _('cached') }}</a></small>
{% if (result.latitude and result.longitude) or result.boundingbox %}
    <small> &bull; <a class="text-info btn-collapse collapsed searx_init_map cursor-pointer" data-toggle="collapse" data-target="#result-map-{{ index }}" data-leaflet-target="osm-map-{{ index }}" data-map-lon="{{ result.longitude }}" data-map-lat="{{ result.latitude }}" {% if result.boundingbox %}data-map-boundingbox='{{ result.boundingbox|tojson|safe }}'{% endif %} {% if result.geojson %}data-map-geojson='{{ result.geojson|tojson|safe }}'{% endif %} data-btn-text-collapsed="{{ _('show map') }}" data-btn-text-not-collapsed="{{ _('hide map') }}">{{ icon('globe') }} {{ _('show map') }}</a></small>
{% endif %}

{% if result.address %}
<p class="result-content result-adress" itemscope itemtype="http://schema.org/PostalAddress">
    {% if result.address.name %}
        <strong itemprop="name">{{ result.address.name }}</strong><br/>
    {% endif %}
    {% if result.address.road %}
        <span itemprop="streetAddress">
            {% if result.address.house_number %}{{ result.address.house_number }}, {% endif %}
            {{ result.address.road }}
        </span><br/>
    {% endif %}
    {% if result.address.locality %}
        <span itemprop="addressLocality">{{ result.address.locality }}</span>,
        {% if result.address.postcode %} <span itemprop="postalCode">{{ result.address.postcode }}</span>{% endif %}
        <br/>
    {% endif %}
    {% if result.address.country %}
        <span itemprop="addressCountry">{{ result.address.country }}</span>
    {% endif %}
</p><div class="clearfix"></div>
{% endif %}

{% if result.content %}<p class="result-content">{{ result.content|safe }}</p>{% endif %}

{% if (result.latitude and result.longitude) or result.boundingbox %}
    <div class="collapse" id="result-map-{{ index }}">
        <div style="height:300px; width:100%; margin: 10px 0;" id="osm-map-{{ index }}"></div>
    </div>
{% endif %}

<div class="clearfix"></div>

<span class="label label-default pull-right">{{ result.engine }}</span>
<p class="text-muted">{{ result.pretty_url }}</p>