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 %}