payrejardi_app/app/views/layouts/public.html.haml
2019-05-16 15:15:00 +02:00

320 lines
12 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.

-@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="Payre Jardinerie - "+@title.to_s+ " - Groupe Payre"
<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 }
-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
=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>
=javascript_include_tag "https://maps.googleapis.com/maps/api/js?libraries=places,geometry&amp;sensor=false"
%body
-if !current_admin
%center
%br
%br
#actus
.center
#left_actus{:style => "width:100%;float:none"}
=image_tag("/blog.png", :class => "blog_img")
%h2
Notre nouveau site sera en ligne
%strong dans quelques jours
.clear
%br
%br
<div class="center_block" style="background-image:url('/public_medias/image_file/file/7/large_e3f9bd61.jpg');background-size:100%;background-size:cover;background-position:center center;text-align:center;">
<div class="row">
<div class="columns span_12" style="padding-top:30px;padding-bottom:60px;">
<div class="main row-fluid">
<h3 class="text-center"><span style="color: rgb(255, 255, 255); font-size: 24px;">NOS MAGASINS</span></h3>
<div class="" style="">
<div class="center">
<div class="row">
<div class="columns span_12" style="">
<div class="main row-fluid">
<div class="" style="">
<div class="row">
<div class="columns span_6" style="">
<div class="main row-fluid">
<p><span style="color: rgb(255, 255, 255); font-size: 18px;">SARL JARDIMAISON</span></p>
<p><span style="color: rgb(255, 255, 255);">Av. du Montcelet<br>38380 ENTRE DEUX GUIERS</span></p><p></p>
<div class="img image_content" style="text-align:center;width:100%;">
<img alt="" style="width:250px;" src="http://localhost:3000/public_medias/image_file/file/15/large_058717c5.png">
</div>
<p><span style="color: rgb(255, 255, 255); font-size: 18px;">04 76 66 80 59</span></p><p><span style="color: rgb(255, 255, 255);">Lundi au Samedi<br>9:0012:00&nbsp; &nbsp;14:00-19:00</span></p><p><span style="color: rgb(255, 255, 255);"></span></p>
</div>
</div>
<div class="columns span_6" style="">
<div class="main row-fluid">
<p><span style="color: rgb(255, 255, 255); font-size: 18px;">SAS Payre</span></p>
<p><span style="color: rgb(255, 255, 255);">Sillo les Aversains<br>38710 Mens</span></p><p></p>
<div class="img image_content" style="text-align:center;width:100%;">
<img alt="" style="width:250px;" src="http://localhost:3000/public_medias/image_file/file/14/large_7df16f92.png">
</div>
<p><span style="color: rgb(255, 255, 255); font-size: 18px;">04 76 34 61 84</span></p><p><span style="color: rgb(255, 255, 255);">Mardi au Vendredi<br>8:3012:30&nbsp; 14:00-18:00</span></p>
<p><span style="color: rgb(255, 255, 255);">Samedi<br>8:3012:30&nbsp; 14:00-17:00</span></p><p><span style="color: rgb(255, 255, 255);"></span></p>
</div>
</div>
<div class="clear"></div>
</div>
</div>
</div>
</div>
<div class="clear"></div>
</div>
</div>
</div>
</div>
</div>
<div class="clear"></div>
</div>
</div>
-else
=link_to image_tag("/logo-fondmob.png", :id => "logo_fondmob"), "/"
=link_to image_tag("/logo-fond.png", :id => "logo_fond"), "/"
-if @menu_item and @menu_item.id == 1 #SI PAGE D'ACCUEIL
.slide_home_wrapper
=render :partial => "public/shared/menu_top"
.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}}
=link_to home_slider_slide.url.to_s, :target => ("_blank" if home_slider_slide.popup) do
.link_overlay
.description.vertical_center
=link_to home_slider_slide.url.to_s, :target => ("_blank" if home_slider_slide.popup) do
-if home_slider_slide.titre2?
.sub_title=home_slider_slide.titre2
-elsif home_slider_slide.article
.sub_title
-if home_slider_slide.article.category
-cats = []
-home_slider_slide.article.categories.uniq.each do |cat|
-cats << cat.lang(I18n.locale.to_s).name
=cats.join(", ")
%span.sep
="|"
=l(home_slider_slide.article.published_at, :format => :human_date)
.content
%h3=home_slider_slide.titre1
#contentdescription
=home_slider_slide.description1
:javascript
$(document).ready(function(){
$('.slider').bxSlider({
auto: true,
nextText: '>',
prevText: '<'
});
});
-else
=render :partial => "public/shared/menu_top"
.slide_home_wrapper.with_ratio{:style => "background-image:url('#{@img_url}');", :data => {:ratio => 0.35}}
-if @menu_item and @menu_item.id == 1
-else
#main_content=yield
-if @menu_item and @menu_item.id == 1
#actus
.center
#left_actus
=image_tag("/blog.png", :class => "blog_img")
%h2
LE JARDIN AU FIL DES MOIS
%strong
="/ Notre Blog"
-Article.before(Time.now).recents.limit(3).each do |article|
-lang_article = article.lang_articles.find_by_lang_site_id(@lang.id)
-if article.image_file
-img_url = article.image_file.file.large.medium.url
%div{:class => "actu"}
.img.with_ratio{:style => "background-image:url('#{img_url}');background-size:100%;background-size:cover;", :data => {:ratio => 0.62}}
.description
%h3= lang_article.title
=simple_format lang_article.description
.cta
=link_to article_path(:slug => lang_article.slug, :lang => @lang.slug), :class => "btn", :target => "_blank" do
=qit("Lire l'article")
>
.clear
#right_actus
.blog_img
%h2
Lactualité de nos
%strong jardinerie
-@breves_rss[0..10].each do |article|
=link_to "https://groupe-payre.fr"+article["url"].to_s, :target => "_blank", :style => "text-decoration:none;" do
%div{:class =>"breve"}
.color{:style => "background:#{Category.find(article['category_id']).color};"}
=l (Time.parse(article['date'].to_s)), :format => "%d %b"
="-"
= article['title']
.clear
#main=yield
#bottom_actus
.center
%h2
Lactualité du groupe Payre
.actus{:style => "margin:0 -1.5%"}
-@articles_rss[0..2].each do |article|
=link_to "https://groupe-payre.fr"+article["url"].to_s, :target => "_blank", :style => "text-decoration:none;" do
%div{:class =>"breve"}
.color{:style => "background:#{Category.find(article['category_id']).color};"}
=l (Time.parse(article['date'].to_s)), :format => "%d %b"
="-"
= article['title']
.clear
#footer
.center
%h2
Nous contacter
-@contact = @contact || Contact.new(:provenance_id => 5)
.contact_form.contact_militer#form
=render :partial => "public/contacts/form"
=image_tag "/bottom-lines.png", :id => "bottom_lines"
=render :partial => "public/shared/footer"
:javascript
resize()