Skip to content

Commit

Permalink
Style updates for agreement spacing and facet color contrast (#1017)
Browse files Browse the repository at this point in the history
* Update work agreement and submit buttons

* Fix color contrast on selected facet headers

* Have save button appear below the deposit agreement

* Fix spacing around deposit agreement link and bold text to match prod

* Add back in br. Add comments to highlight the other overrides in this file

---------

Co-authored-by: Ben Pennell <[email protected]>
  • Loading branch information
lfarrell and bbpennel authored Oct 9, 2023
1 parent e50a1d9 commit 0da501c
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
40 changes: 40 additions & 0 deletions app/assets/stylesheets/unc_custom.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,21 @@ div.unc-modal {
}
}

.facet-limit-active {
.card-header {
button {
color: white;
}
}
.facet-label .remove {
margin: 0;
}

.facet-values li .selected {
color: black !important;
}
}

/* Fixes https://github.com/samvera/hyrax/blob/f14958e665535be2696dc1cdf9e205d6fc54e668/app/assets/stylesheets/hyrax/_card.scss#L5
Resets it to the default Bootstrap card margins
*/
Expand Down Expand Up @@ -1013,6 +1028,31 @@ Hide it entirely until the issue is resolved upstreeam
font-weight: bold;
}

#form-progress {
.card-footer {
padding: 5px;
text-align: center;

.checkbox {
label {
margin-bottom: 0;
}
}

label {
width: 100%;
}

#agreement {
margin-right: 5px;
}

a {
font-weight: bold;
}
}
}


/* Responsive Hyrax override */
@media only screen and (min-width: 768px) {
Expand Down
6 changes: 4 additions & 2 deletions app/views/hyrax/base/_form_progress.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%# [hyc-override] https://github.com/samvera/hyrax/tree/hyrax-v4.0.0/app/views/hyrax/base/_form_progress.html.erb %>
<%# [hyc-override] Overriding partial from gem to switch ordering of form completion requirements %>
<%# [hyc-override] Switch ordering of form completion requirements. Change agreement checkbox %>
<aside id="form-progress" class="form-progress card">
<div class="card-header">
<h3 class="card-title"><%= t("hyrax.works.progress.header") %></h3>
Expand All @@ -9,7 +9,7 @@
<fieldset>
<legend class="legend-save-work"><%= t('.requirements') %></legend>
<ul class="requirements">
<%# [hyc-override] Overriding partial. Make file completion first in the list %>
<%# [hyc-override] Make file completion first in the list %>
<% if Hyrax.config.work_requires_files? %>
<li class="incomplete" id="required-files"><%= t('.required_files') %></li>
<% end %>
Expand Down Expand Up @@ -39,6 +39,7 @@
<% if ::Flipflop.active_deposit_agreement_acceptance? %>
<% if !current_user.admin? || (current_user.admin? && params[:action] == 'new') %>
<label>
<%# [hyc-override] Changing agreement button to submit the onyen of the depositor %>
<%= f.input :agreement,
as: :boolean,
label: t('hyrax.active_consent_to_agreement'),
Expand All @@ -52,6 +53,7 @@
</label>
<% else %>
<label class="d-none">
<%# [hyc-override] Changing agreement button to submit the onyen of the depositor %>
<%= f.input :agreement,
as: :boolean,
checked: f.object.agreement_accepted,
Expand Down

0 comments on commit 0da501c

Please sign in to comment.