Skip to content

Commit

Permalink
HYC-1793 - Another round of style fixes (hyrax-4) (#1031)
Browse files Browse the repository at this point in the history
* Update to hyrax version with style fixes for Review and Approval section

* Update style of the 'add your artwork' prompt to look like it did previously in bootstrap 4

* Get advanced search positioning consistent. Search bar is generally a bit wider now too, which is more inline with hyrax defaults

* Fix sizing and spacing of the featured works section

* Adjustments to sizing/spacing of the marketing text to prevent excessive wrapping and text escaping the box at smaller screen sizes. Preventing the main title on the homepage from wrapping at any screen size

* Adjusted spacing around navigation links and the title at the top of a search

* Prevent embargo inputs from running off the side of the page

* Remove incorrect aria-label
  • Loading branch information
bbpennel authored Oct 19, 2023
1 parent 9848d6c commit 3876254
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 40 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ gem 'execjs', '2.8.1'
gem 'httparty', '~>0.21.0'
gem 'hydra-editor', '~> 6.0'
gem 'hydra-role-management', '~> 1.0'
gem 'hyrax', git: 'https://github.com/UNC-Libraries/hyrax.git', branch: 'unc-hyrax-4-development'
gem 'hyrax', git: 'https://github.com/UNC-Libraries/hyrax.git', branch: 'hyc-1793'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.11.2'
# Use jquery as the JavaScript library
Expand Down
32 changes: 15 additions & 17 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ GIT

GIT
remote: https://github.com/UNC-Libraries/hyrax.git
revision: 916bb20935606fe84073cf303dca43c6bf0ecc7f
branch: unc-hyrax-4-development
revision: 5af9862897810c8b7736062f727613faff391394
branch: hyc-1793
specs:
hyrax (4.0.0)
active-fedora (~> 14.0)
Expand Down Expand Up @@ -188,19 +188,19 @@ GEM
ast (2.4.2)
autoprefixer-rails (10.4.13.0)
execjs (~> 2)
awesome_nested_set (3.5.0)
activerecord (>= 4.0.0, < 7.1)
awesome_nested_set (3.6.0)
activerecord (>= 4.0.0, < 7.2)
aws-eventstream (1.2.0)
aws-partitions (1.815.0)
aws-sdk-core (3.181.0)
aws-partitions (1.835.0)
aws-sdk-core (3.185.1)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.71.0)
aws-sdk-core (~> 3, >= 3.177.0)
aws-sdk-kms (1.72.0)
aws-sdk-core (~> 3, >= 3.184.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.134.0)
aws-sdk-s3 (1.136.0)
aws-sdk-core (~> 3, >= 3.181.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.6)
Expand All @@ -222,7 +222,7 @@ GEM
blacklight (> 6.0, < 8)
cancancan (>= 1.8)
deprecation (~> 1.0)
blacklight-gallery (4.3.0)
blacklight-gallery (4.4.0)
blacklight (>= 7.17, < 9)
rails (>= 6.1, < 8)
blacklight_advanced_search (8.0.0.alpha2)
Expand Down Expand Up @@ -265,7 +265,7 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
carrierwave (1.3.3)
carrierwave (1.3.4)
activemodel (>= 4.0.0)
activesupport (>= 4.0.0)
mime-types (>= 1.16)
Expand Down Expand Up @@ -435,10 +435,9 @@ GEM
webrick
google-apis-drive_v3 (0.44.0)
google-apis-core (>= 0.11.0, < 2.a)
googleauth (1.7.0)
googleauth (1.8.1)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
Expand Down Expand Up @@ -541,7 +540,7 @@ GEM
json-ld-preloaded (3.1.6)
json-ld (~> 3.1)
rdf (~> 3.1)
json-schema (4.0.0)
json-schema (4.1.1)
addressable (>= 2.8)
jwt (2.7.1)
kaminari (1.2.2)
Expand Down Expand Up @@ -630,11 +629,10 @@ GEM
rails (>= 5.0.0)
marcel (1.0.2)
matrix (0.4.2)
memoist (0.16.2)
method_source (1.0.0)
mime-types (3.5.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2023.0808)
mime-types-data (3.2023.1003)
mini_magick (4.12.0)
mini_mime (1.1.5)
mini_racer (0.2.15)
Expand Down Expand Up @@ -955,7 +953,7 @@ GEM
sidekiq-status (3.0.3)
chronic_duration
sidekiq (>= 6.0, < 8)
signet (0.17.0)
signet (0.18.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
Expand Down
57 changes: 42 additions & 15 deletions app/assets/stylesheets/unc_custom.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ span.institution_name {

.advanced_search {
float: right;
margin-right: 15px;
margin: 0.5rem 1rem 0 0;
&:hover {
text-decoration: none;
}
Expand Down Expand Up @@ -146,6 +146,7 @@ span.institution_name {
.repo-name {
font-family: LibreBaskerville, sans-serif;
padding-left: 15px;
white-space: nowrap;
}

img.banner-img {
Expand Down Expand Up @@ -216,7 +217,6 @@ span.institution_name {
color: $text-color !important;

div {
width: 65%;
margin: 0 auto;
}

Expand Down Expand Up @@ -312,6 +312,8 @@ span.institution_name {
-ms-flex-direction: column;
-webkit-flex-direction: column;
flex-direction: column;
margin-bottom: 25px;
margin-top: 25px;

height: 200px;

Expand All @@ -330,19 +332,14 @@ span.institution_name {
margin-bottom: 50px;
}

div {
margin-bottom: 25px;
margin-top: 25px;
}

.featured-item-title {
margin-top: 15px;
}
}

.collections-browse {
margin-bottom: 30px;
font-size: 30px;
margin: .7rem 0 -0.5rem 0;
font-size: 1.9rem;
}

.social {
Expand Down Expand Up @@ -454,7 +451,9 @@ div.unc-modal {
text-align: center;
font-size: 1.5em;
padding: 10px 5px;
margin: 0 15px 10px 15px;
margin: -20px 15px 10px 15px;
background-color: #dff0d8;
width: 100%;
}

.form-inline .date-input {
Expand Down Expand Up @@ -860,7 +859,7 @@ Hide it entirely until the issue is resolved upstreeam
}

p {
font-size: 1.05em;
font-size: .9em;
}
}

Expand Down Expand Up @@ -952,6 +951,10 @@ Hide it entirely until the issue is resolved upstreeam
}
}
}

.repo-name {
font-size: 2rem;
}
}

@media only screen and (max-width: 576px) {
Expand All @@ -964,11 +967,16 @@ Hide it entirely until the issue is resolved upstreeam
}
}

@media only screen and (max-width: 480px) {
@media only screen and (max-width: 576px) {
.navbar-toggle {
margin-right: 0;
}

.navbar-nav {
margin-left: 30px;
margin-bottom: .7rem;
}

#logo {
img {
max-height: 20px;
Expand Down Expand Up @@ -1002,7 +1010,7 @@ Hide it entirely until the issue is resolved upstreeam

#unc-text {
p {
font-size: .7em;
font-size: .8em;
}
}

Expand Down Expand Up @@ -1224,6 +1232,25 @@ Hide it entirely until the issue is resolved upstreeam

.search-form {
label {
visibility: hidden;
display: none;
}
}

#unc-search {
#search-form-header {
.input-group {
padding: 0;
}
}

.advanced_search {
margin-right: 0;
}
}

.visibility {
/* this prevents the embargo inputs from running out of the side of their container */
.form-inline {
display: block;
}
}
}
6 changes: 4 additions & 2 deletions app/views/_controls.html.erb
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<%# [hyc-override] Overriding partial in hyrax gem to update homepage %>
<nav class="navbar navbar-light bg-light navbar-expand-sm justify-content-between align-items-baseline px-2 py-3 border-bottom" role="navigation" aria-label="Root Menu">
<%# [hyc-override] https://github.com/samvera/hyrax/blob/hyrax-v4.0.0/app/views/_controls.html.erb %>
<%# [hyc-override] Reduced top and bottom padding with py %>
<nav class="navbar navbar-light bg-light navbar-expand-sm justify-content-between align-items-baseline px-2 py-2 border-bottom" role="navigation" aria-label="Root Menu">
<ul class="nav navbar-nav col-sm-5">
<li class="nav-item <%= 'active' if current_page?(hyrax.root_path) %>">
<%= link_to t(:'hyrax.links.browse_all'), main_app.search_catalog_path, class: "nav-link", aria: current_page?(main_app.search_catalog_path) ? {current: 'page'} : nil %></li>
<li class="nav-item <%= 'active' if current_page?(hyrax.root_path) %>">
<%= link_to t(:'hyrax.links.collections'), main_app.search_catalog_path(f: { human_readable_type_sim: ["Collection"]}), class: "nav-link", aria: current_page?(main_app.search_catalog_path(f: { human_readable_type_sim: ["Collection"]})) ? {current: 'page'} : nil %></li>
<li class="nav-item <%= 'active' if current_page?(hyrax.root_path) %>">
<%= link_to t(:'hyrax.links.departments'), main_app.facet_catalog_path(id: 'affiliation_label_sim'), class: "nav-link", aria: current_page?(main_app.facet_catalog_path(id: 'affiliation_label_sim')) ? {current: 'page'} : nil %></li>
<%# [hyc-override] Suppress deposit option when read only mode is enabled %>
<% unless Flipflop.read_only? %>
<li class="nav-item" data-turbolinks="false">
<%= link_to '#', class: 'all-unc-work-types nav-link',
Expand Down
2 changes: 1 addition & 1 deletion app/views/hyrax/base/_form_visibility_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<ul class="visibility">
<li class="form-check">
<label class="form-check-label">
<%= f.radio_button :visibility, Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC, 'aria-label': 'Embargo', class: 'form-check-input', data: { 'target': '#collapsePublic' } %>
<%= f.radio_button :visibility, Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC, class: 'form-check-input', data: { 'target': '#collapsePublic' } %>
<%= visibility_badge(Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC) %>
<br />
<%= t('hyrax.visibility.open.note_html', type: f.object.human_readable_type) %>
Expand Down
3 changes: 1 addition & 2 deletions app/views/hyrax/base/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
<%= render 'workflow_actions_widget', presenter: @presenter %>
<%# [hyc-override] Show message to attach child works for art mfa deposits %>
<%if @presenter.workflow.is_mfa_in_review? %>
<p class="bg-success mfa-child-works">If you haven't already done so, please add your artworks now.
</p>
<div class="mfa-child-works">If you haven't already done so, please add your artworks now.</div>
<% end %>
<%# [hyc-override] Changes end here %>
<% if @presenter.iiif_viewer? %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/hyrax/homepage/_featured_fields.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<%# [hyc-override] Restructured to display thumbnail on top of title, and removed other fields %>
<div>
<%= link_to [main_app, featured] do %>
<%= render_thumbnail_tag(featured, {width: 90, alt: "#{featured.title.first.to_s} #{ t('hyrax.homepage.admin_sets.thumbnail')}" }, {suppress_link: true})%>
<%= render_thumbnail_tag(featured, {alt: "#{featured.title.first.to_s} #{ t('hyrax.homepage.admin_sets.thumbnail')}" }, {suppress_link: true})%>
<% end %>
<div class="featured-item-title">
<span class="sr-only"><%= t('hyrax.homepage.featured_works.document.title_label') %></span>
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 @@ -7,7 +7,7 @@
<div id="unc-featured" class="row text-center large-screen">
<h2 class="col-12">Featured Deposits</h2>
<%= render 'featured_works' %>
<div class="col-12">
<div class="col-12 mt-5">
<p class="text-center">Interested in seeing more? <%= link_to "Explore the repository &rarr;".html_safe,
main_app.search_catalog_path %></p>
</div>
Expand Down

0 comments on commit 3876254

Please sign in to comment.