1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-10-31 23:25:58 +00:00
nyaa/nyaa/templates/infobubble.html
Nicolas F 38f8880966 Make blue info bubble dismissible, configurable (#526)
Infobubble text is now in a separate file, along with a timestamp
in the main file, so that changes to it don't result in merge
conflicts too often.

We also add some JS to make the bubble dismissible, keeping track
of the last timestamp that was dismissed in localstorage.

A timestamp of 0 disables the infobubble altogether.
2019-04-08 19:50:30 -07:00

17 lines
586 B
HTML

{# Update this to a larger timestamp if you change your announcement #}
{# A value of 0 disables the announcements altogether #}
{% set info_ts = 0 %}
{% if info_ts > 0 %}
<div class="alert alert-info alert-dismissible" id="infobubble" data-ts='{{ info_ts }}' hidden>
{% include 'infobubble_content.html' %}
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<noscript>
<div class="alert alert-info" id="infobubble-noscript">
{% include 'infobubble_content.html' %}
</div>
</noscript>
{% endif %}