diff --git a/nyaa/static/js/main.js b/nyaa/static/js/main.js index 4cb58df..8eb3624 100644 --- a/nyaa/static/js/main.js +++ b/nyaa/static/js/main.js @@ -260,6 +260,16 @@ document.addEventListener("DOMContentLoaded", function() { } }); +// Info bubble stuff +document.addEventListener("DOMContentLoaded", function() { + var bubble = document.getElementById('infobubble'); + if (Number(localStorage.getItem('infobubble_dismiss_ts')) < Number(bubble.dataset.ts)) { + bubble.removeAttribute('hidden'); + } + $('#infobubble').on('close.bs.alert', function () { + localStorage.setItem('infobubble_dismiss_ts', bubble.dataset.ts); + }) +}); // Decode HTML entities (> etc), used for decoding comment markdown from escaped text function htmlDecode(input){ diff --git a/nyaa/templates/home.html b/nyaa/templates/home.html index ae44076..a80641e 100644 --- a/nyaa/templates/home.html +++ b/nyaa/templates/home.html @@ -12,10 +12,7 @@ {% block body %} {% if not search.term %} -
-

We welcome you to provide feedback on IRC at #nyaa-dev@irc.rizon.net

-

Our GitHub: https://github.com/nyaadevs - creating issues for features and faults is recommended!

-
+{% include "infobubble.html" %} {% endif %} {% include "search_results.html" %} diff --git a/nyaa/templates/infobubble.html b/nyaa/templates/infobubble.html new file mode 100644 index 0000000..68bda06 --- /dev/null +++ b/nyaa/templates/infobubble.html @@ -0,0 +1,16 @@ +{# 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 %} + + +{% endif %} diff --git a/nyaa/templates/infobubble_content.html b/nyaa/templates/infobubble_content.html new file mode 100644 index 0000000..735e86a --- /dev/null +++ b/nyaa/templates/infobubble_content.html @@ -0,0 +1 @@ +Put your announcements into infobubble_content.html!