lungo.widgets.notification.less 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. @import "mixins.less";
  2. @import "constants.less";
  3. @notification_opacity: rgba(0,0,0,0.3);
  4. @defaultTrasition : @easeOutSine;
  5. @keyframe: 300ms;
  6. @modal_opacity: rgba(0,0,0,0.8);
  7. @modal_size: 114px;
  8. @modal_size_middle: 64px;
  9. @modal_border_radius: 1px;
  10. @notify_font_color: #555;
  11. @notify_font_shadow: 0 1px 0px #fff;
  12. @font_color: #fff;
  13. .notification {
  14. position: absolute;
  15. width: 100%;
  16. height: 100%;
  17. z-index: 3;
  18. background: none;
  19. font-size: 0.9em;
  20. color: @font_color;
  21. display: none;
  22. &.modal { background-color: @notification_opacity; }
  23. & .window {
  24. position: relative;
  25. opacity: 0;
  26. .transition(all @keyframe @defaultTrasition);
  27. &.show {
  28. opacity: 1;
  29. .transition-delay(@keyframe);
  30. }
  31. &:not(.special) {
  32. left: 50%;
  33. top: 50%;
  34. width: @modal_size;
  35. margin: -@modal_size_middle auto auto -@modal_size_middle;
  36. padding: 8px;
  37. background-color: @modal_opacity;
  38. text-align: center;
  39. .border-radius(@modal_border_radius);
  40. .transform(translate3d(0, 10%, 0));
  41. &.show { .transform(translate3d(0, 0, 0)); }
  42. & .icon {
  43. display: block;
  44. font-size: 5.0em;
  45. &.loading {
  46. margin-top: 24px;
  47. margin-bottom: 24px;
  48. }
  49. }
  50. & strong {
  51. display: block;
  52. margin-bottom: 4px;
  53. }
  54. }
  55. &.confirm, &.notify {
  56. .transform(translate3d(0, -150%, 0));
  57. &.show { .transform(translate3d(0, 0%, 0)); }
  58. & .icon {
  59. float: left;
  60. font-size: 2.5em;
  61. margin-right: 8px;
  62. }
  63. & strong {
  64. line-height: 1.5em;
  65. }
  66. }
  67. &.confirm {
  68. opacity: 1;
  69. padding: 10px 12px;
  70. top: 0;
  71. top: 42px;
  72. background: #333;
  73. & hr {
  74. margin: 10px 0;
  75. height: 1px;
  76. background: rgba(0,0,0,0.75);
  77. .box-shadow(0 1px 0 rgba(255,255,255,0.25));
  78. }
  79. & .button {
  80. width: 42%;
  81. font-size: 15px;
  82. line-height: 40px;
  83. &:last-child {float: right;}
  84. }
  85. }
  86. &.notify {
  87. padding: 3px 0px 7px 7px;
  88. top: 0;
  89. color: @notify_font_color;
  90. text-shadow: @notify_font_shadow;
  91. .box-shadow(0px 1px 3px rgba(0,0,0,0.5));
  92. &.error, &.alert, &.success {
  93. color: @font_color;
  94. text-shadow: 0 1px 0px rgba(0,0,0,0.1);
  95. }
  96. &.error { .linear-gradient(top, ~','@red 0%, ~','@red-active 85%); }
  97. &.alert { .linear-gradient(top, ~','@yellow 0%, ~','@yellow-active 85%); }
  98. &.success { .linear-gradient(top, ~','@green 0%, ~','@green-active 85%); }
  99. }
  100. &.url {
  101. left: 0%;
  102. top: 00%;
  103. width: 280px;
  104. height: auto;
  105. margin: 64px auto 0px;
  106. padding: 0px;
  107. .transform(translate3d(0, 75%, 0));
  108. & .close {
  109. position: absolute;
  110. top: -14px;
  111. right: -14px;
  112. font-size: 14px;
  113. line-height: 24px;
  114. font-weight: normal;
  115. width: 24px;
  116. height: 24px;
  117. background: #000;
  118. border-radius: 14px;
  119. border: solid 2px #fff;
  120. box-shadow: 0 0 4px black;
  121. }
  122. }
  123. }
  124. }
  125. .notification .window.working span{
  126. -webkit-animation: notification-working 1s infinite;
  127. }
  128. @-webkit-keyframes notification-working {
  129. 0% {opacity: 1;}
  130. 50% {opacity: 0;}
  131. 100% {opacity: 1;}
  132. }