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

View File

@ -26,6 +26,7 @@
</header> </header>
<div id="main"> <div id="main">
<%= render('/shared/flash_messages') unless flash.empty? %>
<%= yield %> <%= yield %>
</div> </div>
</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: Задължително поле text: Задължително поле
mark: '*' mark: '*'
error_notification: error_notification:
default_message: 'Моля разгледайте посочените грешките във формуляра:' default_message: 'Моля разгледайте посочените грешки във формуляра:'
hints: hints:
user: user:
email: Имейл адресът Ви. Ще бъде видим само от организаторите. email: Имейл адресът Ви. Ще бъде видим само от организаторите.