diff --git a/README.md b/README.md index 834c11af7..69c3015cc 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,8 @@ Pour faire tourner sidekiq, vous aurez besoin de : - redis +- lightgallery : une license a été souscrite pour soutenir le projet, mais elle n'est pas obligatoire si la librairie est utilisée dans le cadre d'une application open source. + #### Développement - rbenv : voir https://github.com/rbenv/rbenv-installer#rbenv-installer--doctor-scripts diff --git a/app/javascript/controllers/lightbox_controller.ts b/app/javascript/controllers/lightbox_controller.ts index 49e53ecd0..1c671fa16 100644 --- a/app/javascript/controllers/lightbox_controller.ts +++ b/app/javascript/controllers/lightbox_controller.ts @@ -19,7 +19,10 @@ export default class extends Controller { zoomFromOrigin: false, allowMediaOverlap: true, toggleThumb: true, - selector: '.gallery-link' + selector: '.gallery-link', + // license key is not mandatory for open source projects but we purchased + // an organization license to show our support (see https://www.lightgalleryjs.com/license/) + licenseKey: import.meta.env.VITE_LIGHTGALLERY_LICENSE_KEY }; const gallery = document.querySelector('.gallery'); diff --git a/config/env.example.optional b/config/env.example.optional index c79ce23bb..109b73fc7 100644 --- a/config/env.example.optional +++ b/config/env.example.optional @@ -272,3 +272,6 @@ CRON_JOBS_DISABLED="" # disable SIDEKIQ_RELIABLE_FETCH # SKIP_RELIABLE_FETCH="true" + +# optional license key for lightgallery +VITE_LIGHTGALLERY_LICENSE_KEY = ""