suite
This commit is contained in:
parent
5705daed24
commit
e9bc3c4032
@ -5,8 +5,10 @@ $beige:#F1F0EE;
|
||||
|
||||
@import "qi_css/grid";
|
||||
#couv{
|
||||
height:770px;
|
||||
background:center center no-repeat;
|
||||
height:685px;
|
||||
|
||||
margin-top:85px;
|
||||
background:rgba(0,0,0,0.8) center center no-repeat;
|
||||
background-size:cover;
|
||||
|
||||
}
|
||||
@ -21,7 +23,40 @@ text-decoration:none;
|
||||
}
|
||||
|
||||
}
|
||||
#plume_sub_header{
|
||||
position:absolute;
|
||||
top:210px;
|
||||
left:0;
|
||||
right:0;
|
||||
background:white;
|
||||
padding:5px 30px;
|
||||
|
||||
|
||||
.p_column{
|
||||
float:left;
|
||||
width:33.33%;
|
||||
|
||||
|
||||
.plume_cat{
|
||||
text-transform:uppercase;
|
||||
color:$vert;
|
||||
font-size:23px;
|
||||
margin-top:0px;
|
||||
font-weight:bold;
|
||||
margin-bottom:0px;
|
||||
}
|
||||
h2{
|
||||
font-size:18px;
|
||||
margin:0px 0;
|
||||
font-weight:bold;
|
||||
color:black;
|
||||
text-transform:none;
|
||||
margin-bottom:8px;
|
||||
padding-right:30px;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
.agenda{
|
||||
background:$beige;
|
||||
margin:20px -20px;
|
||||
|
@ -6,4 +6,39 @@ class Plume < ActiveRecord::Base
|
||||
has_many :plume_articles, :through => :plume_cats
|
||||
|
||||
has_many :plume_events
|
||||
|
||||
def v_une_1
|
||||
cat = self.plume_cats.where(:title => "édito").first
|
||||
if cat
|
||||
return cat.plume_articles.first
|
||||
|
||||
else
|
||||
return nil
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def v_une_2
|
||||
cat = self.plume_cats.where(:title => "Dossier").first
|
||||
if cat
|
||||
return cat.plume_articles.first
|
||||
|
||||
else
|
||||
return nil
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def v_une_3
|
||||
cat = self.plume_cats.where(:title => "Grain de sable").first
|
||||
if cat
|
||||
return cat.plume_articles.first
|
||||
|
||||
else
|
||||
return nil
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
@ -17,6 +17,25 @@
|
||||
|
||||
.hr
|
||||
|
||||
|
||||
#plume_sub_header
|
||||
-id = []
|
||||
|
||||
-id << @plume.v_une_1.id if @plume.v_une_1
|
||||
|
||||
-id << @plume.v_une_2.id if @plume.v_une_2
|
||||
-id << @plume.v_une_3.id if @plume.v_une_3
|
||||
|
||||
|
||||
|
||||
-@plume.plume_articles.where(:id => id).each do |article|
|
||||
.p_column
|
||||
|
||||
-if article.plume_cat
|
||||
.plume_cat= article.plume_cat.title
|
||||
%h2=article.title
|
||||
|
||||
|
||||
#couv{:style => "background-image:url('http://lepicvert.org/#{(@plume.image_file.file.url if @plume.image_file)}');"}
|
||||
|
||||
#bottom
|
||||
|
@ -7,13 +7,11 @@
|
||||
|
||||
.right_plume
|
||||
-id = []
|
||||
-cat = @plume.plume_cats.where(:title => "édito").first
|
||||
-if cat
|
||||
-id << cat.plume_articles.first.id if cat.plume_articles.first
|
||||
|
||||
-cat = @plume.plume_cats.where(:title => "Dossier").first
|
||||
-if cat
|
||||
-id << cat.plume_articles.first.id if cat.plume_articles.first
|
||||
-id << @plume.v_une_1.id if @plume.v_une_1
|
||||
|
||||
-id << @plume.v_une_2.id if @plume.v_une_2
|
||||
|
||||
|
||||
|
||||
-@plume.plume_articles.where(:id => id).each do |article|
|
||||
@ -32,9 +30,10 @@
|
||||
|
||||
.clear
|
||||
-id = []
|
||||
-cat = @plume.plume_cats.where(:title => "Grain de sable").first
|
||||
-if cat
|
||||
-id << cat.plume_articles.first.id if cat.plume_articles.first
|
||||
|
||||
-id << @plume.v_une_3.id if @plume.v_une_3
|
||||
|
||||
|
||||
|
||||
-@plume.plume_articles.where(:id => id).each do |article|
|
||||
=link_to public_plume_article_path(article) do
|
||||
|
Loading…
x
Reference in New Issue
Block a user