diff --git a/pinry/core/static/core/css/pinry.css b/pinry/core/static/core/css/pinry.css index 81d3f9b..0b2a0e3 100644 --- a/pinry/core/static/core/css/pinry.css +++ b/pinry/core/static/core/css/pinry.css @@ -29,6 +29,30 @@ body { text-decoration: underline; } +.messages { + list-style-type: none; + top: 50px; + right: 10px; + position: absolute; + z-index: 200; +} + + .messages li { + margin: 10px 0; + padding: 18px 28px; + border: 1px solid #ccc; + font-size: 16px + } + + .messages li:hover { + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); + cursor: pointer; + } + #loader { margin-top: 70px; text-align: center; @@ -38,6 +62,7 @@ body { top: 70px; position: absolute; background: #eee; + z-index: 100; } .pin { diff --git a/pinry/core/static/core/js/messages.js b/pinry/core/static/core/js/messages.js new file mode 100644 index 0000000..0284a5c --- /dev/null +++ b/pinry/core/static/core/js/messages.js @@ -0,0 +1,12 @@ +$(document).ready(function() { + var delayTime = 3000, + alerts = $('.alert'); + + delayTime = delayTime + (alerts.length * 250); + + alerts.each(function() { + $(this).delay(delayTime).fadeOut('slow'); + delayTime -= 250; + console.log(delayTime); + }); +}); diff --git a/pinry/core/templates/core/base.html b/pinry/core/templates/core/base.html index ed71e56..ebb9397 100644 --- a/pinry/core/templates/core/base.html +++ b/pinry/core/templates/core/base.html @@ -34,6 +34,14 @@ + {% if messages %} +
+ {% endif %} + {% block yield %}{% endblock %} {% new_pin %} @@ -53,5 +61,6 @@ {% endif %} +