This commit is contained in:
Nicolas Bally 2015-11-06 16:58:48 +01:00
commit a5302bef37
8 changed files with 94 additions and 31 deletions

View File

@ -29,14 +29,14 @@ a{
} }
body{ body{
font-family:Lato; font-family:"Museo sans";
font-weight:300; font-weight:300;
line-height:1.4em; line-height:1.4em;
text-align:justify; text-align:justify;
padding:0; padding:0;
margin:0; margin:0;
font-size:14px; font-size:15px;
color:#333333; color:#333333;
@ -547,7 +547,10 @@ article{
.image{ .image{
width:15%; width:15%;
float:left; float:left;
background:#757575; background: #757575 center center no-repeat;
background-size:100%;
background-size:cover;
height:80px; height:80px;
overflow:hidden; overflow:hidden;
margin-bottom:5px; margin-bottom:5px;
@ -569,6 +572,8 @@ article{
} }
h1{ h1{
color:#69952f; color:#69952f;
@ -586,13 +591,65 @@ h1{
.event{ .event{
.image{ margin-bottom:2em;
max-width:150px; %strong{
max-height:100px;
height:500px; color:#E5383A;
width:100%; }
.date{
font-weight: 400;
font-family:$header_font, Arial, sans-serif;
}
.image{
width:200px;
img{
max-width:200px;
max-height:300px;
width:100%;
float:left;
background:#757575;
}
}
}
.articles_index{
a{
color:inherit;
&:hover{
color:inherit;
text-decoration:none;
}
}
}
.article_list{
.image{
width:200px;
float:left;
background: #757575 center center no-repeat;
background-size:100%;
background-size:cover;
overflow:hidden;
margin-bottom:5px;
}
.description{
margin-left:210px;
margin-bottom:5px;
background:#757575;
} }

View File

@ -4,22 +4,22 @@ module EventsHelper
if event.entire_day? if event.entire_day?
if event.stop_date? if event.stop_date?
if event.start_at.strftime('%d/%m/%Y') == event.stop_at.strftime('%d/%m/%Y') if event.start_at.strftime('%d/%m/%Y') == event.stop_at.strftime('%d/%m/%Y')
"le #{l(event.start_at, :format => date_format)}" "le <strong>#{l(event.start_at, :format => date_format)}</strong>"
else else
"du #{l(event.start_at, :format => date_format)} au #{l(event.stop_at, :format => date_format)}" "du <strong>#{l(event.start_at, :format => date_format)}</strong> au <strong>#{l(event.stop_at, :format => date_format)}</strong>"
end end
else else
"le #{l(event.start_at, :format => date_format)}" "le <strong>#{l(event.start_at, :format => date_format)}</strong>"
end end
else else
if event.stop_date? if event.stop_date?
if event.start_at.strftime('%d/%m/%Y') == event.stop_at.strftime('%d/%m/%Y') if event.start_at.strftime('%d/%m/%Y') == event.stop_at.strftime('%d/%m/%Y')
"le #{l(event.start_at, :format => date_format)} de #{l(event.start_at, :format => time_format)} à #{l(event.stop_at, :format => time_format)} " "le <strong>#{l(event.start_at, :format => date_format)}</strong> de <strong>#{l(event.start_at, :format => time_format)}</strong> à <strong>#{l(event.stop_at, :format => time_format)}</strong> "
else else
"du #{l(event.start_at, :format => date_format)} à #{l(event.start_at, :format => time_format)} au #{l(event.stop_at, :format => date_format)} à #{l(event.stop_at, :format => time_format)} " "du <strong>#{l(event.start_at, :format => date_format)}</strong> à <strong>#{l(event.start_at, :format => time_format)}</strong> au <strong>#{l(event.stop_at, :format => date_format)}</strong> à <strong>#{l(event.stop_at, :format => time_format)}</strong> "
end end
else else
"le #{l(event.start_at, :format => date_format)} à #{l(event.start_at, :format => time_format)}" "le <strong>#{l(event.start_at, :format => date_format)}</strong> à <strong>#{l(event.start_at, :format => time_format)}</strong>"
end end
end end

View File

@ -66,7 +66,7 @@
-if @menu_item and @menu_item.slug and @menu_item.slug == "index" -if @menu_item and @menu_item.slug and @menu_item.slug == "index"
.main_section_title .main_section_title
=link_to "Actualités +", "/blog.html" =link_to "Actualités +", "/actualites.html"
-article = Article.before(Date.today).recents.first -article = Article.before(Date.today).recents.first
@ -87,7 +87,7 @@
-articles.each do |article| -articles.each do |article|
%a{:href => public_article_path(:id => article.slug)} %a{:href => public_article_path(:id => article.slug)}
.article .article
.image=image_tag article.image_file.file.large.medium.url if article.image_file .image{:style => "background-image:url('"+(article.image_file.file.large.medium.url if article.image_file).to_s+"');"}
.description .description
@ -102,7 +102,7 @@
#sidebar #sidebar
-if @menu_item and @menu_item.slug and @menu_item.slug == "index" -if @menu_item and @menu_item.slug and @menu_item.slug == "index"
.main_section_title .main_section_title
Prochainement + =link_to "Prochainement +", "/agenda.html"
=#render Event.recents.limit(2) =#render Event.recents.limit(2)

View File

@ -3,17 +3,18 @@
-articles = @articles -articles = @articles
-if articles -if articles
.articles .articles_index
-articles.each do |article| -articles.each do |article|
%a{:href => public_article_path(:id => article.slug)} %a{:href => public_article_path(:id => article.slug)}
.article .article_list
.image=image_tag article.image_file.file.large.medium.url if article.image_file .image=image_tag article.image_file.file.large.medium.url if article.image_file
.description .description
%h2=article.title %h1=article.title
=simple_format article.description
.clear .clear
#articles_pagination= paginate @articles #articles_pagination= paginate @articles
-else -else
%p %p

View File

@ -1,9 +1,9 @@
= event_human_date(event)
.event .event
.image=image_tag event.image_file.file.large.medium.url if event.image_file .image=image_tag event.image_file.file.large.medium.url if event.image_file
%h2.date=raw event_human_date(event)
%strong=event.title %h1=event.title
-if event.description and event.description != "" -if event.description and event.description != ""
@ -13,3 +13,4 @@
%br=link_to "En savoir plus", public_event_path(event) %br=link_to "En savoir plus", public_event_path(event)
.clear

View File

@ -8,7 +8,8 @@
-while the_month <= last_month -while the_month <= last_month
%h2{:class => "month_title"}=l(the_month.to_date, :format => :month_and_year) %h2{:class => "month_title"}=l(the_month.to_date, :format => :month_and_year)
.month_content .month_content
=render :partial => "public/events/event", :collection =>Event.where('start_at < ? AND stop_at > ?',the_month.next_month, the_month.beginning_of_month).order(:start_at) =render :partial => "public/events/event", :collection =>Event.where('(start_at < ? AND start_at > ?) OR (stop_at < ? AND stop_at > ?)',the_month.end_of_month, the_month.beginning_of_month,the_month.end_of_month, the_month.beginning_of_month).order(:start_at)
-the_month = the_month.next_month -the_month = the_month.next_month

View File

@ -3,9 +3,14 @@
-@event = Event.find(params[:id]) -@event = Event.find(params[:id])
%h2=@event.title %h1=@event.title
= event_human_date(@event) =raw event_human_date(@event)
%br
%br
.image=image_tag @event.image_file.file.large.medium.url if @event.image_file
%br
%br
.agenda_description .agenda_description
=simple_format @event.description =simple_format @event.description

View File

@ -20,9 +20,7 @@
%ul %ul
-menu_item.children.where(:enabled => true, :visible => true).order(:position).each do |menu_item| -menu_item.children.where(:enabled => true, :visible => true).order(:position).each do |menu_item|
%li=menu_item_link(menu_item) %li=menu_item_link(menu_item)
-if first_level_menu.slug == "livres-eft"
%li=link_to "Ebook Maigrir Durablement avec l'EFT", "http://www.maigrir-durablement-avec-eft.com/", :target => "_blank"
%li=link_to "Ebook Arrêter de Fumer avec l'EFT", "http://www.arreter-de-fumer-avec-eft.com/", :target => "_blank"
.breadcrumb .breadcrumb
-if @menu_item.ancestors -if @menu_item.ancestors