2018-06-11 20:44:10 +02:00
|
|
|
|
{% with alerte=json.data.entries.0 %}
|
|
|
|
|
{% if alerte %}
|
|
|
|
|
<div id="alert" data-urid="{{alerte.link|slugify}}" style="display: none">
|
|
|
|
|
<div class="tile airquality">
|
|
|
|
|
<div class="tile-head">
|
|
|
|
|
<div class="tile-title">
|
2023-02-01 11:30:28 +01:00
|
|
|
|
<h2 class="cell--title"><a href="{% firstof alerte.links.0.href "http://www.air-rhonealpes.fr/" %}">{{alerte.title}}</a></h2>
|
2018-06-11 20:44:10 +02:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tile-content">
|
|
|
|
|
{{alerte.summary|truncatechars_html:800|safe}}
|
|
|
|
|
</div>
|
2019-05-23 17:32:46 +02:00
|
|
|
|
|
|
|
|
|
{% if alerte.links.0.href %}
|
2019-07-09 17:05:27 +02:00
|
|
|
|
<p class="more-info"><a class="action-more-info"
|
2020-08-19 11:14:32 +02:00
|
|
|
|
title="Plus d’infos (ouverture dans une nouvelle fenêtre)"
|
|
|
|
|
target="_blank" rel="noopener" href="{{alerte.links.0.href}}">d’infos</a></p>
|
2019-05-23 17:32:46 +02:00
|
|
|
|
{% endif %}
|
|
|
|
|
|
2018-06-11 20:44:10 +02:00
|
|
|
|
</div>
|
|
|
|
|
<script>
|
2019-04-30 09:29:01 +02:00
|
|
|
|
$(function() {
|
|
|
|
|
if (window.localStorage.getItem('alert-' + $('#alert').data('urid')) != 'acked') {
|
|
|
|
|
$('#alert').dialog({
|
|
|
|
|
title: 'Information prioritaire',
|
|
|
|
|
modal: true,
|
|
|
|
|
width: 'auto',
|
|
|
|
|
close: function(event, ui) {
|
|
|
|
|
window.localStorage.setItem('alert-' + $('#alert').data('urid'), 'acked');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
2018-06-11 20:44:10 +02:00
|
|
|
|
</script>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% endwith %}
|