diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index a443db3..ab1028f 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -13,3 +13,12 @@ *= require_tree . *= require_self */ + +#main { + font-size: 16px; +} + +h1 { + margin: 0 0 1em 0; + font-size: 2em; +} diff --git a/app/assets/stylesheets/flash_messages.css.scss b/app/assets/stylesheets/flash_messages.css.scss new file mode 100644 index 0000000..b47a0b8 --- /dev/null +++ b/app/assets/stylesheets/flash_messages.css.scss @@ -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; + } +} \ No newline at end of file diff --git a/app/assets/stylesheets/forms.css.scss b/app/assets/stylesheets/forms.css.scss index 0a51e9d..ebc16a8 100644 --- a/app/assets/stylesheets/forms.css.scss +++ b/app/assets/stylesheets/forms.css.scss @@ -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; diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index cb9643b..55074fb 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -26,6 +26,7 @@
+ <%= render('/shared/flash_messages') unless flash.empty? %> <%= yield %>
diff --git a/app/views/shared/_flash_messages b/app/views/shared/_flash_messages new file mode 100644 index 0000000..c94abd1 --- /dev/null +++ b/app/views/shared/_flash_messages @@ -0,0 +1,3 @@ +div#flash_messages + - flash.each do |key, value| + = content_tag :div, value, class: "flash #{key}" diff --git a/app/views/shared/_flash_messages.html.slim b/app/views/shared/_flash_messages.html.slim new file mode 100644 index 0000000..c94abd1 --- /dev/null +++ b/app/views/shared/_flash_messages.html.slim @@ -0,0 +1,3 @@ +div#flash_messages + - flash.each do |key, value| + = content_tag :div, value, class: "flash #{key}" diff --git a/config/locales/simple_form.bg.yml b/config/locales/simple_form.bg.yml index 4f63345..80cf975 100644 --- a/config/locales/simple_form.bg.yml +++ b/config/locales/simple_form.bg.yml @@ -6,7 +6,7 @@ bg: text: Задължително поле mark: '*' error_notification: - default_message: 'Моля разгледайте посочените грешките във формуляра:' + default_message: 'Моля разгледайте посочените грешки във формуляра:' hints: user: email: Имейл адресът Ви. Ще бъде видим само от организаторите.