Skip to content

Commit

Permalink
Merge pull request #1440 from mlibrary/DEEPBLUE-255-add-subheader
Browse files Browse the repository at this point in the history
DEEPBLUE-255 - Add subheader for long term announcements
  • Loading branch information
fritzfreiheit authored Jul 12, 2023
2 parents 99cc478 + a3a342d commit 05b02c3
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 0 deletions.
19 changes: 19 additions & 0 deletions app/assets/stylesheets/custom_layout/tweaks.css
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,25 @@ table.datatable thead th.no-sort {
border-bottom: 2px solid rgb(235, 255, 241);
}

.subheader-default {
background-color: rgb(235, 255, 200);
border-top: 2px solid rgb(235, 255, 241);
}

.subheader-inner {
background-color : rgb(255, 138, 10);
border-bottom: 0px;
color: black;
text-align: center;
}

.subheader-section-default {
background-color : rgb(235, 255, 241);
border-bottom: 0px;
color: black;
text-align: center;
}

.update-alert--warning {
background-color : rgb(255, 138, 88);
border-bottom: 0px;
Expand Down
1 change: 1 addition & 0 deletions app/views/_masthead.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@
</nav>

</header>
<%= render '/subheader' %>
10 changes: 10 additions & 0 deletions app/views/_subheader.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<% ::Deepblue::ThreadedVarService.ensure_i18n_templates_are_fresh %>
<% if Flipflop.display_subheader? %>
<div class="<%= t( "hyrax.subheader.css_outer" ) %>">
<div class="<%= t( "hyrax.subheader.css_inner" ) %>">
<section class="<%= t( "hyrax.subheader.css_section_default" ) %>">
<%= t( "hyrax.subheader.default_html" ) %>
</section>
</div>
</div>
<% end %>
4 changes: 4 additions & 0 deletions config/features.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
default: false,
description: "Disable all deposits and edits to the system."

feature :display_subheader,
default: true,
description: "Display a subheader below the standard header."

end

group :masthead_banner_announcements do
Expand Down
7 changes: 7 additions & 0 deletions config/locales/hyrax.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,13 @@ en:
label: "ID of work where file should go to:"
confirm: >
Are you sure you want to move the file?
subheader:
css_outer: row ribbon-content subheader-default
css_inner: subheader-inner
css_section_default: subheader-section-default container-fluid
default_html:
Need language around using Deep Blue Data as a repository for your NIH data sharing plan? See
<a href="https://deepblue.lib.umich.edu/data/services#boilerplate">Data Sharing Boilerplate</a>
masthead_banner:
standard_html: >
We've recently updated Deep Blue Data--for more about our upgrade to Hyrax 2.0, please see
Expand Down

0 comments on commit 05b02c3

Please sign in to comment.