{"id":17365683,"url":"https://github.com/ratmd/bs-lightbox","last_synced_at":"2025-03-27T17:43:16.014Z","repository":{"id":62974228,"uuid":"563293607","full_name":"RatMD/bs-lightbox","owner":"RatMD","description":"A simple and useful Bootstrap v5 and v4 Lightbox system, based on Bootstraps Carousel and Modal components.","archived":false,"fork":false,"pushed_at":"2023-06-22T07:28:50.000Z","size":4624,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-03T18:45:23.987Z","etag":null,"topics":["bootstrap","bootstrap-plugin","bootstrap4","bootstrap5","lightbox","lightbox-gallery"],"latest_commit_sha":null,"homepage":"https://ratmd.github.io/bs-lightbox","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RatMD.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-08T10:08:46.000Z","updated_at":"2024-10-28T09:58:37.000Z","dependencies_parsed_at":"2024-11-15T05:38:34.782Z","dependency_job_id":null,"html_url":"https://github.com/RatMD/bs-lightbox","commit_stats":{"total_commits":32,"total_committers":1,"mean_commits":32.0,"dds":0.0,"last_synced_commit":"fd7f6bf757b3ce608e3b768ba51f5a5fcca1a5c6"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RatMD%2Fbs-lightbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RatMD%2Fbs-lightbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RatMD%2Fbs-lightbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RatMD%2Fbs-lightbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RatMD","download_url":"https://codeload.github.com/RatMD/bs-lightbox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245896978,"owners_count":20690381,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap","bootstrap-plugin","bootstrap4","bootstrap5","lightbox","lightbox-gallery"],"created_at":"2024-10-15T21:05:45.632Z","updated_at":"2025-03-27T17:43:15.992Z","avatar_url":"https://github.com/RatMD.png","language":"TypeScript","readme":"@rat.md / bs-lightbox\n=====================\n**bs-lightbox** is a simple Lightbox system based on the Bootstrap-native Carousel and Modal \ncomponents, compatible with **Bootstrap 5** and **Bootstrap 4**.\n\n- [View some Examples \u0026 the Documentation](https://ratmd.github.io/bs-lightbox/)\n\nFeatures\n--------\n\n- Compatible with **Bootstrap v5** and **Bootstrap v4**\n- Native **Lightbox** environment using Bootstraps **Carousel** \u0026 **Modal** components\n- No stylesheet or CSS overwrites, just Bootstraps component \u0026 utility classes\n- Access to all Carousel \u0026 Modal **options** and **events**\n- Simple but useful API \u0026 Methods\n- Available as **ES6** compiled JavaScript and as **ES Module**\n- **Free/To/Use** and written in **Vanilla JS**\n\n\nInstallation\n------------\n\nYou can download the latest release of the **bs-lightbox** package directly on the \n[Release Page of the official GitHub repository](https://github.com/RatMD/bs-lightbox/releases), \nalternatively you can also receive your copy of this script using npm:\n\n```\nnpm i @rat.md/bs-lightbox\n```\n\n\nUsage\n-----\n**bs-lightbox** does not provide an own stylesheet, instead it just relies on the Bootstrap-native\ncomponent and utility classes. Since **bs-lightbox** does not provide any bundled JS version, you've \nto make sure that Bootstrap's JavaScript library is loaded BEFORE the `rat.lightbox` file.\n\n```html\n\u003chtml\u003e\n    \u003chead\u003e\n        \u003c!-- Include Bootstrap CSS --\u003e\n        \u003clink href=\"path/to/your/css/bootstrap.min.css\" /\u003e\n    \u003c/head\u003e\n    \u003cbody\u003e\n        \n        \u003c!-- Simple Lightbox --\u003e\n        \u003cimg src=\"path/to/your/image.jpg\" data-bs-handle=\"lightbox\" /\u003e\n\n        \u003c!-- Include Bootstrap JS --\u003e\n        \u003cscript src=\"path/to/your/js/bootstrap.bundle.min.js\"\u003e\u003c/script\u003e\n\n        \u003c!-- Include @rat.md/bs-lightbox JS --\u003e\n        \u003cscript src=\"path/to/your/js/rat.lightbox.min.js\"\u003e\u003c/script\u003e\n\n        \u003c!-- Invoke Lightbox on all valid components --\u003e\n        \u003cscript\u003e\n            document.addEventListener('DOMContentLoaded', () =\u003e {\n                rat.Lightbox.invoke();\n            });\n        \u003c/script\u003e\n    \u003c/body\u003e\n\u003c/html\u003e\n```\n\n### Usage as ES Module\n**bs-lightbox** does also provide an ES-Module version, which can be found in the `dist/esm` folder. \nDepending on how you're including Bootstrap, you probably need to append the Carousel and Modal \nprototype objects / classes manually, as shown below.\n\n```javascript\nimport { Carousel, Modal } from 'bootstrap';                // Optional, depending on your usage\nimport { Lightbox } from '../esm/rat.lightbox.min.js';\n\n// The following lines are only necessary, if the 'bootstrap' global is not added\nLightbox.CAROUSEL = Carousel;\nLightbox.MODAL = Modal; \n\n// Go on as usual, make sure the following line is execute when the DOM is ready.\nLightbox.invoke(\n    null,       // Custom or Default selector\n    {}          // Custom Configurations\n);\n```\n\n\nCopyright \u0026 License\n-------\nWritten and Copyright by [rat.md](https://www.rat.md).\n\nPublished under der MIT license.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fratmd%2Fbs-lightbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fratmd%2Fbs-lightbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fratmd%2Fbs-lightbox/lists"}