Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements: auto resize, displaying a caption, others fixes #4

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
babel.config.json
webpack.config.js
webpack.config.js
package-lock.json
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Description

Get a nice lightbox with different options
Get a nice lightbox with different options, for Bootstrap 5.

# Installation

`npm i lightboxcrpozo`

Demo inside dist/index.html

Package Manager: npm
Transpiling: babel
Bundling: webpack
* Package Manager: npm
* Transpiling: babel
* Bundling: webpack

# Usage

```
<div data-toggle="lightbox">
<div data-bs-toggle="lightbox">
<img class="lightbox-bootstrap" src="">
<img class="lightbox-bootstrap" src="">
</div>
Expand All @@ -30,7 +30,6 @@ Bundling: webpack

# Options

* *interval_time* - data-interval="5000" (number/false stops the looping)
* *effect_type* - data-ride="normal" (fade/normal)
* *arrow_mode* - data-arrow="true" (true/false)

* *interval_time* - data-bs-interval="5000" (number/false stops the looping)
* *effect_type* - data-bs-ride="normal" (fade/normal)
* *arrow_mode* - data-bs-arrow="true" (true/false)
2 changes: 2 additions & 0 deletions dist/bootstrap.min.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Bootstrap v5.0.0-beta2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Bootstrap v5.2.1 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
9 changes: 5 additions & 4 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</head>
<body>
<div class="container">
<div data-toggle="lightbox" data-arrow="true" data-ride="normal" data-interval="5000">
<div data-bs-toggle="lightbox" data-bs-arrow="true" data-bs-ride="normal" data-bs-interval="5000">
<div class="row">
<img class="col-md-4 lightbox-bootstrap" src="https://iso.500px.com/wp-content/uploads/2016/02/stock-photo-116395391.jpg">
<img class="col-md-4 lightbox-bootstrap" src="https://iso.500px.com/wp-content/uploads/2016/01/moises_cover1.jpg">
Expand All @@ -24,7 +24,7 @@
<img class="col-md-2 lightbox-bootstrap" src="https://fujilove.com/wp-content/uploads/2017/07/Fuji-Love-4-1.jpg">
</div>
</div>
<div data-toggle="lightbox" data-arrow="true" >
<div data-bs-toggle="lightbox" data-bs-arrow="true" >
<div class="row">
<img class="col-md-6 lightbox-bootstrap" src="https://minimalistphotographyawards.com/wp-content/uploads/2019/07/Katzberg_Achim_play-the-barrel-organ-1024x682.jpg">
<img class="col-md-6 lightbox-bootstrap" src="https://www.creativeboom.com/uploads/articles/3e/3e5f600afee7b2539913340e2b9ac558b59584de_810.jpg">
Expand All @@ -33,6 +33,7 @@
</div>


<script src="./js/bundle.js"></script>
<script src="./bootstrap.min.js"></script>
<script src="./lightbox.min.js"></script>
</body>
</html>
</html>
Loading