jipe_app/app/views/layouts/public.html.haml
2019-01-26 20:19:49 +01:00

380 lines
14 KiB
Plaintext

-@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
<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
-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: '<'
});
});
=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
SARL au capital de 651 510,00 €
="-"
RCS : Colmar B 530 702 331
="-"
APE : 2511Z
:javascript
resize()