arclight 0.0.1 → 1.6.2
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.
- checksums.yaml +5 -5
- data/.all-contributorsrc +450 -0
- data/.codeclimate.yml +5 -0
- data/.eslintrc +22 -0
- data/.github/workflows/ruby.yml +51 -0
- data/.gitignore +7 -0
- data/.rspec +0 -1
- data/.rubocop.yml +521 -0
- data/.rubocop_todo.yml +122 -0
- data/.solr_wrapper +6 -0
- data/CONTRIBUTING.md +43 -0
- data/CONTRIBUTORS.md +79 -0
- data/Gemfile +41 -0
- data/LICENSE.txt +1 -0
- data/README.md +100 -12
- data/Rakefile +13 -3
- data/app/assets/images/arclight/logo.png +0 -0
- data/app/assets/images/blacklight/bookmark.svg +1 -0
- data/app/assets/images/blacklight/collection.svg +5 -0
- data/app/assets/images/blacklight/compact.svg +1 -0
- data/app/assets/images/blacklight/container.svg +5 -0
- data/app/assets/images/blacklight/ead.svg +1 -0
- data/app/assets/images/blacklight/file.svg +5 -0
- data/app/assets/images/blacklight/folder.svg +1 -0
- data/app/assets/images/blacklight/list.svg +1 -0
- data/app/assets/images/blacklight/minus.svg +1 -0
- data/app/assets/images/blacklight/online.svg +5 -0
- data/app/assets/images/blacklight/pdf.svg +1 -0
- data/app/assets/images/blacklight/plus.svg +1 -0
- data/app/assets/images/blacklight/repository.svg +1 -0
- data/app/assets/javascripts/arclight/arclight.js +4 -0
- data/app/assets/javascripts/arclight/oembed_controller.js +58 -0
- data/app/assets/javascripts/arclight/truncate_controller.js +27 -0
- data/app/assets/stylesheets/arclight/application.scss +14 -0
- data/app/assets/stylesheets/arclight/build.scss +4 -0
- data/app/assets/stylesheets/arclight/modules/collection_search.scss +3 -0
- data/app/assets/stylesheets/arclight/modules/hierarchy_and_online_contents.scss +155 -0
- data/app/assets/stylesheets/arclight/modules/highlights.scss +11 -0
- data/app/assets/stylesheets/arclight/modules/icons.scss +20 -0
- data/app/assets/stylesheets/arclight/modules/layout.scss +220 -0
- data/app/assets/stylesheets/arclight/modules/mastheads.scss +42 -0
- data/app/assets/stylesheets/arclight/modules/repositories.scss +25 -0
- data/app/assets/stylesheets/arclight/modules/repository_card.scss +9 -0
- data/app/assets/stylesheets/arclight/modules/search_form.scss +9 -0
- data/app/assets/stylesheets/arclight/modules/search_results.scss +250 -0
- data/app/assets/stylesheets/arclight/modules/show_collection.scss +38 -0
- data/app/assets/stylesheets/arclight/modules/truncator.scss +58 -0
- data/app/assets/stylesheets/arclight/responsive.scss +13 -0
- data/app/assets/stylesheets/arclight/variables.scss +25 -0
- data/app/components/arclight/access_component.html.erb +14 -0
- data/app/components/arclight/access_component.rb +25 -0
- data/app/components/arclight/bookmark_component.html.erb +25 -0
- data/app/components/arclight/bookmark_component.rb +9 -0
- data/app/components/arclight/breadcrumb_component.rb +50 -0
- data/app/components/arclight/breadcrumbs_hierarchy_component.html.erb +34 -0
- data/app/components/arclight/breadcrumbs_hierarchy_component.rb +25 -0
- data/app/components/arclight/collection_context_component.html.erb +12 -0
- data/app/components/arclight/collection_context_component.rb +27 -0
- data/app/components/arclight/collection_info_component.html.erb +28 -0
- data/app/components/arclight/collection_info_component.rb +26 -0
- data/app/components/arclight/collection_sidebar_component.html.erb +15 -0
- data/app/components/arclight/collection_sidebar_component.rb +39 -0
- data/app/components/arclight/constraints_component.html.erb +7 -0
- data/app/components/arclight/constraints_component.rb +17 -0
- data/app/components/arclight/document_collection_context_component.html.erb +29 -0
- data/app/components/arclight/document_collection_context_component.rb +28 -0
- data/app/components/arclight/document_collection_hierarchy_component.html.erb +50 -0
- data/app/components/arclight/document_collection_hierarchy_component.rb +62 -0
- data/app/components/arclight/document_component.html.erb +39 -0
- data/app/components/arclight/document_component.rb +49 -0
- data/app/components/arclight/document_components_hierarchy_component.html.erb +20 -0
- data/app/components/arclight/document_components_hierarchy_component.rb +34 -0
- data/app/components/arclight/document_download_component.html.erb +24 -0
- data/app/components/arclight/document_download_component.rb +71 -0
- data/app/components/arclight/embed_component.html.erb +10 -0
- data/app/components/arclight/embed_component.rb +43 -0
- data/app/components/arclight/expand_hierarchy_button_component.html.erb +5 -0
- data/app/components/arclight/expand_hierarchy_button_component.rb +16 -0
- data/app/components/arclight/group_component.html.erb +34 -0
- data/app/components/arclight/group_component.rb +23 -0
- data/app/components/arclight/header_component.html.erb +5 -0
- data/app/components/arclight/header_component.rb +10 -0
- data/app/components/arclight/index_metadata_field_component.html.erb +16 -0
- data/app/components/arclight/index_metadata_field_component.rb +20 -0
- data/app/components/arclight/masthead_component.html.erb +17 -0
- data/app/components/arclight/masthead_component.rb +10 -0
- data/app/components/arclight/metadata_section_component.html.erb +13 -0
- data/app/components/arclight/metadata_section_component.rb +22 -0
- data/app/components/arclight/oembed_viewer_component.html.erb +5 -0
- data/app/components/arclight/oembed_viewer_component.rb +16 -0
- data/app/components/arclight/online_content_filter_component.html.erb +15 -0
- data/app/components/arclight/online_content_filter_component.rb +17 -0
- data/app/components/arclight/online_status_indicator_component.rb +19 -0
- data/app/components/arclight/repository_breadcrumb_component.html.erb +10 -0
- data/app/components/arclight/repository_breadcrumb_component.rb +17 -0
- data/app/components/arclight/repository_location_component.html.erb +20 -0
- data/app/components/arclight/repository_location_component.rb +10 -0
- data/app/components/arclight/search_bar_component.html.erb +27 -0
- data/app/components/arclight/search_bar_component.rb +32 -0
- data/app/components/arclight/search_result_breadcrumbs_component.html.erb +6 -0
- data/app/components/arclight/search_result_breadcrumbs_component.rb +37 -0
- data/app/components/arclight/search_result_component.html.erb +20 -0
- data/app/components/arclight/search_result_component.rb +18 -0
- data/app/components/arclight/search_result_title_component.html.erb +15 -0
- data/app/components/arclight/search_result_title_component.rb +15 -0
- data/app/components/arclight/sidebar_component.html.erb +9 -0
- data/app/components/arclight/sidebar_component.rb +19 -0
- data/app/components/arclight/upper_metadata_layout_component.rb +10 -0
- data/app/components/blacklight/icons/bookmark_component.rb +12 -0
- data/app/components/blacklight/icons/collection_component.rb +14 -0
- data/app/components/blacklight/icons/compact_component.rb +12 -0
- data/app/components/blacklight/icons/container_component.rb +14 -0
- data/app/components/blacklight/icons/ead_component.rb +12 -0
- data/app/components/blacklight/icons/file_component.rb +14 -0
- data/app/components/blacklight/icons/folder_component.rb +12 -0
- data/app/components/blacklight/icons/online_component.rb +15 -0
- data/app/components/blacklight/icons/pdf_component.rb +12 -0
- data/app/components/blacklight/icons/repository_component.rb +12 -0
- data/app/controllers/arclight/repositories_controller.rb +40 -0
- data/app/helpers/arclight/ead_format_helpers.rb +309 -0
- data/app/helpers/arclight/field_config_helpers.rb +26 -0
- data/app/helpers/arclight_helper.rb +108 -0
- data/app/models/arclight/document_downloads.rb +122 -0
- data/app/models/arclight/parent.rb +24 -0
- data/app/models/arclight/parents.rb +39 -0
- data/app/models/arclight/requests/aeon_external_request.rb +42 -0
- data/app/models/arclight/requests/aeon_web_ead.rb +52 -0
- data/app/models/arclight/requests/google_form.rb +49 -0
- data/app/models/concerns/arclight/catalog.rb +44 -0
- data/app/models/concerns/arclight/search_behavior.rb +47 -0
- data/app/models/concerns/arclight/solr_document.rb +160 -0
- data/app/presenters/arclight/index_presenter.rb +10 -0
- data/app/presenters/arclight/show_presenter.rb +54 -0
- data/app/views/arclight/.keep +0 -0
- data/app/views/arclight/_requests.html.erb +7 -0
- data/app/views/arclight/repositories/_repository.html.erb +43 -0
- data/app/views/arclight/repositories/index.html.erb +9 -0
- data/app/views/arclight/repositories/show.html.erb +37 -0
- data/app/views/arclight/requests/_aeon_external_request_endpoint.html.erb +8 -0
- data/app/views/arclight/requests/_aeon_web_ead.html.erb +6 -0
- data/app/views/arclight/requests/_google_form.html.erb +10 -0
- data/app/views/catalog/_document_list.html.erb +8 -0
- data/app/views/catalog/_group.html.erb +4 -0
- data/app/views/catalog/_group_toggle.html.erb +10 -0
- data/app/views/catalog/_search_results_header.html.erb +3 -0
- data/app/views/catalog/hierarchy.html.erb +19 -0
- data/app/views/catalog/index.html.erb +17 -0
- data/app/views/shared/_breadcrumbs.html.erb +3 -0
- data/app/views/shared/_main_menu_links.html.erb +6 -0
- data/arclight.gemspec +29 -11
- data/bin/rails +13 -0
- data/config/breadcrumbs.rb +24 -0
- data/config/i18n-tasks.yml +134 -0
- data/config/importmap.rb +3 -0
- data/config/locales/arclight.en.yml +100 -0
- data/config/repositories.yml +0 -0
- data/config/routes.rb +6 -0
- data/docker-compose.yml +16 -0
- data/lib/arclight/digital_object.rb +27 -0
- data/lib/arclight/engine.rb +47 -0
- data/lib/arclight/exceptions.rb +19 -0
- data/lib/arclight/hash_absolute_xpath.rb +62 -0
- data/lib/arclight/level_label.rb +46 -0
- data/lib/arclight/missing_id_strategy.rb +21 -0
- data/lib/arclight/normalized_date.rb +49 -0
- data/lib/arclight/normalized_id.rb +30 -0
- data/lib/arclight/normalized_title.rb +33 -0
- data/lib/arclight/repository.rb +116 -0
- data/lib/arclight/routes/hierarchy.rb +19 -0
- data/lib/arclight/routes.rb +8 -0
- data/lib/arclight/traject/ead2_component_config.rb +335 -0
- data/lib/arclight/traject/ead2_config.rb +316 -0
- data/lib/arclight/traject/nokogiri_namespaceless_reader.rb +22 -0
- data/lib/arclight/version.rb +3 -1
- data/lib/arclight/year_range.rb +111 -0
- data/lib/arclight.rb +11 -1
- data/lib/generators/arclight/install_generator.rb +163 -0
- data/lib/generators/arclight/templates/arclight.scss +6 -0
- data/lib/generators/arclight/templates/catalog_controller.rb +423 -0
- data/lib/generators/arclight/templates/config/downloads.yml +25 -0
- data/lib/generators/arclight/templates/config/locales/arclight.en.yml +61 -0
- data/lib/generators/arclight/templates/config/repositories.yml +53 -0
- data/lib/generators/arclight/update_generator.rb +22 -0
- data/lib/tasks/index.rake +84 -0
- data/package.json +30 -0
- data/solr/conf/_rest_managed.json +3 -0
- data/solr/conf/admin-extra.html +31 -0
- data/solr/conf/elevate.xml +36 -0
- data/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
- data/solr/conf/protwords.txt +21 -0
- data/solr/conf/schema.xml +400 -0
- data/solr/conf/solrconfig.xml +328 -0
- data/solr/conf/spellings.txt +2 -0
- data/solr/conf/stopwords.txt +58 -0
- data/solr/conf/stopwords_en.txt +58 -0
- data/solr/conf/synonyms.txt +31 -0
- data/solr/conf/xslt/example.xsl +132 -0
- data/solr/conf/xslt/example_atom.xsl +67 -0
- data/solr/conf/xslt/example_rss.xsl +66 -0
- data/solr/conf/xslt/luke.xsl +337 -0
- data/tasks/arclight.rake +79 -0
- data/template.rb +10 -0
- metadata +440 -20
- data/.travis.yml +0 -5
data/CONTRIBUTORS.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
## Contributors ✨
|
|
2
|
+
|
|
3
|
+
ArcLight is a cross-institutional project led by Stanford University, with contributions from Duke University, Georgia Tech, Indiana University, LYRASIS, the National Library of Medicine, University of Michigan, Princeton University, and Rockefeller Archive Center.
|
|
4
|
+
|
|
5
|
+
Individual project contributors include ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
|
6
|
+
|
|
7
|
+
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
|
8
|
+
<!-- prettier-ignore-start -->
|
|
9
|
+
<!-- markdownlint-disable -->
|
|
10
|
+
<table>
|
|
11
|
+
<tr>
|
|
12
|
+
<td align="center"><a href="https://github.com/seanaery"><img src="https://avatars3.githubusercontent.com/u/3933756?v=4" width="125px;" alt="Sean Aery"/><br /><sub><b>Sean Aery</b></sub></a><br /><a href="https://github.com/projectblacklight/arclight/commits?author=seanaery" title="Code">💻</a></td>
|
|
13
|
+
<td align="center"><a href="http://hillelarnold.com"><img src="https://avatars0.githubusercontent.com/u/607621?v=4" width="125px;" alt="Hillel Arnold"/><br /><sub><b>Hillel Arnold</b></sub></a><br /><a href="#analysis-helrond" title="Functional requirements and related research">🔬</a> <a href="#userTesting-helrond" title="User Testing">📓</a></td>
|
|
14
|
+
<td align="center"><a href="http://cbeer.info"><img src="https://avatars1.githubusercontent.com/u/111218?v=4" width="125px;" alt="Chris Beer"/><br /><sub><b>Chris Beer</b></sub></a><br /><a href="https://github.com/projectblacklight/arclight/commits?author=cbeer" title="Code">💻</a> <a href="https://github.com/projectblacklight/arclight/commits?author=cbeer" title="Documentation">📖</a></td>
|
|
15
|
+
<td align="center"><a href="http://leaannbradford.com"><img src="https://avatars3.githubusercontent.com/u/18175797?v=4" width="125px;" alt="Lea Ann Bradford"/><br /><sub><b>Lea Ann Bradford</b></sub></a><br /><a href="https://github.com/projectblacklight/arclight/commits?author=labradford" title="Code">💻</a></td>
|
|
16
|
+
<td align="center"><a href="http://actspatial.com"><img src="https://avatars0.githubusercontent.com/u/9905193?v=4" width="125px;" alt="Christina Chortaria"/><br /><sub><b>Christina Chortaria</b></sub></a><br /><a href="https://github.com/projectblacklight/arclight/commits?author=christinach" title="Code">💻</a></td>
|
|
17
|
+
</tr>
|
|
18
|
+
<tr>
|
|
19
|
+
<td align="center"><a href="https://github.com/mark-cooper"><img src="https://avatars1.githubusercontent.com/u/551470?v=4" width="125px;" alt="Mark Cooper"/><br /><sub><b>Mark Cooper</b></sub></a><br /><a href="https://github.com/projectblacklight/arclight/commits?author=mark-cooper" title="Code">💻</a> <a href="#plugin-mark-cooper" title="Plugin/utility libraries">🔌</a></td>
|
|
20
|
+
<td align="center"><a href="http://knittles.ticklefish.org/"><img src="https://avatars3.githubusercontent.com/u/856924?v=4" width="125px;" alt="Esmé Cowles"/><br /><sub><b>Esmé Cowles</b></sub></a><br /><a href="#business-escowles" title="Business development">💼</a> <a href="#analysis-escowles" title="Functional requirements and related research">🔬</a></td>
|
|
21
|
+
<td align="center"><a href="https://github.com/tomcramer"><img src="https://avatars3.githubusercontent.com/u/1054837?v=4" width="125px;" alt="Tom Cramer"/><br /><sub><b>Tom Cramer</b></sub></a><br /><a href="#business-tomcramer" title="Business development">💼</a></td>
|
|
22
|
+
<td align="center"><a href="https://github.com/mdalmau"><img src="https://avatars0.githubusercontent.com/u/573273?v=4" width="125px;" alt="Michelle Dalmau"/><br /><sub><b>Michelle Dalmau</b></sub></a><br /><a href="#business-mdalmau" title="Business development">💼</a></td>
|
|
23
|
+
<td align="center"><a href="http://robotlibrarian.billdueber.com/"><img src="https://avatars0.githubusercontent.com/u/114006?v=4" width="125px;" alt="Bill Dueber"/><br /><sub><b>Bill Dueber</b></sub></a><br /><a href="#analysis-billdueber" title="Functional requirements and related research">🔬</a> <a href="https://github.com/projectblacklight/arclight/commits?author=billdueber" title="Code">💻</a></td>
|
|
24
|
+
</tr>
|
|
25
|
+
<tr>
|
|
26
|
+
<td align="center"><a href="https://github.com/jwd"><img src="https://avatars1.githubusercontent.com/u/842343?v=4" width="125px;" alt="Jon Dunn"/><br /><sub><b>Jon Dunn</b></sub></a><br /><a href="#business-jwd" title="Business development">💼</a></td>
|
|
27
|
+
<td align="center"><a href="https://github.com/eckardm"><img src="https://avatars1.githubusercontent.com/u/7072443?v=4" width="125px;" alt="Max Eckard"/><br /><sub><b>Max Eckard</b></sub></a><br /><a href="#analysis-eckardm" title="Functional requirements and related research">🔬</a> <a href="#productOwner-eckardm" title="Product owner">🗺</a> <a href="#userTesting-eckardm" title="User Testing">📓</a></td>
|
|
28
|
+
<td align="center"><a href="https://github.com/jrgriffiniii"><img src="https://avatars0.githubusercontent.com/u/1443986?v=4" width="125px;" alt="James R. Griffin III"/><br /><sub><b>James R. Griffin III</b></sub></a><br /><a href="https://github.com/projectblacklight/arclight/commits?author=jrgriffiniii" title="Code">💻</a></td>
|
|
29
|
+
<td align="center"><a href="https://github.com/p-galligan"><img src="https://avatars2.githubusercontent.com/u/2585069?v=4" width="125px;" alt="Patrick Galligan"/><br /><sub><b>Patrick Galligan</b></sub></a><br /><a href="#userTesting-p-galligan" title="User Testing">📓</a></td>
|
|
30
|
+
<td align="center"><a href="http://ggeisler.com"><img src="https://avatars1.githubusercontent.com/u/101482?v=4" width="125px;" alt="Gary Geisler"/><br /><sub><b>Gary Geisler</b></sub></a><br /><a href="https://github.com/projectblacklight/arclight/commits?author=ggeisler" title="Code">💻</a> <a href="#design-ggeisler" title="Design">🎨</a></td>
|
|
31
|
+
</tr>
|
|
32
|
+
<tr>
|
|
33
|
+
<td align="center"><a href="https://github.com/bonniegee"><img src="https://avatars3.githubusercontent.com/u/8737364?v=4" width="125px;" alt="Bonnie Gordon"/><br /><sub><b>Bonnie Gordon</b></sub></a><br /><a href="#userTesting-bonniegee" title="User Testing">📓</a></td>
|
|
34
|
+
<td align="center"><a href="https://github.com/mswendyh"><img src="https://avatars1.githubusercontent.com/u/7033667?v=4" width="125px;" alt="Wendy Hagenmaier"/><br /><sub><b>Wendy Hagenmaier</b></sub></a><br /><a href="#analysis-mswendyh" title="Functional requirements and related research">🔬</a></td>
|
|
35
|
+
<td align="center"><img src="http://gravatar.com/avatar/8b53dcb509d4b1fe8dd74da6a94395ef.jpg?d=retro" width="125px;" alt="Jim Halliday"/><br /><sub><b>Jim Halliday</b></sub><br /><a href="#business" title="Business development">💼</a></td>
|
|
36
|
+
<td align="center"><a href="https://github.com/jlhardes"><img src="https://avatars1.githubusercontent.com/u/3440166?v=4" width="125px;" alt="Julie Hardesty"/><br /><sub><b>Julie Hardesty</b></sub></a><br /><a href="#analysis-jlhardes" title="Functional requirements and related research">🔬</a> <a href="#productOwner-jlhardes" title="Product owner">🗺</a></td>
|
|
37
|
+
<td align="center"><a href="http://stanford.edu/~drh"><img src="https://avatars3.githubusercontent.com/u/1861171?v=4" width="125px;" alt="Darren Hardy"/><br /><sub><b>Darren Hardy</b></sub></a><br /><a href="https://github.com/projectblacklight/arclight/commits?author=drh-stanford" title="Code">💻</a> <a href="https://github.com/projectblacklight/arclight/commits?author=drh-stanford" title="Documentation">📖</a></td>
|
|
38
|
+
</tr>
|
|
39
|
+
<tr>
|
|
40
|
+
<td align="center"><a href="https://github.com/drhardy"><img src="https://avatars3.githubusercontent.com/u/25580222?v=4" width="125px;" alt="Darren Hardy"/><br /><sub><b>Darren Hardy</b></sub></a><br /><a href="https://github.com/projectblacklight/arclight/commits?author=drhardy" title="Code">💻</a></td>
|
|
41
|
+
<td align="center"><a href="https://github.com/regineheberlein"><img src="https://avatars1.githubusercontent.com/u/5940563?v=4" width="125px;" alt="Regine Heberlein"/><br /><sub><b>Regine Heberlein</b></sub></a><br /><a href="#analysis-regineheberlein" title="Functional requirements and related research">🔬</a> <a href="#productOwner-regineheberlein" title="Product owner">🗺</a></td>
|
|
42
|
+
<td align="center"><a href="https://github.com/noahgh221"><img src="https://avatars3.githubusercontent.com/u/7328518?v=4" width="125px;" alt="Noah Huffman"/><br /><sub><b>Noah Huffman</b></sub></a><br /><a href="#analysis-noahgh221" title="Functional requirements and related research">🔬</a> <a href="#productOwner-noahgh221" title="Product owner">🗺</a></td>
|
|
43
|
+
<td align="center"><a href="https://github.com/njaffer"><img src="https://avatars0.githubusercontent.com/u/12487929?v=4" width="125px;" alt="Nabeela Jaffer"/><br /><sub><b>Nabeela Jaffer</b></sub></a><br /><a href="#analysis-njaffer" title="Functional requirements and related research">🔬</a> <a href="#business-njaffer" title="Business development">💼</a></td>
|
|
44
|
+
<td align="center"><a href="https://github.com/jkeck"><img src="https://avatars0.githubusercontent.com/u/96776?v=4" width="125px;" alt="Jessie Keck"/><br /><sub><b>Jessie Keck</b></sub></a><br /><a href="https://github.com/projectblacklight/arclight/commits?author=jkeck" title="Code">💻</a> <a href="https://github.com/projectblacklight/arclight/commits?author=jkeck" title="Documentation">📖</a></td>
|
|
45
|
+
</tr>
|
|
46
|
+
<tr>
|
|
47
|
+
<td align="center"><a href="https://github.com/gordonleacock"><img src="https://avatars3.githubusercontent.com/u/12927191?v=4" width="125px;" alt="Gordon Leacock"/><br /><sub><b>Gordon Leacock</b></sub></a><br /><a href="https://github.com/projectblacklight/arclight/commits?author=gordonleacock" title="Code">💻</a> <a href="https://github.com/projectblacklight/arclight/commits?author=gordonleacock" title="Documentation">📖</a></td>
|
|
48
|
+
<td align="center"><a href="https://matienzo.org/"><img src="https://avatars0.githubusercontent.com/u/73732?v=4" width="125px;" alt="María A. Matienzo"/><br /><sub><b>María A. Matienzo</b></sub></a><br /><a href="#projectManagement-anarchivist" title="Project Management">📆</a> <a href="#business-anarchivist" title="Business development">💼</a> <a href="#analysis-anarchivist" title="Functional requirements and related research">🔬</a> <a href="#productOwner-anarchivist" title="Product owner">🗺</a></td>
|
|
49
|
+
<td align="center"><a href="https://github.com/archivistsarah"><img src="https://avatars0.githubusercontent.com/u/25084902?v=4" width="125px;" alt="Sarah Newhouse"/><br /><sub><b>Sarah Newhouse</b></sub></a><br /><a href="#analysis-archivistsarah" title="Functional requirements and related research">🔬</a></td>
|
|
50
|
+
<td align="center"><a href="https://github.com/grepcats"><img src="https://avatars0.githubusercontent.com/u/7513448?v=4" width="125px;" alt="Kayla Ondracek"/><br /><sub><b>Kayla Ondracek</b></sub></a><br /><a href="#analysis-grepcats" title="Functional requirements and related research">🔬</a></td>
|
|
51
|
+
<td align="center"><a href="https://github.com/djpillen"><img src="https://avatars3.githubusercontent.com/u/11635158?v=4" width="125px;" alt="Dallas Pillen"/><br /><sub><b>Dallas Pillen</b></sub></a><br /><a href="https://github.com/projectblacklight/arclight/commits?author=djpillen" title="Code">💻</a> <a href="#userTesting-djpillen" title="User Testing">📓</a></td>
|
|
52
|
+
</tr>
|
|
53
|
+
<tr>
|
|
54
|
+
<td align="center"><a href="https://github.com/cmkpowell"><img src="https://avatars1.githubusercontent.com/u/16540397?v=4" width="125px;" alt="Chris Powell"/><br /><sub><b>Chris Powell</b></sub></a><br /><a href="#analysis-cmkpowell" title="Functional requirements and related research">🔬</a> <a href="#productOwner-cmkpowell" title="Product owner">🗺</a></td>
|
|
55
|
+
<td align="center"><a href="https://www.jack-reed.com/"><img src="https://avatars0.githubusercontent.com/u/1656824?v=4" width="125px;" alt="Jack Reed"/><br /><sub><b>Jack Reed</b></sub></a><br /><a href="https://github.com/projectblacklight/arclight/commits?author=mejackreed" title="Code">💻</a> <a href="https://github.com/projectblacklight/arclight/commits?author=mejackreed" title="Documentation">📖</a></td>
|
|
56
|
+
<td align="center"><a href="https://github.com/John-Rees"><img src="https://avatars1.githubusercontent.com/u/29233549?v=4" width="125px;" alt="John Rees"/><br /><sub><b>John Rees</b></sub></a><br /><a href="#analysis-John-Rees" title="Functional requirements and related research">🔬</a></td>
|
|
57
|
+
<td align="center"><a href="https://github.com/joshschneider"><img src="https://avatars3.githubusercontent.com/u/12468197?v=4" width="125px;" alt="Josh Schneider"/><br /><sub><b>Josh Schneider</b></sub></a><br /><a href="#analysis-joshschneider" title="Functional requirements and related research">🔬</a> <a href="#productOwner-joshschneider" title="Product owner">🗺</a></td>
|
|
58
|
+
<td align="center"><a href="https://github.com/willsexton"><img src="https://avatars2.githubusercontent.com/u/1359320?v=4" width="125px;" alt="Will Sexton"/><br /><sub><b>Will Sexton</b></sub></a><br /><a href="#business-willsexton" title="Business development">💼</a></td>
|
|
59
|
+
</tr>
|
|
60
|
+
<tr>
|
|
61
|
+
<td align="center"><a href="https://github.com/shallcro"><img src="https://avatars2.githubusercontent.com/u/43279347?v=4" width="125px;" alt="Mike Shallcross"/><br /><sub><b>Mike Shallcross</b></sub></a><br /><a href="#analysis-shallcro" title="Functional requirements and related research">🔬</a></td>
|
|
62
|
+
<td align="center"><a href="https://github.com/remocrevo"><img src="https://avatars1.githubusercontent.com/u/8701105?v=4" width="125px;" alt="Remington Steed"/><br /><sub><b>Remington Steed</b></sub></a><br /><a href="https://github.com/projectblacklight/arclight/commits?author=remocrevo" title="Code">💻</a></td>
|
|
63
|
+
<td align="center"><a href="https://github.com/tampakis"><img src="https://avatars2.githubusercontent.com/u/4650153?v=4" width="125px;" alt="Nikitas Tampakis"/><br /><sub><b>Nikitas Tampakis</b></sub></a><br /><a href="#analysis-tampakis" title="Functional requirements and related research">🔬</a></td>
|
|
64
|
+
<td align="center"><a href="https://github.com/estelendur"><img src="https://avatars0.githubusercontent.com/u/10409866?v=4" width="125px;" alt="Esty Thomas"/><br /><sub><b>Esty Thomas</b></sub></a><br /><a href="https://github.com/projectblacklight/arclight/commits?author=estelendur" title="Code">💻</a></td>
|
|
65
|
+
<td align="center"><a href="http://camillevilla.github.io"><img src="https://avatars2.githubusercontent.com/u/5402927?v=4" width="125px;" alt="Camille Villa"/><br /><sub><b>Camille Villa</b></sub></a><br /><a href="https://github.com/projectblacklight/arclight/commits?author=camillevilla" title="Code">💻</a> <a href="https://github.com/projectblacklight/arclight/commits?author=camillevilla" title="Documentation">📖</a></td>
|
|
66
|
+
</tr>
|
|
67
|
+
<tr>
|
|
68
|
+
<td align="center"><a href="https://github.com/jvine"><img src="https://avatars0.githubusercontent.com/u/6945691?v=4" width="125px;" alt="Jennifer Vine"/><br /><sub><b>Jennifer Vine</b></sub></a><br /><a href="#design-jvine" title="Design">🎨</a></td>
|
|
69
|
+
<td align="center"><a href="https://github.com/jweise"><img src="https://avatars2.githubusercontent.com/u/114413?v=4" width="125px;" alt="John Weise"/><br /><sub><b>John Weise</b></sub></a><br /><a href="#business-jweise" title="Business development">💼</a></td>
|
|
70
|
+
<td align="center"><a href="https://github.com/gwiedeman"><img src="https://avatars0.githubusercontent.com/u/10030353?v=4" width="125px;" alt="Gregory Wiedeman"/><br /><sub><b>Gregory Wiedeman</b></sub></a><br /><a href="https://github.com/projectblacklight/arclight/commits?author=gwiedeman" title="Code">💻</a> <a href="https://github.com/projectblacklight/arclight/issues?q=author%3Agwiedeman" title="Bug reports">🐛</a> <a href="#userTesting-gwiedeman" title="User Testing">📓</a> <a href="#inProduction-gwiedeman" title="Has a production implementation">🏆</a></td>
|
|
71
|
+
<td align="center"><a href="https://github.com/lauraw15"><img src="https://avatars2.githubusercontent.com/u/6343788?v=4" width="125px;" alt="Laura Wilsey"/><br /><sub><b>Laura Wilsey</b></sub></a><br /><a href="#analysis-lauraw15" title="Functional requirements and related research">🔬</a></td>
|
|
72
|
+
</tr>
|
|
73
|
+
</table>
|
|
74
|
+
|
|
75
|
+
<!-- markdownlint-enable -->
|
|
76
|
+
<!-- prettier-ignore-end -->
|
|
77
|
+
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
78
|
+
|
|
79
|
+
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
data/Gemfile
CHANGED
|
@@ -1,4 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
source 'https://rubygems.org'
|
|
2
4
|
|
|
3
5
|
# Specify your gem's dependencies in arclight.gemspec
|
|
4
6
|
gemspec
|
|
7
|
+
|
|
8
|
+
# BEGIN ENGINE_CART BLOCK
|
|
9
|
+
# engine_cart: 2.5.0
|
|
10
|
+
# engine_cart stanza: 2.5.0
|
|
11
|
+
# the below comes from engine_cart, a gem used to test this Rails engine gem in the context of a Rails app.
|
|
12
|
+
file = File.expand_path('Gemfile', ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path('.internal_test_app', File.dirname(__FILE__)))
|
|
13
|
+
if File.exist?(file)
|
|
14
|
+
begin
|
|
15
|
+
eval_gemfile file
|
|
16
|
+
rescue Bundler::GemfileError => e
|
|
17
|
+
Bundler.ui.warn '[EngineCart] Skipping Rails application dependencies:'
|
|
18
|
+
Bundler.ui.warn e.message
|
|
19
|
+
end
|
|
20
|
+
else
|
|
21
|
+
Bundler.ui.warn "[EngineCart] Unable to find test application dependencies in #{file}, using placeholder dependencies"
|
|
22
|
+
|
|
23
|
+
if ENV['RAILS_VERSION']
|
|
24
|
+
if ENV['RAILS_VERSION'] == 'edge'
|
|
25
|
+
gem 'rails', github: 'rails/rails'
|
|
26
|
+
ENV['ENGINE_CART_RAILS_OPTIONS'] = '--edge --skip-turbolinks'
|
|
27
|
+
else
|
|
28
|
+
gem 'rails', ENV['RAILS_VERSION']
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
case ENV['RAILS_VERSION']
|
|
32
|
+
when /^6.0/
|
|
33
|
+
gem 'sass-rails', '>= 6'
|
|
34
|
+
gem 'webpacker', '~> 4.0'
|
|
35
|
+
when /^5.[12]/
|
|
36
|
+
gem 'sass-rails', '~> 5.0'
|
|
37
|
+
gem 'sprockets', '~> 3.7'
|
|
38
|
+
gem 'thor', '~> 0.20'
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
# END ENGINE_CART BLOCK
|
|
43
|
+
|
|
44
|
+
# Used by engine_cart if you need to change a specific version of a dependency
|
|
45
|
+
eval_gemfile File.expand_path('spec/test_app_templates/Gemfile.extra', File.dirname(__FILE__))
|
data/LICENSE.txt
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
Copyright 2017 The Board of Trustees of the Leland Stanford Junior University
|
|
2
|
+
Copyright (c) 2017, Regents of the University of Michigan.
|
|
2
3
|
|
|
3
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
5
|
you may not use this file except in compliance with the License.
|
data/README.md
CHANGED
|
@@ -1,12 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
[](https://badge.fury.io/rb/arclight)
|
|
2
|
+
[](https://badge.fury.io/js/arclight)
|
|
3
|
+

|
|
4
|
+
[](CONTRIBUTORS.md)
|
|
5
|
+
[](https://codeclimate.com/github/projectblacklight/arclight/coverage)
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
# ArcLight
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
A Rails engine supporting discovery of archival materials, based on [Blacklight](https://projectblacklight.org/)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Requirements
|
|
13
|
+
|
|
14
|
+
* [Ruby](https://www.ruby-lang.org/en/) 3.0.3 or later
|
|
15
|
+
* [Rails](http://rubyonrails.org) 7.1 or later
|
|
16
|
+
* Solr 8.1 or later
|
|
6
17
|
|
|
7
18
|
## Installation
|
|
8
19
|
|
|
9
|
-
|
|
20
|
+
[Installing ArcLight](https://github.com/projectblacklight/arclight/wiki/Creating,-installing,-and-running-your-ArcLight-application) is straightforward in a Rails environment.
|
|
21
|
+
|
|
22
|
+
Basically, add this line to your application's `Gemfile`:
|
|
10
23
|
|
|
11
24
|
```ruby
|
|
12
25
|
gem 'arclight'
|
|
@@ -14,28 +27,103 @@ gem 'arclight'
|
|
|
14
27
|
|
|
15
28
|
And then execute:
|
|
16
29
|
|
|
17
|
-
|
|
30
|
+
```sh
|
|
31
|
+
$ bundle
|
|
32
|
+
```
|
|
18
33
|
|
|
19
34
|
Or install it yourself as:
|
|
20
35
|
|
|
21
|
-
|
|
36
|
+
```sh
|
|
37
|
+
$ gem install arclight
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
For further details, see our [Installing ArcLight](https://github.com/projectblacklight/arclight/wiki/Creating,-installing,-and-running-your-ArcLight-application) documentation.
|
|
22
41
|
|
|
23
42
|
## Usage
|
|
24
43
|
|
|
25
|
-
|
|
44
|
+
Arclight is a Ruby gem designed to work with archival data. It can be installed on a server or virtual server. Once running, finding aids in the form of archival collection data can be imported into Arclight through an indexing process. Institutional and repositories data can also be added to Arclight (Currently this requires a developer. Configuration pages will be added for this in future versions). Additional finding aids can be added at any time.
|
|
45
|
+
|
|
46
|
+
After data indexing, Arclight can to be used to search, browse, and display the repositories (sets of collections), collections, and components within collections. Globally available search allows filtering on several types of terms (Keyword, Name, Place, etc.). Once a search is begun, it can be further narrowed using facets on the left side of the search page. Selecting a search result goes directly to that results show or display page. Also global available are buttons for Repositories and Collections which can be used an any time.
|
|
47
|
+
|
|
48
|
+
Browsing allows you to view the Overview or Contents (when it exists) of a collection. The Overview tab displays top level metadata about the collection. The Contents tab displays an outline view of a next level of the collection. You can expand each level by selecting (clicking). Selecting a component in the Contents views goes to a component page which shows the metadata for it.
|
|
49
|
+
|
|
50
|
+
Some pages include an inline view tab to the right of an item which will expand the Contents further.
|
|
51
|
+
|
|
52
|
+
See the [ArcLight demo](https://arclight-demo.projectblacklight.org/) and [ArcLight MVP Wiki](https://github.com/projectblacklight/arclight/wiki) for usage.
|
|
53
|
+
|
|
54
|
+
See [Arclight Major Features](https://github.com/projectblacklight/arclight/wiki/Arclight-Major-Features) for a list of features.
|
|
55
|
+
|
|
56
|
+
### Traject indexing of EAD content
|
|
57
|
+
[Traject](https://github.com/traject/traject) is a high performance way of transforming documents for indexing into Solr and how ArcLight does indexing. An EAD2 can be indexed by doing the following:
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
bundle exec traject -u http://127.0.0.1:8983/solr/blacklight-core -i xml -c lib/arclight/traject/ead2_config.rb spec/fixtures/ead/sample/large-components-list.xml
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Or
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
bundle exec rake arclight:seed
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Resources
|
|
70
|
+
|
|
71
|
+
* General
|
|
72
|
+
* [ArcLight demo site](https://arclight-demo.projectblacklight.org/)
|
|
73
|
+
* [ArcLight Github wiki](https://github.com/projectblacklight/arclight/wiki): developer/implementor documentation
|
|
74
|
+
* [Blacklight wiki](https://github.com/projectblacklight/blacklight/wiki)
|
|
75
|
+
* Use the [ArcLight Google Group](http://groups.google.com/d/forum/arclight-community) to contact us with questions
|
|
76
|
+
* ArcLight MVP:
|
|
77
|
+
* [MVP sprint demo videos](https://www.youtube.com/playlist?list=PLMdUaIJ0G8QgbuDCUVvFhTSTO96N37lRA)
|
|
78
|
+
|
|
79
|
+
## Contributors
|
|
80
|
+
|
|
81
|
+
See the [CONTRIBUTORS](CONTRIBUTORS.md) file.
|
|
26
82
|
|
|
27
83
|
## Development
|
|
28
84
|
|
|
29
|
-
|
|
85
|
+
ArcLight requires Solr to be running. For development you can start this using `solr_wrapper` or you may choose to use Docker. Start Solr using Docker by doing `docker compose up`.
|
|
30
86
|
|
|
31
|
-
|
|
87
|
+
### Run the test suite
|
|
32
88
|
|
|
33
|
-
|
|
89
|
+
Ensure Solr and Rails are _not_ running (ports 8983 and 3000 respectively), then:
|
|
90
|
+
|
|
91
|
+
```sh
|
|
92
|
+
$ bundle exec rake
|
|
93
|
+
```
|
|
94
|
+
If you find that the tests are failing when you run them on a Linux computer, you might need to install Google Chrome so the Selenium testing framework can run properly.
|
|
95
|
+
|
|
96
|
+
### Run a development server
|
|
97
|
+
|
|
98
|
+
```sh
|
|
99
|
+
$ bundle exec rake arclight:server
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Then visit http://localhost:3000. It will also start a Solr instance on port 8983.
|
|
103
|
+
|
|
104
|
+
### Run a console
|
|
105
|
+
|
|
106
|
+
You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
107
|
+
|
|
108
|
+
### Releasing
|
|
34
109
|
|
|
35
|
-
|
|
110
|
+
#### To release a new gem:
|
|
36
111
|
|
|
112
|
+
1. Update the version number in `lib/arclight/version.rb`
|
|
113
|
+
2. Run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, build the gem file (e.g., `gem build arclight.gemspec`) and push the `.gem` file to [rubygems.org](https://rubygems.org) (e.g., `gem push arclight-x.y.z.gem`).
|
|
114
|
+
|
|
115
|
+
#### To release the frontend sources:
|
|
116
|
+
|
|
117
|
+
When any of the javascript components or SASS sources in the gem are changed, this package should be published to NPM with the following steps:
|
|
118
|
+
1. [Install npm](https://www.npmjs.com/get-npm)
|
|
119
|
+
2. Bump the version number in `package.json`
|
|
120
|
+
3. run `npm run build && npm publish` to push the javascript package to https://npmjs.org/package/arclight
|
|
121
|
+
|
|
122
|
+
## Contributing
|
|
37
123
|
|
|
124
|
+
[Bug reports](https://github.com/projectblacklight/arclight/issues) and [pull requests](https://github.com/projectblacklight/arclight/pulls) are welcome on ArcLight -- see [CONTRIBUTING.md](https://github.com/projectblacklight/arclight/blob/main/CONTRIBUTING.md) for details.
|
|
38
125
|
## License
|
|
39
126
|
|
|
40
|
-
The gem is available as open source under the terms of the [
|
|
127
|
+
The gem is available as open source under the terms of the [Apache 2 License](https://opensource.org/licenses/Apache-2.0).
|
|
41
128
|
|
|
129
|
+
ArcLight also uses embedded SVG icons from the [FontAwesome](https://fontawesome.com) project. These icons are unmodified and licensed [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). All of these icons have the license and attribution embedded in them.
|
data/Rakefile
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'bundler/gem_tasks'
|
|
4
|
+
require 'rspec/core/rake_task'
|
|
3
5
|
|
|
4
6
|
RSpec::Core::RakeTask.new(:spec)
|
|
5
7
|
|
|
6
|
-
|
|
8
|
+
require 'rubocop/rake_task'
|
|
9
|
+
RuboCop::RakeTask.new(:rubocop)
|
|
10
|
+
|
|
11
|
+
Dir.glob('./tasks/*.rake').each { |f| load f }
|
|
12
|
+
Dir.glob('./lib/tasks/*.rake').each { |f| load f }
|
|
13
|
+
|
|
14
|
+
require 'engine_cart/rake_task'
|
|
15
|
+
|
|
16
|
+
task default: %i[rubocop eslint ci]
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 384 512"><path d="M0 512V48C0 21.49 21.49 0 48 0h288c26.51 0 48 21.49 48 48v464L192 400 0 512z"/></svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Used unmodified from https://fontawesome.com
|
|
3
|
+
CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
|
|
4
|
+
-->
|
|
5
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 512 512"><path d="M32 448c0 17.7 14.3 32 32 32h384c17.7 0 32-14.3 32-32V160H32v288zm160-212c0-6.6 5.4-12 12-12h104c6.6 0 12 5.4 12 12v8c0 6.6-5.4 12-12 12H204c-6.6 0-12-5.4-12-12v-8zM480 32H32C14.3 32 0 46.3 0 64v48c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16V64c0-17.7-14.3-32-32-32z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24"><path d="M3,15H21V13H3Zm0,4H21V17H3Zm0-8H21V9H3ZM3,5V7H21V5Z"/></svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Used unmodified from https://fontawesome.com
|
|
3
|
+
CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
|
|
4
|
+
-->
|
|
5
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 512 512"><path d="M464 128H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 384 512"><path d="M149.9 349.1l-.2-.2-32.8-28.9 32.8-28.9c3.6-3.2 4-8.8.8-12.4l-.2-.2-17.4-18.6c-3.4-3.6-9-3.7-12.4-.4l-57.7 54.1c-3.7 3.5-3.7 9.4 0 12.8l57.7 54.1c1.6 1.5 3.8 2.4 6 2.4 2.4 0 4.8-1 6.4-2.8l17.4-18.6c3.3-3.5 3.1-9.1-.4-12.4zm220-251.2L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM256 51.9l76.1 76.1H256zM336 464H48V48h160v104c0 13.3 10.7 24 24 24h104zM209.6 214c-4.7-1.4-9.5 1.3-10.9 6L144 408.1c-1.4 4.7 1.3 9.6 6 10.9l24.4 7.1c4.7 1.4 9.6-1.4 10.9-6L240 231.9c1.4-4.7-1.3-9.6-6-10.9zm24.5 76.9l.2.2 32.8 28.9-32.8 28.9c-3.6 3.2-4 8.8-.8 12.4l.2.2 17.4 18.6c3.3 3.5 8.9 3.7 12.4.4l57.7-54.1c3.7-3.5 3.7-9.4 0-12.8l-57.7-54.1c-3.5-3.3-9.1-3.2-12.4.4l-17.4 18.6c-3.3 3.5-3.1 9.1.4 12.4z"/></svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Used unmodified from https://fontawesome.com
|
|
3
|
+
CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
|
|
4
|
+
-->
|
|
5
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 384 512"><path d="M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm160-14.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 512 512"><path d="M464 128H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg height="24" width="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>file</title><path d="M0,0H24V24H0Z" fill="none"/><path d="M3,19H21V13.45H3ZM3,5v5.61H21V5Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/><path d="M0 0h24v24H0z" fill="none"/></svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Used unmodified from https://fontawesome.com
|
|
3
|
+
CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
|
|
4
|
+
-->
|
|
5
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 640 512"><path d="M608 0H160a32 32 0 0 0-32 32v96h160V64h192v320h128a32 32 0 0 0 32-32V32a32 32 0 0 0-32-32zM232 103a9 9 0 0 1-9 9h-30a9 9 0 0 1-9-9V73a9 9 0 0 1 9-9h30a9 9 0 0 1 9 9zm352 208a9 9 0 0 1-9 9h-30a9 9 0 0 1-9-9v-30a9 9 0 0 1 9-9h30a9 9 0 0 1 9 9zm0-104a9 9 0 0 1-9 9h-30a9 9 0 0 1-9-9v-30a9 9 0 0 1 9-9h30a9 9 0 0 1 9 9zm0-104a9 9 0 0 1-9 9h-30a9 9 0 0 1-9-9V73a9 9 0 0 1 9-9h30a9 9 0 0 1 9 9zm-168 57H32a32 32 0 0 0-32 32v288a32 32 0 0 0 32 32h384a32 32 0 0 0 32-32V192a32 32 0 0 0-32-32zM96 224a32 32 0 1 1-32 32 32 32 0 0 1 32-32zm288 224H64v-32l64-64 32 32 128-128 96 96z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 384 512"><path d="M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm250.2-143.7c-12.2-12-47-8.7-64.4-6.5-17.2-10.5-28.7-25-36.8-46.3 3.9-16.1 10.1-40.6 5.4-56-4.2-26.2-37.8-23.6-42.6-5.9-4.4 16.1-.4 38.5 7 67.1-10 23.9-24.9 56-35.4 74.4-20 10.3-47 26.2-51 46.2-3.3 15.8 26 55.2 76.1-31.2 22.4-7.4 46.8-16.5 68.4-20.1 18.9 10.2 41 17 55.8 17 25.5 0 28-28.2 17.5-38.7zm-198.1 77.8c5.1-13.7 24.5-29.5 30.4-35-19 30.3-30.4 35.7-30.4 35zm81.6-190.6c7.4 0 6.7 32.1 1.8 40.8-4.4-13.9-4.3-40.8-1.8-40.8zm-24.4 136.6c9.7-16.9 18-37 24.7-54.7 8.3 15.1 18.9 27.2 30.1 35.5-20.8 4.3-38.9 13.1-54.8 19.2zm131.6-5s-5 6-37.3-7.8c35.1-2.6 40.9 5.4 37.3 7.8z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/><path d="M0 0h24v24H0z" fill="none"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M4 10v7h3v-7H4zm6 0v7h3v-7h-3zM2 22h19v-3H2v3zm14-12v7h3v-7h-3zm-4.5-9L2 6v2h19V6l-9.5-5z"/></svg>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Controller } from '@hotwired/stimulus'
|
|
2
|
+
|
|
3
|
+
export default class OembedController extends Controller {
|
|
4
|
+
static values = {
|
|
5
|
+
url: String
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
connect() {
|
|
9
|
+
const loadedAttr = this.element.getAttribute('loaded')
|
|
10
|
+
|
|
11
|
+
if (loadedAttr && loadedAttr === 'loaded') {
|
|
12
|
+
return
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
fetch(this.urlValue)
|
|
16
|
+
.then((response) => {
|
|
17
|
+
if (response.ok) return response.text()
|
|
18
|
+
throw new Error(`HTTP error, status = ${response.status}`)
|
|
19
|
+
})
|
|
20
|
+
.then((body) => {
|
|
21
|
+
const oEmbedEndPoint = this.findOEmbedEndPoint(body)
|
|
22
|
+
if (!oEmbedEndPoint || oEmbedEndPoint.length === 0) {
|
|
23
|
+
console.warn(`No oEmbed endpoint found in <head> at ${this.urlValue}`)
|
|
24
|
+
return
|
|
25
|
+
}
|
|
26
|
+
this.loadEndPoint(oEmbedEndPoint)
|
|
27
|
+
}).catch(error => {
|
|
28
|
+
console.error(error)
|
|
29
|
+
})
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// We are choosing not to make this class static so that downstream classes
|
|
33
|
+
// can override it and access values to populate extraParams.
|
|
34
|
+
// E.g. https://github.com/sul-dlss/vt-arclight/blob/main/app/javascript/controllers/sul_embed_controller.js
|
|
35
|
+
findOEmbedEndPoint(body, extraParams = {}) { // eslint-disable-line class-methods-use-this
|
|
36
|
+
// Parse out link elements so image assets are not loaded
|
|
37
|
+
const template = document.createElement('template')
|
|
38
|
+
template.innerHTML = body.match(/<link .*>/g).join('')
|
|
39
|
+
|
|
40
|
+
// Look for a link element containing the oEmbed endpoint; bail out if none
|
|
41
|
+
const endpoint = template.content.querySelector('link[rel="alternate"][type="application/json+oembed"]')
|
|
42
|
+
?.getAttribute('href')
|
|
43
|
+
if (!endpoint) return ''
|
|
44
|
+
|
|
45
|
+
// Serialize any extra params and append them to the endpoint
|
|
46
|
+
const qs = new URLSearchParams(extraParams).toString()
|
|
47
|
+
return `${endpoint}&${qs}`
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
loadEndPoint(oEmbedEndPoint) {
|
|
51
|
+
fetch(oEmbedEndPoint)
|
|
52
|
+
.then((response) => response.json())
|
|
53
|
+
.then((json) => {
|
|
54
|
+
this.element.innerHTML = json.html
|
|
55
|
+
this.element.setAttribute('loaded', 'loaded')
|
|
56
|
+
})
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Controller } from '@hotwired/stimulus'
|
|
2
|
+
|
|
3
|
+
export default class extends Controller {
|
|
4
|
+
static targets = ['content']
|
|
5
|
+
|
|
6
|
+
connect() {
|
|
7
|
+
// target elements
|
|
8
|
+
const contentInner = Array.from(this.contentTarget.children)
|
|
9
|
+
|
|
10
|
+
// calculate total scrollable inner height vs. observed outer height
|
|
11
|
+
const outerHeight = this.contentTarget.clientHeight
|
|
12
|
+
const innerHeight = contentInner.map(e => e.scrollHeight).reduce((a, b) => a + b, 0)
|
|
13
|
+
|
|
14
|
+
// truncation occurred if total inner height exceeds outer (observed) height.
|
|
15
|
+
// if no longer truncated, reset the expanded state (e.g. on window resize).
|
|
16
|
+
if (innerHeight > outerHeight) {
|
|
17
|
+
this.element.classList.add('truncated')
|
|
18
|
+
} else {
|
|
19
|
+
this.element.classList.remove('truncated')
|
|
20
|
+
this.contentTarget.classList.remove('expanded')
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
trigger() {
|
|
25
|
+
this.element.classList.toggle('expanded')
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@import 'variables';
|
|
2
|
+
@import 'responsive';
|
|
3
|
+
@import 'modules/collection_search';
|
|
4
|
+
@import 'modules/highlights';
|
|
5
|
+
@import 'modules/hierarchy_and_online_contents';
|
|
6
|
+
@import 'modules/icons';
|
|
7
|
+
@import 'modules/layout';
|
|
8
|
+
@import 'modules/mastheads';
|
|
9
|
+
@import 'modules/repositories.scss';
|
|
10
|
+
@import 'modules/repository_card.scss';
|
|
11
|
+
@import 'modules/search_results';
|
|
12
|
+
@import 'modules/show_collection';
|
|
13
|
+
@import 'modules/truncator';
|
|
14
|
+
@import 'modules/search_form';
|