Skip to content

Commit

Permalink
🐛 Neutral Theme logged out home page styling
Browse files Browse the repository at this point in the history
This commit:
- replaces the table structure with Bootstrap grid layout for logged out
view on the neutral theme homepage
- uses container-fluid and row classes to ensure collections sit side
by side on the homepage and ensures it is responsive
- maintain existing admin view with sortable interface
- ensure compatibility with neutral theme collection display

Ref:
- notch8/palni_palci_knapsack#240
  • Loading branch information
sjproctor committed Feb 18, 2025
1 parent 823f01d commit b81dc84
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
28 changes: 14 additions & 14 deletions app/views/hyrax/homepage/_featured_collection_section.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div id="featured_collections" >
<div id="featured_collections">
<% if @featured_collection_list.empty? %>
<p id='no-collections'><%= t('hyrax.homepage.featured_collections.no_collections') %></p>
<% elsif can? :update, FeaturedCollection %>
Expand All @@ -13,21 +13,21 @@
<%= f.submit("Save order", class: 'btn btn-secondary') %>
<% end %>
<% else %>
<table class="table table-striped collection-highlights">
<tbody>
<%= form_for [main_app, @featured_collection_list] do |f| %>
<div class="container-fluid">
<%= form_for [main_app, @featured_collection_list] do |f| %>
<div class="row">
<%= f.fields_for :featured_collections do |featured| %>
<%= render 'explore_collections', f: featured %>
<% end %>
<% end %>
</tbody>
</table>
</div>
<% end %>
</div>
<% end %>
</div>
<ul class="list-inline collection-highlights-list">
<li>
<%= link_to t('hyrax.homepage.admin_sets.link'),
main_app.search_catalog_path(f: { generic_type_sim: ["Collection"]}),
class: 'btn btn-secondary mt-1' %>
</li>
</ul>
<ul class="list-inline collection-highlights-list">
<li>
<%= link_to t('hyrax.homepage.admin_sets.link'),
main_app.search_catalog_path(f: { generic_type_sim: ["Collection"]}),
class: 'btn btn-secondary mt-1' %>
</li>
</ul>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<% # April's note: overriding Hyrax v5.0.0rc2 template for client theming %>

<% featured_collection = f.object.presenter %>
<div class="neutral-repository-collections pb-3 col-6 col-md-4">
<div class="neutral-repository-collections col-6 col-md-4">
<%= link_to [hyrax, featured_collection] do %>
<%= render_thumbnail_tag(featured_collection, { class: "img-fluid", alt: "#{featured_collection.title.first} #{ t('hyrax.homepage.admin_sets.thumbnail')}" }, {suppress_link: true}) %>
<% end %>
Expand Down

0 comments on commit b81dc84

Please sign in to comment.