Skip to content

Commit

Permalink
🐛 Aligned featured collection and works
Browse files Browse the repository at this point in the history
This commit removes a negative margin on the featured collections column
and removes a margin from the file img on the featured collections card
to ensure the featured works and featured collections are aligned on the
logged in home page and the logged out home page.

Ref:
- notch8/palni_palci_knapsack#142
  • Loading branch information
sjproctor committed Feb 1, 2025
1 parent 5fc86dd commit 5642859
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
9 changes: 0 additions & 9 deletions app/assets/stylesheets/hyku.scss
Original file line number Diff line number Diff line change
Expand Up @@ -543,11 +543,6 @@ body.public-facing {
width: 100%;
}

// align featured collections with featured works
#featured_collections {
margin-top: -5px;
}

.mb-30 {
margin-bottom: 30px;
}
Expand Down Expand Up @@ -740,10 +735,6 @@ tr[data-feature="use-iiif-print"] {

// Featured collection
#featured_collections {
display: flex;
flex-wrap: wrap;
justify-content: left;

h3 {
font-size: inherit;
}
Expand Down
4 changes: 2 additions & 2 deletions app/views/hyrax/homepage/_explore_collections.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

<% featured_collection = f.object.presenter %>
<tr>
<td>
<td class="p-2">
<div class="d-flex">
<div>
<%= link_to [hyrax, featured_collection] do %>
<%= render_thumbnail_tag(featured_collection,
{ class: 'img-fluid d-none d-sm-block file_listing_thumbnail', alt: "#{featured_collection.title_or_label} #{ t('hyrax.homepage.admin_sets.thumbnail')}" },
{ class: 'img-fluid d-none d-sm-block file_listing_thumbnail mt-0', alt: "#{featured_collection.title_or_label} #{ t('hyrax.homepage.admin_sets.thumbnail')}" },
{suppress_link: true}
) %>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/hyrax/homepage/_home_content.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
also, to render featured collections
%>

<div class="<%= @presenter.display_featured_works? || @presenter.display_recently_uploaded? ? 'col-md-6' : '' %>">
<div class="<%= @presenter.display_featured_works? || @presenter.display_recently_uploaded? ? 'col-md-6 mb-4' : '' %>">
<ul id="homeTabs" class="nav nav-tabs" role="list">
<%# add check for featured works %>
<% if @presenter.display_featured_works? %>
Expand Down

0 comments on commit 5642859

Please sign in to comment.