diff --git a/app/assets/javascripts/public.js.coffee b/app/assets/javascripts/public.js.coffee
index 6556f13..7e2d48a 100644
--- a/app/assets/javascripts/public.js.coffee
+++ b/app/assets/javascripts/public.js.coffee
@@ -75,7 +75,6 @@ top = 20
@resize = () ->
-
top = $("#menu_top_container").outerHeight()
#$("body").css("padding-top", $("#menu_top_container").outerHeight()+"px");
diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml
index 3083115..0dc73e2 100644
--- a/app/views/layouts/public.html.haml
+++ b/app/views/layouts/public.html.haml
@@ -227,108 +227,42 @@
#slider_left
.slider_home
-
+ #bxslider
- -@home_slider = HomeSlider.find_by_slug("home")
- -@date = Time.now
- -if @home_slider
- -@home_slides_simu = @home_slider.home_slider_slides.where(:enabled => true)
- -@home_slides_simu = @home_slides_simu.where("start_at IS NULL or start_at <= ?",@date)
- -@home_slides_simu = @home_slides_simu.where("end_at IS NULL or end_at >= ?",@date)
- -@home_slides_simu = @home_slides_simu.order(:position)
- -@home_slides_simu = @home_slides_simu.joins(:lang_sites).where("lang_sites.id = ?", @lang.id)
- -@home_slides_simu.each do |home_slider_slide|
- -if home_slider_slide.image_file
+ -@home_slider = HomeSlider.find_by_slug("home")
+ -@date = Time.now
+ -if @home_slider
+ -@home_slides_simu = @home_slider.home_slider_slides.where(:enabled => true)
+ -@home_slides_simu = @home_slides_simu.where("start_at IS NULL or start_at <= ?",@date)
+ -@home_slides_simu = @home_slides_simu.where("end_at IS NULL or end_at >= ?",@date)
+ -@home_slides_simu = @home_slides_simu.order(:position)
+ -@home_slides_simu = @home_slides_simu.joins(:lang_sites).where("lang_sites.id = ?", @lang.id)
+ -@home_slides_simu.each do |home_slider_slide|
+ -if home_slider_slide.image_file
- %li
-
+
+ -url = ""
+ -url = home_slider_slide.image_file.file.large.url
+ =link_to home_slider_slide.url.to_s do
+ .slide_inner.with_ratio{:style => "background:url('#{url}') black no-repeat center center;background-size:100%;background-size:cover;", :data => {:ratio => 0.45}}
+
- -if home_slider_slide.url?
- =link_to home_slider_slide.url do
-
- =image_tag(home_slider_slide.image_file.file.large.url)
- -else
-
- =image_tag(home_slider_slide.image_file.file.large.url)
-
-
-
-
-
-
- :scss
-
- #clip_header{
- cursor:pointer;
- }
- #bxslider{
- iframe{
- //height:416px;
- //width:740px;
- }
- .inner{
-
- //height:416px;
- max-width:75%;
- width:75%;
- position:relative;
- }
-
- }
-
- #slider_banner{
-
- //height:416px;
- position:relative;
-
-
- .right_slider{
-
-
-
- #slider_right{
- background:white;
-
- box-sizing:border-box;
- }
-
- }
- .slider_home{
- li{
- //height:506px;
- overflow:hidden;
- background:rgb(50,50,50);
- left:0;
-
- }
- }
- }
:javascript
- var slider;
- slider = $('#bxslider').bxSlider({
- video: true,
- auto: true,
- pause:4500,
- speed:2000,
- easing: 'ease',
- mode: 'fade',
- useCSS: false,
- startSlide:0,
- infiniteLoop:true,
-
+ $(document).ready(function(){
+ $('#bxslider').bxSlider({
+ nextText: '>',
+ prevText: '<'
+ });
});
-
-
-
@@ -350,15 +284,7 @@
.clear
-
- :coffeescript
- resize_corps = () ->
- test = $(".width_sidebar").width() - $(".width_sidebar #sidebar").outerWidth() - 1
- $(".width_sidebar #corps").css
- "width" :test+"px"
- resize_corps()
- $(window).on "resize", ->
- resize_corps()
+
:javascript
resize()