pollen_app/app/views/layouts/public.html.haml
Nicolas Bally d80a0b2d9a v2 site
2021-01-20 19:27:14 +01:00

221 lines
7.6 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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
- @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
-@title = strip_tags(@title.to_s)
%title=@title.to_s
<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">
<link href="https://fonts.googleapis.com/css2?family=Pacifico&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,400i,700,700i,900" 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="@onevoiceanimal"/>'
=raw '<meta property="twitter:creator" content="@onevoiceanimal"/>'
=raw '<meta property="twitter:url" content="'+@social_url+'"/>'
-if @facebook_img
=raw '<meta property="og:image" content="https://walden-solutions.fr'+@facebook_img.to_s+'"/>'
=raw '<link rel="image_src" href="https://walden-solutions.fr'+@facebook_img.to_s+'"/>'
=raw '<meta name="twitter:card" content="summary_large_image">'
=raw '<meta property="twitter:image" content="https://walden-solutions.fr'+@facebook_img.to_s+'"/>'
-begin
-if @facebook_img
-require 'rmagick'
-img = Magick::Image.ping((Rails.root.to_s + "/public".to_s + @facebook_img.to_s) ).first
-@img_size = []
-puts @img_size[0] = img.columns
-puts @img_size[1] = img.rows
-rescue
-""
-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
%body
-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]
#header
.top_right
=ic :tel
+33 (0)4 65 84 48 38
="-"
=link_to "mailto:contact@walden-solutions.fr", :style => "color:#DBC089;" do
=ic :mail
contact@walden-solutions.fr
#menu_top
%ul
-MenuItem.where(:parent_id => nil, :menu_id => 1).order(:position).each do |menu_item|
-if menu_item_link(menu_item) and menu_item_link(menu_item) != ""
%li
=menu_item_link(menu_item)
%li
=link_to "Contact", "#contact"
=link_to "/" do
=image_tag "/logo-walden.png", :id => "logo"
.clear
-if @menu_item and @menu_item.id != 3
#header_image.header_image.with_ratio{:style => "position:relative;background-color:black;background-image:url('#{@img_url}');", :id => (@menu_item.id if @menu_item), :data => {:ratio => 0.35}}
%div{:style => "position:absolute;top:0;right:0;left:0;bottom:0;"}
%h1=@title
:scss
.header_image{
h1{
color:white;
position:absolute;
bottom:25px;
left:30px;
font-size:35px;
max-width:500px;
font-weight:300;
padding:15px 20px;
background:rgba(#DBC089,0.9);
padding-top:8px;
}
}
-else
.qi_slider
-@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
%div.with_ratio.qi_slide{:style => "background-image:url('#{home_slider_slide.image_file.file.url}');background-size:100%;background-size:cover;", :data => {:ratio => 0.45}}
:javascript
$('.qi_slider').slick({
autoplay: true,
autoplaySpeed: 2000,
});
#main=yield
#contact
#footer
.center
%h2{:style => "color:black;"}
Contact
%p
Envie déchanger autour de beaux projets ? Nhésitez pas à nous contacter.
.contact_form.contact_militer#form
=render :partial => "public/contacts/form"
.clear
:javascript
resize()