More flash

This commit is contained in:
Petko Bordjukov 2014-08-31 13:08:14 +03:00
parent 9523fc3865
commit da8cd26222
7 changed files with 47 additions and 7 deletions

View File

@ -13,3 +13,12 @@
*= require_tree .
*= require_self
*/
#main {
font-size: 16px;
}
h1 {
margin: 0 0 1em 0;
font-size: 2em;
}

View File

@ -0,0 +1,18 @@
#flash_messages {
border: 1px solid #CCC;
background-color: #F1F1F1;
padding: 10px;
margin: 0px 100px 10px 100px;
div {
text-align: center;
}
.notice {
color: green;
}
.alert {
color: orange;
}
}

View File

@ -1,30 +1,31 @@
#main {
font-size: 16px;
}
h1 {
margin: 0 0 1em 0;
font-size: 2em;
.alert-error {
color: red;
}
.input {
position: relative;
margin: 0 0 1em 0;
border-top: 0.1em dotted #999;
padding: 1em 0;
}
.input label {
font-size: 1em;
display: block;
width: 12em;
float: left;
}
.input input, .input textarea, .input select {
font-size: 1em;
width: 20em;
float: left;
}
.input textarea {
height: 8em;
}
.input .hint, .input .error {
display: block;
clear: both;
@ -34,11 +35,13 @@ h1 {
margin: 0 0 0 16em;
padding: 1em 0 0 0;
}
.input .error {
font-style: normal;
padding: 1em 0 0 0;
color: #F00;
}
.input .error::before {
content: "";
display: inline-block;
@ -46,6 +49,7 @@ h1 {
margin: 0 0.2em 0 0;
transform: translate(0, 0.1em);
}
.btn {
display: block;
margin: 2em 0 0 13em;
@ -63,9 +67,11 @@ h1 {
transition: background 200ms, border 200ms, transform 200ms;
-webkit-transition: background 200ms, border 200ms, transform 200ms;
}
.btn:hover {
background: #152551;
}
.btn:active {
background: #597AD2;
border-bottom: 0.2em solid #000;

View File

@ -26,6 +26,7 @@
</header>
<div id="main">
<%= render('/shared/flash_messages') unless flash.empty? %>
<%= yield %>
</div>
</div>

View File

@ -0,0 +1,3 @@
div#flash_messages
- flash.each do |key, value|
= content_tag :div, value, class: "flash #{key}"

View File

@ -0,0 +1,3 @@
div#flash_messages
- flash.each do |key, value|
= content_tag :div, value, class: "flash #{key}"

View File

@ -6,7 +6,7 @@ bg:
text: Задължително поле
mark: '*'
error_notification:
default_message: 'Моля разгледайте посочените грешките във формуляра:'
default_message: 'Моля разгледайте посочените грешки във формуляра:'
hints:
user:
email: Имейл адресът Ви. Ще бъде видим само от организаторите.