geoblacklight 6.0.0.pre.alpha.6 → 6.0.0.pre.alpha.7
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 +4 -4
- data/.github/ISSUE_TEMPLATE.md +0 -1
- data/.github/workflows/ruby.yml +1 -1
- data/CODE_OF_CONDUCT.md +11 -11
- data/CONTRIBUTING.md +19 -9
- data/README.md +1 -1
- data/app/assets/stylesheets/geoblacklight/global.css +1 -1
- data/app/assets/stylesheets/geoblacklight/index_maps.css +1 -1
- data/app/assets/stylesheets/geoblacklight/record.css +15 -13
- data/app/assets/stylesheets/geoblacklight/viewers.css +88 -5
- data/app/components/geoblacklight/document/download_link_component.html.erb +1 -2
- data/app/components/geoblacklight/document/download_links_component.html.erb +3 -1
- data/app/components/geoblacklight/document/preview_component.html.erb +6 -0
- data/app/components/geoblacklight/document/preview_component.rb +14 -0
- data/app/components/geoblacklight/document_component.html.erb +1 -6
- data/app/components/geoblacklight/facets/bbox_field_component.html.erb +17 -0
- data/app/components/geoblacklight/facets/bbox_field_component.rb +7 -0
- data/app/components/geoblacklight/header_badge_component.html.erb +2 -0
- data/app/components/geoblacklight/header_badge_component.rb +21 -0
- data/app/components/geoblacklight/header_component.html.erb +1 -1
- data/app/components/geoblacklight/header_icons_component.html.erb +1 -1
- data/app/components/geoblacklight/header_icons_component.rb +8 -12
- data/app/components/geoblacklight/item_map_viewer_component.rb +6 -5
- data/app/components/geoblacklight/location_leaflet_map_component.rb +8 -9
- data/app/{views/catalog/_metadata.html.erb → components/geoblacklight/metadata_component.html.erb} +5 -7
- data/app/components/geoblacklight/metadata_component.rb +29 -0
- data/app/components/geoblacklight/metadata_description_markdown_component.rb +21 -0
- data/app/components/geoblacklight/relations_component.html.erb +2 -2
- data/app/components/geoblacklight/resource_header_badge_component.rb +37 -0
- data/app/components/geoblacklight/search_result_component.html.erb +15 -14
- data/app/components/geoblacklight/static_map_component.rb +5 -2
- data/app/helpers/geoblacklight_helper.rb +27 -50
- data/app/javascript/geoblacklight/controllers/leaflet_viewer_controller.js +19 -4
- data/app/javascript/geoblacklight/controllers/openlayers_viewer_controller.js +10 -2
- data/app/javascript/geoblacklight/leaflet/basemaps.js +8 -8
- data/app/javascript/geoblacklight/openlayers/basemaps.js +8 -8
- data/app/models/concerns/geoblacklight/solr_document.rb +9 -0
- data/app/views/catalog/_document_split.html.erb +1 -6
- data/app/views/catalog/_home_text.html.erb +1 -1
- data/app/views/catalog/metadata.html.erb +1 -1
- data/geoblacklight.gemspec +2 -1
- data/lib/generators/geoblacklight/templates/catalog_controller.rb +22 -30
- data/lib/generators/geoblacklight/templates/settings.yml +0 -5
- data/lib/geoblacklight/configuration/leaflet_config.rb +3 -2
- data/lib/geoblacklight/configuration/settings_builder.rb +0 -1
- data/lib/geoblacklight/configuration.rb +18 -5
- data/lib/geoblacklight/engine.rb +1 -0
- data/lib/geoblacklight/item_viewer.rb +1 -1
- data/lib/geoblacklight/version.rb +1 -1
- data/schema/readme.md +1 -1
- data/spec/components/geoblacklight/citation_component_spec.rb +1 -1
- data/spec/components/geoblacklight/document_component_spec.rb +10 -0
- data/spec/components/geoblacklight/metadata_component_spec.rb +67 -0
- data/spec/components/geoblacklight/metadata_description_markdown_component_spec.rb +38 -0
- data/spec/components/geoblacklight/viewer_help_text_component_spec.rb +1 -0
- data/spec/controllers/catalog_controller_spec.rb +8 -55
- data/spec/features/configurable_basemap_spec.rb +7 -7
- data/spec/features/home_page_spec.rb +0 -26
- data/spec/features/index_view_spec.rb +0 -24
- data/spec/features/layer_preview_spec.rb +1 -1
- data/spec/features/metadata_panel_spec.rb +18 -69
- data/spec/features/relations_spec.rb +0 -18
- data/spec/features/search_spec.rb +0 -22
- data/spec/features/sms_spec.rb +8 -8
- data/spec/features/web_services_modal_spec.rb +0 -83
- data/spec/fixtures/fgdc/SANB_a2725322-fgdc.xml +209 -0
- data/spec/fixtures/index_maps/index-map-point.geojson +13181 -949
- data/spec/fixtures/index_maps/index-map-polygon-no-downloadurl.geojson +21150 -970
- data/spec/fixtures/index_maps/index-map-polygon.geojson +21150 -970
- data/spec/fixtures/index_maps/index-map-stanford.geojson +269 -390
- data/spec/fixtures/index_maps/index-map-v1-complex.geojson +8596 -12247
- data/spec/fixtures/iso19139/{stanford-cg357zz0321.xml → SANB_a2725322-iso19139.xml} +130 -194
- data/spec/fixtures/metadata/fgdc.html +119 -59
- data/spec/fixtures/metadata/iso.html +258 -260
- data/spec/fixtures/mods/stanford-bc576pk4911.mods +98 -0
- data/spec/fixtures/solr_documents/README.md +48 -47
- data/spec/fixtures/solr_documents/actual-raster1.json +2 -3
- data/spec/fixtures/solr_documents/index-map-stanford.json +31 -27
- data/spec/fixtures/solr_documents/restricted-line.json +20 -31
- data/spec/helpers/geoblacklight_helper_spec.rb +0 -76
- data/spec/models/concerns/geoblacklight/solr_document/citation_spec.rb +1 -1
- data/spec/requests/bookmarks_spec.rb +13 -0
- data/spec/requests/catalog_search_spec.rb +43 -0
- data/spec/requests/catalog_show_spec.rb +48 -0
- data/spec/requests/home_page_spec.rb +42 -0
- data/spec/requests/index_view_spec.rb +27 -0
- data/spec/requests/metadata_spec.rb +40 -0
- data/spec/requests/missing_metadata_spec.rb +28 -0
- data/spec/requests/relations_spec.rb +28 -0
- data/spec/requests/search_history_spec.rb +13 -0
- data/spec/requests/search_results_spec.rb +62 -0
- data/spec/requests/web_services_spec.rb +51 -0
- metadata +44 -23
- data/spec/features/bookmarks_spec.rb +0 -12
- data/spec/features/data_dictionary_download_spec.rb +0 -18
- data/spec/features/empty_search_spec.rb +0 -13
- data/spec/features/exports_spec.rb +0 -14
- data/spec/features/help_text_spec.rb +0 -10
- data/spec/features/missing_metadata_spec.rb +0 -26
- data/spec/features/oembed_spec.rb +0 -11
- data/spec/features/saved_searches_spec.rb +0 -11
- data/spec/features/search_bar_spec.rb +0 -14
- data/spec/features/search_results_complex_geometry_spec.rb +0 -25
- data/spec/features/search_results_icons_spec.rb +0 -16
- data/spec/features/search_results_overlap_ratio_spec.rb +0 -57
- data/spec/features/show_page_metadata_spec.rb +0 -14
- data/spec/features/suppressed_records_spec.rb +0 -16
- data/spec/fixtures/fgdc/harvard-g7064-s2-1834-k3.xml +0 -1
- data/spec/fixtures/mods/fb897vt9938.mods +0 -111
- data/spec/fixtures/mods/stanford-cg357zz0321.mods +0 -113
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 41621cc93dcec1e50e5a61dcd253b85e9d30d37d14408fd38cbb52ed95e9d1fe
|
|
4
|
+
data.tar.gz: 1a252e3b76a40a850255f2d826483931ef00f6d6ad60f3327e59883cad0b1513
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4505cc2a6b93f79da8d71ba8d907d2e3a3d464593757138efa6c7d02fa3869df8a315c9513c858052997d376232e47b3f69baf84e5e6d27ce31e2e55ca851983
|
|
7
|
+
data.tar.gz: 96a2d4ff423acdea8c7b95b38eab43c627b7b1f757c94fa883928d3459b97e85ba5a52decbd75a74f808819e75952b71b7670bd2cd1593e10629fcd527abea1a
|
data/.github/ISSUE_TEMPLATE.md
CHANGED
data/.github/workflows/ruby.yml
CHANGED
data/CODE_OF_CONDUCT.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# GeoBlacklight Code of Conduct
|
|
2
2
|
|
|
3
|
-
GeoBlacklight is a collaborative project that welcomes participation from anyone interested in contributing to an open source discovery platform for GIS data.
|
|
3
|
+
GeoBlacklight is a collaborative project that welcomes participation from anyone interested in contributing to an open source discovery platform for GIS data. Involvement need not be in the form of contributing code. Members from across the geospatial professional spectrum are welcome to become involved in a way that fits their interests and expertise. Diversity of backgrounds is an asset to the project, as it is to many open source projects. Consequently, GeoBlacklight adheres to the [Contributor Covenant Code of Conduct](https://www.contributor-covenant.org/) as guiding principles for our work together.
|
|
4
4
|
|
|
5
5
|
## Contributor Covenant Code of Conduct
|
|
6
6
|
|
|
@@ -18,21 +18,21 @@ religion, or sexual identity and orientation.
|
|
|
18
18
|
Examples of behavior that contributes to creating a positive environment
|
|
19
19
|
include:
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
- Using welcoming and inclusive language
|
|
22
|
+
- Being respectful of differing viewpoints and experiences
|
|
23
|
+
- Gracefully accepting constructive criticism
|
|
24
|
+
- Focusing on what is best for the community
|
|
25
|
+
- Showing empathy towards other community members
|
|
26
26
|
|
|
27
27
|
Examples of unacceptable behavior by participants include:
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
- The use of sexualized language or imagery and unwelcome sexual attention or
|
|
30
30
|
advances
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
- Trolling, insulting/derogatory comments, and personal or political attacks
|
|
32
|
+
- Public or private harassment
|
|
33
|
+
- Publishing others' private information, such as a physical or electronic
|
|
34
34
|
address, without explicit permission
|
|
35
|
-
|
|
35
|
+
- Other conduct which could reasonably be considered inappropriate in a
|
|
36
36
|
professional setting
|
|
37
37
|
|
|
38
38
|
## Our Responsibilities
|
data/CONTRIBUTING.md
CHANGED
|
@@ -1,38 +1,45 @@
|
|
|
1
1
|
# GeoBlacklight Codebase Contribution Guide
|
|
2
|
+
|
|
2
3
|
GeoBlacklight is a collaborative, open source project where contributions are :sparkles:welcome:sparkles:.
|
|
3
4
|
|
|
4
5
|
### Who can contribute?
|
|
6
|
+
|
|
5
7
|
**Anyone** is welcome to contribute to GeoBlacklight. We follow a set of contribution practices to maintain a technically sustainable and stable software project for everyone. We expect all contributors to adhere to our [Code of Conduct](https://github.com/geoblacklight/geoblacklight/blob/main/CODE_OF_CONDUCT.md).
|
|
6
8
|
|
|
7
9
|
### How to contact us
|
|
10
|
+
|
|
8
11
|
See the [community page](https://geoblacklight.org/community/) on our website for information about our community calendar, volunteer opportunities, and more. This page links to our Slack and Google Group so you can reach us if you have questions or want to get more involved.
|
|
9
12
|
|
|
10
13
|
## Issues
|
|
14
|
+
|
|
11
15
|
Issues are used in the GeoBlacklight community as a convenient way to document bugs, propose new functionality and enhancements, and discuss important code changes.
|
|
12
16
|
|
|
13
17
|
### Creating an issue
|
|
14
|
-
Did you find a bug in GeoBlacklight? Looking to suggest a new feature? Add an issue for it in the [issue tracker](https://github.com/geoblacklight/geoblacklight/issues).
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
Did you find a bug in GeoBlacklight? Looking to suggest a new feature? Add an issue for it in the [issue tracker](https://github.com/geoblacklight/geoblacklight/issues).
|
|
20
|
+
|
|
21
|
+
- Make sure you have a [GitHub account](https://github.com/signup/free)
|
|
22
|
+
- Submit a new issue that:
|
|
23
|
+
- Clearly describes the issue
|
|
24
|
+
- Provides a descriptive summary
|
|
25
|
+
- Explains the expected behavior
|
|
26
|
+
- Explains the actual behavior
|
|
27
|
+
- Provides steps to reproduce the actual behavior
|
|
23
28
|
|
|
24
29
|
### Assigning an issue
|
|
25
30
|
|
|
26
31
|
In the GeoBlacklight community, issue assignment helps signal who is interested in working on an issue or who can assist in moving it forward. If you find an issue you’d like to contribute to, you can assign yourself to it. If an issue is already assigned, you are still welcome to contribute or provide support. Active issues will be marked with a status of “In progress” on our Project boards.
|
|
27
32
|
|
|
28
33
|
## Contributing to the codebase
|
|
29
|
-
|
|
34
|
+
|
|
35
|
+
GeoBlacklight welcomes code contributions. You do _not_ need to be a "GeoBlacklight Committer" to contribute code or documentation. We follow the [pull request](https://help.github.com/articles/using-pull-requests/) model for contributing on GitHub. GeoBlacklight uses a suite of tests to express its features and protect from bugs :bug:.
|
|
30
36
|
|
|
31
37
|
When proposing major new features or changes that may introduce an API or schema change, please make sure to communicate with the [community](https://geoblacklight.org/community/) so the full implications are understood. Likely there are ways to introduce these changes in a backwards compatible way that others may be able to help with.
|
|
32
38
|
|
|
33
39
|
To contribute to our website or documentation pages, see the [GeoBlacklight Website Contribution Guide](https://github.com/geoblacklight/geoblacklight.github.io/blob/main/CONTRIBUTING.md).
|
|
34
40
|
|
|
35
41
|
### Pull request overview
|
|
42
|
+
|
|
36
43
|
Given the multi-institutional nature of the project, communitiy code review is important. **We discourage individuals from merging their own requests.** We also prefer that developers from the same institutions do not merge their colleagues code.
|
|
37
44
|
|
|
38
45
|
**Contributors:**
|
|
@@ -54,7 +61,9 @@ Given the multi-institutional nature of the project, communitiy code review is i
|
|
|
54
61
|
1. Merge changes to the appropriate branch
|
|
55
62
|
|
|
56
63
|
### Tips for contributions
|
|
64
|
+
|
|
57
65
|
Please take the time to review the changes you made. Make sure that:
|
|
66
|
+
|
|
58
67
|
- New and changed code has comments
|
|
59
68
|
- The commit summary explains what has been changed
|
|
60
69
|
- Each commit addresses just a single concern
|
|
@@ -62,4 +71,5 @@ Please take the time to review the changes you made. Make sure that:
|
|
|
62
71
|
- The GitHub Actions CI tests completed successfully
|
|
63
72
|
|
|
64
73
|
### Who are the GeoBlacklight Developers?
|
|
74
|
+
|
|
65
75
|
The [GeoBlacklight Developers](https://github.com/orgs/geoblacklight/teams/geoblacklight-developers) team consists of contributors with GitHub privileges to review and merge pull requests (PRs) for the GeoBlacklight project. This team brings together individuals with varying types of expertise, including experience in the codebase, documentation, metadata, GIS data, and web services. If you have any questions or need guidance, this team or its individual members are a great starting point. When you submit a PR, a member of this team will review it and, if appropriate, merge it into the project.
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# GeoBlacklight
|
|
2
2
|
|
|
3
|
-
 | []() | [](https://github.com/geoblacklight/geoblacklight/releases) | [](https://zenodo.org/record/5851664#.YyIculLMK2A)
|
|
3
|
+
 | [](<>) | [](https://github.com/geoblacklight/geoblacklight/releases) | [](https://zenodo.org/record/5851664#.YyIculLMK2A)
|
|
4
4
|
|
|
5
5
|
GeoBlacklight is a world-class discovery platform for geospatial (GIS) holdings. It
|
|
6
6
|
is an open collaborative project aiming to build off of the successes
|
|
@@ -33,8 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
/* Sidebar */
|
|
35
35
|
.page-sidebar {
|
|
36
|
-
|
|
37
|
-
turbo-frame .card {
|
|
36
|
+
> * + * {
|
|
38
37
|
margin-top: 1rem;
|
|
39
38
|
}
|
|
40
39
|
|
|
@@ -47,6 +46,16 @@
|
|
|
47
46
|
}
|
|
48
47
|
}
|
|
49
48
|
|
|
49
|
+
#relations {
|
|
50
|
+
display: block;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.relations {
|
|
54
|
+
.list-group {
|
|
55
|
+
--bs-list-group-border-width: 0;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
50
59
|
/* Login button */
|
|
51
60
|
.login-btn {
|
|
52
61
|
--gbl-login-btn-bg: rgba(var(--bs-body-color-rgb), 0.03);
|
|
@@ -61,19 +70,12 @@
|
|
|
61
70
|
|
|
62
71
|
/* Downloads */
|
|
63
72
|
.download a {
|
|
64
|
-
display: block;
|
|
65
|
-
|
|
66
|
-
.title {
|
|
67
|
-
margin: 0;
|
|
68
|
-
display: inline;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
73
|
.badge {
|
|
72
|
-
|
|
73
|
-
margin-
|
|
74
|
+
display: inline;
|
|
75
|
+
margin-inline-end: 0.5em;
|
|
74
76
|
}
|
|
75
77
|
|
|
76
|
-
.
|
|
77
|
-
|
|
78
|
+
.title {
|
|
79
|
+
overflow-wrap: break-word;
|
|
78
80
|
}
|
|
79
81
|
}
|
|
@@ -1,11 +1,84 @@
|
|
|
1
1
|
/* Styles for map viewers */
|
|
2
2
|
|
|
3
|
-
/*
|
|
4
|
-
|
|
5
|
-
#openlayers-viewer {
|
|
3
|
+
/* Viewers */
|
|
4
|
+
.viewer {
|
|
6
5
|
height: 500px;
|
|
7
6
|
}
|
|
8
7
|
|
|
8
|
+
.leaflet-viewer,
|
|
9
|
+
.openlayers-viewer,
|
|
10
|
+
.mirador-viewer,
|
|
11
|
+
.openseadragon-viewer {
|
|
12
|
+
border: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.leaflet-viewer,
|
|
16
|
+
.openseadragon-viewer {
|
|
17
|
+
border-radius: var(--bs-border-radius);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* Locator map on search results */
|
|
21
|
+
search .location-viewer {
|
|
22
|
+
border: none;
|
|
23
|
+
border-radius: 0;
|
|
24
|
+
|
|
25
|
+
@media (min-width: 992px) {
|
|
26
|
+
height: unset;
|
|
27
|
+
aspect-ratio: 1;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.leaflet-container {
|
|
32
|
+
background: var(--bs-body-bg);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* Contrast fix for darkMatter theme in Leaflet */
|
|
36
|
+
[data-bs-theme="dark"] .leaflet-tile-pane img[src*="dark_all"] {
|
|
37
|
+
filter: brightness(2.5) contrast(200%);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Dark mode styles for leaflet controls */
|
|
41
|
+
.leaflet-touch .leaflet-bar {
|
|
42
|
+
border: 2px solid var(--bs-border-color);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.leaflet-bar a {
|
|
46
|
+
color: var(--bs-body-color);
|
|
47
|
+
background-color: var(--bs-body-bg);
|
|
48
|
+
|
|
49
|
+
&:hover {
|
|
50
|
+
color: var(--bs-body-color);
|
|
51
|
+
background-color: color-mix(in srgb, var(--bs-body-bg), var(--bs-body-color) 10%);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&.leaflet-disabled {
|
|
55
|
+
color: color-mix(in srgb, var(--bs-body-color), var(--bs-body-bg) 50%);
|
|
56
|
+
background-color: var(--bs-body-bg);
|
|
57
|
+
cursor: not-allowed;
|
|
58
|
+
|
|
59
|
+
&:hover {
|
|
60
|
+
color: color-mix(in srgb, var(--bs-body-color), var(--bs-body-bg) 50%);
|
|
61
|
+
background-color: var(--bs-body-bg);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
[data-bs-theme="dark"] .leaflet-bar a.leaflet-fullscreen-icon {
|
|
67
|
+
color: var(--bs-body-bg);
|
|
68
|
+
background-color: var(--bs-body-color);
|
|
69
|
+
filter: invert(1);
|
|
70
|
+
|
|
71
|
+
&:hover {
|
|
72
|
+
background-color: color-mix(in srgb, var(--bs-body-color), black 10%);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* Dark mode responsiveness for openlayers viewer */
|
|
77
|
+
:root {
|
|
78
|
+
--ol-foreground-color: var(--bs-body-color);
|
|
79
|
+
--ol-background-color: var(--bs-body-bg);
|
|
80
|
+
}
|
|
81
|
+
|
|
9
82
|
/* Hide attribution and controls and disable interaction on the static map */
|
|
10
83
|
#static-map {
|
|
11
84
|
height: 250px;
|
|
@@ -24,7 +97,12 @@
|
|
|
24
97
|
|
|
25
98
|
/* Prevent transparency of Leaflet's affiliations display to improve contrast */
|
|
26
99
|
.leaflet-container .leaflet-control-attribution {
|
|
27
|
-
background:
|
|
100
|
+
background: var(--bs-body-bg);
|
|
101
|
+
color: var(--bs-body-color);
|
|
102
|
+
|
|
103
|
+
a {
|
|
104
|
+
color: var(--bs-link-color);
|
|
105
|
+
}
|
|
28
106
|
}
|
|
29
107
|
|
|
30
108
|
/* Fix text color on buttons inside the map to match Bootstrap */
|
|
@@ -38,8 +116,13 @@
|
|
|
38
116
|
|
|
39
117
|
/* Blur the background of the dynamic search toggle to improve contrast */
|
|
40
118
|
#gbl-dynamic-button {
|
|
41
|
-
background: rgba(
|
|
119
|
+
background: rgba(var(--bs-body-bg-rgb), 0.7);
|
|
42
120
|
backdrop-filter: blur(5px);
|
|
121
|
+
|
|
122
|
+
/* Make sure it can fit inside the facet on very small screens */
|
|
123
|
+
@media (min-width: 992px) and (max-width: 1199px) {
|
|
124
|
+
--bs-btn-font-size: var(--bs-small-font-size);
|
|
125
|
+
}
|
|
43
126
|
}
|
|
44
127
|
|
|
45
128
|
/* IIIF viewers */
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<li class="download list-group-item list-group-item-action">
|
|
2
2
|
<%= link_to url, class: 'nav-link', data: @data do %>
|
|
3
|
-
<% if file_type.present? %><span class="badge text-bg-secondary"><%= file_type %></span><% end
|
|
4
|
-
<p class="title"><%= title %></p>
|
|
3
|
+
<% if file_type.present? %><span class="badge text-bg-secondary"><%= file_type %></span><% end %><span class="title"><%= title %></span>
|
|
5
4
|
<% end %>
|
|
6
5
|
</li>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<div data-controller="downloads" class="downloads card">
|
|
2
|
-
<div class="card-header"
|
|
2
|
+
<div class="card-header">
|
|
3
|
+
<h2 class="mb-0 h6"><%= t("geoblacklight.download.downloads") %></h2>
|
|
4
|
+
</div>
|
|
3
5
|
<ul class="list-group list-group-flush">
|
|
4
6
|
<% download_links.each do |link| %>
|
|
5
7
|
<%= render link %>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<div id="viewer-container">
|
|
2
|
+
<%= render Geoblacklight::ViewerHelpTextComponent.new('viewer_protocol', @document.viewer_protocol) %>
|
|
3
|
+
<%= render Geoblacklight::IndexMapLegendComponent.new(document: @document) %>
|
|
4
|
+
<%= render Geoblacklight::ItemMapViewerComponent.new(document: @document) %>
|
|
5
|
+
<%= render Geoblacklight::IiifDragDropComponent.new(document: @document) %>
|
|
6
|
+
</div>
|
|
@@ -16,12 +16,7 @@
|
|
|
16
16
|
<% @document.display_note.each do |display_note| %>
|
|
17
17
|
<%= render Geoblacklight::DisplayNoteComponent.new(display_note: display_note) %>
|
|
18
18
|
<% end %>
|
|
19
|
-
|
|
20
|
-
<%= render Geoblacklight::ViewerHelpTextComponent.new('viewer_protocol', @document.viewer_protocol) %>
|
|
21
|
-
<%= render Geoblacklight::IndexMapLegendComponent.new(document: @document) %>
|
|
22
|
-
<%= render Geoblacklight::ItemMapViewerComponent.new(document: @document) %>
|
|
23
|
-
<%= render Geoblacklight::IiifDragDropComponent.new(document: @document) %>
|
|
24
|
-
</div>
|
|
19
|
+
<%= render Geoblacklight::Document::PreviewComponent.new(document: @document) %>
|
|
25
20
|
<%= render Geoblacklight::AttributeTableComponent.new(document: @document) %>
|
|
26
21
|
<%= render Geoblacklight::IndexMapInspectComponent.new(document: @document) %>
|
|
27
22
|
<%= embed %>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<div class="accordion-item facet-limit blacklight-<%= @facet_field.key %> <%= 'facet-limit-active' if @facet_field.active? %>">
|
|
2
|
+
<h3 class="accordion-header p-0 facet-field-heading h6" id="<%= header_html_id %>">
|
|
3
|
+
<button
|
|
4
|
+
type="button"
|
|
5
|
+
class="btn accordion-button"
|
|
6
|
+
data-bs-toggle="collapse"
|
|
7
|
+
data-bs-target="#<%= html_id %>"
|
|
8
|
+
aria-expanded="true"
|
|
9
|
+
aria-controls="<%= html_id %>"
|
|
10
|
+
>
|
|
11
|
+
<%= @facet_field.label %>
|
|
12
|
+
</button>
|
|
13
|
+
</h3>
|
|
14
|
+
<div id="<%= html_id %>" role="region" aria-labelledby="<%= header_html_id %>" class="panel-collapse facet-content collapse show">
|
|
15
|
+
<%= render Geoblacklight::LocationLeafletMapComponent.new(geosearch: { dynamic: true }) %>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Geoblacklight
|
|
4
|
+
class HeaderBadgeComponent < ViewComponent::Base
|
|
5
|
+
attr_reader :document, :field
|
|
6
|
+
|
|
7
|
+
def initialize(document:, field:)
|
|
8
|
+
@document = document
|
|
9
|
+
@field = field
|
|
10
|
+
super()
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def label
|
|
14
|
+
@document[field]
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def icon(field)
|
|
18
|
+
helpers.geoblacklight_icon(label)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<header>
|
|
2
2
|
<%= top_bar %>
|
|
3
3
|
<% if landing_page? %>
|
|
4
|
-
<div class="p-5 bg-
|
|
4
|
+
<div class="p-5 bg-body-tertiary">
|
|
5
5
|
<div class="d-flex justify-content-center">
|
|
6
6
|
<%= content_tag :h1, t('geoblacklight.home.headline'), class: 'text-center display-5 fw-bold' %>
|
|
7
7
|
</div>
|
|
@@ -12,20 +12,16 @@ module Geoblacklight
|
|
|
12
12
|
super()
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
def
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
helpers.geoblacklight_icon(@document[field], classes: "svg_tooltip")
|
|
15
|
+
def render_badge(field)
|
|
16
|
+
render badge_class(field).new(document: @document, field:)
|
|
19
17
|
end
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
helpers.geoblacklight_icon(@document.resource_class.first, classes: "svg_tooltip")
|
|
19
|
+
def badge_class(field)
|
|
20
|
+
if field == Geoblacklight.configuration.fields.resource_class
|
|
21
|
+
Geoblacklight::ResourceHeaderBadgeComponent
|
|
22
|
+
else
|
|
23
|
+
Geoblacklight::HeaderBadgeComponent
|
|
24
|
+
end
|
|
29
25
|
end
|
|
30
26
|
end
|
|
31
27
|
end
|
|
@@ -46,7 +46,7 @@ module Geoblacklight
|
|
|
46
46
|
def iiif_manifest_tag
|
|
47
47
|
tag.div(nil,
|
|
48
48
|
id: "mirador",
|
|
49
|
-
class: "viewer
|
|
49
|
+
class: "viewer mirador-viewer",
|
|
50
50
|
data: {
|
|
51
51
|
manifest_url: @document.viewer_endpoint
|
|
52
52
|
})
|
|
@@ -57,7 +57,7 @@ module Geoblacklight
|
|
|
57
57
|
def iiif_image_tag
|
|
58
58
|
tag.div(nil,
|
|
59
59
|
id: "openseadragon",
|
|
60
|
-
class: "viewer
|
|
60
|
+
class: "viewer openseadragon-viewer",
|
|
61
61
|
data: {
|
|
62
62
|
image_url: @document.viewer_endpoint
|
|
63
63
|
})
|
|
@@ -67,7 +67,7 @@ module Geoblacklight
|
|
|
67
67
|
def oembed_tag
|
|
68
68
|
tag.div(nil,
|
|
69
69
|
id: "oembed-viewer",
|
|
70
|
-
class: "viewer",
|
|
70
|
+
class: "viewer oembed-viewer",
|
|
71
71
|
data: {
|
|
72
72
|
controller: "oembed-viewer",
|
|
73
73
|
oembed_viewer_url_value: @document.viewer_endpoint
|
|
@@ -80,11 +80,12 @@ module Geoblacklight
|
|
|
80
80
|
viewer_name = openlayers? ? "openlayers-viewer" : "leaflet-viewer"
|
|
81
81
|
tag.div(nil,
|
|
82
82
|
id: viewer_name,
|
|
83
|
-
class: "viewer
|
|
83
|
+
class: "viewer #{viewer_name}",
|
|
84
84
|
data: {
|
|
85
85
|
"controller" => viewer_name,
|
|
86
86
|
"#{viewer_name}-available-value" => helpers.document_available?(@document),
|
|
87
|
-
"#{viewer_name}-basemap-value" =>
|
|
87
|
+
"#{viewer_name}-basemap-value" => Geoblacklight.configuration.basemap_provider,
|
|
88
|
+
"#{viewer_name}-dark-basemap-value" => Geoblacklight.configuration.dark_basemap_provider,
|
|
88
89
|
"#{viewer_name}-protocol-value" => protocol,
|
|
89
90
|
"#{viewer_name}-url-value" => @document.viewer_endpoint,
|
|
90
91
|
"#{viewer_name}-map-geom-value" => @document.geometry.geojson,
|
|
@@ -3,14 +3,10 @@
|
|
|
3
3
|
module Geoblacklight
|
|
4
4
|
class LocationLeafletMapComponent < ViewComponent::Base
|
|
5
5
|
def initialize(
|
|
6
|
-
id: "leaflet-viewer",
|
|
7
6
|
map_geometry: config.homepage_map_geom,
|
|
8
|
-
classes: "",
|
|
9
7
|
page: nil,
|
|
10
8
|
geosearch: nil
|
|
11
9
|
)
|
|
12
|
-
@id = id
|
|
13
|
-
@classes = classes
|
|
14
10
|
@map_geometry = map_geometry if map_geometry != "null"
|
|
15
11
|
@page = page
|
|
16
12
|
@geosearch = geosearch
|
|
@@ -49,18 +45,21 @@ module Geoblacklight
|
|
|
49
45
|
end
|
|
50
46
|
|
|
51
47
|
def viewer_tag
|
|
52
|
-
tag.div(
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
tag.div(
|
|
49
|
+
id: "leaflet-viewer",
|
|
50
|
+
class: "viewer leaflet-viewer location-viewer",
|
|
51
|
+
data: data_permanent.merge(leaflet_viewer_data_attributes)
|
|
52
|
+
)
|
|
55
53
|
end
|
|
56
54
|
|
|
57
55
|
def leaflet_viewer_data_attributes
|
|
58
56
|
{
|
|
59
57
|
"controller" => "leaflet-viewer",
|
|
60
|
-
"leaflet-viewer-basemap-value" =>
|
|
58
|
+
"leaflet-viewer-basemap-value" => Geoblacklight.configuration.basemap_provider,
|
|
59
|
+
"leaflet-viewer-dark-basemap-value" => Geoblacklight.configuration.dark_basemap_provider,
|
|
61
60
|
"leaflet-viewer-map-geom-value" => search_bbox || @map_geometry,
|
|
62
61
|
"leaflet-viewer-data-map-value" => @data_map,
|
|
63
|
-
"leaflet-viewer-page-value" => params[:action]
|
|
62
|
+
"leaflet-viewer-page-value" => @page || params[:action],
|
|
64
63
|
"leaflet-viewer-options-value" => leaflet_options.to_h,
|
|
65
64
|
"leaflet-viewer-catalog-base-url-value" => (helpers.search_action_path if @geosearch)
|
|
66
65
|
}.compact
|
data/app/{views/catalog/_metadata.html.erb → components/geoblacklight/metadata_component.html.erb}
RENAMED
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
<% document ||= @documents.first %>
|
|
2
|
-
|
|
3
1
|
<div class="metadata-view">
|
|
4
2
|
<div class="container-fluid">
|
|
5
3
|
<ul class="nav nav-pills" role="tablist">
|
|
6
|
-
<% document.references.shown_metadata.each do |metadata| %>
|
|
4
|
+
<% @document.references.shown_metadata.each do |metadata| %>
|
|
7
5
|
<li role="presentation" class="nav-item">
|
|
8
|
-
<a class="pill-metadata nav-link <%= first_metadata?(
|
|
6
|
+
<a class="pill-metadata nav-link <%= first_metadata?(metadata) ? 'active' : nil %>"
|
|
9
7
|
href="#<%= metadata.type %>"
|
|
10
8
|
aria-controls="<%= metadata.type %>"
|
|
11
9
|
role="tab"
|
|
12
10
|
data-bs-toggle="pill"
|
|
13
11
|
data-ref-endpoint="<%= metadata.endpoint %>"
|
|
14
|
-
data-ref-download="#btn-metadata-download"><%= formatted_name_reference(metadata.type) %></a>
|
|
12
|
+
data-ref-download="#btn-metadata-download"><%= helpers.formatted_name_reference(metadata.type) %></a>
|
|
15
13
|
</li>
|
|
16
14
|
<% end %>
|
|
17
15
|
</ul>
|
|
18
16
|
</div>
|
|
19
17
|
|
|
20
18
|
<div class="tab-content">
|
|
21
|
-
<% document.references.shown_metadata.each do |metadata| %>
|
|
22
|
-
<div role="tabpanel" class="tab-pane<%= first_metadata?(
|
|
19
|
+
<% @document.references.shown_metadata.each do |metadata| %>
|
|
20
|
+
<div role="tabpanel" class="tab-pane<%= first_metadata?(metadata) ? ' active' : nil %>" id="<%= metadata.type %>">
|
|
23
21
|
<%= render_transformed_metadata(metadata) %>
|
|
24
22
|
</div>
|
|
25
23
|
<% end %>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Geoblacklight
|
|
4
|
+
# Renders the available metadata views for a document.
|
|
5
|
+
class MetadataComponent < ViewComponent::Base
|
|
6
|
+
def initialize(document:)
|
|
7
|
+
@document = document
|
|
8
|
+
super()
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
private
|
|
12
|
+
|
|
13
|
+
def first_metadata?(metadata)
|
|
14
|
+
@document.references.shown_metadata.first.type == metadata.type
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def render_transformed_metadata(metadata)
|
|
18
|
+
content = metadata.transform.html_safe
|
|
19
|
+
render partial: "catalog/metadata/content", locals: {content: content}
|
|
20
|
+
rescue Geoblacklight::MetadataTransformer::TransformError => transform_err
|
|
21
|
+
Geoblacklight.logger.warn transform_err.message
|
|
22
|
+
render partial: "catalog/metadata/markup", locals: {content: metadata.to_xml}
|
|
23
|
+
rescue Geoblacklight::MetadataTransformer::ParseError,
|
|
24
|
+
Geoblacklight::MetadataTransformer::TypeError => err
|
|
25
|
+
Geoblacklight.logger.warn err.message
|
|
26
|
+
render partial: "catalog/metadata/missing"
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|