1
0
mirror of https://github.com/searxng/searxng.git synced 2024-09-13 08:40:16 +02:00
searxng/searx/templates/oscar/result_templates/map.html
Thomas Pointhuber 740594a4b7 [enh] oscar_template: initial osm-map support for map results
* TODO: remove leaflet.min.css if not required
2014-11-02 13:00:28 +01:00

19 lines
1.4 KiB
HTML

<h3>{% 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></h3>
{% if result.publishedDate %}<time class="text-muted" datetime="{{ result.publishedDate }}" pubdate>{{ result.publishedDate }}</time>{% endif %}
{% if result.content %}<p>{{ result.content|safe }}</p>{% endif %}
{% if result.latitude and result.longitude %}
<button type="button" class="btn btn-default btn-collapse collapsed searx_init_map" 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') }}">{{ _('Show Map') }}</button>
<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>