Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public facing collections show page styling #2345

Merged
merged 5 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
//= require tether
// Required by Blacklight
//= require blacklight/blacklight
//= require blacklight_gallery
//= require admin_color_select
//= require blacklight_advanced_search
//= require blacklight_gallery/default

// Moved the Hyku JS *above* the Hyrax JS to resolve #1187 (following
// a pattern found in ScholarSphere)
Expand Down Expand Up @@ -57,7 +57,6 @@
//= require jquery.flot.pie
//= require flot_graph
//= require statistics_tab_manager
//= require blacklight_gallery/default

// Required for blacklight range limit
//= require blacklight_range_limit/range_limit_distro_facets
Expand Down
1 change: 0 additions & 1 deletion app/assets/javascripts/blacklight_gallery.js

This file was deleted.

14 changes: 14 additions & 0 deletions app/assets/stylesheets/hyku.scss
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,11 @@ a.btn.btn-default.restore-default-color.with-color-hint {
width: 50%;
}
}

// makes hamburger menu visible for mobile
.navbar-toggler-icon {
display: inline-block !important;
}
}

@media (max-width: 768px) {
Expand Down Expand Up @@ -574,6 +579,15 @@ span.constraint-value p, .facet-values p {
.hyc-bugs .hyc-last-updated,
.hyc-title {
padding: 0;

h1 {
color: #000;
}
}

.hyc-created-by,
.hyc-last-updated {
color: #000 !important;
}

.hyc-item-count {
Expand Down
80 changes: 79 additions & 1 deletion app/assets/stylesheets/hyrax.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,89 @@

// for catalog search result snippets
.highlight {
background: #ffff00;
background: #ffff00;
font-weight: 700;
}

// to make collection form labels bold
#collection-edit-controls label.control-label {
font-weight: bold !important;
}

/* Collection show page */
// Contribute back to Hyrax?

// nav search header
#search-form-header {
// adds bootstrap class to element
label[for="search-field-header"] {
@extend .sr-only;
}

.form-group {
justify-content: right;
}
}

.hyc-bugs {
margin-top: 10px;
}

.hyrax-collections-show {
.document-metadata {
dd {
word-break: break-all;
}
}
}

#hyc-collection-metadata-total_items,
#hyc-collection-metadata-creator {
align-items: baseline;
}

// collections gallery view
#documents {

// hide the bookmark button
.caption-area {
input[name="commit"] {
display: none;
}
}

.document {
margin-top: 6px;
padding-top: 6px;

.document-thumbnail {
.img-thumbnail {
padding: 0.25rem;
background-color: #fff;
border: 1px solid #dee2e6;
border-radius: 0.25rem;
}
}
}
}

// adds bootstrap class to element
.documents-gallery {
@extend .row-cols-lg-4;
}

// pagination
.hyc-bl-pager {
.pagination {
display: flex;
}
}

@media (max-width: 768px) {
.hyc-banner {
.hyc-bugs {
flex-wrap: wrap;
}
}
}
/* End Collection show page */
20 changes: 11 additions & 9 deletions app/views/hyrax/collections/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@
<% else %>
<div class="hyc-generic">
<% end %>

<div class="hyc-title">
<h1><%= markdown(@presenter.title.first) %></h1>
<%= @presenter.collection_type_badge %>
<%= @presenter.permission_badge %>
<div class="d-flex space-between">
<div class="hyc-title">
<h1><%= markdown(@presenter.title.first) %></h1>
<%= @presenter.collection_type_badge %>
<%= @presenter.permission_badge %>
</div>
<div class="hyc-item-count">
<%= pluralize(@presenter.total_viewable_items, t('.item_count')) %>
</div>
</div>


<% unless @presenter.logo_record.blank? %>
<div class="hyc-logos">
<% @presenter.logo_record.each_with_index do |lr, i| %>
Expand All @@ -37,10 +42,7 @@
<% end %>

<% unless @presenter.total_viewable_items.blank? %>
<div class="hyc-bugs">
<div class="hyc-item-count">
<%= pluralize(@presenter.total_viewable_items, t('.item_count')) %></div>

<div class="hyc-bugs d-flex space-between">
<% unless @presenter.creator.blank? %>
<div class="hyc-created-by">Created by: <%= @presenter.creator.first %></div>
<% end %>
Expand Down
Loading