From af0fab5d8168768914de59b61c2d1926478a5f2e Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Thu, 20 Oct 2016 17:12:17 +0200 Subject: [PATCH] Style notifications --- src/templates/attract/_notifications.jade | 4 ++++ src/templates/attract/layout.jade | 10 ++++++++++ 2 files changed, 14 insertions(+) create mode 100644 src/templates/attract/_notifications.jade diff --git a/src/templates/attract/_notifications.jade b/src/templates/attract/_notifications.jade new file mode 100644 index 0000000..cf1b56e --- /dev/null +++ b/src/templates/attract/_notifications.jade @@ -0,0 +1,4 @@ +ul#notifications-list + li.nc-item + #notifications-loader + i.pi-spin.spin diff --git a/src/templates/attract/layout.jade b/src/templates/attract/layout.jade index ed6d722..06792d0 100644 --- a/src/templates/attract/layout.jade +++ b/src/templates/attract/layout.jade @@ -186,4 +186,14 @@ html(lang="en") {% if project %} $('.help').openModalUrl('Help', "{{ url_for('attract.help', project_url=project.url) }}"); {% endif %} + + $(document).ready(function() { + {% if current_user.is_authenticated %} + getNotificationsLoop(); // Check for new notifications in the background + + // Resize #notifications and change overflow for scrollbars + $(window).on("resize", function() { notificationsResize(); }); + {% endif %} + }); + | {% block footer_scripts %}{% endblock %}