suite
This commit is contained in:
parent
6a8e471b82
commit
5074882b36
@ -78,181 +78,194 @@
|
|||||||
|
|
||||||
|
|
||||||
%body
|
%body
|
||||||
=link_to image_tag("/logo-fond.png", :id => "logo_fond"), "/"
|
-if !current_admin
|
||||||
-if @menu_item and @menu_item.id == 1
|
%center
|
||||||
.slide_home_wrapper
|
%br
|
||||||
=image_tag("/50ans.png", :id => "cinquante") if false
|
%br
|
||||||
|
#actus
|
||||||
|
.center
|
||||||
|
%h2
|
||||||
|
Notre nouveau site sera en ligne
|
||||||
|
%strong dans quelques jours
|
||||||
|
.clear
|
||||||
|
%br
|
||||||
|
%br
|
||||||
|
-else
|
||||||
|
=link_to image_tag("/logo-fond.png", :id => "logo_fond"), "/"
|
||||||
|
-if @menu_item and @menu_item.id == 1
|
||||||
|
.slide_home_wrapper
|
||||||
|
=image_tag("/50ans.png", :id => "cinquante") if false
|
||||||
|
|
||||||
#menu_top
|
#menu_top
|
||||||
.sub_menu
|
.sub_menu
|
||||||
=render :partial => "public/shared/second_menu"
|
=render :partial => "public/shared/second_menu"
|
||||||
.menu
|
.menu
|
||||||
=render :partial => "public/shared/first_menu"
|
=render :partial => "public/shared/first_menu"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.slide_home.slider
|
.slide_home.slider
|
||||||
|
|
||||||
-@home_slider = HomeSlider.find_by_slug("home")
|
-@home_slider = HomeSlider.find_by_slug("home")
|
||||||
-@date = Time.now
|
-@date = Time.now
|
||||||
-if @home_slider
|
-if @home_slider
|
||||||
-@home_slides_simu = @home_slider.home_slider_slides.where(:enabled => true)
|
-@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("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.where("end_at IS NULL or end_at >= ?",@date)
|
||||||
-@home_slides_simu = @home_slides_simu.order(:position)
|
-@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 = @home_slides_simu.joins(:lang_sites).where("lang_sites.id = ?", @lang.id)
|
||||||
-@home_slides_simu.each do |home_slider_slide|
|
-@home_slides_simu.each do |home_slider_slide|
|
||||||
-if home_slider_slide.image_file
|
-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}}
|
%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
|
=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?
|
-if home_slider_slide.titre2?
|
||||||
.sub_title=home_slider_slide.titre2
|
.sub_title=home_slider_slide.titre2
|
||||||
-elsif home_slider_slide.article
|
-elsif home_slider_slide.article
|
||||||
.sub_title
|
.sub_title
|
||||||
-if home_slider_slide.article.category
|
-if home_slider_slide.article.category
|
||||||
|
|
||||||
-cats = []
|
-cats = []
|
||||||
-home_slider_slide.article.categories.uniq.each do |cat|
|
-home_slider_slide.article.categories.uniq.each do |cat|
|
||||||
-cats << cat.lang(I18n.locale.to_s).name
|
-cats << cat.lang(I18n.locale.to_s).name
|
||||||
=cats.join(", ")
|
=cats.join(", ")
|
||||||
|
|
||||||
%span.sep
|
%span.sep
|
||||||
="|"
|
="|"
|
||||||
=l(home_slider_slide.article.published_at, :format => :human_date)
|
=l(home_slider_slide.article.published_at, :format => :human_date)
|
||||||
.content
|
.content
|
||||||
=home_slider_slide.description1
|
=home_slider_slide.description1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:javascript
|
:javascript
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$('.slider').bxSlider({
|
$('.slider').bxSlider({
|
||||||
auto: true,
|
auto: true,
|
||||||
nextText: '>',
|
nextText: '>',
|
||||||
prevText: '<'
|
prevText: '<'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
-else
|
-else
|
||||||
.slide_home_wrapper.with_ratio{:style => "background-image:url('#{@img_url}');", :data => {:ratio => 0.35}}
|
.slide_home_wrapper.with_ratio{:style => "background-image:url('#{@img_url}');", :data => {:ratio => 0.35}}
|
||||||
|
|
||||||
|
|
||||||
#menu_top
|
#menu_top
|
||||||
.sub_menu
|
.sub_menu
|
||||||
=render :partial => "public/shared/second_menu"
|
=render :partial => "public/shared/second_menu"
|
||||||
.menu
|
.menu
|
||||||
=render :partial => "public/shared/first_menu"
|
=render :partial => "public/shared/first_menu"
|
||||||
|
|
||||||
-if @menu_item and @menu_item.id == 1
|
-if @menu_item and @menu_item.id == 1
|
||||||
|
|
||||||
#main=yield
|
#main=yield
|
||||||
-else
|
-else
|
||||||
#main_content=yield
|
#main_content=yield
|
||||||
-if @menu_item and @menu_item.id == 1
|
-if @menu_item and @menu_item.id == 1
|
||||||
#actus
|
#actus
|
||||||
.center
|
.center
|
||||||
#left_actus
|
#left_actus
|
||||||
%h2
|
%h2
|
||||||
Actualités agricoles
|
Actualités agricoles
|
||||||
|
|
||||||
|
|
||||||
-@articles_rss[0..3].each do |article|
|
-@articles_rss[0..3].each do |article|
|
||||||
|
|
||||||
|
|
||||||
%div{:class => "actu"}
|
%div{:class => "actu"}
|
||||||
|
|
||||||
|
|
||||||
.img.with_ratio{:style => "background-image:url('https://groupe-payre.fr#{article['image_url']}');background-size:100%;background-size:cover;", :data => {:ratio => 0.62}}
|
.img.with_ratio{:style => "background-image:url('https://groupe-payre.fr#{article['image_url']}');background-size:100%;background-size:cover;", :data => {:ratio => 0.62}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.description
|
.description
|
||||||
%h3= article['title']
|
%h3= article['title']
|
||||||
|
|
||||||
=simple_format article["description"]
|
=simple_format article["description"]
|
||||||
|
|
||||||
.cta
|
.cta
|
||||||
=link_to "https://groupe-payre.fr"+article["url"].to_s, :class => "btn", :target => "_blank" do
|
=link_to "https://groupe-payre.fr"+article["url"].to_s, :class => "btn", :target => "_blank" do
|
||||||
=qit("Lire l'article")
|
=qit("Lire l'article")
|
||||||
>
|
>
|
||||||
.clear
|
.clear
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#right_actus
|
#right_actus
|
||||||
%h2
|
%h2
|
||||||
L'actu du groupe
|
L'actu du groupe
|
||||||
|
|
||||||
-@breves_rss[0..10].each do |article|
|
-@breves_rss[0..10].each do |article|
|
||||||
=link_to "https://groupe-payre.fr"+article["url"].to_s, :target => "_blank", :style => "text-decoration:none;" do
|
=link_to "https://groupe-payre.fr"+article["url"].to_s, :target => "_blank", :style => "text-decoration:none;" do
|
||||||
%div{:class =>"breve"}
|
%div{:class =>"breve"}
|
||||||
.color{:style => "background:#{Category.find(article['category_id']).color};"}
|
.color{:style => "background:#{Category.find(article['category_id']).color};"}
|
||||||
=l (Time.parse(article['date'].to_s)), :format => "%d %b"
|
=l (Time.parse(article['date'].to_s)), :format => "%d %b"
|
||||||
="-"
|
="-"
|
||||||
= article['title']
|
= article['title']
|
||||||
.clear
|
.clear
|
||||||
|
|
||||||
|
|
||||||
#footer
|
#footer
|
||||||
.center
|
.center
|
||||||
%h2
|
%h2
|
||||||
Nous contacter
|
Nous contacter
|
||||||
|
|
||||||
-@contact = @contact || Contact.new(:provenance_id => 2)
|
-@contact = @contact || Contact.new(:provenance_id => 2)
|
||||||
|
|
||||||
.contact_form.contact_militer#form
|
.contact_form.contact_militer#form
|
||||||
=render :partial => "public/contacts/form"
|
=render :partial => "public/contacts/form"
|
||||||
=image_tag "/bottom-lines.png", :id => "bottom_lines"
|
=image_tag "/bottom-lines.png", :id => "bottom_lines"
|
||||||
#sub_footer
|
#sub_footer
|
||||||
|
|
||||||
#logos
|
#logos
|
||||||
=link_to "https://etschaix.fr", :target => "_blank" do
|
=link_to "https://etschaix.fr", :target => "_blank" do
|
||||||
=image_tag "/payre-agriculture.png"
|
=image_tag "/payre-agriculture.png"
|
||||||
|
|
||||||
=link_to "https://payreenergies.fr", :target => "_blank" do
|
=link_to "https://payreenergies.fr", :target => "_blank" do
|
||||||
=image_tag "/payre-energies.png"
|
=image_tag "/payre-energies.png"
|
||||||
|
|
||||||
=link_to "https://payremaintenance.fr", :target => "_blank" do
|
=link_to "https://payremaintenance.fr", :target => "_blank" do
|
||||||
=image_tag "/payre-maintenance.png"
|
=image_tag "/payre-maintenance.png"
|
||||||
|
|
||||||
=link_to "http://payrejardinerie.fr/", :target => "_blank" do
|
=link_to "http://payrejardinerie.fr/", :target => "_blank" do
|
||||||
=image_tag "/payre-jardinerie.png"
|
=image_tag "/payre-jardinerie.png"
|
||||||
|
|
||||||
#place
|
#place
|
||||||
%p
|
%p
|
||||||
ETS CHAIX
|
ETS CHAIX
|
||||||
%br
|
%br
|
||||||
11 rue Valserres
|
11 rue Valserres
|
||||||
%br
|
%br
|
||||||
05000 GAP
|
05000 GAP
|
||||||
#contacts
|
#contacts
|
||||||
|
|
||||||
%p
|
%p
|
||||||
=ic :phone
|
=ic :phone
|
||||||
04 92 51 35 05
|
04 92 51 35 05
|
||||||
%br
|
%br
|
||||||
=ic :fax
|
=ic :fax
|
||||||
04 92 53 42 89
|
04 92 53 42 89
|
||||||
%br
|
%br
|
||||||
=link_to "mailto:contact@etschaix.fr" do
|
=link_to "mailto:contact@etschaix.fr" do
|
||||||
=ic :"envelope-o"
|
=ic :"envelope-o"
|
||||||
contact@etschaix.fr
|
contact@etschaix.fr
|
||||||
|
|
||||||
.clear
|
.clear
|
||||||
|
|
||||||
|
|
||||||
:javascript
|
:javascript
|
||||||
resize()
|
resize()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user