From f0b21a172a65fb307559cff430d3af2d11b61343 Mon Sep 17 00:00:00 2001 From: LaRita Robinson Date: Tue, 21 Jan 2025 15:53:28 -0500 Subject: [PATCH 1/4] Got lost during a merge conflict fix --- app/views/shared/_appearance_styles.html.erb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/views/shared/_appearance_styles.html.erb b/app/views/shared/_appearance_styles.html.erb index 4c6b3417e..5a9f734d4 100644 --- a/app/views/shared/_appearance_styles.html.erb +++ b/app/views/shared/_appearance_styles.html.erb @@ -31,8 +31,7 @@ body.public-facing footer.navbar { } body.public-facing footer.navbar .navbar-link { color: <%= appearance.footer_link_color %>; } body.public-facing footer.navbar .navbar-link:hover { color: <%= appearance.footer_link_hover_color %>; } -body.public-facing footer.navbar .navbar-text, -body.public-facing .navbar.navbar-expand-lg .navbar-nav a { +body.public-facing footer.navbar .navbar-text { color: <%= appearance.header_and_footer_text_color %> !important; } body.public-facing .navbar.navbar-expand-lg { border-color: <%= appearance.header_background_border_color %> !important; } From 2ef60c9b9d629d3373fff07908a0de0b79dc8d90 Mon Sep 17 00:00:00 2001 From: LaRita Robinson Date: Wed, 22 Jan 2025 13:59:30 -0500 Subject: [PATCH 2/4] Restore facet border color customization --- app/views/shared/_appearance_styles.html.erb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/shared/_appearance_styles.html.erb b/app/views/shared/_appearance_styles.html.erb index 5a9f734d4..480721d44 100644 --- a/app/views/shared/_appearance_styles.html.erb +++ b/app/views/shared/_appearance_styles.html.erb @@ -31,7 +31,8 @@ body.public-facing footer.navbar { } body.public-facing footer.navbar .navbar-link { color: <%= appearance.footer_link_color %>; } body.public-facing footer.navbar .navbar-link:hover { color: <%= appearance.footer_link_hover_color %>; } -body.public-facing footer.navbar .navbar-text { +body.public-facing footer.navbar .navbar-text, +body.public-facing .navbar-dark .navbar-nav .nav-link { color: <%= appearance.header_and_footer_text_color %> !important; } body.public-facing .navbar.navbar-expand-lg { border-color: <%= appearance.header_background_border_color %> !important; } @@ -204,6 +205,9 @@ body.public-facing .card-header > .btn.w-100 { color: <%= appearance.facet_panel_text_color %>; background-color: <%= appearance.facet_panel_background_color %> !important; } +body.public-facing .card { + border-color: <%= appearance.facet_panel_border_color %> !important; +} body.public-facing .card-body > .facet-limit-active { color: <%= appearance.facet_panel_text_color %> !important; background-color: <%= appearance.facet_panel_background_color %>; From 25ec784eea352d331a5d61ced89986e2fc22dd01 Mon Sep 17 00:00:00 2001 From: LaRita Robinson Date: Wed, 22 Jan 2025 16:46:05 -0500 Subject: [PATCH 3/4] Fix content block form Removes duplicated tabs. Adds appropriate classes. Adds missing translations. --- app/views/hyrax/content_blocks/_form.html.erb | 62 ++++--------------- config/locales/hyrax.en.yml | 4 ++ 2 files changed, 16 insertions(+), 50 deletions(-) diff --git a/app/views/hyrax/content_blocks/_form.html.erb b/app/views/hyrax/content_blocks/_form.html.erb index 4284de64d..639cf0cb7 100644 --- a/app/views/hyrax/content_blocks/_form.html.erb +++ b/app/views/hyrax/content_blocks/_form.html.erb @@ -1,5 +1,6 @@ -<%# Copied from Hyrax v5.0.0rc2 to add home_text content block form - Adding themes %> -<%# imported from hyrax 3.0.0.pre.rc1 %> +<%# OVERRIDE Hyrax v5.0.0rc2 to add content blocks for: + - Home Page Text for theme + - Home "About" page content %> <%= render "shared/nav_safety_modal" %>
+
@@ -59,6 +54,7 @@ <% end %>
+
<%= simple_form_for ContentBlock.for(:marketing), url: hyrax.content_block_path(ContentBlock.for(:marketing)), html: {class: 'nav-safety'} do |f| %> @@ -77,7 +73,8 @@ <% end %>
- <%# Copied from Hyrax v2.9.0 to add home_text content block form - Adding themes %> + + <%# OVERRIDE to add home text block %>
<%= simple_form_for ContentBlock.for(:home_text), url: hyrax.content_block_path(ContentBlock.for(:home_text)), html: {class: 'nav-safety'} do |f| %> @@ -114,6 +111,7 @@ <% end %>
+ <%# OVERRIDE: add about section content blocks %>
<%= simple_form_for ContentBlock.for(:homepage_about_section_heading), url: hyrax.content_block_path(ContentBlock.for(:homepage_about_section_heading)), html: {class: 'nav-safety'} do |f| %> @@ -150,42 +148,6 @@ <% end %>
-
-
- <%= simple_form_for ContentBlock.for(:homepage_about_section_heading), url: hyrax.content_block_path(ContentBlock.for(:homepage_about_section_heading)), html: {class: 'nav-safety'} do |f| %> -
-
- <%= f.label :homepage_about_section_heading %>
- <%# the following line was changed from hyrax to give some context for what this context block does %> -

<%= t(:'hyrax.content_blocks.instructions.homepage_about_section_heading_instructions') %>

- <%= f.text_area :homepage_about_section_heading, value: f.object.value, class: 'form-control tinymce', rows: 20, cols: 120 %> -
-
- - <% end %> -
-
-
-
- <%= simple_form_for ContentBlock.for(:homepage_about_section_content), url: hyrax.content_block_path(ContentBlock.for(:homepage_about_section_content)), html: {class: 'nav-safety'} do |f| %> -
-
- <%= f.label :homepage_about_section_content %>
- <%# the following line was changed from hyrax to give some context for what this context block does %> -

<%= t(:'hyrax.content_blocks.instructions.homepage_about_section_content_instructions') %>

- <%= f.text_area :homepage_about_section_content, value: f.object.value, class: 'form-control tinymce', rows: 20, cols: 120 %> -
-
- - <% end %> -
-
<%= tinymce :content_block %> diff --git a/config/locales/hyrax.en.yml b/config/locales/hyrax.en.yml index a061e061e..66f800027 100644 --- a/config/locales/hyrax.en.yml +++ b/config/locales/hyrax.en.yml @@ -507,11 +507,15 @@ en: featured_researcher: Featured Researcher home_text: Home Page Text marketing_text: Marketing Text + homepage_about_section_heading: About Section Heading + homepage_about_section_content: About Section Content instructions: announcement_instructions: Announcement Text displays on the homepage. It is for important or timely messages to be made prominently visible to all home page visitors. It would be appropriate to enter an announcement here, for example, to notify users about an upcoming planned maintenance outage of the system. featured_researcher_instructions: Featured Researcher is a space to enter information and on the home page reserved for highlighting repository users. home_text_instructions: Home Page Text refers to the custom messaging that is displayed on the home page either in the hero block or another section of the home page. This text appears when selecting a theme that either requires or allows home page text. We recommend no more than 3 sentences in this area. marketing_instructions: Banner Text refers to the text that is displayed over banner image on the homepage. We recommend no more than approximately 30 characters or spaces in this text area. + homepage_about_section_heading_instructions: This heading is not used by any of the default Hyku themes. It may be used for custom themes. + homepage_about_section_content_instructions: This content is not used by any of the default Hyku themes. It may be used for custom themes. updated: Content blocks updated. controls: about: About From 11bd59bc179d89613f3a22ceb48c6ca64efcf14c Mon Sep 17 00:00:00 2001 From: LaRita Robinson Date: Wed, 22 Jan 2025 17:38:53 -0500 Subject: [PATCH 4/4] Fix Content Block form spec The spec mistakenly used the wrong count expectation, due to duplicate content block form tabs which are now removed. --- app/views/hyrax/content_blocks/_form.html.erb | 2 +- spec/views/hyrax/content_blocks/edit.html.erb_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/hyrax/content_blocks/_form.html.erb b/app/views/hyrax/content_blocks/_form.html.erb index 639cf0cb7..98bab768c 100644 --- a/app/views/hyrax/content_blocks/_form.html.erb +++ b/app/views/hyrax/content_blocks/_form.html.erb @@ -1,4 +1,4 @@ -<%# OVERRIDE Hyrax v5.0.0rc2 to add content blocks for: +<%# OVERRIDE Hyrax v5.0.1 to add content blocks for: - Home Page Text for theme - Home "About" page content %> <%= render "shared/nav_safety_modal" %> diff --git a/spec/views/hyrax/content_blocks/edit.html.erb_spec.rb b/spec/views/hyrax/content_blocks/edit.html.erb_spec.rb index 6003293ca..acacc6aaa 100644 --- a/spec/views/hyrax/content_blocks/edit.html.erb_spec.rb +++ b/spec/views/hyrax/content_blocks/edit.html.erb_spec.rb @@ -36,7 +36,7 @@ end it "renders the instruction blocks" do - expect(rendered).to have_xpath('//p[@class="content-block-instructions" ]', count: 8) + expect(rendered).to have_xpath('//p[@class="content-block-instructions" ]', count: 6) end # TODO: These next 4 tests are tightly coupled with the implimentation,