blacklight-spotlight 4.6.1 → 4.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,12 @@
1
+ // Global accessibility overrides
2
+
3
+ // Increase visibility of Firefox focus indicator
4
+ @-moz-document url-prefix() {
5
+ :focus {
6
+ outline: $input-focus-border-color auto 5px;
7
+ }
8
+ }
9
+
10
+ .btn:focus-visible {
11
+ outline: $input-focus-border-color auto 5px;
12
+ }
@@ -62,12 +62,7 @@ $image-overlay-max-height: 300px;
62
62
  position: relative;
63
63
 
64
64
  .img-responsive {
65
- transition: all 0.5s ease;
66
65
  width: 100%;
67
-
68
- &:hover {
69
- filter: brightness(70%);
70
- }
71
66
  }
72
67
  }
73
68
 
@@ -75,21 +70,22 @@ $image-overlay-max-height: 300px;
75
70
  position: absolute;
76
71
  bottom: 0;
77
72
  left: 0;
73
+ height: 100%;
78
74
  width: 100%;
79
- background: linear-gradient(
80
- 0deg,
81
- rgba(46, 45, 41, 0.7) 70%,
82
- rgba(46, 45, 41, 0) 100%
83
- );
75
+ background: linear-gradient(0deg, rgba(46, 45, 41, 0.7) 45%, rgba(46, 45, 41, 0) 100%);
84
76
  color: $white;
85
- padding: 50px 20px 20px 20px;
86
- text-align: center;
77
+ padding: 5%;
78
+ display: flex;
79
+ flex-direction: column;
80
+ justify-content: flex-end;
87
81
 
88
- // prevents potential blur caused by the vertical-align technique
89
- transform-style: preserve-3d;
82
+ &:hover {
83
+ background: linear-gradient(rgba(46, 45, 41, 0.7), 0%, rgba(46, 45, 41, 0.7) 100%);
84
+ }
90
85
 
91
86
  .browse-category-title {
92
87
  font-size: $h3-font-size;
88
+ text-align: center;
93
89
 
94
90
  .category-subtitle {
95
91
  display: block;
@@ -65,15 +65,24 @@ $xl-sidebar-five-tile-width: ($container-xl-sidebar * 0.2) - $tile-margin;
65
65
  color: $featured-browse-category-caption-color;
66
66
  position: absolute;
67
67
  text-align: center;
68
+ height: 100%;
68
69
  width: 100%;
69
- padding: 35px 15px 15px;
70
- background: linear-gradient(0deg, rgba(46, 45, 41, 0.7) 70%, rgba(46, 45, 41, 0) 100%);
70
+ padding: 5%;
71
+ background: linear-gradient(0deg, rgba(46, 45, 41, 0.7) 45%, rgba(46, 45, 41, 0) 100%);
71
72
  border-radius: $border-radius-lg;
73
+ display: flex;
74
+ flex-direction: column;
75
+ justify-content: flex-end;
76
+
77
+ &:hover {
78
+ background: linear-gradient(rgba(46, 45, 41, 0.7), 0%, rgba(46, 45, 41, 0.7) 100%);
79
+ }
72
80
  }
73
81
 
74
82
  .category-title {
75
83
  font-size: $h4-font-size;
76
84
  line-height: 1.2;
85
+ text-align: center;
77
86
  margin: 0;
78
87
  padding: $spacer * 0.25;
79
88
 
@@ -18,7 +18,6 @@
18
18
  padding: 0;
19
19
  position: relative;
20
20
 
21
-
22
21
  .site-title {
23
22
  margin-bottom: 0;
24
23
  }
@@ -30,14 +29,6 @@
30
29
  white-space: nowrap;
31
30
  }
32
31
 
33
- small {
34
- @extend .d-none;
35
- @extend .d-md-block;
36
- @extend .py-2;
37
-
38
- font-size: $h4-font-size;
39
- }
40
-
41
32
  .navbar {
42
33
  &:last-child {
43
34
  margin-bottom: 0;
@@ -128,12 +119,11 @@
128
119
  // especially on light background images.
129
120
  .background-container-gradient {
130
121
  @include masthead-background-containers();
131
- background:
132
- linear-gradient(
133
- rgba(0, 0, 0, 0.0),
134
- rgba(0, 0, 0, 0.4),
135
- rgba(0, 0, 0, 0.5)
136
- );
122
+ background: linear-gradient(
123
+ rgba(0, 0, 0, 0),
124
+ rgba(0, 0, 0, 0.4),
125
+ rgba(0, 0, 0, 0.5)
126
+ );
137
127
 
138
128
  height: 100%;
139
129
  }
@@ -153,12 +143,3 @@
153
143
  width: 1px;
154
144
  }
155
145
  }
156
-
157
- #skip-link {
158
- margin-left: 1rem;
159
- padding-top: 0.5rem;
160
- position: absolute;
161
- top: 0;
162
- z-index: 1000;
163
- width: auto;
164
- }
@@ -8,18 +8,6 @@
8
8
  .category-caption {
9
9
  z-index: 100;
10
10
  }
11
-
12
- .hover-overlay {
13
- height: 100%;
14
- position: absolute;
15
- width: 100%;
16
- }
17
-
18
- &:hover {
19
- .hover-overlay {
20
- background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7));
21
- }
22
- }
23
11
  }
24
12
 
25
13
  .spotlight-flexbox.browse-categories .box {
@@ -36,7 +36,7 @@ SirTrevor.Blocks.Browse = (function(){
36
36
  }
37
37
  var resource_id = data.slug || data.id;
38
38
  var markup = `
39
- <li class="field form-inline dd-item dd3-item" data-resource-id="${resource_id}" data-id="${index}" id="${this.formId("item_" + data.id)}">
39
+ <li class="field form-inline dd-item dd3-item" data-resource-id="${resource_id}" data-id="${index}" id="${this.formId(index)}">
40
40
  <input type="hidden" name="item[${index}][id]" value="${resource_id}" />
41
41
  <input type="hidden" name="item[${index}][full_title]" value="${(data.full_title || data.title)}" />
42
42
  <input data-property="weight" type="hidden" name="item[${index}][weight]" value="${data.weight}" />
@@ -42,7 +42,7 @@ SirTrevor.Blocks.BrowseGroupCategories = (function(){
42
42
  }
43
43
  var resource_id = data.slug || data.id;
44
44
  var markup = `
45
- <li class="field form-inline dd-item dd3-item" data-resource-id="${resource_id}" data-id="${index}" id="${this.formId("item_" + data.id)}">
45
+ <li class="field form-inline dd-item dd3-item" data-resource-id="${resource_id}" data-id="${index}" id="${this.formId(index)}">
46
46
  <input type="hidden" name="item[${index}][id]" value="${resource_id}" />
47
47
  <input type="hidden" name="item[${index}][title]" value="${data.title}" />
48
48
  <input data-property="weight" type="hidden" name="item[${index}][weight]" value="${data.weight}" />
@@ -70,7 +70,7 @@ Core.Block.Resources = (function(){
70
70
  }
71
71
  var resource_id = data.slug || data.id;
72
72
  var markup = `
73
- <li class="field form-inline dd-item dd3-item" data-resource-id="${resource_id}" data-id="${index}" id="${this.formId("item_" + data.id)}">
73
+ <li class="field form-inline dd-item dd3-item" data-resource-id="${resource_id}" data-id="${index}" id="${this.formId(index)}">
74
74
  <input type="hidden" name="item[${index}][id]" value="${resource_id}" />
75
75
  <input type="hidden" name="item[${index}][title]" value="${data.title}" />
76
76
  ${this._itemPanelIiifFields(index, data)}
@@ -70,7 +70,7 @@ SirTrevor.Blocks.UploadedItems = (function(){
70
70
  var dataUrl = data.url || data.file.url;
71
71
 
72
72
  var markup = `
73
- <li class="field form-inline dd-item dd3-item" data-id="${index}" id="${this.formId("item_" + dataId)}">
73
+ <li class="field form-inline dd-item dd3-item" data-id="${index}" id="${this.formId(index)}">
74
74
  <input type="hidden" name="item[${index}][id]" value="${dataId}" />
75
75
  <input type="hidden" name="item[${index}][title]" value="${dataTitle}" />
76
76
  <input type="hidden" name="item[${index}][url]" data-item-grid-thumbnail="true" value="${dataUrl}"/>
@@ -5,7 +5,7 @@ import Core from 'spotlight/core'
5
5
  export default class {
6
6
  connect(){
7
7
  SirTrevor.setDefaults({
8
- iconUrl: Spotlight.sirTrevorIcon,
8
+ iconUrl: Spotlight.sirTrevorIcon || window.sirTrevorIcon,
9
9
  uploadUrl: $('[data-attachment-endpoint]').data('attachment-endpoint'),
10
10
  ajaxOptions: {
11
11
  headers: {
@@ -44,7 +44,7 @@ module Spotlight
44
44
  end
45
45
 
46
46
  def finalize_job_tracker!
47
- return unless job_tracker.status == 'in_progress' || job_tracker.status == 'enqueued'
47
+ return unless %w[in_progress enqueued].include?(job_tracker.status)
48
48
 
49
49
  job_tracker.update(
50
50
  status: @failed ? 'failed' : 'completed',
@@ -33,7 +33,7 @@
33
33
  <%= masthead_heading_content %>
34
34
  </h1>
35
35
  <% if masthead_subheading_content %>
36
- <small><%= masthead_subheading_content %></small>
36
+ <small class="d-none d-md-block py-2 fs-4"><%= masthead_subheading_content %></small>
37
37
  <% end %>
38
38
  <% end %>
39
39
  </div>
@@ -122,6 +122,25 @@ module Spotlight
122
122
  generate 'blacklight_gallery:install'
123
123
  end
124
124
 
125
+ def configure_osd_for_sprockets
126
+ return unless defined?(Sprockets)
127
+
128
+ append_to_file 'app/assets/javascripts/application.js', "\n//= require openseadragon\n//= require openseadragon-rails/openseadragon-rails\n"
129
+
130
+ append_to_file 'config/initializers/assets.rb' do
131
+ <<~CONTENT
132
+ Rails.application.config.assets.paths << Rails.root.join('node_modules/openseadragon/build/openseadragon/images')
133
+ Rails.application.config.assets.paths << Rails.root.join('node_modules/openseadragon/build/openseadragon')
134
+ CONTENT
135
+ end
136
+
137
+ append_to_file 'app/assets/config/manifest.js', "//= link_tree ../../../node_modules/openseadragon/build/openseadragon/images\n"
138
+
139
+ inject_into_file 'app/controllers/application_controller.rb', after: 'class ApplicationController < ActionController::Base' do
140
+ "\n helper Openseadragon::OpenseadragonHelper\n"
141
+ end
142
+ end
143
+
125
144
  def add_oembed
126
145
  unless Bundler.locked_gems.dependencies.key? 'blacklight-oembed'
127
146
  gem 'blacklight-oembed', '~> 1.0'
@@ -129,6 +148,12 @@ module Spotlight
129
148
  end
130
149
  generate 'blacklight_oembed:install'
131
150
  copy_file 'config/initializers/oembed.rb'
151
+
152
+ return unless defined?(Sprockets)
153
+
154
+ # Use the rolled up assets from blacklight-oembed for sprockets
155
+ gsub_file 'app/assets/javascripts/blacklight_oembed.js', "import oembed from 'blacklight_oembed/oembed'",
156
+ '//= require blacklight_oembed/oembed'
132
157
  end
133
158
 
134
159
  def add_mailer_defaults
@@ -16,7 +16,7 @@
16
16
  </updateLog>
17
17
  </updateHandler>
18
18
 
19
- <!-- solr lib dirs -->
19
+ <!-- solr lib dirs: needed for Solr 8 compatibility but ignored in solr 9.8 and above -->
20
20
  <lib dir="${solr.install.dir:../../../..}/modules/analysis-extras/lib" />
21
21
  <lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lib" />
22
22
  <lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lucene-libs" />
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spotlight
4
- VERSION = '4.6.1'
4
+ VERSION = '4.7.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight-spotlight
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.6.1
4
+ version: 4.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2024-12-16 00:00:00.000000000 Z
14
+ date: 2025-02-11 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activejob-status
@@ -863,6 +863,7 @@ files:
863
863
  - app/assets/javascripts/spotlight/spotlight.esm.js.map
864
864
  - app/assets/javascripts/spotlight/spotlight.js
865
865
  - app/assets/javascripts/spotlight/spotlight.js.map
866
+ - app/assets/stylesheets/spotlight/#_accessibility.scss#
866
867
  - app/assets/stylesheets/spotlight/_accessibility.scss
867
868
  - app/assets/stylesheets/spotlight/_attachments.css
868
869
  - app/assets/stylesheets/spotlight/_blacklight_configuration.scss
@@ -1597,7 +1598,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1597
1598
  - !ruby/object:Gem::Version
1598
1599
  version: '0'
1599
1600
  requirements: []
1600
- rubygems_version: 3.4.19
1601
+ rubygems_version: 3.5.11
1601
1602
  signing_key:
1602
1603
  specification_version: 4
1603
1604
  summary: Enable librarians, curators, and others who are responsible for digital collections