diff --git a/app/assets/stylesheets/public/public.css.scss b/app/assets/stylesheets/public/public.css.scss index 41d3f14..8b7012d 100644 --- a/app/assets/stylesheets/public/public.css.scss +++ b/app/assets/stylesheets/public/public.css.scss @@ -492,6 +492,19 @@ ol { } .column{ + + .cat{ + background:#8fca46; + text-transform:uppercase; + color:white; + font-weight:bold; + font-size:1.2em; + margin-top:0px; + margin-bottom:0px; + margin:-10px; + padding:10px; + + } text-align:center; font-size:1.1em; *{ @@ -507,14 +520,31 @@ ol { padding:10px; margin-right:29px; - img{ - height:245px; + .img{ + + height:245px; margin:20px 0px; + img{ + max-height:245px; + max-width:100%; + } } .title{ - text-transform:uppercase; - + background:#8fca46; + text-transform:uppercase; + color:white; + a{ + color:white; + } + font-weight:bold; + font-size:1.2em; + margin-top:0px; + + margin:0px -10px; + padding:10px; + + } @@ -698,7 +728,7 @@ padding:5px; } } text-align:center; } - height:410px; + min-height:410px; float:left; border:3px solid #8fca46; width:288px; @@ -706,15 +736,34 @@ padding:5px; } } padding:10px; margin-right:29px; - img{ - height:245px; + .img{ + + height:245px; margin:20px 0px; + img{ + max-height:245px; + max-width:100%; + } + } + + .title{ + background:#8fca46; + text-transform:uppercase; + color:white; + a{ + color:white; + } + font-weight:bold; + font-size:1.2em; + margin-top:0px; + + margin:0px -10px; + padding:10px; + + } - .title{ - text-transform:uppercase; - - } + } diff --git a/app/views/admin/promotions/_form.html.haml b/app/views/admin/promotions/_form.html.haml index 3770839..634f919 100644 --- a/app/views/admin/promotions/_form.html.haml +++ b/app/views/admin/promotions/_form.html.haml @@ -5,7 +5,7 @@ = form.input :title, :label => "Titre :" = form.input :month, :label => "Mois :", :order => [:month, :year] - = form.input :description, :label => "Description courte :", :as => :text, :class => "text_editor" + = form.input :description, :label => "Description courte :", :as => :text, :input_html => {:class => "text_editor"} %li.string.optional @@ -29,3 +29,10 @@ .actions = form.submit "Sauvegarder" + + :javascript + $(".text_editor").each(function() { + + + auto_tiny_mce($(this)); + }); \ No newline at end of file diff --git a/app/views/admin/promotions/edit.js.erb b/app/views/admin/promotions/edit.js.erb index 06a7cbc..47ca148 100644 --- a/app/views/admin/promotions/edit.js.erb +++ b/app/views/admin/promotions/edit.js.erb @@ -1 +1 @@ -show_pane_hover("<%= escape_javascript(render(:partial => "form"))%>",550,600); \ No newline at end of file +show_pane_hover("<%= escape_javascript(render(:partial => "form"))%>",800,600); \ No newline at end of file diff --git a/app/views/admin/promotions/new.js.erb b/app/views/admin/promotions/new.js.erb index 06a7cbc..47ca148 100644 --- a/app/views/admin/promotions/new.js.erb +++ b/app/views/admin/promotions/new.js.erb @@ -1 +1 @@ -show_pane_hover("<%= escape_javascript(render(:partial => "form"))%>",550,600); \ No newline at end of file +show_pane_hover("<%= escape_javascript(render(:partial => "form"))%>",800,600); \ No newline at end of file diff --git a/app/views/public/home/show.html.haml b/app/views/public/home/show.html.haml index 3071c8e..389c4cf 100644 --- a/app/views/public/home/show.html.haml +++ b/app/views/public/home/show.html.haml @@ -50,7 +50,7 @@ .title =link_to promotion.title, "/pages/promotions.html" .description - =link_to simple_format(promotion.description), "/pages/promotions.html" + =link_to raw(promotion.description), "/pages/promotions.html" .column_2.column .cat Bébés @@ -64,7 +64,7 @@ .title =link_to promotion.title, "/pages/promotions.html" .description - =link_to simple_format(promotion.description), "/pages/promotions.html" + =link_to raw(promotion.description), "/pages/promotions.html" .column_3.column .cat Hygiène @@ -78,6 +78,6 @@ .title =link_to promotion.title, "/pages/promotions.html" .description - =link_to simple_format(promotion.description), "/pages/promotions.html" + =link_to raw(promotion.description), "/pages/promotions.html" .clear \ No newline at end of file