Skip to content

Commit

Permalink
browsing grid finished
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgraffeocohen committed May 28, 2014
1 parent 6debf6c commit e4c5c8e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
15 changes: 8 additions & 7 deletions app/assets/stylesheets/movie.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@
}

#movie-options {
.poster-thumbnail {
position: absolute;
height: 292px;
width: 217px;
border-radius: 14px;
margin-top: 104px;
margin-left: 40px;
.choice {
float: left;
padding: 5px;
.poster-thumbnail {
height: 292px;
width: 217px;
}
}
}


#poster-container {
margin-top: 77px;
.poster {
Expand Down
19 changes: 8 additions & 11 deletions app/views/movies/_options.html.erb
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<div class="row">
<div id="movie-options">
<% i = 0 %>
<% unless choices.nil? || choices.empty? %>
<% choices.each do |movie| %>
<a href="<%= movie_path(movie) %>"><img class="poster-thumbnail" src="<%= movie.poster_link %>"
style="left: <%= 17 + i %>px;"></a>
<% i += 250 %>
<% end %>
<% end %>
</div>
<div class="row" id="movie-options">
<% unless choices.blank? %>
<% choices.each do |movie| %>
<div class="choice">
<a href="<%= movie_path(movie) %>"><img class="poster-thumbnail" src="<%= movie.poster_link %>"></a>
</div>
<% end %>
<% end %>
</div>

0 comments on commit e4c5c8e

Please sign in to comment.