Skip to content

Commit

Permalink
Add blacklight-gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Dec 19, 2024
1 parent 27215b6 commit d92b717
Show file tree
Hide file tree
Showing 15 changed files with 61 additions and 13 deletions.
4 changes: 1 addition & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ gem 'puma', '~> 6.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
Expand Down Expand Up @@ -139,4 +137,4 @@ gem 'cssbundling-rails', '~> 1.4'

gem 'jsbundling-rails', '~> 1.3'

gem "turbo-rails", "~> 2.0"
gem 'turbo-rails', '~> 2.0'
1 change: 0 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,6 @@ DEPENDENCIES
honeybadger
iiif-presentation
jbuilder (~> 2.7)
jquery-rails
jsbundling-rails (~> 1.3)
jsonpath
letter_opener
Expand Down
3 changes: 2 additions & 1 deletion app/javascript/bibliography.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable camelcase */
/* global Bibliography */
import Blacklight from "blacklight-frontend";

(function (global) {
var Bibliography;
Expand Down Expand Up @@ -60,7 +61,7 @@
// This string contains the formatted bibliography for this item.
// This string can contain HTML elements as well which should be displayed correctly.
var formatted_bibliography = bibEntry.attributes.formatted_bibliography_ts.attributes.value;

return '<p class="' + elClass + '">' +
formatted_bibliography +
' <a href="' + bibEntry.links.self + '">' +
Expand Down
4 changes: 3 additions & 1 deletion app/javascript/blacklight_gallery.js
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
//= require blacklight_gallery/default
import 'blacklight-gallery/vendor/assets/javascripts/imagesloaded.min.js'
import 'blacklight-gallery/app/assets/javascripts/blacklight_gallery/slideshow'
import 'blacklight-gallery/app/assets/javascripts/blacklight_gallery/masonry'
4 changes: 3 additions & 1 deletion app/javascript/blacklight_oembed.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//= require 'blacklight_oembed/jquery.oembed.js'

import Blacklight from "blacklight-frontend";

Blacklight.onLoad(function() {
$('[data-embed-url]').oEmbed();
});
});
3 changes: 2 additions & 1 deletion app/javascript/cited_documents.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable camelcase */
/* global CitedDocuments */
/* global Blacklight */

import Blacklight from "blacklight-frontend";

(function (global) {
var CitedDocuments;
Expand Down
3 changes: 2 additions & 1 deletion app/javascript/exhibit_search_typeahead.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/* global Blacklight */
/* global Bloodhound */
/* global ExhibitSearchTypeahead */

import Blacklight from "blacklight-frontend";

(function (global) {
var ExhibitSearchTypeahead;

Expand Down
1 change: 1 addition & 0 deletions app/javascript/full_text_collapse.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* global Blacklight */
import Blacklight from "blacklight-frontend";

Blacklight.onLoad(function(){
var uniqueId = (function() {
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/index_status_typeahead.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* global Blacklight */
/* global Bloodhound */
/* global IndexStatusTypeahead */
import Blacklight from "blacklight-frontend";

(function (global) {
var IndexStatusTypeahead;
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/nested_related_items.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* global Blacklight */
/* global NestedRelatedItems */
import Blacklight from "blacklight-frontend";

(function (global) {
var NestedRelatedItems;
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/site_search_type_toggle.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* global Blacklight */
/* global SiteSearchTypeToggle */
import Blacklight from "blacklight-frontend";

(function (global) {
var SiteSearchTypeToggle;
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/table_of_contents.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global Blacklight */
import Blacklight from "blacklight-frontend";

Blacklight.onLoad(function() {
$('.blacklight-toc_search').on('show.bs.collapse hide.bs.collapse', function(){
Expand Down
3 changes: 3 additions & 0 deletions app/views/layouts/spotlight/base.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
<% end %>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/sul-dlss/component-library@v2024-12-18/styles/sul.css" />
<%= stylesheet_link_tag "component_library_overrides" %>
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.serializeJSON/3.2.1/jquery.serializejson.min.js"></script>

<%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>
<script type="text/javascript">
Honeybadger.configure({
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"bootstrap-slider": "^11.0.2",
"leaflet": "^1.9.4",
"leaflet-sidebar": "^0.2.4",
"masonry-layout": "v4",
"nodemon": "^3.1.7",
"openseadragon-rails": "^1.0.4",
"postcss": "^8.4.49",
Expand Down
39 changes: 39 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,11 @@ dependency-graph@^0.11.0:
resolved "https://registry.yarnpkg.com/dependency-graph/-/dependency-graph-0.11.0.tgz#ac0ce7ed68a54da22165a85e97a01d53f5eb2e27"
integrity sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg==

desandro-matches-selector@^2.0.0:
version "2.0.2"
resolved "https://registry.yarnpkg.com/desandro-matches-selector/-/desandro-matches-selector-2.0.2.tgz#717beed4dc13e7d8f3762f707a6d58a6774218e1"
integrity sha512-+1q0nXhdzg1IpIJdMKalUwvvskeKnYyEe3shPRwedNcWtnhEKT3ZxvFjzywHDeGcKViIxTCAoOYQWP1qD7VNyg==

detect-libc@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
Expand Down Expand Up @@ -484,6 +489,11 @@ escalade@^3.1.1, escalade@^3.2.0:
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5"
integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==

ev-emitter@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ev-emitter/-/ev-emitter-1.1.1.tgz#8f18b0ce5c76a5d18017f71c0a795c65b9138f2a"
integrity sha512-ipiDYhdQSCZ4hSbX4rMW+XzNKMD1prg/sTvoVmSLkuQ1MVlwjJQQA+sW8tMYR3BLUr9KjodFV4pvzunvRhd33Q==

fast-glob@^3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129"
Expand All @@ -509,6 +519,13 @@ fill-range@^7.1.1:
dependencies:
to-regex-range "^5.0.1"

fizzy-ui-utils@^2.0.0:
version "2.0.7"
resolved "https://registry.yarnpkg.com/fizzy-ui-utils/-/fizzy-ui-utils-2.0.7.tgz#7df45dcc4eb374a08b65d39bb9a4beedf7330505"
integrity sha512-CZXDVXQ1If3/r8s0T+v+qVeMshhfcuq0rqIFgJnrtd+Bu8GmDmqMjntjUePypVtjHXKJ6V4sw9zeyox34n9aCg==
dependencies:
desandro-matches-selector "^2.0.0"

fraction.js@^4.3.7:
version "4.3.7"
resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.3.7.tgz#06ca0085157e42fda7f9e726e79fefc4068840f7"
Expand All @@ -533,6 +550,11 @@ get-caller-file@^2.0.5:
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==

get-size@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/get-size/-/get-size-2.0.3.tgz#54a1d0256b20ea7ac646516756202769941ad2ef"
integrity sha512-lXNzT/h/dTjTxRbm9BXb+SGxxzkm97h/PCIKtlN/CBCxxmkkIVV21udumMS93MuVTDX583gqc94v3RjuHmI+2Q==

get-stdin@^9.0.0:
version "9.0.0"
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-9.0.0.tgz#3983ff82e03d56f1b2ea0d3e60325f39d703a575"
Expand Down Expand Up @@ -640,6 +662,14 @@ lilconfig@^3.1.1:
resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.1.3.tgz#a1bcfd6257f9585bf5ae14ceeebb7b559025e4c4"
integrity sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==

masonry-layout@v4:
version "4.2.2"
resolved "https://registry.yarnpkg.com/masonry-layout/-/masonry-layout-4.2.2.tgz#d57b44af13e601bfcdc423f1dd8348b5524de348"
integrity sha512-iGtAlrpHNyxaR19CvKC3npnEcAwszXoyJiI8ARV2ePi7fmYhIud25MHK8Zx4P0LCC4d3TNO9+rFa1KoK1OEOaA==
dependencies:
get-size "^2.0.2"
outlayer "^2.1.0"

merge2@^1.3.0:
version "1.4.1"
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
Expand Down Expand Up @@ -718,6 +748,15 @@ openseadragon@^5.0.1:
resolved "https://registry.yarnpkg.com/openseadragon/-/openseadragon-5.0.1.tgz#ad3aaccc6c0f733c3153131e9af05bc2e17a1952"
integrity sha512-a/hjouW9i3UfWxRADVYN2MyRhXMGnE7x9VVL7/4jXCcDLFyO4UM5o4RStYtqa5BfaHw/wMNAaD2WbxQF8f1pJg==

outlayer@^2.1.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/outlayer/-/outlayer-2.1.1.tgz#29863b6de10ea5dadfffcadfa0d728907387e9a2"
integrity sha512-+GplXsCQ3VrbGujAeHEzP9SXsBmJxzn/YdDSQZL0xqBmAWBmortu2Y9Gwdp9J0bgDQ8/YNIPMoBM13nTwZfAhw==
dependencies:
ev-emitter "^1.0.0"
fizzy-ui-utils "^2.0.0"
get-size "^2.0.2"

path-type@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/path-type/-/path-type-5.0.0.tgz#14b01ed7aea7ddf9c7c3f46181d4d04f9c785bb8"
Expand Down

0 comments on commit d92b717

Please sign in to comment.