diff --git a/Gemfile b/Gemfile index a5bef2e8a..b4cdb3b22 100644 --- a/Gemfile +++ b/Gemfile @@ -30,7 +30,7 @@ gem 'blacklight_range_limit' gem 'bolognese', '>= 1.9.10' gem 'bootstrap', '~> 4.6' gem 'bootstrap-datepicker-rails' -gem 'bulkrax', '8.3.0', github: 'samvera-labs/bulkrax', tag: 'v8.3.0' +gem 'bulkrax', '~> 8.3' gem 'byebug', group: %i[development test] gem 'capybara', group: %i[test] gem 'capybara-screenshot', '~> 1.0', group: %i[test] diff --git a/Gemfile.lock b/Gemfile.lock index 6f242ff9d..e07a2f744 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -88,28 +88,6 @@ GIT rake (>= 12.2) thor (~> 1.0) -GIT - remote: https://github.com/samvera-labs/bulkrax.git - revision: 562ca9ce898d47e5377679c525f2e2c13c7d9959 - tag: v8.3.0 - specs: - bulkrax (8.3.0) - bagit (~> 0.4.6) - coderay - denormalize_fields - iso8601 (~> 0.9.0) - kaminari - language_list (~> 1.2, >= 1.2.1) - libxml-ruby (~> 5.0) - loofah (>= 2.2.3) - marcel - oai (>= 0.4, < 2.x) - rack (>= 2.0.6) - rails (>= 5.1.6) - rdf (>= 2.0.2, < 4.0) - rubyzip - simple_form - GIT remote: https://github.com/samvera-labs/hyku_knapsack.git revision: 5a7c54cace96881a3963ab2fd881ca6ea3f57372 @@ -418,6 +396,22 @@ GEM signet (~> 0.8) typhoeus builder (3.2.4) + bulkrax (8.3.0) + bagit (~> 0.4.6) + coderay + denormalize_fields + iso8601 (~> 0.9.0) + kaminari + language_list (~> 1.2, >= 1.2.1) + libxml-ruby (~> 5.0) + loofah (>= 2.2.3) + marcel + oai (>= 0.4, < 2.x) + rack (>= 2.0.6) + rails (>= 5.1.6) + rdf (>= 2.0.2, < 4.0) + rubyzip + simple_form byebug (11.1.3) cancancan (3.6.1) capybara (3.39.2) @@ -1500,7 +1494,7 @@ DEPENDENCIES bolognese (>= 1.9.10) bootstrap (~> 4.6) bootstrap-datepicker-rails - bulkrax (= 8.3.0)! + bulkrax (~> 8.3) byebug capybara capybara-screenshot (~> 1.0) diff --git a/app/assets/javascripts/admin_color_select.js b/app/assets/javascripts/admin_color_select.js deleted file mode 100644 index 371fc0b42..000000000 --- a/app/assets/javascripts/admin_color_select.js +++ /dev/null @@ -1,20 +0,0 @@ -$(document).on('turbolinks:load', function() { - $('div.defaultable-colors a.restore-default-color').click(function(e) { - e.preventDefault() - - var defaultTarget = $(e.target).data('default-target') - var input = $("input[name='admin_appearance["+ defaultTarget +"]']") - - input.val(input.data('default-value')) - }) - - $('.panel-footer a.restore-all-default-colors').click(function(e) { - e.preventDefault() - - var allColorInputs = $("input[name*='color']") - - allColorInputs.each(function() { - $(this).val($(this).data('default-value')) - }) - }) -}); diff --git a/app/assets/javascripts/admin_font_select.js b/app/assets/javascripts/admin_font_select.js deleted file mode 100644 index 7fa065108..000000000 --- a/app/assets/javascripts/admin_font_select.js +++ /dev/null @@ -1,6 +0,0 @@ -Blacklight.onLoad(function() { - if($("#admin_appearance_body_font").length > 0){ - $("#admin_appearance_body_font").fontselect({lookahead: 20}); - $("#admin_appearance_headline_font").fontselect({lookahead: 20}); - } -}); diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 19d7834a8..f6384aa62 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -27,7 +27,6 @@ //= require tether // Required by Blacklight //= require blacklight/blacklight -//= require admin_color_select //= require blacklight_advanced_search //= require blacklight_gallery/default diff --git a/app/assets/javascripts/hyku/admin/appearance/colors.js b/app/assets/javascripts/hyku/admin/appearance/colors.js index 04aefdf0b..f6afd9c98 100644 --- a/app/assets/javascripts/hyku/admin/appearance/colors.js +++ b/app/assets/javascripts/hyku/admin/appearance/colors.js @@ -9,7 +9,7 @@ $(document).on('turbolinks:load', function() { input.val(input.data('default-value')); }); - $('.panel-footer a.restore-all-default-colors').click(function(e) { + $('.card-footer a.restore-all-default-colors').click(function(e) { e.preventDefault(); var allColorInputs = $("input[name*='color']"); diff --git a/app/assets/javascripts/hyku/admin/appearance/default_images.js b/app/assets/javascripts/hyku/admin/appearance/default_images.js index b3ae5cbc9..e9f070b0a 100644 --- a/app/assets/javascripts/hyku/admin/appearance/default_images.js +++ b/app/assets/javascripts/hyku/admin/appearance/default_images.js @@ -1,6 +1,6 @@ // Default Images form $(document).on('turbolinks:load', function() { - $('#default_images .panel-footer input[name="commit"]').click(function(e) { + $('#default_images .card-footer input[name="commit"]').click(function(e) { // Prevent ActionController::ParameterMissing error by not // allowing a blank form to be submit. Blank inputs are allowed, // as long as at least one input has a value. diff --git a/app/assets/javascripts/hyku/admin/appearance/fonts.js b/app/assets/javascripts/hyku/admin/appearance/fonts.js index 93fbdfd34..16f1e9d2f 100644 --- a/app/assets/javascripts/hyku/admin/appearance/fonts.js +++ b/app/assets/javascripts/hyku/admin/appearance/fonts.js @@ -17,7 +17,7 @@ Blacklight.onLoad(function() { inputDisplay.text(defaultValue); }); - $('.panel-footer a.restore-all-default-fonts').click(function(e) { + $('.card-footer a.restore-all-default-fonts').click(function(e) { e.preventDefault(); var allFontInputs = $("input[name*='font']"); diff --git a/app/assets/stylesheets/hyku.scss b/app/assets/stylesheets/hyku.scss index 49d6692fa..959ed3781 100644 --- a/app/assets/stylesheets/hyku.scss +++ b/app/assets/stylesheets/hyku.scss @@ -78,6 +78,12 @@ } } +// active hightlight on sort/per page on catalog page +.dropdown-item:active, +.dropdown-item.active { + background-color: #9bafbf; +} + footer.navbar { border-radius: 0; font-size: 0.9em; @@ -363,7 +369,7 @@ a.restore-default-color { margin-bottom: 2em; } -a.btn.btn-default.restore-default-color.with-color-hint { +a.btn.btn-secondary.restore-default-color.with-color-hint { margin-top: 4em; } @@ -387,7 +393,7 @@ a.btn.btn-default.restore-default-color.with-color-hint { } } -#default_images .panel-footer form { +#default_images .card-footer form { display: inline-block; } @@ -441,11 +447,13 @@ div#collapse-citations { body.public-facing { .btn { &.btn-primary, - &.btn-secondary, - &.btn-danger { + &.btn-secondary { color: #fff; } + &.btn-danger { + color: #fff !important; + } &.btn-primary { background-color: #337ab7; } @@ -502,10 +510,6 @@ body.public-facing { width: unset; } -// .featured-collection-section { -// border: 1px solid #ccc; -// } - .mb-30 { margin-bottom: 30px; } @@ -561,11 +565,6 @@ span.constraint-value p, .facet-values p { margin: 10px 0 10px 0; } -.catalog_startOverLink { - font-size: 1.15em; - font-weight: bold; -} - // collection show page styles .space-between { @@ -579,15 +578,6 @@ span.constraint-value p, .facet-values p { .hyc-bugs .hyc-last-updated, .hyc-title { padding: 0; - - h1 { - color: #000; - } - } - - .hyc-created-by, - .hyc-last-updated { - color: #000 !important; } .hyc-item-count { @@ -721,4 +711,96 @@ tr[data-feature="use-iiif-print"] { .slideshow-info { text-align: center; margin-bottom: 15px; -} \ No newline at end of file +} + +/* Collection show page */ + +// nav search header +#search-form-header { + // adds bootstrap class to element + label[for="search-field-header"] { + @extend .sr-only; + } + + .form-group { + justify-content: right; + } +} + +.hyc-bugs { + margin-top: 10px; +} + +.hyc-bl-results { + margin: 2em 0 2em; +} + +.hyrax-collections-show { + .document-metadata { + dd { + word-break: break-all; + } + } + + table.table-striped { + th { + &:not(:nth-child(1)):not(:nth-child(2)) { + text-align: center; + } + border-top: none; + } + } +} + +dd { + /* margin-bottom: .5rem; */ + margin-left: 0; + margin-bottom: 0; +} + +// collections gallery view +#documents { + + // hide the bookmark button + .caption-area { + input[name="commit"] { + display: none; + } + } + + .document { + margin-top: 6px; + padding-top: 6px; + + .document-thumbnail { + .img-thumbnail { + padding: 0.25rem; + background-color: #fff; + border: 1px solid #dee2e6; + border-radius: 0.25rem; + } + } + } +} + +// adds bootstrap class to element +.documents-gallery { + @extend .row-cols-lg-4; +} + +// pagination +.hyc-bl-pager { + .pagination { + display: flex; + } +} + +@media (max-width: 768px) { + .hyc-banner { + .hyc-bugs { + flex-wrap: wrap; + } + } +} +/* End Collection show page */ + diff --git a/app/assets/stylesheets/hyrax.scss b/app/assets/stylesheets/hyrax.scss index bb7dc7780..7fd30d825 100644 --- a/app/assets/stylesheets/hyrax.scss +++ b/app/assets/stylesheets/hyrax.scss @@ -3,6 +3,7 @@ *= require select2 *= require_self */ +@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Montserrat&display=swap'); @import "variables"; @import "bootstrap-default-overrides"; @import "bootstrap"; @@ -30,95 +31,3 @@ #collection-edit-controls label.control-label { font-weight: bold !important; } - -/* Collection show page */ -// Contribute back to Hyrax? - -// nav search header -#search-form-header { - // adds bootstrap class to element - label[for="search-field-header"] { - @extend .sr-only; - } - - .form-group { - justify-content: right; - } -} - -.hyc-bugs { - margin-top: 10px; -} - -.hyc-bl-results { - margin: 2em 0 2em; -} - -.hyrax-collections-show { - .document-metadata { - dd { - word-break: break-all; - } - } - - table.table-striped { - th { - &:not(:nth-child(1)):not(:nth-child(2)) { - text-align: center; - } - border-top: none; - } - } -} - -dd { - /* margin-bottom: .5rem; */ - margin-left: 0; - margin-bottom: 0; -} - -// collections gallery view -#documents { - - // hide the bookmark button - .caption-area { - input[name="commit"] { - display: none; - } - } - - .document { - margin-top: 6px; - padding-top: 6px; - - .document-thumbnail { - .img-thumbnail { - padding: 0.25rem; - background-color: #fff; - border: 1px solid #dee2e6; - border-radius: 0.25rem; - } - } - } -} - -// adds bootstrap class to element -.documents-gallery { - @extend .row-cols-lg-4; -} - -// pagination -.hyc-bl-pager { - .pagination { - display: flex; - } -} - -@media (max-width: 768px) { - .hyc-banner { - .hyc-bugs { - flex-wrap: wrap; - } - } -} -/* End Collection show page */ \ No newline at end of file diff --git a/app/assets/stylesheets/themes/cultural_repository.scss b/app/assets/stylesheets/themes/cultural_repository.scss index 08c716aa2..598c138ef 100644 --- a/app/assets/stylesheets/themes/cultural_repository.scss +++ b/app/assets/stylesheets/themes/cultural_repository.scss @@ -80,6 +80,7 @@ } // Note: copied over to override /* line 555, /usr/local/rvm/gems/ruby-2.5.3/gems/bootstrap-sass-3.4.1/assets/stylesheets/bootstrap/_navbar.scss */ + // TODO: is this doing anything? .navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:focus { diff --git a/app/assets/stylesheets/themes/scholarly_show.scss b/app/assets/stylesheets/themes/scholarly_show.scss index dd0bf79e4..cd81b1c0a 100644 --- a/app/assets/stylesheets/themes/scholarly_show.scss +++ b/app/assets/stylesheets/themes/scholarly_show.scss @@ -1,6 +1,6 @@ .scholarly_show { .show-actions { - .btn.btn-default, + .btn.btn-secondary, .btn.btn-danger, .btn-group { padding: 5px 10px; diff --git a/app/assets/stylesheets/variables.scss b/app/assets/stylesheets/variables.scss index 11210710e..3648903c5 100644 --- a/app/assets/stylesheets/variables.scss +++ b/app/assets/stylesheets/variables.scss @@ -1,5 +1,3 @@ -@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Montserrat&display=swap'); - $primary-font-family: "Lato", Helvetica, sans-serif; $splash-font-family: "Montserrat", "Lato", Helvetica, sans-serif; diff --git a/app/forms/hyku/forms/admin/appearance.rb b/app/forms/hyku/forms/admin/appearance.rb index 6b9cc65ba..70f917bf3 100644 --- a/app/forms/hyku/forms/admin/appearance.rb +++ b/app/forms/hyku/forms/admin/appearance.rb @@ -30,7 +30,8 @@ class Appearance < Hyrax::Forms::Admin::Appearance # @!attribute default_colors # @return [Hash] class_attribute :default_colors, default: { - 'active_tabs_background_color' => '#337ab7', + 'active_tabs_background_color' => '#f5f5f5', + 'collection_banner_text_color' => '#000000', 'default_button_background_color' => '#ffffff', 'default_button_border_color' => '#cccccc', 'default_button_text_color' => '#333333', @@ -38,6 +39,7 @@ class Appearance < Hyrax::Forms::Admin::Appearance 'facet_panel_text_color' => '#333333', 'footer_link_color' => '#ffebcd', 'footer_link_hover_color' => '#ffffff', + 'header_and_footer_background_color' => '#3c3c3c', 'header_and_footer_text_color' => '#dcdcdc', 'link_color' => '#2e74b2', 'link_hover_color' => '#215480', @@ -47,7 +49,7 @@ class Appearance < Hyrax::Forms::Admin::Appearance 'navbar_link_text_color' => '#eeeeee', 'navbar_link_text_hover_color' => '#eeeeee', 'primary_button_hover_color' => '#286090', - 'header_and_footer_background_color' => '#3c3c3c' + 'primary_button_text_color' => '#ffffff' } # rubocop:disable Metrics/BlockLength @@ -93,6 +95,7 @@ def customization_params navbar_link_text_color navbar_link_text_hover_color primary_button_hover_color + primary_button_text_color ] end # rubocop:enable Metrics/MethodLength @@ -150,6 +153,11 @@ def site @site ||= Site.instance end + # The color for the collection banner text + def collection_banner_text_color + block_for('collection_banner_text_color') + end + # The alt text for the logo image def logo_image_text block_for('logo_image_text') @@ -258,11 +266,16 @@ def footer_link_hover_color end # PRIMARY BUTTON COLORS - # The background hover color for "primary" buttons + # The background hover color for "primary" buttons and basis for other primary button options def primary_button_hover_color block_for('primary_button_hover_color') end + # The text color for "primary" buttons + def primary_button_text_color + block_for('primary_button_text_color') + end + # The border color for "primary" buttons def primary_button_border_color @primary_button_border ||= darken_color(primary_button_hover_color, 0.05) diff --git a/app/views/hyrax/admin/appearances/_banner_image_form.html.erb b/app/views/hyrax/admin/appearances/_banner_image_form.html.erb index fc2c82634..5c732a566 100644 --- a/app/views/hyrax/admin/appearances/_banner_image_form.html.erb +++ b/app/views/hyrax/admin/appearances/_banner_image_form.html.erb @@ -41,7 +41,7 @@ } }); - var inputImage = document.querySelector('[name="form[banner_image]"]'); + var inputImage = document.querySelector('[name="admin_appearance[banner_image]"]'); inputImage.addEventListener('change', function(e) { var files = e.target.files; diff --git a/app/views/hyrax/base/_analytics_button.html.erb b/app/views/hyrax/base/_analytics_button.html.erb index bb1da454d..1769b0612 100644 --- a/app/views/hyrax/base/_analytics_button.html.erb +++ b/app/views/hyrax/base/_analytics_button.html.erb @@ -1,5 +1,5 @@ <% if Hyrax.config.analytics? %> <% # turbolinks needs to be turned off or the page will use the cache and the %> <% # analytics graph will not show unless the page is refreshed. %> - <%= link_to t('.analytics'), @presenter.stats_path, id: 'stats', class: 'btn btn-default btn-block center-block', data: { turbolinks: false } %> + <%= link_to t('.analytics'), @presenter.stats_path, id: 'stats', class: 'btn btn-secondary btn-block center-block', data: { turbolinks: false } %> <% end %> \ No newline at end of file diff --git a/app/views/hyrax/base/show.html.erb b/app/views/hyrax/base/show.html.erb index 86074f8c2..502685329 100644 --- a/app/views/hyrax/base/show.html.erb +++ b/app/views/hyrax/base/show.html.erb @@ -1,11 +1,10 @@ -<%# OVERRIDE: Hyrax 3.4.1 to remove social media %> -<%# to add work-show class to works pages %> +<%# OVERRIDE: Hyrax 5, see below for details %> +<%# OVERRIDE: add works-show class %> <% content_for(:extra_body_classes, 'works-show ') %> - <% provide :page_title, @presenter.page_title %> - <%= render 'shared/citations' %> +<%# OVERRIDE: additional citations %> <%= render 'shared/additional_citations' %>
@@ -18,6 +17,7 @@
<%= render 'workflow_actions_widget', presenter: @presenter %> + <%# OVERRIDE: add pdf viewer & adjust viewer logic %> <% if @presenter.video_embed_viewer? %> <%= render 'video_embed_viewer', presenter: @presenter %> <% elsif @presenter.iiif_viewer? %> @@ -39,8 +39,9 @@
<%= render('download_pdf', presenter: @presenter, file_set_id: @presenter.file_set_presenters.first.id) if @presenter.show_pdf_download_button? %> <%= render 'citations', presenter: @presenter %> - + <%#= render 'analytics_button', presenter: @presenter %> +
<% end %>
diff --git a/app/views/hyrax/content_blocks/_form.html.erb b/app/views/hyrax/content_blocks/_form.html.erb index 0ea19bc34..01d84fdf7 100644 --- a/app/views/hyrax/content_blocks/_form.html.erb +++ b/app/views/hyrax/content_blocks/_form.html.erb @@ -161,8 +161,8 @@ <%= f.text_area :homepage_about_section_heading, value: f.object.value, class: 'form-control tinymce', rows: 20, cols: 120 %>
-
- - <%= f.submit("Save order", class: 'btn btn-primary') %> + <%= f.submit("Save order", class: 'btn btn-secondary') %> <% end %> <% else %> @@ -28,6 +28,6 @@
  • <%= link_to t('hyrax.homepage.admin_sets.link'), main_app.search_catalog_path(f: { generic_type_sim: ["Collection"]}), - class: 'btn btn-primary mt-1' %> + class: 'btn btn-secondary mt-1' %>
  • diff --git a/app/views/hyrax/my/_collection_action_menu.html.erb b/app/views/hyrax/my/_collection_action_menu.html.erb index 9f931d2e3..4d37e6d4b 100644 --- a/app/views/hyrax/my/_collection_action_menu.html.erb +++ b/app/views/hyrax/my/_collection_action_menu.html.erb @@ -3,7 +3,7 @@ <% ul_id = 'collection-action-dropdown-ul-' + id %>
    - diff --git a/app/views/hyrax/my/_work_action_menu.html.erb b/app/views/hyrax/my/_work_action_menu.html.erb index 61a02efc1..f01a1860f 100644 --- a/app/views/hyrax/my/_work_action_menu.html.erb +++ b/app/views/hyrax/my/_work_action_menu.html.erb @@ -3,7 +3,7 @@
    - diff --git a/app/views/hyrax/oers/_form_metadata.html.erb b/app/views/hyrax/oers/_form_metadata.html.erb index 98fba7c4d..5e72dfa5a 100644 --- a/app/views/hyrax/oers/_form_metadata.html.erb +++ b/app/views/hyrax/oers/_form_metadata.html.erb @@ -7,7 +7,7 @@ <% if f.object.display_additional_fields? %> <%= link_to t('hyrax.works.form.additional_fields'), '#extended-terms', - class: 'btn btn-default additional-fields', + class: 'btn btn-secondary additional-fields', data: { toggle: 'collapse' }, role: "button", 'aria-expanded'=> "false", diff --git a/app/views/shared/_appearance_styles.html.erb b/app/views/shared/_appearance_styles.html.erb index f5497a825..91e775f95 100644 --- a/app/views/shared/_appearance_styles.html.erb +++ b/app/views/shared/_appearance_styles.html.erb @@ -1,4 +1,4 @@ -<% # Dynamic styles added by the admin in the appearances page %> +<%# Dynamic styles added by the admin in the appearances page %> <% appearance = Hyku::Forms::Admin::Appearance.new %>