mmsc_app/app/views/layouts/public.html.haml
Nicolas Bally 0848b6ef2e suite
2021-02-09 17:39:42 +01:00

97 lines
3.4 KiB
Plaintext

-if @m_odr
-@title = @m_odr.name
-@description = @m_odr.description
-@products_controllers = ["ProductOrdersController", "ProductsController","ProductCategoriesController", "ProductCustomersController", "ProductCustomersAuthsController" ]
-@facebook_title = @facebook_title || @title
- @twitter_title = @twitter_title || @title
-@menu_shadow=true
-@lang = @lang || LangSite.first
-if !@facebook_img or @facebook_img == ""
-@facebook_img= ""
!!!
- @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
=render :partial => "public/shared/ga"
-@title = strip_tags(@title.to_s)
%title=@title.to_s
<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">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:800&display=swap" rel="stylesheet">
%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="'+@twitter_title.to_s+'"/>'
=raw '<meta property="twitter:site" content=""/>'
=raw '<meta property="twitter:creator" content=""/>'
=raw '<meta property="twitter:url" content="'+@social_url+'"/>'
-if @facebook_img
=raw '<meta property="og:image" content="https://mmsc.olwen.xyz'+@facebook_img.to_s+'"/>'
=raw '<link rel="image_src" href="https://mmsc.olwen.xyz'+@facebook_img.to_s+'"/>'
=raw '<meta name="twitter:card" content="summary_large_image">'
=raw '<meta property="twitter:image" content="https://mmsc.olwen.xyz'+@facebook_img.to_s+'"/>'
= javascript_include_tag "public"
= csrf_meta_tag
= stylesheet_link_tag 'public', :media => :all
<!-- 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', '603317247079299');
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=603317247079299&ev=PageView&noscript=1"/></noscript>
<!-- End Facebook Pixel Code -->
%body
=render partial: 'public/shared/header'
=render partial: 'public/shared/flashes'
.content
=yield
=render partial: 'public/shared/footer'