Added figures to homepage

This commit is contained in:
Mehdi Arfaoui 2016-02-06 17:55:38 +01:00
parent 1391dc4e43
commit 5f3e68ee8b

View file

@ -3,11 +3,17 @@
<div class="subjects-index col-md-8" style="margin-bottom:20px">
<h1>Sujets d'actualité</h1>
<h1>Sujets d'actualité</h1>
<% # render @subjects %>
<% @subjects.each do |subject| %>
<div style="overflow:hidden;"><h2 class="subject-title"><%= link_to subject.title, subject %></h2>
<p class="subject-presentation-text"><%= subject.presentation %></p></div>
<div style="overflow:hidden;" class="col-md-4"><h1 class="subject-title"><%= link_to subject.title, subject %></h1>
</div>
<div style="overflow:hidden;" class="col-md-4"> <% if subject.public_figure.picture? %>
<div style="height:50px; width: 50px; -webkit-border-radius: 50%; border-radius: 50%; background: url('<%= subject.public_figure.picture.url %>') 50% 50% no-repeat; background-size:cover; background-position: center center; float:left; margin-right:15px;"></div>
<% end %>
</div>
</div>
<% end %>