merci jal

This commit is contained in:
Marwann 2015-11-28 19:09:29 +01:00
parent 8b6aeab496
commit ce6a7f69e3
2 changed files with 14 additions and 12 deletions

View file

@ -1,12 +1,11 @@
// Place all the styles related to the public-figures controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
#celebrity {
#public_figure div {
height: 150px;
width: 150px;
-webkit-border-radius: 50%;
border-radius: 50%;
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
background-size:cover;
background-repeat:no-repeat;
}

View file

@ -1,16 +1,13 @@
<style>
#celebrity {background-image: url('<%= @public_figure.picture.url %>');}
</style>
<% provide(:title, @public_figure.name ) %>
<h1 id="PublicFigureTitle">
<%= best_in_place @public_figure, :name %>
</h1>
<div id="celebrity">
<!-- <%= image_tag @public_figure.picture.url, #class:"figure-main-image", alt:"#{@public_figure.name}" \
if @public_figure.picture? %> -->
</div>
<% if @public_figure.picture? %>
<div class="public_figure" style="background:url('#{@public_figure.picture.url}')"></div>
<% end %>
<% if allowed_to :delete_public_figure %>
<%= link_to "Supprimer", @public_figure,
@ -76,4 +73,10 @@
</ul>
<% end %>
</section>
</section>
<script>
$(document).ready(function () {
// for a filled square thumbnail
$('img').fakecrop();
});
</script>