abritium_app/app/views/layouts/public.html.haml
Nicolas Bally 69532530c2 suite
2019-05-30 14:44:41 +02:00

259 lines
10 KiB
Plaintext

-@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= "/public_medias/image_file/file/13/large_4df7bef3.jpg"
!!!
- @social_url = @social_url || request.url.to_s
-if @description and @description == ""
- @description = qit "SEO texte description par défaut 2",""
%html{:lang => "fr", "xml:lang" => "fr", :xmlns => "http://www.w3.org/1999/xhtml"}
%head
-@title = strip_tags(@title.to_s)
%title="Abritium - "+@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">
%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 }
= stylesheet_link_tag '/fonts/Stylograph/stylesheet.css'
-if @facebook_img
=raw '<meta property="og:image" content="http://payresas.fr'+@facebook_img.to_s+'"/>'
=raw '<link rel="image_src" href="http://payresas.fr'+@facebook_img.to_s+'"/>'
=raw '<meta name="twitter:card" content="summary_large_image">'
=raw '<meta property="twitter:image" content="http://payresas.fr'+@facebook_img.to_s+'"/>'
-@img_size = FastImage.size('http://payresas.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
= 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>
=javascript_include_tag "https://maps.googleapis.com/maps/api/js?libraries=places,geometry&amp;sensor=false"
%body
#top_gradient
#logo_container
=link_to image_tag("/logo-abritium.png", :id => "logo-abritium-img"), "/"
-if @menu_item and @menu_item.id == 1
.slide_home_wrapper
=image_tag("/services-a-la-personne.png?a=n", :id => "services-img")
=link_to "#footer" do
=image_tag("/devis.png", :id => "devis-img")
:javascript
$(document).ready(function(){
var slider = $('.slider').bxSlider({
nextText: '>',
prevText: '<',
auto: true
});
$(".sub_bar").click(function (){
slider.stopAuto();
slider.goToSlide($(this).data('slide'));
});
});
.slide_home.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.slide{:style => "background-image:url('#{home_slider_slide.image_file.file.large.url}');background-size:100%;background-size:cover;", :data => {:ratio => 0.45}}
.description_background
.description.vertical_center
=link_to home_slider_slide.url.to_s, :target => ("_blank" if home_slider_slide.popup) do
%h3=home_slider_slide.titre1
.content
=home_slider_slide.description1
-else
.slide_home_wrapper.with_ratio{:style => "background-image:url('#{@img_url}');", :data => {:ratio => 0.35}}
-content_for :menu do
=link_to "Jardinage", "#jardinage"
=link_to "Bricolage", "#bricolage"
=link_to "Crédit d'impôts", "#service"
=link_to "Témoignages clients", "#avis"
=link_to "Contactez-nous", "#footer"
#menu_top
=yield :menu
#menu_fixed
=link_to image_tag("/logo-abritium-mini.png"), "#top_gradient", :class => "mini-logo"
=yield :menu
-if @menu_item and @menu_item.id == 1
#main=yield
-else
#main_content=yield
-if @menu_item and @menu_item.id == 1 and false
#actus
.center
%h2="Le blog d'Abritium"
-@articles = Article.before(Time.now).recents.joins(:lang_articles).where("lang_articles.enabled = 1 and lang_articles.lang_site_id = ?", @lang.id)
=render @articles
.clear
#avis{:style => "padding:20px 0;background:url('/fond.jpg') no-repeat;background-size:cover;padding-bottom:60px !important;"}
%h2 Témoignages clients
.center{:style => "max-width:800px;"}
-Testimony.all.sort_by { rand }.each do |testimony|
-css_style = ""
-color = "black"
-css_style += "color:#{color};" if color
.quote{:style => css_style}
.guillemet.bottom_corner
<svg width="40px" height="40px" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;">
<g transform="matrix(6.6048,0,0,6.6048,0.86082,1.26248)">
<g>
=raw '<path d="M6.48,4.382C6.484,7.373 4.416,10.198 1.612,11.14C0.945,11.365 0.64,11.1 0.352,10.614C0.035,10.081 0.24,9.735 0.728,9.437C1.445,8.998 2.13,8.506 2.645,7.828C3.517,6.677 3.293,5.563 2.067,4.846C1.86,4.725 1.645,4.619 1.441,4.493C0.155,3.7 -0.283,2.701 0.178,1.626C0.705,0.396 2.268,-0.293 3.592,0.12C5.284,0.648 6.477,2.41 6.48,4.382" style="fill:'+(color ? color : "black")+';fill-rule:nonzero;"/>'
=raw '<path d="M14.88,4.621C14.883,7.487 13.007,10.193 10.412,11.111C9.82,11.32 9.367,11.389 9.03,10.693C8.716,10.046 9.022,9.73 9.507,9.43C10.295,8.944 11.028,8.4 11.466,7.546C12.02,6.465 11.816,5.636 10.807,4.965C10.576,4.811 10.315,4.701 10.07,4.568C8.698,3.824 8.268,2.734 8.86,1.511C9.483,0.226 10.862,-0.317 12.185,0.2C13.836,0.846 14.878,2.554 14.88,4.621" style="fill:'+(color ? color : "black")+';fill-rule:nonzero;"/>'
</g>
</g>
</svg>
.guillemet.top_corner
<svg width="40px" height="40px" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;">
<g transform="matrix(-6.6048,2.12427e-15,-2.12427e-15,-6.6048,99.1431,75.5965)">
<g>
=raw '<path d="M6.48,4.382C6.484,7.373 4.416,10.198 1.612,11.14C0.945,11.365 0.64,11.1 0.352,10.614C0.035,10.081 0.24,9.735 0.728,9.437C1.445,8.998 2.13,8.506 2.645,7.828C3.517,6.677 3.293,5.563 2.067,4.846C1.86,4.725 1.645,4.619 1.441,4.493C0.155,3.7 -0.283,2.701 0.178,1.626C0.705,0.396 2.268,-0.293 3.592,0.12C5.284,0.648 6.477,2.41 6.48,4.382" style="fill:'+(color ? color : "black")+';fill-rule:nonzero;"/>'
=raw '<path d="M14.88,4.621C14.883,7.487 13.007,10.193 10.412,11.111C9.82,11.32 9.367,11.389 9.03,10.693C8.716,10.046 9.022,9.73 9.507,9.43C10.295,8.944 11.028,8.4 11.466,7.546C12.02,6.465 11.816,5.636 10.807,4.965C10.576,4.811 10.315,4.701 10.07,4.568C8.698,3.824 8.268,2.734 8.86,1.511C9.483,0.226 10.862,-0.317 12.185,0.2C13.836,0.846 14.878,2.554 14.88,4.621" style="fill:'+(color ? color : "black")+';fill-rule:nonzero;"/>'
</g>
</g>
</svg>
=#'+(color ? color : "black")+'
.quote_content
=simple_format testimony.quote
%p.author
=testimony.author
.clear
%br
#footer
.center
%h2
Contactez-nous
-@contact = @contact || Contact.new(:provenance_id => 1)
.contact_form.contact_militer#form
=render :partial => "public/contacts/form"
#contacts
Abritium
="-"
=ic :phone
06 87 99 14 96
="-"
=link_to "mailto:info@abritium.fr" do
=ic :"envelope-o"
info@abritium.fr
.clear
:javascript
resize()
=render :partial => "public/shared/ga"