Skip to content

Commit

Permalink
Reduce exhibit-card image size and allow more cards per row on home page
Browse files Browse the repository at this point in the history
fixes #377
  • Loading branch information
hackartisan committed Jun 21, 2018
1 parent 6c32413 commit 39433d6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

@import 'blacklight/blacklight';

@import 'application_variables';
@import 'spotlight/variables_bootstrap';
@import 'bootstrap-sprockets';
@import 'bootstrap';
Expand Down
1 change: 1 addition & 0 deletions app/assets/stylesheets/application_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$exhibit-card-image-size: 260px;
1 change: 1 addition & 0 deletions app/views/spotlight/exhibits/_exhibits.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<%= render collection: exhibits, partial: 'exhibit_card', as: 'exhibit' %>
5 changes: 4 additions & 1 deletion app/views/spotlight/exhibits/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
<%= render 'missing_exhibits' %>
<% else %>
<%= render 'tags', tags: @exhibits.published.all_tags %>
<%= render 'exhibits', exhibits: @published_exhibits %>
<%# Local modification: replaced rendering _exhibits partial, which splits into groups of 3, with the collection directly %>
<div>
<%= render collection: @published_exhibits, partial: 'exhibit_card', as: 'exhibit' %>
</div>

<% if @published_exhibits.total_count > @published_exhibits.size %>
<nav>
Expand Down

0 comments on commit 39433d6

Please sign in to comment.