-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
175 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
//= link_tree ../images | ||
//= link_directory ../javascripts .js | ||
//= link application.css | ||
//= link spotlight/manifest.js | ||
//= link spotlight/manifest.js | ||
//= link_tree ../../javascript .js | ||
//= link_tree ../../../vendor/javascript .js | ||
|
||
// needed for import map pin_all_under | ||
//= link spotlight/application.js | ||
//= link spotlight/spotlight.esm.js | ||
//= link spotlight/spotlight.js |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails | ||
import jQuery from 'jquery' | ||
window.jQuery = jQuery | ||
window.$ = jQuery | ||
|
||
console.log("JQURY imported") | ||
import 'bootstrap' | ||
import "@hotwired/turbo-rails" | ||
import L from 'leaflet' | ||
window.L = L | ||
import SirTrevor from 'sir-trevor' | ||
window.SirTrevor = SirTrevor | ||
import Clipboard from 'clipboard' | ||
window.Clipboard = Clipboard | ||
|
||
// We can probably ditch this dynamic import once we use Blacklight 8 | ||
import('blacklight/blacklight') | ||
import('spotlight/spotlight.esm').then((Spotlight)=> { | ||
console.log('spotlight defined') | ||
window.Spotlight = Spotlight | ||
}) | ||
|
||
import {I18n} from 'i18n-js' | ||
window.I18n = I18n | ||
|
||
//= require rails-ujs | ||
//= require turbolinks | ||
// | ||
// | ||
// Required by Blacklight | ||
//= require jquery3 | ||
//= require popper | ||
//= require twitter/typeahead | ||
//= require bootstrap | ||
//= require bootstrap/util | ||
//= require blacklight/blacklight | ||
|
||
//= require transform_result | ||
//= require i18n/translations | ||
// require_tree . | ||
|
||
|
||
// For blacklight_range_limit built-in JS, if you don't want it you don't need | ||
// this: | ||
//= require 'blacklight_range_limit' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<!DOCTYPE html> | ||
<%= content_tag :html, class: 'no-js', **(try(:html_tag_attributes) || {}) do %> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<%= render partial: 'shared/analytics' %> | ||
<title><%= h(@page_title || application_name.to_s) %></title> | ||
<link href="<%= current_exhibit ? spotlight.opensearch_exhibit_catalog_url(current_exhibit, format: 'xml') : main_app.opensearch_catalog_url(format: 'xml') %>" title="<%= h(@page_title || application_name.to_str) %>" type="application/opensearchdescription+xml" rel="search"/> | ||
<%= favicon_link_tag 'favicon.ico' %> | ||
<% if current_exhibit %> | ||
<%= exhibit_stylesheet_link_tag "application" %> | ||
<% else %> | ||
<%= stylesheet_link_tag "application" %> | ||
<% end %> | ||
|
||
<%#= javascript_include_tag "application" %> | ||
<%= javascript_importmap_tags %> | ||
<%= csrf_meta_tags %> | ||
<%= content_for(:head) %> | ||
<%= description %> | ||
<%= twitter_card %> | ||
<%= opengraph %> | ||
<%= javascript_tag "window.addEventListener('load', () => Spotlight.sirTrevorIcon = '#{asset_path('spotlight/blocks/sir-trevor-icons.svg')}')" %> | ||
<%= javascript_tag '$.fx.off = true;' if Rails.env.test? %> | ||
</head> | ||
<body class="<%= render_body_class %>"> | ||
<%= render partial: 'shared/body_preamble' %> | ||
<div id="skip-link"> | ||
<% if should_render_spotlight_search_bar? %> | ||
<%= link_to t('blacklight.skip_links.search_field'), '#search_field', class: 'element-invisible element-focusable rounded-bottom py-2 px-3', data: { turbolinks: 'false' } %> | ||
<% end %> | ||
<%= link_to t('blacklight.skip_links.main_content'), '#main-container', class: 'element-invisible element-focusable rounded-bottom py-2 px-3', data: { turbolinks: 'false' } %> | ||
<%= content_for(:skip_links) %> | ||
</div> | ||
|
||
<%= render partial: 'shared/header_navbar' %> | ||
<%= render partial: 'shared/masthead' %> | ||
<%= content_for?(:header_content) ? yield(:header_content) : "" %> | ||
|
||
<main id="main-container" class="<%= container_classes %>" role="main" aria-label="<%= t('blacklight.main.aria.main_container') %>"> | ||
<%= content_for(:container_header) %> | ||
|
||
<%= render partial: 'shared/flash_msg', layout: 'shared/flash_messages' %> | ||
|
||
<div class="row"> | ||
<%= content_for?(:content) ? yield(:content) : yield %> | ||
</div> | ||
</main> | ||
|
||
<%= render partial: 'shared/footer' %> | ||
<%= render partial: 'shared/modal' %> | ||
</body> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
<%= javascript_tag do %> | ||
I18n.defaultLocale = "<%= I18n.default_locale %>"; | ||
I18n.locale = "<%= I18n.locale %>"; | ||
window.addEventListener('load', () => { | ||
console.log("SPOT", window.Spotlight) | ||
I18n.defaultLocale = "<%= I18n.default_locale %>"; | ||
I18n.locale = "<%= I18n.locale %>"; | ||
}) | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require_relative "../config/application" | ||
require "importmap/commands" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Pin npm packages by running ./bin/importmap | ||
|
||
pin "application", preload: true | ||
pin "jquery", to: "https://ga.jspm.io/npm:[email protected]/dist/jquery.js", preload: true | ||
pin "bootstrap", to: "https://ga.jspm.io/npm:[email protected]/dist/js/bootstrap.js" | ||
pin "popper.js", to: "https://ga.jspm.io/npm:[email protected]/dist/umd/popper.js" | ||
pin "@hotwired/turbo-rails", to: "https://ga.jspm.io/npm:@hotwired/[email protected]/app/javascript/turbo/index.js" | ||
pin "@hotwired/turbo", to: "https://ga.jspm.io/npm:@hotwired/[email protected]/dist/turbo.es2017-esm.js" | ||
pin "@rails/actioncable/src", to: "https://ga.jspm.io/npm:@rails/[email protected]/src/index.js" | ||
pin "leaflet", to: "https://ga.jspm.io/npm:[email protected]/dist/leaflet-src.js" | ||
pin_all_from Blacklight::Engine.root.join('app/assets/javascripts/blacklight/'), under: 'blacklight' | ||
pin_all_from Spotlight::Engine.root.join('app/assets/javascripts/spotlight/'), under: 'spotlight' | ||
pin "sir-trevor", to: "https://ga.jspm.io/npm:[email protected]/build/sir-trevor.js" | ||
pin "clipboard", to: "https://ga.jspm.io/npm:[email protected]/lib/clipboard.js" | ||
pin "delegate", to: "https://ga.jspm.io/npm:[email protected]/src/delegate.js" | ||
pin "good-listener", to: "https://ga.jspm.io/npm:[email protected]/src/listen.js" | ||
pin "select", to: "https://ga.jspm.io/npm:[email protected]/src/select.js" | ||
pin "tiny-emitter", to: "https://ga.jspm.io/npm:[email protected]/index.js" | ||
pin "i18n-js", to: "https://ga.jspm.io/npm:[email protected]/app/assets/javascripts/i18n.js" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.