Skip to content

Commit

Permalink
Don't use a grid inside a list
Browse files Browse the repository at this point in the history
The floats don't work well with a list and cause the numbers to be on
the preceeding line.
  • Loading branch information
jcoyne committed Apr 13, 2017
1 parent 5407cfa commit ced69a7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
11 changes: 11 additions & 0 deletions app/assets/stylesheets/hyrax/_catalog.scss
Expand Up @@ -9,3 +9,14 @@
width: 100%;
}
}

.document {
.list-thumbnail {
width: 30%;
float: left;
}
.metadata {
width: 70%;
display: inline-block;
}
}
4 changes: 1 addition & 3 deletions app/views/catalog/_document.html.erb
@@ -1,5 +1,3 @@
<li id="document_<%= document.to_param %>" class="document <%= render_document_class document %>" itemscope itemtype="<%= document.itemtype %>">
<div class="row">
<%= render_document_partials document, blacklight_config.view_config(document_index_view_type).partials, document_counter: document_counter %>
</div>
<%= render_document_partials document, blacklight_config.view_config(document_index_view_type).partials, document_counter: document_counter %>
</li>
3 changes: 2 additions & 1 deletion app/views/catalog/_index_list_default.html.erb
@@ -1,4 +1,4 @@
<div class="col-sm-9">
<div class="metadata">
<table class="table">
<% doc_presenter = index_presenter(document) %>
<% index_fields(document).each do |field_name, field| -%>
Expand All @@ -12,3 +12,4 @@
</table>
</div>

<div class="clearfix"></div>
3 changes: 1 addition & 2 deletions app/views/catalog/_thumbnail_list_default.html.erb
@@ -1,4 +1,3 @@
<div class="col-sm-3">
<div class="list-thumbnail">
<%= render_thumbnail_tag document %>
</div>

0 comments on commit ced69a7

Please sign in to comment.