From d7147e8d700c2937c58b4cba6d8ed70a2e273b24 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Wed, 30 Sep 2015 20:44:17 +0200 Subject: [PATCH] design + contact --- app/assets/javascripts/public.js.coffee | 18 ++++++++- app/assets/stylesheets/public.scss | 51 ++++++++++++++++++++++++- app/views/layouts/public.html.haml | 7 ++++ 3 files changed, 73 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/public.js.coffee b/app/assets/javascripts/public.js.coffee index 024d567..8e5ae4e 100644 --- a/app/assets/javascripts/public.js.coffee +++ b/app/assets/javascripts/public.js.coffee @@ -165,6 +165,21 @@ resize = () -> $(window).load -> resize() + + $(document).on "scroll", -> + scroll_ajust() + + $(document).on "touchmove", -> + scroll_ajust() + + scroll_ajust = () -> + var_scroll = $(window).scrollTop() + if var_scroll > 100 + $(".top").addClass("move_top") + else + $(".top").removeClass("move_top") + + $ -> $(window).bind "resize", -> @@ -172,4 +187,5 @@ $ -> resize() - \ No newline at end of file + + \ No newline at end of file diff --git a/app/assets/stylesheets/public.scss b/app/assets/stylesheets/public.scss index b9537b1..592f568 100644 --- a/app/assets/stylesheets/public.scss +++ b/app/assets/stylesheets/public.scss @@ -276,12 +276,34 @@ a{ } .top{ - position:absolute; + position:fixed; top:0px; left:0px; right:0px; - height:350px; + z-index:10; + + + + .contact{ + + font-family:"din_alternatebold", Arial, sans-serif; + font-size:1.1em; + position:absolute;top:20px;right:20px; + color:white; + text-align:right; + + div{ + padding:5px; + + } + a{ + + color:white; + + } + + } #logo{ @@ -291,6 +313,31 @@ a{ height:70px; } + + + + &.move_top{ + background:rgba(11,37,57,0.9); + .contact{ + float:right; + position:static; + margin:20px 20px; + div{ + + display:inline; + } + } + + + #logo{ + float:left; + position:static; + margin:15px 20px; + height:40px; + + } + + } diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml index d2c3915..2807cd7 100644 --- a/app/views/layouts/public.html.haml +++ b/app/views/layouts/public.html.haml @@ -39,6 +39,13 @@ .top =image_tag("/logo.png", :id => "logo") + + .contact + %div + +33 (0)3 88 85 05 40 + %div + =link_to "contact@jipe.fr", "mailto:contact@jipe.fr" + .clear .main{:class => (@menu_item.slug if @menu_item)}