diff --git a/.github/workflows/build-demo-app.yml b/.github/workflows/build-demo-app.yml
new file mode 100644
index 000000000..012499187
--- /dev/null
+++ b/.github/workflows/build-demo-app.yml
@@ -0,0 +1,153 @@
+name: Build demo app
+
+on:
+ pull_request:
+ push:
+ branches:
+ - main
+ schedule:
+ - cron: "0 1 * * SUN" # every sunday at 1AM
+ workflow_dispatch:
+
+env:
+ REGISTRY: ghcr.io
+ IMAGE_NAME: ${{ github.repository }}
+ BRANCH: ${{ github.head_ref || github.ref_name }}
+
+jobs:
+ build-app:
+ runs-on: ubuntu-latest
+ outputs:
+ artifact-url: ${{ steps.artifact-upload-step.outputs.artifact-url }}
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up Ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: 3.3
+
+ - name: Install dependencies
+ run: bundle install
+ env:
+ RAILS_VERSION: 7.1.3
+
+ - name: Setup Yarn
+ run: exec "yarnpkg"
+
+ - name: Build
+ run: BRANCH=${{ env.BRANCH }} rails new build -m template.rb -a propshaft
+
+ - name: Cleanup
+ run: rm -rf build/node_modules build/Gemfile.lock build/yarn.lock build/tmp
+
+ - name: Copy Dockerfile
+ run: cp lib/generators/geoblacklight/templates/demo-app/Dockerfile build/.
+
+ - name: Copy compose.yml
+ run: cp lib/generators/geoblacklight/templates/demo-app/compose.yml build/.
+
+ - name: Copy start-server script
+ run: cp lib/generators/geoblacklight/templates/demo-app/start-server.sh build/.
+
+ - name: Copy fixture solr documents
+ run: mkdir -p build/spec/fixtures && cp -R spec/fixtures/solr_documents build/spec/fixtures/.
+
+ - name: Replace main image tag with pr tag
+ if: github.ref_name != 'main'
+ run: sed -i 's/main/pr-${{ github.event.number }}/g' build/compose.yml
+
+ - name: Upload app build
+ uses: actions/upload-artifact@v4
+ id: artifact-upload-step
+ with:
+ name: build-${{ env.BRANCH }}
+ path: build/
+
+ build-docker:
+ runs-on: ubuntu-latest
+ needs:
+ - build-app
+ steps:
+ - name: Download app build
+ uses: actions/download-artifact@v4
+ with:
+ name: build-${{ env.BRANCH }}
+
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v3
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
+
+ - name: Log in to the Container registry
+ uses: docker/login-action@v3
+ with:
+ registry: ${{ env.REGISTRY }}
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Extract metadata (tags, labels) for Docker
+ id: meta
+ uses: docker/metadata-action@v5
+ with:
+ images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
+ tags: |
+ type=ref,event=branch
+ type=ref,event=pr
+ type=sha
+ env:
+ DOCKER_METADATA_PR_HEAD_SHA: true
+
+ # Rebuild base context when triggered by schedule or workflow_dispatch
+ - name: Build and push base Docker image
+ uses: docker/build-push-action@v6
+ if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
+ with:
+ context: "${{ github.workspace }}"
+ file: "${{ github.workspace }}/Dockerfile"
+ push: true
+ platforms: linux/amd64,linux/arm64
+ cache-from: type=gha
+ cache-to: type=gha,mode=max
+ tags: ghcr.io/geoblacklight/geoblacklight:base
+ target: "base"
+
+ # Build only the app context. Build times are faster because most
+ # gems and node packages are already installed in the base context.
+ - name: Build and push branch Docker image
+ uses: docker/build-push-action@v6
+ with:
+ context: "${{ github.workspace }}"
+ file: "${{ github.workspace }}/Dockerfile"
+ push: true
+ platforms: linux/amd64,linux/arm64
+ cache-from: type=gha
+ cache-to: type=gha,mode=max
+ tags: ${{ steps.meta.outputs.tags }}
+ labels: ${{ steps.meta.outputs.labels }}
+ target: "app"
+
+ notify:
+ runs-on: ubuntu-latest
+ if: github.ref_name != 'main'
+ needs:
+ - build-app
+ - build-docker
+ permissions:
+ contents: read
+ packages: write
+ pull-requests: write
+ steps:
+ - name: Add artifact link to PR comments
+ uses: mshick/add-pr-comment@v2
+ with:
+ message: |
+ Demo app download link: ${{ needs.build-app.outputs.artifact-url }}
+
+ 1. Download demo app and unzip file
+ 2. Change into app directory
+ - run `docker compose pull`
+ - run `docker compose up`
+ 3. Open in browser
+ - App: http://127.0.0.1:3001
+ - Solr: http://127.0.0.1:8984
diff --git a/.github/workflows/prune-containers.yml b/.github/workflows/prune-containers.yml
new file mode 100644
index 000000000..50d7a309d
--- /dev/null
+++ b/.github/workflows/prune-containers.yml
@@ -0,0 +1,19 @@
+name: Prune containers
+
+on:
+ workflow_dispatch:
+ schedule:
+ - cron: "0 0 * * SUN" # every sunday at midnight
+
+jobs:
+ clean:
+ runs-on: ubuntu-latest
+ name: Delete old images
+ steps:
+ - uses: snok/container-retention-policy@v3.0.0
+ with:
+ account: geoblacklight
+ image-names: geoblacklight
+ token: ${{ secrets.GITHUB_TOKEN }}
+ image-tags: "!main !base"
+ cut-off: 2w
diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml
index 42dab101e..d7b123cdd 100644
--- a/.github/workflows/ruby.yml
+++ b/.github/workflows/ruby.yml
@@ -10,66 +10,66 @@ jobs:
linter:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
- - name: Set up Ruby
- uses: ruby/setup-ruby@v1
- with:
- ruby-version: 3.2
- - name: Install dependencies
- run: bundle install
- - name: Run linter
- run: bundle exec standardrb
+ - uses: actions/checkout@v2
+ - name: Set up Ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: 3.2
+ - name: Install dependencies
+ run: bundle install
+ - name: Run linter
+ run: bundle exec standardrb
aardvark-fixture-linter:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
- - name: Set up Ruby
- uses: ruby/setup-ruby@v1
- with:
- ruby-version: 3.2
- - name: Install json schema validator
- run: gem install json_schemer
- - name: Run json_schemer against aarkvark fixtures
- run: find spec/fixtures/solr_documents -type f -name "*.json" | xargs json_schemer schema/geoblacklight-schema-aardvark.json
+ - uses: actions/checkout@v2
+ - name: Set up Ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: 3.2
+ - name: Install json schema validator
+ run: gem install json_schemer
+ - name: Run json_schemer against aarkvark fixtures
+ run: find spec/fixtures/solr_documents -type f -name "*.json" | xargs json_schemer schema/geoblacklight-schema-aardvark.json
test:
runs-on: ubuntu-latest
strategy:
matrix:
- ruby_version: ['3.2', '3.3']
- rails_version: ['7.0.8.4', '7.1.3.4']
+ ruby_version: ["3.2", "3.3"]
+ rails_version: ["7.0.8.4", "7.1.3.4", "7.2.0"]
name: test ruby ${{ matrix.ruby_version }} / rails ${{ matrix.rails_version }}
steps:
- - uses: actions/checkout@v2
- - name: Set up Ruby
- uses: ruby/setup-ruby@v1
- with:
- ruby-version: ${{ matrix.ruby_version }}
- - name: Create Solr container
- run: docker run -d -p 8983:8983 geoblacklight/solr:8.9-v1.0.0 server/scripts/ci-start.sh
- - name: Install dependencies
- run: bundle install
- env:
- RAILS_VERSION: ${{ matrix.rails_version }}
- - name: Setup Yarn
- run: exec "yarnpkg"
- - name: Load config into solr
- run: |
+ - uses: actions/checkout@v2
+ - name: Set up Ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: ${{ matrix.ruby_version }}
+ - name: Create Solr container
+ run: docker run -d -p 8983:8983 geoblacklight/solr:8.9-v1.0.0 server/scripts/ci-start.sh
+ - name: Install dependencies
+ run: bundle install
+ env:
+ RAILS_VERSION: ${{ matrix.rails_version }}
+ - name: Setup Yarn
+ run: exec "yarnpkg"
+ - name: Load config into solr
+ run: |
cd solr/conf
zip -1 -r solr_config.zip ./*
curl -H "Content-type:application/octet-stream" --data-binary @solr_config.zip "http://solr:SolrRocks@127.0.0.1:8983/solr/admin/configs?action=UPLOAD&name=blacklight"
curl -H 'Content-type: application/json' http://solr:SolrRocks@127.0.0.1:8983/api/collections/ -d '{create: {name: blacklight-core, config: blacklight, numShards: 1}}'
- - name: Run tests
- run: bundle exec rake ci
- env:
- RAILS_VERSION: ${{ matrix.rails_version }}
- ENGINE_CART_RAILS_OPTIONS: '--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test --skip-webpack-install --skip-javascript'
- SOLR_URL: http://solr:SolrRocks@localhost:8983/solr/blacklight-core
- - name: Upload coverage artifacts
- uses: actions/upload-artifact@v2
- if: always()
- with:
- name: coverage
- path: coverage/
+ - name: Run tests
+ run: bundle exec rake ci
+ env:
+ RAILS_VERSION: ${{ matrix.rails_version }}
+ ENGINE_CART_RAILS_OPTIONS: "--skip-git --skip-keeps --skip-action-cable --skip-test -a propshaft"
+ SOLR_URL: http://solr:SolrRocks@localhost:8983/solr/blacklight-core
+ - name: Upload coverage artifacts
+ uses: actions/upload-artifact@v2
+ if: always()
+ with:
+ name: coverage
+ path: coverage/
diff --git a/.gitignore b/.gitignore
index d6ea0334f..2ec0445dc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,6 +28,7 @@ jetty
yarn-debug.log*
.yarn-integrity
yarn.lock
+package-lock.json
# Ignore IDE files
.idea
@@ -36,8 +37,7 @@ yarn.lock
/public/vite*
/public/geoblacklight-vite*
node_modules
-dist
+app/assets/javascripts/geoblacklight
# Vite uses dotenv and suggests to ignore local-only env files. See
# https://vitejs.dev/guide/env-and-mode.html#env-files
*.local
-
diff --git a/Gemfile b/Gemfile
index 047c3f607..ecc1ba496 100644
--- a/Gemfile
+++ b/Gemfile
@@ -3,20 +3,6 @@ source "https://rubygems.org"
# Specify your gem's dependencies in geoblacklight.gemspec
gemspec
-group :test do
- gem "capybara", require: false
- gem "database_cleaner", require: false
- gem "engine_cart", require: false
- gem "factory_bot_rails", require: false
- gem "foreman", require: false
- gem "rails-controller-testing", require: false
- gem "rspec-rails", require: false
- gem "simplecov", require: false
- gem "standardrb", require: false
- gem "webdrivers", require: false
- gem "webmock", require: false
-end
-
# BEGIN ENGINE_CART BLOCK
# engine_cart: 2.6.0
# engine_cart stanza: 2.5.0
@@ -35,7 +21,7 @@ else
if ENV["RAILS_VERSION"]
if ENV["RAILS_VERSION"] == "edge"
gem "rails", github: "rails/rails"
- ENV["ENGINE_CART_RAILS_OPTIONS"] = "--edge --skip-turbolinks"
+ ENV["ENGINE_CART_RAILS_OPTIONS"] = "--edge"
else
gem "rails", ENV["RAILS_VERSION"]
end
diff --git a/Rakefile b/Rakefile
index 2f5549d3d..2a6d3cde2 100644
--- a/Rakefile
+++ b/Rakefile
@@ -49,7 +49,7 @@ namespace :geoblacklight do
end
namespace :internal do
- task seed: ["engine_cart:generate"] do
+ task :seed do
within_test_app do
system "bundle exec rake geoblacklight:index:seed"
system "bundle exec rake geoblacklight:downloads:mkdir"
@@ -57,7 +57,28 @@ namespace :geoblacklight do
end
end
- desc "Run Solr and GeoBlacklight for interactive development"
+ desc "Run GeoBlacklight server (without Solr)"
+ task :server_only, [:rails_server_args] do |_t, args|
+ if File.exist? EngineCart.destination
+ within_test_app do
+ system "bundle update"
+ end
+ else
+ Rake::Task["engine_cart:generate"].invoke
+ end
+
+ within_test_app do
+ puts "\n^C to stop the rails server"
+ puts " "
+ begin
+ system "bundle exec rails s #{args[:rails_server_args]}"
+ rescue Interrupt
+ puts "Shutting down the rails server..."
+ end
+ end
+ end
+
+ desc "Run GeoBlacklight and Solr (solr_wrapper) with seed data for interactive development"
task :server, [:rails_server_args] do |_t, args|
if File.exist? EngineCart.destination
within_test_app do
@@ -67,7 +88,9 @@ namespace :geoblacklight do
Rake::Task["engine_cart:generate"].invoke
end
- SolrWrapper.wrap(port: "8983") do |solr|
+ # with artifact_path set, solr_wrapper checks to see if the solr instance is already downloaded rather than downloading each time
+ # to clear this folder and re-download, run `solr_wrapper clean`
+ SolrWrapper.wrap(port: "8983", artifact_path: "tmp/solr") do |solr|
solr.with_collection(name: "blacklight-core", dir: File.join(File.expand_path(".", File.dirname(__FILE__)), "solr", "conf")) do
Rake::Task["geoblacklight:internal:seed"].invoke
@@ -87,15 +110,9 @@ namespace :geoblacklight do
desc "Run Solr and seed with sample data"
task :solr do
- if File.exist? EngineCart.destination
- within_test_app do
- system "bundle update"
- end
- else
- Rake::Task["engine_cart:generate"].invoke
- end
-
- SolrWrapper.wrap(port: "8983") do |solr|
+ # with artifact_path set, solr_wrapper checks to see if the solr instance is already downloaded rather than downloading each time
+ # to clear this folder and re-download, run `solr_wrapper clean`
+ SolrWrapper.wrap(port: "8983", artifact_path: "tmp/solr") do |solr|
solr.with_collection(name: "blacklight-core", dir: File.join(File.expand_path(".", File.dirname(__FILE__)), "solr", "conf")) do
Rake::Task["geoblacklight:internal:seed"].invoke
@@ -106,7 +123,7 @@ namespace :geoblacklight do
begin
sleep
rescue Interrupt
- puts "Shutting down..."
+ puts "Shutting down solr_wrapper..."
end
end
end
diff --git a/app/assets/stylesheets/geoblacklight/geoblacklight.scss b/app/assets/stylesheets/geoblacklight/geoblacklight.scss
index f6d0c83c8..1d78f338d 100644
--- a/app/assets/stylesheets/geoblacklight/geoblacklight.scss
+++ b/app/assets/stylesheets/geoblacklight/geoblacklight.scss
@@ -1 +1,2 @@
+// GeoBlacklight styles entrypoint
@import 'modules/base';
diff --git a/app/assets/stylesheets/geoblacklight/modules/_blacklight_overrides.scss b/app/assets/stylesheets/geoblacklight/modules/_blacklight_overrides.scss
index cb574daff..e9274c4ca 100644
--- a/app/assets/stylesheets/geoblacklight/modules/_blacklight_overrides.scss
+++ b/app/assets/stylesheets/geoblacklight/modules/_blacklight_overrides.scss
@@ -10,22 +10,6 @@ $logo-image: image_url('blacklight/logo.svg') !default;
}
}
-// Begin - Addresses GBL issue #634
-// Emulates font-size for SVG icons and aligns to baseline
-.blacklight-icons {
- display: inline-flex;
- height: $font-size-base;
- width: $font-size-base;
-}
-
-.blacklight-icons svg {
- height: 1rem;
- width: 1rem;
- top: .125rem;
- position: relative;
-}
-// End - Addresses GBL issue #634
-
.blacklight-icons-iiif-drag-drop, .blacklight-icons-iiif-drag-drop svg {
height: 2rem;
width: 2rem;
@@ -43,9 +27,27 @@ $logo-image: image_url('blacklight/logo.svg') !default;
.documents-list .document {
margin-top:0.5rem;
padding-top:0.5rem;
+ border-bottom: 0;
}
// End - Addresses GBL issue #639
-.navbar-search.bg-light {
- background-color: inherit!important;
-}
\ No newline at end of file
+// Round the left end of the search bar since we don't have a dropdown there
+auto-complete {
+ border-top-left-radius: $border-radius !important;
+ border-bottom-left-radius: $border-radius !important;
+}
+
+// Add a bit of padding to the main container
+#main-container {
+ padding-top: 1rem;
+}
+
+// center contents of the container that holds the search bar on the home page
+.jumbotron ~ .navbar-search.navbar .container {
+ justify-content: center;
+}
+
+// add padding around the container that holds the search bar (on all pages)
+.navbar-search.navbar .container {
+ padding: 1rem;
+}
diff --git a/app/assets/stylesheets/geoblacklight/modules/downloads.scss b/app/assets/stylesheets/geoblacklight/modules/downloads.scss
index 263957324..5e28ce2f8 100644
--- a/app/assets/stylesheets/geoblacklight/modules/downloads.scss
+++ b/app/assets/stylesheets/geoblacklight/modules/downloads.scss
@@ -47,3 +47,16 @@
}
}
}
+
+a.download-in-progress {
+ font-weight: bold;
+ cursor: not-allowed;
+ opacity: 0.5;
+ text-decoration: none;
+}
+
+.download-complete {
+ font-weight: bold;
+ background: transparent no-repeat center right;
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' version='1.1' width='14' height='14' viewBox='0 0 512 512' role='img'%3E%3Ctitle%3ECheckmark%3C/title%3E%3Cpath fill='%231f5d04' d='M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z'%3E%3C/path%3E%3C/svg%3E");
+}
diff --git a/app/assets/stylesheets/geoblacklight/modules/home.scss b/app/assets/stylesheets/geoblacklight/modules/home.scss
index b71bd0e80..e6424c619 100644
--- a/app/assets/stylesheets/geoblacklight/modules/home.scss
+++ b/app/assets/stylesheets/geoblacklight/modules/home.scss
@@ -1,24 +1,5 @@
-
-.geobl-homepage-masthead {
- .search-query-form {
- max-width: 100%;
- }
-
- .navbar .container {
- justify-content: center!important;
- }
-}
-
#main-container {
- .category-block {
- min-height: 240px;
-
- .category-icon {
- font-size: 6em;
- }
- }
-
- [data-map="home"] {
+ .leaflet-container {
height: 400px;
.leaflet-control-container {
diff --git a/app/assets/stylesheets/geoblacklight/modules/icon-customization.scss b/app/assets/stylesheets/geoblacklight/modules/icon-customization.scss
index 54cd8a53c..971cd9006 100644
--- a/app/assets/stylesheets/geoblacklight/modules/icon-customization.scss
+++ b/app/assets/stylesheets/geoblacklight/modules/icon-customization.scss
@@ -8,15 +8,17 @@ span.icon-missing {
// CatalogController#index - Home
.category-icon {
+ display: flex;
+ place-content: center;
+ padding: 2rem 0;
+
.blacklight-icons {
height: 6rem;
- width: auto;
+ width: 6rem;
}
.blacklight-icons svg {
- width: 100%;
- height: 100%;
- top: 2rem;
+ aspect-ratio: 1;
}
}
@@ -30,7 +32,8 @@ span.icon-missing {
.blacklight-icons svg {
width: auto;
- height: 100%;
+ height: 1.5rem;
+ vertical-align: baseline;
}
}
}
@@ -42,12 +45,27 @@ span.icon-missing {
}
}
-.blacklight-icons {
- svg * {
- width: 100%;
- height: 100%;
+// Begin - Addresses GBL issue #634
+// Emulates font-size for SVG icons and aligns to baseline
+.status-icons,
+.facet-label,
+.show-tools,
+.gbl-display-note,
+.relations {
+ .blacklight-icons {
+ display: inline-flex;
+ height: $font-size-base;
+ width: $font-size-base;
+ }
+
+ .blacklight-icons svg {
+ height: 1rem;
+ width: 1rem;
+ top: .125rem;
+ position: relative;
}
}
+// End - Addresses GBL issue #634
// Sidebar Action Icons
#citationLink {
diff --git a/app/assets/stylesheets/geoblacklight/modules/index_maps.scss b/app/assets/stylesheets/geoblacklight/modules/index_maps.scss
index 3cf6b6de6..acf39135e 100644
--- a/app/assets/stylesheets/geoblacklight/modules/index_maps.scss
+++ b/app/assets/stylesheets/geoblacklight/modules/index_maps.scss
@@ -6,20 +6,15 @@
}
}
-#map[data-protocol="IndexMap"] {
+.viewer[data-leaflet-viewer-protocol-value="IndexMap"] {
.leaflet-interactive {
stroke: black;
- fill-opacity: 0.65;
}
}
.index-map-legend {
font-size: 15px;
display: flex;
- position: absolute;
- right: 15px;
- top: -2px;
- left: 90px;
&-info {
display: flex;
@@ -42,15 +37,6 @@
margin-bottom: 0;
}
- &-default {
- background: #7FCDBB;
- }
- &-unavailable {
- background: #EDF8B1;
- }
- &-selected {
- background: #2C7FB8;
- }
&-default, &-unavailable, &-selected {
opacity: 0.65;
}
diff --git a/app/assets/stylesheets/geoblacklight/modules/item.scss b/app/assets/stylesheets/geoblacklight/modules/item.scss
index b49714d0e..3389c80ce 100644
--- a/app/assets/stylesheets/geoblacklight/modules/item.scss
+++ b/app/assets/stylesheets/geoblacklight/modules/item.scss
@@ -6,13 +6,13 @@
}
#viewer-container {
- [data-map="item"] {
+ .viewer {
border: 1px solid $gray-400;
- height: 27.5rem;
+ min-height: 27.5rem;
- // Ensure oembed iframe is the same height as its container
- iframe {
- height: 27.5rem;
+ // Ensure embeds, openlayers viewer, and IIIF viewer fit their container
+ iframe, .ol-viewport, .clover-iiif-image-openseadragon {
+ min-height: 27.5rem;
}
}
diff --git a/app/assets/stylesheets/geoblacklight/modules/modal.scss b/app/assets/stylesheets/geoblacklight/modules/modal.scss
index 1898f59fc..d7fec7537 100644
--- a/app/assets/stylesheets/geoblacklight/modules/modal.scss
+++ b/app/assets/stylesheets/geoblacklight/modules/modal.scss
@@ -1,18 +1,3 @@
-.modal-header, .modal-body, .modal-footer {
- .hide-without-js {
- display: none;
- }
-}
-
-#ajax-modal {
- .modal-header, .modal-body, .modal-footer {
- .hide-without-js {
- display: inline-block;
- }
- }
-
-}
-
// Add some separation between web services entries
.web-services-modal-body > div + div {
border-top: 1px solid #dee2e6;
diff --git a/app/assets/stylesheets/geoblacklight/modules/results.scss b/app/assets/stylesheets/geoblacklight/modules/results.scss
index 2333d78cc..8544549df 100644
--- a/app/assets/stylesheets/geoblacklight/modules/results.scss
+++ b/app/assets/stylesheets/geoblacklight/modules/results.scss
@@ -1,4 +1,4 @@
-[data-map="index"], [data-map="bookmarks"] {
+[data-page="index"], [data-page="bookmarks"] {
height: 480px;
}
@@ -6,6 +6,7 @@
max-height: 100px;
overflow:hidden;
padding-left: 2ch;
+ border-bottom: 1px dotted $gray-300 !important;
}
.documents-list {
@@ -20,17 +21,16 @@
}
.document-counter {
- @extend .pr-1;
+ @extend .pe-1;
}
- .caret-toggle {
- @include caret('right');
- padding-left: 0;
- width: 28px;
+ // rotate BS5's default caret
+ .dropdown-toggle:after {
+ transform: rotate(-90deg);
+ }
- &[aria-expanded="true"] {
- @include caret('down');
- }
+ .dropdown-toggle[aria-expanded="true"]:after {
+ transform: rotate(0deg);
}
.status-icons {
@@ -43,15 +43,7 @@
}
#main-container {
- .category-block {
- min-height: 240px;
-
- .category-icon {
- font-size: 6em;
- }
- }
-
- [data-map="index"] {
+ .viewer[data-page="index"] {
height: 400px;
.leaflet-control-container {
diff --git a/app/assets/stylesheets/geoblacklight/modules/sidebar.scss b/app/assets/stylesheets/geoblacklight/modules/sidebar.scss
index 3b2c2ba35..d97aab7bb 100644
--- a/app/assets/stylesheets/geoblacklight/modules/sidebar.scss
+++ b/app/assets/stylesheets/geoblacklight/modules/sidebar.scss
@@ -33,10 +33,10 @@
margin-bottom: 20px;
}
-.page-sidebar [data-map="item"] {
+.page-sidebar .viewer {
height: 280px;
.leaflet-control-attribution {
display: none;
}
-}
\ No newline at end of file
+}
diff --git a/app/components/geoblacklight/attribute_table_component.rb b/app/components/geoblacklight/attribute_table_component.rb
index 4f3ea49fe..1459bff9b 100644
--- a/app/components/geoblacklight/attribute_table_component.rb
+++ b/app/components/geoblacklight/attribute_table_component.rb
@@ -5,5 +5,13 @@ module Geoblacklight
# A component for rendering attribute table
#
class AttributeTableComponent < ViewComponent::Base
+ def initialize(document:)
+ @document = document
+ super
+ end
+
+ def render?
+ helpers.document_available?(@document) && @document.inspectable?
+ end
end
end
diff --git a/app/components/geoblacklight/carto_component.rb b/app/components/geoblacklight/carto_component.rb
index b100edd18..7028e4e3a 100644
--- a/app/components/geoblacklight/carto_component.rb
+++ b/app/components/geoblacklight/carto_component.rb
@@ -29,7 +29,7 @@ def carto_link
# Removes blank space from provider to accomodate Carto OneClick
#
def carto_provider
- application_name.delete(" ")
+ helpers.application_name.delete(" ")
end
private
diff --git a/app/components/geoblacklight/citation_component.rb b/app/components/geoblacklight/citation_component.rb
deleted file mode 100644
index f521fade7..000000000
--- a/app/components/geoblacklight/citation_component.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-module Geoblacklight
- class CitationComponent < Blacklight::Document::CitationComponent
- attr_reader :document
- with_collection_parameter :document
-
- def initialize(document:)
- @document = document
- super
- end
-
- def citation
- document.geoblacklight_citation(solr_document_url(document))
- end
- end
-end
diff --git a/app/components/geoblacklight/citation_component.html.erb b/app/components/geoblacklight/document/citation_component.html.erb
similarity index 100%
rename from app/components/geoblacklight/citation_component.html.erb
rename to app/components/geoblacklight/document/citation_component.html.erb
diff --git a/app/components/geoblacklight/document/citation_component.rb b/app/components/geoblacklight/document/citation_component.rb
new file mode 100644
index 000000000..9e9b662ff
--- /dev/null
+++ b/app/components/geoblacklight/document/citation_component.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+module Geoblacklight
+ module Document
+ class CitationComponent < Blacklight::Document::CitationComponent
+ attr_reader :document
+ with_collection_parameter :document
+
+ def initialize(document:)
+ @document = document
+ super
+ end
+
+ def citation
+ document.geoblacklight_citation(solr_document_url(document))
+ end
+ end
+ end
+end
diff --git a/app/components/geoblacklight/document/sidebar_component.html.erb b/app/components/geoblacklight/document/sidebar_component.html.erb
new file mode 100644
index 000000000..768041064
--- /dev/null
+++ b/app/components/geoblacklight/document/sidebar_component.html.erb
@@ -0,0 +1,10 @@
+<%= render Geoblacklight::StaticMapComponent.new(document:) %>
+<%= render_show_tools %>
+
+
+
+<%= render Blacklight::Document::MoreLikeThisComponent.new(document: document) %>
diff --git a/app/components/geoblacklight/document/sidebar_component.rb b/app/components/geoblacklight/document/sidebar_component.rb
new file mode 100644
index 000000000..e63a2212c
--- /dev/null
+++ b/app/components/geoblacklight/document/sidebar_component.rb
@@ -0,0 +1,8 @@
+# frozen_string_literal: true
+
+module Geoblacklight
+ module Document
+ class SidebarComponent < Blacklight::Document::SidebarComponent
+ end
+ end
+end
diff --git a/app/components/geoblacklight/document_component.html.erb b/app/components/geoblacklight/document_component.html.erb
new file mode 100644
index 000000000..ecb128e57
--- /dev/null
+++ b/app/components/geoblacklight/document_component.html.erb
@@ -0,0 +1,38 @@
+<%= content_tag @component,
+ id: @id,
+ data: {
+ 'document-id': @document.id.to_s.parameterize,
+ 'document-counter': @counter,
+ },
+ itemscope: true,
+ itemtype: @document.itemtype,
+ class: classes.flatten.join(' ') do %>
+ <%= header %>
+ <% if body.present? %>
+ <%= body %>
+ <% else %>
+
+ <% @document.display_note.each do |display_note| %>
+ <%= render Geoblacklight::DisplayNoteComponent.new(display_note: display_note) %>
+ <% end %>
+ <%= render Geoblacklight::ViewerContainerComponent.new(document: @document) %>
+ <%= render Geoblacklight::AttributeTableComponent.new(document: @document) %>
+ <%= render Geoblacklight::IndexMapInspectComponent.new(document: @document) %>
+ <% title.with_after_title { render Geoblacklight::HeaderIconsComponent.new(document: @document) } %>
+ <%= title %>
+ <%= embed %>
+ <%= content %>
+ <%= metadata %>
+ <% metadata_sections.each do |section| %>
+ <%= section %>
+ <% end %>
+
+ <% partials.each do |partial| %>
+ <%= partial %>
+ <% end %>
+
+
+ <%= thumbnail %>
+ <% end %>
+ <%= footer %>
+<% end %>
diff --git a/app/components/geoblacklight/document_component.rb b/app/components/geoblacklight/document_component.rb
new file mode 100644
index 000000000..57dec4ae0
--- /dev/null
+++ b/app/components/geoblacklight/document_component.rb
@@ -0,0 +1,6 @@
+# frozen_string_literal: true
+
+module Geoblacklight
+ class DocumentComponent < Blacklight::DocumentComponent
+ end
+end
diff --git a/app/components/geoblacklight/download_links_component.html.erb b/app/components/geoblacklight/download_links_component.html.erb
index 2a1b831b9..df05fff0a 100644
--- a/app/components/geoblacklight/download_links_component.html.erb
+++ b/app/components/geoblacklight/download_links_component.html.erb
@@ -1,6 +1,6 @@
-