From a3a342df2655c7d1f6a865ec24c6b6415f9b0fda Mon Sep 17 00:00:00 2001 From: Fritz Freiheit Date: Wed, 12 Jul 2023 16:26:37 -0400 Subject: [PATCH] DEEPBLUE-255 - Add subheader for long term announcements --- .../stylesheets/custom_layout/tweaks.css | 19 +++++++++++++++++++ app/views/_masthead.html.erb | 1 + app/views/_subheader.html.erb | 10 ++++++++++ config/features.rb | 4 ++++ config/locales/hyrax.en.yml | 7 +++++++ 5 files changed, 41 insertions(+) create mode 100644 app/views/_subheader.html.erb diff --git a/app/assets/stylesheets/custom_layout/tweaks.css b/app/assets/stylesheets/custom_layout/tweaks.css index 6494b9fcd..46b7fb020 100644 --- a/app/assets/stylesheets/custom_layout/tweaks.css +++ b/app/assets/stylesheets/custom_layout/tweaks.css @@ -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; diff --git a/app/views/_masthead.html.erb b/app/views/_masthead.html.erb index 43488a354..e5305883d 100644 --- a/app/views/_masthead.html.erb +++ b/app/views/_masthead.html.erb @@ -25,3 +25,4 @@ +<%= render '/subheader' %> diff --git a/app/views/_subheader.html.erb b/app/views/_subheader.html.erb new file mode 100644 index 000000000..c76b11080 --- /dev/null +++ b/app/views/_subheader.html.erb @@ -0,0 +1,10 @@ +<% ::Deepblue::ThreadedVarService.ensure_i18n_templates_are_fresh %> +<% if Flipflop.display_subheader? %> +
"> +
"> +
"> + <%= t( "hyrax.subheader.default_html" ) %> +
+
+
+<% end %> diff --git a/config/features.rb b/config/features.rb index f7531c3dc..d57e9803a 100644 --- a/config/features.rb +++ b/config/features.rb @@ -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 diff --git a/config/locales/hyrax.en.yml b/config/locales/hyrax.en.yml index 742352863..5e9dce2c3 100644 --- a/config/locales/hyrax.en.yml +++ b/config/locales/hyrax.en.yml @@ -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 + Data Sharing Boilerplate masthead_banner: standard_html: > We've recently updated Deep Blue Data--for more about our upgrade to Hyrax 2.0, please see