Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
lightgallery.js
Advanced tools
Full featured JavaScript lightbox gallery. No dependencies.
lightgallery supports all major browsers including IE 9 and above.
You can install lightgallery.js
using the npm package manager.
npm install lightgallery.js
You can also find lightgallery.js
on Yarn and Bower.
yarn add lightgallery.js
bower install lightgallery.js --save
http://www.jsdelivr.com/projects/lightgallery.js
You can also directly download lightgallery from GitHub.
First of all add lightgallery.css in the <head>
of the document.
<head>
<link rel="stylesheet" href="css/lightgallery.css">
</head>
Then include lightgallery.min.js
into your document.
If you want to include any lightgallery plugin you can include it after lightgallery.min.js
.
<body>
...
<script src="js/lightgallery.min.js"></script>
<!-- lightgallery plugins -->
<script src="js/lg-thumbnail.min.js"></script>
<script src="js/lg-fullscreen.min.js"></script>
</body>
Lightgallery also supports AMD, CommonJS and ES6 modules. When you use AMD make sure that lightgallery.js is loaded before lightgallery modules.
require(['./lightgallery.js'], function() {
require(["./lg-zoom.js", "./lg-thumbnail.js"], function(){
lightGallery(document.getElementById('lightgallery'));
});
});
lightgallery does not force you to use any kind of markup. You can use whatever markup you want. But i suggest you to use the following markup. Here you can find the detailed examples of different kinds of markup.
<div id="lightgallery">
<a href="img/img1.jpg">
<img src="img/thumb1.jpg">
</a>
<a href="img/img2.jpg">
<img src="img/thumb2.jpg">
</a>
...
</div>
Finally you need to initiate the gallery by adding the following code.
<script>
lightGallery(document.getElementById('lightgallery'));
</script>
If you like lightgallery please support the project by staring the repository or tweet about this project.
If you want to use lightgallery.js to develop commercial sites, themes, projects, and applications, the Commercial license is the appropriate license. With this option, your source code is kept proprietary. Purchase a lightgallery.js Commercial License at uplabs.com/posts/lightgallery-js
If you are creating an open source application under a license compatible with the GNU GPL license v3, you may use this project under the terms of the GPLv3.
FAQs
Full featured lightbox gallery. Zero dependencies
The npm package lightgallery.js receives a total of 7,115 weekly downloads. As such, lightgallery.js popularity was classified as popular.
We found that lightgallery.js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.