This commit is contained in:
Nicolas Bally 2016-07-25 19:22:26 +02:00
parent b5690bc6f2
commit c25824013c
5 changed files with 59 additions and 12 deletions

View File

@ -16,7 +16,7 @@ $ ->
top = 0 top = 120
resize = () -> resize = () ->
#$(".bxslider li").each -> #$(".bxslider li").each ->
@ -64,11 +64,11 @@ $ ->
scroll_ajust = () -> scroll_ajust = () ->
var_scroll = $(window).scrollTop() var_scroll = $(window).scrollTop()
if var_scroll > top if var_scroll > top
$(".sub_menu_bar").addClass("move_top") $("#top_bar").addClass("move_top")
else else
$(".sub_menu_bar").removeClass("move_top") $("#top_bar").removeClass("move_top")
if var_scroll > 100 if var_scroll > top
$(".top_link").css $(".top_link").css
"opacity" : 1 "opacity" : 1
else else

View File

@ -97,6 +97,7 @@ body{
line-height: 22px; line-height: 22px;
color: black; color: black;
font-weight: 300; font-weight: 300;
padding-top:120px;
} }
@ -105,6 +106,7 @@ a{
} }
.center{ .center{
max-width:1450px; max-width:1450px;
padding:0 20px;
margin:auto; margin:auto;
} }
@ -170,8 +172,37 @@ h3{
} }
} }
#top_bar{
position:fixed;
top:0;
left:0;
right:0;
#logo-min{
display:none;
}
&.move_top{
#logo{
display:none;
}
#logo-min{
display:block;
margin:10px 0;
float:left;
}
.menu{
padding:16px 0;
position:static;
text-align:right;
}
}
}
#home_top{ #home_top{
background:url('/Image-home.png') no-repeat center center; background:url('/Image-home.png') no-repeat center center;
background-size:100%; background-size:100%;
background-size:cover; background-size:cover;
@ -510,5 +541,16 @@ padding:5px 8px;
} }
}
.resp-no-margin{
margin:0 !important;
}
#agence_bloc{
h2,h3{
text-align:center !important;
}
} }
} }

View File

@ -46,7 +46,7 @@ class MenuItem < ActiveRecord::Base
end end
end end
def cible_url(lang) def cible_url(lang=LangSite.first)
menu_item_path(:url => self.menu_item_langs.find_by_lang_site_id(lang.id).permalink, :lang => lang.slug) menu_item_path(:url => self.menu_item_langs.find_by_lang_site_id(lang.id).permalink, :lang => lang.slug)
end end

View File

@ -40,22 +40,27 @@
=flash[:alert] =flash[:alert]
.top .top#top_bar
.center .center
=link_to image_tag("/logo.png", :id => "logo"), "/"+@lang.slug+"/index.html" =link_to image_tag("/logo.png", :id => "logo"), "/"+@lang.slug+"/index.html"
=link_to image_tag("/logo-min.png", :id => "logo-min"), "/"+@lang.slug+"/index.html"
.menu .menu
%ul %ul
-MenuItem.where(:parent_id => nil, :menu_id => Menu.first.id).order(:position).each do |menu_item| -links = [["Home","main"],["L'agence","agence_bloc"],["Nos services","services-bloc"],["Un peu de nous","nous-bloc"], ["Contact","contact-bloc"]]
-description = "" -links.each do |link|
-description = menu_item.menu_content.description if menu_item.menu_content and menu_item.menu_content_type == "Page"
%li %li
=menu_item_link(menu_item) %a{:href => "#", :onclick => "$('html,body').animate({scrollTop: ($('#"+link[1].to_s+"').offset().top - 50)},'slow');return false;"}
=link[0]
.clean
#main{:class => (@menu_item.slug if @menu_item)} #main{:class => (@menu_item.slug if @menu_item)}
@ -88,7 +93,7 @@
.clear .clear
.contact_container .contact_container#contact-bloc
.center .center
%div{:style => "text-align:center;"} %div{:style => "text-align:center;"}
=image_tag "/tete-section.png", :style => "width:300px" =image_tag "/tete-section.png", :style => "width:300px"

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB