jipe_app/app/views/layouts/public.html.haml
Nicolas Bally 792fd9b603 suite
2020-04-21 14:24:15 +02:00

527 lines
18 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-@products_controllers = ["ProductOrdersController", "ProductsController","ProductCategoriesController", "ProductCustomersController", "ProductCustomersAuthsController" ]
-@facebook_title = @facebook_title || @title
-@menu_shadow=true
-@lang = @lang || LangSite.first
-if !@facebook_img or @facebook_img == ""
-@facebook_img= "/public_medias/image_file/file/280/large_medium_shutterstock_64985671_0__-_copie.jpg"
!!!
- @social_url = @social_url || request.url.to_s
-if @description and @description == ""
- @description = qit "SEO texte description par défaut",""
%html{:lang => "fr", "xml:lang" => "fr", :xmlns => "http://www.w3.org/1999/xhtml"}
%head
-@title = strip_tags(@title.to_s)
%title=@title.to_s+" - Jipe"
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/favicon-194x194.png" sizes="194x194">
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/mstile-144x144.png">
<meta name="theme-color" content="#ffffff">
%meta{:name=>"viewport", :content=>"width=device-width,initial-scale=1"}
%meta{ :"http-equiv" => "Content-Type", :content => "text/html; charset=utf-8" }
%meta{ :"name" => "Description", :content => @description }
%meta{ :"name" => "Keywords", :content => @keywords }
=raw '<meta property="og:title" content="'+@facebook_title.to_s+'" />'
=raw '<meta property="og:description" content="'+@description.to_s+'" />'
=raw '<meta property="og:url" content="'+@social_url+'" />'
=raw '<meta property="twitter:description" content="'+((@description and @description != "") ? @description : "En savoir plus :").to_s+'"/>'
=raw '<meta property="twitter:title" content="'+@facebook_title.to_s+'"/>'
=raw '<meta property="twitter:site" content="@onevoiceplanet"/>'
=raw '<meta property="twitter:creator" content="@onevoiceplanet"/>'
=raw '<meta property="twitter:url" content="'+@social_url+'"/>'
-if @facebook_img
=raw '<meta property="og:image" content="https://jipe.fr'+@facebook_img.to_s+'"/>'
=raw '<link rel="image_src" href="https://jipe.fr'+@facebook_img.to_s+'"/>'
=raw '<meta name="twitter:card" content="summary_large_image">'
=raw '<meta property="twitter:image" content="https://jipe.fr'+@facebook_img.to_s+'"/>'
-@img_size = FastImage.size('https://jipe.fr'+@facebook_img.to_s)
-if @img_size and @img_size.size > 0
=raw '<meta property="og:image:width" content="'+@img_size[0].to_s+'"/>'
=raw '<meta property="og:image:height" content="'+@img_size[1].to_s+'"/>'
= javascript_include_tag "public"
= csrf_meta_tag
=render :partial => "public/shared/ga"
= stylesheet_link_tag 'public', :media => :all
= stylesheet_link_tag '/fonts/Stylograph/stylesheet.css'
<link href="https://fonts.googleapis.com/css?family=Galada|Lato:400,900|Roboto+Slab:400,700" rel="stylesheet">
<script src="https://f.vimeocdn.com/js/froogaloop2.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Mukta+Malar" rel="stylesheet">
=javascript_include_tag "https://maps.googleapis.com/maps/api/js?libraries=places,geometry&amp;sensor=false"
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '1765758747084089', {
em: 'insert_email_variable,'
});
fbq('track', 'PageView');
fbq('track', 'InitiateCheckout');
fbq('track', 'AddPaymentInfo');
fbq('track', 'Purchase', {value: '0.00', currency: 'EUR'});
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=1765758747084089&ev=PageView&noscript=1"/></noscript>
<!-- DO NOT MODIFY -->
<!-- End Facebook Pixel Code -->
%body.forum_body{:style => ("padding:0; " if @page_dons).to_s+(@don_image ? "background-image:url('#{@don_image}');" : ""),:class => (" don_tunnels" if controller.class.name.split("::")[1] == "DonTunnelsController").to_s+(" boutique_body" if @products_controllers.include?(controller.class.name.split("::")[1])).to_s+(" forum_body" if controller.class.name.split("::").first=="Forum").to_s}
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/fr_FR/sdk.js#xfbml=1&version=v2.5&appId=1571839706461030";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
-if flash[:error] or flash[:notice] or flash[:alert]
.flashs
-if flash[:error]
.error
%span.remove=ic :times
=flash[:error]
-if flash[:notice]
.notice
%span.remove=ic :times
=flash[:notice]
-if flash[:alert]
.alert
%span.remove=ic :times
=flash[:alert]
#main{:class => (@menu_item.slug if @menu_item)}
-if !@page_dons and (!@don_tunnel or @don_tunnel.layout_html)
#menu_top_container
.main_container.widther
#menu
.bars{:onclick => '$("#menu ul").toggle()'}
=ic :bars
=link_to image_tag("/logo.png", :id => "logo"), "/"+@lang.slug+"/index.html"
%ul
-if false
%li
=link_to "Blog", articles_path(:lang => @lang.slug)
-MenuItem.where(:parent_id => nil, :menu_id => Menu.first.id).order(:position).each do |menu_item|
-description = ""
-description = menu_item.menu_content.description if menu_item.menu_content and menu_item.menu_content_type == "Page"
-if menu_item_link(menu_item) and menu_item_link(menu_item) != ""
%li
=menu_item_link(menu_item)
.clear
=link_to add_banner_public_banners_path(), :remote => true, :onclick => "$('#banner').show();$('#small_banner').closest('#small_banner').hide();" do
#small_banner{:style => ("display:none;" if !session[:no_banner])}
=image_tag "/covid.png"
#banner{:style => ("display:none;" if session[:no_banner])}
.banner_wrapper
.left
=image_tag "/covid.png"
.right
%h4 Continuité de production
%p
%strong Jipé continue à produire
en prenant les mesures nécessaires pour
%strong
assurer la sécurité
de ses
%strong collaborateurs,
de ses
%strong prestataires
et
%strong fournisseurs.
%h4 Solutions durgence et pour laprès confinement
%p
Après avoir fourni des
%strong structures pour faire face à lurgence,
nous pouvons
%strong dès maintenant
vous proposer des
%strong solutions pour gérer laprès confinement
(salles externes, douches de décontamination, sanitaires, lieux disolement…)
%p.actions
=link_to "En savoir plus", "/fr/blog/covid-19-jipe-continue-a-produire-et-propose-des-solutions.html"
=link_to "Nous contacter", "/fr/contact.html"
.close_banner=link_to ic(:times)+" Ne plus afficher cette info", remove_banner_public_banners_path(), :remote => true, :onclick => "$(this).closest('#banner').hide();$('#small_banner').show();"
.clear
:scss
.banner_wrapper{
max-width:950px;
margin:auto;
}
#small_banner{
position:absolute;
top:70px;
left:0;
background:#F9F1E4;
color:#DB3028;
font-size:14px;
text-align:center;
padding:10px 40px;
z-index:10;
font-weight:bold;
img{
width:100px;
}
}
#banner{
background:#F9F1E4;
color:#333f48;
padding:30px 20px;
font-size:14px;
position:relative;
p{
margin:5px 0;
}
.actions{
a{
padding:4px 8px;
border:1px solid #DB3028;
display:inline-block;
margin-right:8px;
margin-top:8px;
color:#DB3028;
}
}
.close_banner{
position:absolute;
bottom:5px;right:5px;
}
.right{
margin-left:230px;
h4{
margin-bottom:-4px;
color:#DB3028;
}
}
.left{
color:#BF2F2A;
font-size:18px;
float:left;
text-align:left;
width:250px;
img{
max-width:180px;display:block;margin:30px 10px;
}
margin-left:-10px;
}
}
@media screen and (max-width: 820px){
#small_banner{
img{
width:50px;
}
padding:8px 15px;
}
#banner{
.right{
margin:0;
padding-bottom:50px;
}
.left{
float:none;
width:100%;
img{
margin:auto;
}
}
}
}
-if @menu_item and @menu_item.id != 1
-if @menu_item.ancestors.reverse[0]
-menu_title = @menu_item.ancestors.reverse[0]
-else
-menu_title = @menu_item
#sub_menu_top
.bars{:onclick => '$("#sub_menu_top .normal").toggle();'}
=ic :bars
-if @menu_item
-if @menu_item.parent_id
-if @menu_item.ancestors.reverse[0]
-first_level_menu = @menu_item.ancestors.reverse[0]
-else
-first_level_menu = @menu_item
-if first_level_menu.children.size > 0
%ul
-first_level_menu.children.order(:position).each do |menu_item|
%li
-if @ancestor_1
-if @ancestor_1 == menu_item
-active = true
-menu_item_lang = menu_item.menu_item_langs.find_by_lang_site_id(@lang.id)
-if active == nil
-if @menu_item and (@menu_item == menu_item or @menu_item.ancestors.include?(menu_item))
-active = true
-else
-active = false
-name = menu_item_lang.name
-if menu_item_lang.enabled == true and menu_item_lang.visible == true
=link_to @jipe_host.to_s+menu_item_path(:url => menu_item_lang.url, :lang => @lang.slug), :class => "normal "+("active" if active).to_s do
-if menu_item.icon_image_file
=image_tag menu_item.icon_b_image_file.file.url, :class => "blanc" if menu_item.icon_image_file
=image_tag menu_item.icon_image_file.file.url, :class => "noir" if menu_item.icon_b_image_file
=name
-if @menu_item and @menu_item.id == 1
#slider_banner
.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
-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;position:relative;", :data => {:ratio => 0.37}}
-if home_slider_slide.title
%h1.title
=home_slider_slide.title
:javascript
$(document).ready(function(){
$('#bxslider').bxSlider({
nextText: '>',
prevText: '<',
auto: true,
speed:700,
pause:3000
});
});
=yield
:scss
#sub_menu_top.home_sub_menu{
margin-bottom:50px;
ul li a{
&:hover{
color:#BF2F2A;
.noir{
display:block !important;
}
.blanc{
display:none !important;
}
}
}
}
-if @menu_item and @menu_item.id == 1
#sub_menu_top.home_sub_menu
-first_level_menu = MenuItem.where(:id => 4).first
-if first_level_menu and first_level_menu.children.size > 0
%ul
-first_level_menu.children.order(:position).each do |menu_item|
%li
-if @ancestor_1
-if @ancestor_1 == menu_item
-active = true
-menu_item_lang = menu_item.menu_item_langs.find_by_lang_site_id(@lang.id)
-if active == nil
-if @menu_item and (@menu_item == menu_item or @menu_item.ancestors.include?(menu_item))
-active = true
-else
-active = false
-name = menu_item_lang.name
-if menu_item_lang.enabled == true and menu_item_lang.visible == true
=link_to @jipe_host.to_s+menu_item_path(:url => menu_item_lang.url, :lang => @lang.slug), :class => ("active" if active) do
-if menu_item.icon_image_file
=image_tag menu_item.icon_b_image_file.file.url, :class => "blanc" if menu_item.icon_image_file
=image_tag menu_item.icon_image_file.file.url, :class => "noir" if menu_item.icon_b_image_file
=name
.clear
.bottom
.inner
=ic :"map-marker"
Jipé
="-"
Zone Industrielle Le Pâquis
="-"
55210 VIGNEULLES LES HATTONCHATEL
="-"
France
="-"
=ic(:phone)
+33 (0)3 29 89 35 34
="-"
=ic(:"envelope-o")
=link_to "contact@jipe.fr", "mailto:contact@jipe.fr"
.span
SAS au capital de 651 510,00 €
="-"
RCS : Colmar B 530 702 331
="-"
APE : 2511Z
:javascript
resize()