diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee index bf741df..916e04a 100644 --- a/app/assets/javascripts/application.js.coffee +++ b/app/assets/javascripts/application.js.coffee @@ -13,7 +13,8 @@ bottom = 0 prev_link = "" $ -> - + $(".top_link").click -> + $('html,body').animate({scrollTop: 0},'slow'); position_img_now = -> @@ -175,13 +176,17 @@ $ -> $(".slider .slides").superslides inherit_width_from: ".slider" inherit_height_from: ".slider" - play: 2000 - animation_speed: 2500 + play: 6000 + animation_speed: 3000 animation_easing: "swing" @scroll_ajust = -> + + var_scroll = $(window).scrollTop() + + if( $(this).scrollTop() <= 300 ) top = 300 - $(this).scrollTop() $("#menu").removeClass "scroll" @@ -191,6 +196,18 @@ $ -> $("#menu").css top : top + + + if var_scroll > 100 + $(".top_link").css + "opacity" : 1 + else + $(".top_link").css + "opacity" : 0 + + + + $(document).on "scroll", () -> @@ -201,6 +218,6 @@ $(document).on "touchmove", () -> scroll_ajust() - - - \ No newline at end of file + + + diff --git a/app/assets/stylesheets/public.scss b/app/assets/stylesheets/public.scss index cfb2c4b..888c8b3 100644 --- a/app/assets/stylesheets/public.scss +++ b/app/assets/stylesheets/public.scss @@ -142,7 +142,9 @@ h3{ } #body{ + margin:0 20px; margin-top:30px; + } .clear{ @@ -530,19 +532,27 @@ cursor:pointer #bottom { - background: #D5F6FE; - height: 182px; - color: #82827d; + background: #f9f5ee; + padding:20px; + color: #603a18; width: 100%; text-align: center; - table { - width: 100%; - margin: auto; - text-align: left; - a { - color: #82827d; - text-decoration: none; } } } + + text-align: left; + a { + color: #603a18; + text-decoration: none; + + } + + .col{ + float:left; + } +} + + + #sidebar{ width:300px; @@ -641,3 +651,47 @@ cursor:pointer } +.socials_links{ + position:fixed; + bottom:300px; + right:0; + + .link{ + display:block; + + width:50px; + text-align:center; + padding:12px 0; + position:relative; + + + color:white; + font-size:1.2em; + &.twitter{ + background:rgba(54,174,218,1); + } + + &.facebook{ + + background:rgba(60,90,150,1); + } + + + + } + + .top_link{ + opacity:0; + transition-duration:0.5s; + padding:3px 7px; + font-size:2.5em; + display:block; + cursor:pointer; + color:rgba(215,215,215,1); + &:hover{ + color:rgba(180,180,180,1); + } + } + + +} \ No newline at end of file diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml index aab5f7d..dc63d45 100644 --- a/app/views/layouts/public.html.haml +++ b/app/views/layouts/public.html.haml @@ -117,7 +117,8 @@ - #body{:class => ("with_sidebar" if first_level_menu.children.size > 0)}=yield + #body{:class => ("with_sidebar" if first_level_menu and first_level_menu.children.size > 0)} + =yield .clear -if @menu_item and @menu_item.id == 1 @@ -164,44 +165,59 @@ #bottom - %table - %tr - %td{:style => "border:0px solid ;width:40%;padding:20px;padding-top:10px; "} - %h3 Visites sur réservation : - - de 9h à 12h et de 14h à 17h - %br - Ouvert tous les jours de l'année. - %br - - - %br - Groupes à partir de 6 personnes, maximum - %br - 30 personnes. Au-delà, nous consulter. - - %td{:style => "border:0px solid ; width:20%;text-align:center;"} - %h3 Ballalama - - 80 chemin du champ de l’Orme - %br - 38140 Réaumont - %br - %br - %br - %br - = link_to "Mentions légales","/mentions-legales" - - %td{:style => "border:0px solid ;width:40%;text-align:right; "} - - - = link_to(image_tag( "/plan.png", :alt => "Ballalama élevage et promenades en lama à Réaumont", :style => "margin-right:10px"), "/pages/plan-dacces.html") + .col{:style => "width:40%;"} + %h3 Visites sur réservation : + + de 9h à 12h et de 14h à 17h + %br + Ouvert tous les jours de l'année. + %br + %br + Tel : 04 76 91 03 34 + %br + %br + N° Siret : 430 323 113 00018 + + - .clear + + + .col{:style => "width:20%;text-align:center;"} + %h3 Ballalama + + 80 chemin du champ de l’Orme + %br + 38140 Réaumont + %br + + =link_to image_tag("/afla.png", :class => "afla"), "http://www.lamas-alpagas.org/", :target => "_blank" +    + =link_to image_tag("/ferme.png", :class => "ferme"), "http://www.bienvenue-a-la-ferme.com/", :target => "_blank" + .clear + + + %br + = link_to "Mentions légales","/mentions-legales" + + .col{:style => "width:40%;text-align:right;"} + + + = link_to(image_tag( "/plan.png", :alt => "Ballalama élevage et promenades en lama à Réaumont", :style => "margin-right:10px"), "/pages/plan-dacces.html") + %br + + + .clear + + + .socials_links + .top_link + =i(:"arrow-circle-o-up") + + diff --git a/app/views/public/shared/_first_menu.html.haml b/app/views/public/shared/_first_menu.html.haml index 7b25e47..2719297 100644 --- a/app/views/public/shared/_first_menu.html.haml +++ b/app/views/public/shared/_first_menu.html.haml @@ -1,4 +1,5 @@ .links + =link_to ic(:home), "/", :class => "link" =link_to "Actualités", public_articles_path(), :class => "link" -MenuItem.where(:parent_id => nil, :menu_id => Menu.first.id).order(:position).each do |menu_item| =menu_item_link(menu_item) diff --git a/public/afla.png b/public/afla.png new file mode 100644 index 0000000..50809ef Binary files /dev/null and b/public/afla.png differ diff --git a/public/ferme.png b/public/ferme.png new file mode 100644 index 0000000..93b2edc Binary files /dev/null and b/public/ferme.png differ diff --git a/public/slide1.jpg b/public/slide1.jpg index 553966a..ed5917f 100644 Binary files a/public/slide1.jpg and b/public/slide1.jpg differ diff --git a/public/slide2.jpg b/public/slide2.jpg index c53b5cf..ddfd9da 100644 Binary files a/public/slide2.jpg and b/public/slide2.jpg differ diff --git a/public/slide3.jpg b/public/slide3.jpg index be48574..e47ac79 100644 Binary files a/public/slide3.jpg and b/public/slide3.jpg differ