flash messages look nicer

This commit is contained in:
danielvincent 2010-10-09 22:32:39 -07:00
parent 1ac410b590
commit b313272ff3
3 changed files with 47 additions and 29 deletions

View file

@ -12,7 +12,9 @@ $(document).ready(function(){
$("label").inFieldLabels(); $("label").inFieldLabels();
$('#flash_notice, #flash_error, #flash_alert').delay(2500).slideUp(130); $('#flash_notice, #flash_error, #flash_alert').delay(4000).animate({
top: -100
}, $(this).remove());
$("div.image_cycle").cycle({ $("div.image_cycle").cycle({
fx: 'fade', fx: 'fade',

View file

@ -32,24 +32,27 @@ h3 {
#flash_error, #flash_error,
#flash_alert { #flash_alert {
z-index: 100; z-index: 100;
top: 32px; position: fixed;
position: absolute; color: white;
color: black; top: 0;
width: 400px; left: 0;
margin: 0 0 0 -200px; width: 100%;
left: 50%; padding: 1em;
text-align: center; box-shadow: 0 1px 2px #333333;
font-size: 14px; -moz-box-shadow: 0 1px 2px #333333;
padding: 3px 0; } -webkit-box-shadow: 0 1px 2px #333333;
font-weight: bold; }
#flash_notice { #flash_notice {
background-color: #ccffcc; background-color: rgba(127, 255, 36, 0.85);
border: solid 1px #66cc66; } border-bottom: solid 1px #66cc66;
text-shadow: 0 1px #66cc66; }
#flash_error, #flash_error,
#flash_alert { #flash_alert {
background-color: #ffcccc; background-color: rgba(208, 49, 43, 0.85);
border: solid 1px #cc6666; } border-bottom: solid 1px #cc6666;
text-shadow: 0 1px #cc6666; }
.fieldWithErrors { .fieldWithErrors {
display: inline; } display: inline; }

View file

@ -39,26 +39,39 @@ h3
#flash_error, #flash_error,
#flash_alert #flash_alert
:z-index 100 :z-index 100
:top 32px :position fixed
:position absolute :color #fff
:color #000
:width 400px :top 0
:margin 0 0 0 -200px :left 0
:left 50%
:text :width 100%
:align center
:padding 1em
:box-shadow 0 1px 2px #333
:-moz-box-shadow 0 1px 2px #333
:-webkit-box-shadow 0 1px 2px #333
:font :font
:size 14px :weight bold
:padding 3px 0
#flash_notice #flash_notice
:background-color #CFC :background
:border solid 1px #6C6 :color rgba(127,255,36,0.85)
:border
:bottom solid 1px #6C6
:text
:shadow 0 1px #6C6
#flash_error, #flash_error,
#flash_alert #flash_alert
:background-color #FCC :background
:border solid 1px #C66 :color rgba(208,49,43,0.85)
:border
:bottom solid 1px #C66
:text
:shadow 0 1px #C66
.fieldWithErrors .fieldWithErrors
:display inline :display inline