diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml index b275be8..e763752 100644 --- a/app/views/layouts/public.html.haml +++ b/app/views/layouts/public.html.haml @@ -1,99 +1,113 @@ !!! %html{:lang => "fr"} - %head - %meta{:"http-equiv" => "content-type" ,:content =>"text/html;charset=UTF-8" } - %title="Pharmacie Boissier - Rives sur Fures (38140) - "+ @title.to_s - -if @description - %meta{:name => "description", :content => @description} - -else - %meta{:name => "description", :content => "La pharmacie Boissier située à Rives sur Fures (38140) vous accueil et vous conseil."} - -if @keywords - %meta{:name => "keywords", :content => @keywords} - -else - %meta{:name => "keywords", :content => "pharmacie, Boissier, Rives, Renage, Réaumont, Saint Blaise, Charnècles, homéopathie, aromathérapie"} - - - - = stylesheet_link_tag 'public/public' - + %head + %meta{:"http-equiv" => "content-type" ,:content =>"text/html;charset=UTF-8" } + %title="Pharmacie Boissier - Rives sur Fures (38140) - "+ @title.to_s + -if @description + %meta{:name => "description", :content => @description} + -else + %meta{:name => "description", :content => "La pharmacie Boissier située à Rives sur Fures (38140) vous accueil et vous conseil."} + -if @keywords + %meta{:name => "keywords", :content => @keywords} + -else + %meta{:name => "keywords", :content => "pharmacie, Boissier, Rives, Renage, Réaumont, Saint Blaise, Charnècles, homéopathie, aromathérapie"} + + + + = stylesheet_link_tag 'public/public' + - =javascript_include_tag "https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" - - =javascript_include_tag 'public/public', :debug => true - - - - - - - - = csrf_meta_tag - - + + = csrf_meta_tag + + - - - - %body - #public - #header - .center - .menu - =render(:partial => "public/shared/first_menu") - =link_to image_tag('front/logo.png', :alt => "Pharmacie Boissier - Rives sur Fures - Pays Voironnais (à proximité de Renage, Réaumont, Saint Blaise du Buis, Charnècles)"), "/" - - =yield - - #footer - .center - .column - %h4 Horaires d'ouverture - %p - ="- le lundi de 14h à 19h " - %br - ="- du mardi au vendredi : 8h30 à 12h15 et 14h à 19h " - %br - ="- le samedi : 8h30 à 12h15 " - %p=image_tag('front/footer_logo.png') - .column - %h4 Nous contacter - %p - Pharmacie Boissier - %br - 63 rue du Plan - %br - 38140 Rives sur Fures + + + + + %body + #public + #header + .center + .menu + =render(:partial => "public/shared/first_menu") + =link_to image_tag('front/logo.png', :alt => "Pharmacie Boissier - Rives sur Fures - Pays Voironnais (à proximité de Renage, Réaumont, Saint Blaise du Buis, Charnècles)"), "/" + + =yield + + :javascript + $(".promotion_line .element").css("height", "auto"); + $(".promotion_line").each(function() { + promotion_pannel_height= 0; + $(this).find(".element").each(function() { + if ($(this).height() > promotion_pannel_height) { + return promotion_pannel_height = $(this).height(); + } + }); + promotion_pannel_height = promotion_pannel_height - 0 + $(this).find(".element").css("height", promotion_pannel_height+"px"); + }); + + + #footer + .center + .column + %h4 Horaires d'ouverture + %p + ="- le lundi de 14h à 19h " + %br + ="- du mardi au vendredi : 8h30 à 12h15 et 14h à 19h " + %br + ="- le samedi : 8h30 à 12h15 " + %p=image_tag('front/footer_logo.png') + .column + %h4 Nous contacter + %p + Pharmacie Boissier + %br + 63 rue du Plan + %br + 38140 Rives sur Fures - %p - Plan d’accès - %p - =link_to "contact@pharmacieboissier.com", "mailto:contact@pharmacieboissier.com" - %p - tel : 04 76 65 35 69 - %br - fax : 04 76 66 83 50 - .column.last - %h4 Pharmacie de garde - %p - =link_to "- consultez la liste des pharmacies de garde ", "/pages/infos-utiles/pharmacies-gardes.html" - %br - ="- appelez le 3915" - - - %h4=link_to "Déposez vos ordonnances", "/pages/ordonnances.html" + %p + Plan d’accès + %p + =link_to "contact@pharmacieboissier.com", "mailto:contact@pharmacieboissier.com" + %p + tel : 04 76 65 35 69 + %br + fax : 04 76 66 83 50 + .column.last + %h4 Pharmacie de garde + %p + =link_to "- consultez la liste des pharmacies de garde ", "/pages/infos-utiles/pharmacies-gardes.html" + %br + ="- appelez le 3915" + + + %h4=link_to "Déposez vos ordonnances", "/pages/ordonnances.html" - %p=link_to "ou commandez un produit directement en ligne !","/pages/ordonnances.html" - - .clear - \ No newline at end of file + %p=link_to "ou commandez un produit directement en ligne !","/pages/ordonnances.html" + + .clear + \ No newline at end of file diff --git a/app/views/portlets/dynamic_contents/_promotions-list.html.haml b/app/views/portlets/dynamic_contents/_promotions-list.html.haml index 846c63f..a4f88c7 100644 --- a/app/views/portlets/dynamic_contents/_promotions-list.html.haml +++ b/app/views/portlets/dynamic_contents/_promotions-list.html.haml @@ -1,9 +1,12 @@ -%h2 Cosmétiques -=render(:partial => "public/promotions/promotion", :collection => Promotion.where(:promotion_type_id => 2).order("month ASC, title ASC")) -%p{:style=> "clear:both"} -%h2 Bébés -=render(:partial => "public/promotions/promotion", :collection => Promotion.where(:promotion_type_id => 3).order("month ASC, title ASC")) -%p{:style=> "clear:both"} -%h2 Hygiène -=render(:partial => "public/promotions/promotion", :collection => Promotion.where(:promotion_type_id => 1).order("month ASC, title ASC")) -%p{:style=> "clear:both"} \ No newline at end of file +%h2{:id => "cosmetique"} Cosmétiques +.promotion_line + =render(:partial => "public/promotions/promotion", :collection => Promotion.where(:promotion_type_id => 2).order("month ASC, title ASC")) + %p{:style=> "clear:both"} +%h2{:id => "bebe"} Bébés +.promotion_line + =render(:partial => "public/promotions/promotion", :collection => Promotion.where(:promotion_type_id => 3).order("month ASC, title ASC")) + %p{:style=> "clear:both"} +%h2{:id => "hygiene"} Hygiène +.promotion_line + =render(:partial => "public/promotions/promotion", :collection => Promotion.where(:promotion_type_id => 1).order("month ASC, title ASC")) + %p{:style=> "clear:both"} \ 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 389c4cf..04f025f 100644 --- a/app/views/public/home/show.html.haml +++ b/app/views/public/home/show.html.haml @@ -1,83 +1,92 @@ #slider - -
- +
#home_ordonnance - .center - %p - =link_to "Nouveau ! déposez vos ordonnances ou commandez un produit directement en ligne !", "/pages/ordonnances.html" + .center + %p + =link_to "Nouveau ! déposez vos ordonnances ou commandez un produit directement en ligne !", "/pages/ordonnances.html" #home_folder - -block = @home.home_blocks.find_by_slug("right_block") - -if block and block.cible and block.cible_type == "Folder" - =image_tag((block.cible.image_file ? block.cible.image_file.file.large.medium.url : "")) - %h3 Dossier du mois - %h2=link_to block.cible.title, block.cible.cible_url - .description= simple_format block.cible.description - =link_to "Lire la suite", block.cible.cible_url, :class => "readmore" - %p{:style => "clear:both"} + -block = @home.home_blocks.find_by_slug("right_block") + -if block and block.cible and block.cible_type == "Folder" + =image_tag((block.cible.image_file ? block.cible.image_file.file.large.medium.url : "")) + %h3 Actualité + %h2=link_to block.cible.title, block.cible.cible_url + .description= simple_format block.cible.description + =link_to "Lire la suite", block.cible.cible_url, :class => "readmore" + %p{:style => "clear:both"} #home_promotions - %h2 - %p.center=link_to "PROMOTIONS (voir toutes les promotions)", "/pages/promotions.html" - - .center - .column_1.column - .cat - Cosmétiques - -if @home.promotion_1 - -promotion = @home.promotion_1 - - - - .img - =link_to image_tag(promotion.image_file.file.large.medium.small.thumb.url), "/pages/promotions.html" if promotion.image_file - .title - =link_to promotion.title, "/pages/promotions.html" - .description - =link_to raw(promotion.description), "/pages/promotions.html" - .column_2.column - .cat - Bébés - -if @home.promotion_2 - -promotion = @home.promotion_2 - - - - .img - =link_to image_tag(promotion.image_file.file.large.medium.small.thumb.url), "/pages/promotions.html" if promotion.image_file - .title - =link_to promotion.title, "/pages/promotions.html" - .description - =link_to raw(promotion.description), "/pages/promotions.html" - .column_3.column - .cat - Hygiène - -if @home.promotion_3 - -promotion = @home.promotion_3 - - - - .img - =link_to image_tag(promotion.image_file.file.large.medium.small.thumb.url), "/pages/promotions.html" if promotion.image_file - .title - =link_to promotion.title, "/pages/promotions.html" - .description - =link_to raw(promotion.description), "/pages/promotions.html" - - .clear \ No newline at end of file + %h2 + %p.center=link_to "PROMOTIONS (voir toutes les promotions)", "/pages/promotions.html" + + .center + .promotion_line + + .column_1.column.element + .cat + =link_to "Cosmétiques", "/pages/promotions.html#cosmetique" + + -if @home.promotion_1 + -promotion = @home.promotion_1 + + + + .img + =link_to image_tag(promotion.image_file.file.large.medium.small.thumb.url), "/pages/promotions.html#cosmetique" if promotion.image_file + .title + =link_to promotion.title, "/pages/promotions.html#cosmetique" + .description + =link_to raw(promotion.description), "/pages/promotions.html#cosmetique" + .column_2.column.element + .cat + =link_to "Bébés", "/pages/promotions.html#bebe" + + -if @home.promotion_2 + -promotion = @home.promotion_2 + + + + .img + =link_to image_tag(promotion.image_file.file.large.medium.small.thumb.url), "/pages/promotions.html#bebe" if promotion.image_file + .title + =link_to promotion.title, "/pages/promotions.html#bebe" + .description + =link_to raw(promotion.description), "/pages/promotions.html#bebe" + .column_3.column.element + .cat + =link_to "Hygiène", "/pages/promotions.html#hygiene" + + -if @home.promotion_3 + -promotion = @home.promotion_3 + + + + .img + =link_to image_tag(promotion.image_file.file.large.medium.small.thumb.url), "/pages/promotions.html#hygiene" if promotion.image_file + .title + =link_to promotion.title, "/pages/promotions.html#hygiene" + .description + =link_to raw(promotion.description), "/pages/promotions.html#hygiene" + + .clear +:css + .cat a{ + color:white !important; + } \ No newline at end of file diff --git a/app/views/public/promotions/_promotion.html.haml b/app/views/public/promotions/_promotion.html.haml index f7d9ba2..2ee1d27 100644 --- a/app/views/public/promotions/_promotion.html.haml +++ b/app/views/public/promotions/_promotion.html.haml @@ -1,11 +1,11 @@ -.promotion{:style => ("margin-right:0px" if (promotion_counter+1).modulo(3) == 0)} +.promotion.element{:style => ("margin-right:0px" if (promotion_counter+1).modulo(3) == 0)} .img =image_tag promotion.image_file.file.large.medium.small.thumb.url if promotion.image_file .title - %h3=promotion.title + =promotion.title .description =simple_format promotion.description .clear