Skip to content

Commit

Permalink
Tweak readme.md.
Browse files Browse the repository at this point in the history
* use `https` everywhere
* fix a few typos
* minor markdown tweaks
  • Loading branch information
XhmikosR committed Aug 2, 2016
1 parent b1684c0 commit f196b1d
Showing 1 changed file with 122 additions and 109 deletions.
231 changes: 122 additions & 109 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# lightgallery

![travis](https://travis-ci.org/sachinchoolur/lightgallery.js.svg?branch=master)
![bower](https://img.shields.io/bower/v/lightgallery.js.svg)
![npm](https://img.shields.io/npm/v/lightgallery.js.svg)

# lightGallery
Full featured javascript lightbox gallery. No dependencies.
Full featured JavaScript lightbox gallery. No dependencies.

![lightgallery](https://raw.githubusercontent.com/sachinchoolur/lightgallery.js/gh-pages/lightgallery.png)
Demo
---
[lightGallery demo](http://sachinchoolur.github.io/lightgallery.js/). [Codepen demo](http://codepen.io/sachinchoolur/pen/qNyvGW)

Main features
---
## Demo

* [lightgallery demo](https://sachinchoolur.github.io/lightgallery.js/)
* [Codepen demo](https://codepen.io/sachinchoolur/pen/qNyvGW)

## Main features

* Fully responsive.
* Modular architecture with built in plugins.
Expand All @@ -19,7 +22,7 @@ Main features
* Double-click/Double-tap to see actual size of the image.
* Animated thumbnails.
* Social media sharing.
* Youtube, Vimeo, Dailymotion, VK and html5 videos Support.
* YouTube, Vimeo, Dailymotion, VK and HTML5 video support.
* 20+ Hardware-Accelerated CSS3 transitions.
* Dynamic mode.
* Full screen support.
Expand All @@ -33,150 +36,160 @@ Main features
* Keyboard Navigation for desktop.
* Font icon support.
* And many more.

Browser support
---
lightgallery supports all major browsers including IE 9 and above..

## Browser support

lightgallery supports all major browsers including IE 9 and above.

## Installation

Installation
---
#### Install with Bower
### Install with Bower

You can install ```lightgallery``` using the [Bower](http://bower.io) package manager.
You can install `lightgallery` using the [Bower](http://bower.io) package manager.

```sh
$ bower install lightgallery.js --save
bower install lightgallery.js --save
```

#### npm
### npm

You can also find ```lightgallery``` on [npm](http://npmjs.org).
You can also find `lightgallery` on [npm](https://www.npmjs.com/).

```sh
$ npm install lightgallery.js
npm install lightgallery.js
```
#### Download from Github

You can also directly download lightgallery from github.
### Download from GitHub

You can also directly download lightgallery from GitHub.

#### Include CSS and Javascript files
First of all add lightgallery.css in the <head> of the document.
``` html
## Include CSS and JavaScript files

First of all add lightgallery.css in the `<head>` of the document.

```html
<head>
<link type="text/css" rel="stylesheet" href="css/lightgallery.css" />
<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.
``` html

Then include `lightgallery.min.js` into your document.
If you want to include any lightgallery plugin you can include it after `lightgallery.min.js`.

```html
<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>
</body>
```

Lightgallery also supports AMD, CommonJS and ES6 modules
When you use AMD make sure that lightgallery.js is loaded berfore lightgallery modules.
``` javascript
require(['./lightgallery'], function() {
Lightgallery also supports AMD, CommonJS and ES6 modules
When you use AMD make sure that lightgallery.js is loaded before lightgallery modules.

```js
require(['./lightgallery'], function() {
require(["./lg-zoom", "./lg-thumbnail"], function(){
lightGallery(document.getElementById('lightgallery'));
lightGallery(document.getElementById('lightgallery'));
});
});
```
##### The markup
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](http://sachinchoolur.github.io/lightgallery.js/demos/html-markup.html) you can find the detailed examples of deferent kind of markups.
``` html
});
```

## The markup

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](https://sachinchoolur.github.io/lightgallery.js/demos/html-markup.html)
you can find the detailed examples of different kinds of markup.

```html
<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>
...
<a href="img/img1.jpg">
<img src="img/thumb1.jpg">
</a>
<a href="img/img2.jpg">
<img src="img/thumb2.jpg">
</a>
...
</div>
```
#### Call the plugin

## Call the plugin

Finally you need to initiate the gallery by adding the following code.
``` javascript
<script type="text/javascript">
lightGallery(document.getElementById('lightgallery'));

```js
<script>
lightGallery(document.getElementById('lightgallery'));
</script>
```

#### Support lightgallery
## Support lightgallery

If you like lightgallery please support the project by staring the repository or <a href="https://twitter.com/intent/tweet?original_referer=https%3A%2F%2Fabout.twitter.com%2Fresources%2Fbuttons&ref_src=twsrc%5Etfw&text=lightgallery%20-%20Full%20featured%20%23javascript%20lightbox%20gallery%2C%20No%20%23jQuery%20-%20http%3A%2F%2Fbit.ly%2F2amlfJe" target="_blank">tweet</a> about this project.

## Resources

* [API Reference](https://sachinchoolur.github.io/lightgallery.js/docs/api.html)
* [Events](https://sachinchoolur.github.io/lightgallery.js/docs/api.html#events)
* [Methods](https://sachinchoolur.github.io/lightgallery.js/docs/api.html#methods)
* [Data Attributes](https://sachinchoolur.github.io/lightgallery.js/docs/api.html#attributes)
* [Dynamic variables](https://sachinchoolur.github.io/lightgallery.js/docs/api.html#dynamic)
* [Sass variables](https://sachinchoolur.github.io/lightgallery.js/docs/api.html#sass)
* [Module API](https://sachinchoolur.github.io/lightgallery.js/docs/plugin-api.html)

Resources
----
* [API Reference](http://sachinchoolur.github.io/lightgallery.js/docs/api.html)
* [Events](http://sachinchoolur.github.io/lightgallery.js/docs/api.html#events)
* [Methods](http://sachinchoolur.github.io/lightgallery.js/docs/api.html#methods)
* [Data Attributes](http://sachinchoolur.github.io/lightgallery.js/docs/api.html#attributes)
* [Dynamic variables](http://sachinchoolur.github.io/lightgallery.js/docs/api.html#dynamic)
* [Sass variables](http://sachinchoolur.github.io/lightgallery.js/docs/api.html#sass)
* [Module API](http://sachinchoolur.github.io/lightgallery.js/docs/plugin-api.html)
## Demos

Demos
----
* Thumbnails
* [Gallery with animated thumbnails](http://sachinchoolur.github.io/lightgallery.js/demos/)
* [Gallery without animated thumbnails](http://sachinchoolur.github.io/lightgallery.js/demos/#normal-thumb)
* Youtube, Vimeo Video Gallery
* [Youtube, Vimeo Video Gallery](http://sachinchoolur.github.io/lightgallery.js/demos/videos.html)
* [Video Gallery Without Poster](http://sachinchoolur.github.io/lightgallery.js/demos/videos.html#video-without-poster)
* [Video Player Parameters](http://sachinchoolur.github.io/lightgallery.js/demos/videos.html#video-player-param)
* [Automatically load thumbnails](http://sachinchoolur.github.io/lightgallery.js/demos/videos.html#auto-thumb)
* Html5 Video Gallery
* [Html5 Video Gallery](http://sachinchoolur.github.io/lightgallery.js/demos/html5-videos.html)
* [Html5 video gallery with videojs](http://sachinchoolur.github.io/lightgallery.js/demos/html5-videos.html#video-without-poster)
* [Transitions](http://sachinchoolur.github.io/lightgallery.js/demos/transitions.html)
* [Dynamic](http://sachinchoolur.github.io/lightgallery.js/demos/dynamic.html)
* [Events](http://sachinchoolur.github.io/lightgallery.js/demos/events.html)
* [Methods](http://sachinchoolur.github.io/lightgallery.js/demos/methods.html)
* [Iframe. External websites, Google map etc..](http://sachinchoolur.github.io/lightgallery.js/demos/iframe.html)
* [Captions](http://sachinchoolur.github.io/lightgallery.js/demos/captions.html)
* [Gallery with animated thumbnails](https://sachinchoolur.github.io/lightgallery.js/demos/)
* [Gallery without animated thumbnails](https://sachinchoolur.github.io/lightgallery.js/demos/#normal-thumb)
* YouTube, Vimeo Video Gallery
* [YouTube, Vimeo Video Gallery](https://sachinchoolur.github.io/lightgallery.js/demos/videos.html)
* [Video Gallery Without Poster](https://sachinchoolur.github.io/lightgallery.js/demos/videos.html#video-without-poster)
* [Video Player Parameters](https://sachinchoolur.github.io/lightgallery.js/demos/videos.html#video-player-param)
* [Automatically load thumbnails](https://sachinchoolur.github.io/lightgallery.js/demos/videos.html#auto-thumb)
* HTML5 Video Gallery
* [HTML5 Video Gallery](https://sachinchoolur.github.io/lightgallery.js/demos/html5-videos.html)
* [HTML5 video gallery with videojs](https://sachinchoolur.github.io/lightgallery.js/demos/html5-videos.html#video-without-poster)
* [Transitions](https://sachinchoolur.github.io/lightgallery.js/demos/transitions.html)
* [Dynamic](https://sachinchoolur.github.io/lightgallery.js/demos/dynamic.html)
* [Events](https://sachinchoolur.github.io/lightgallery.js/demos/events.html)
* [Methods](https://sachinchoolur.github.io/lightgallery.js/demos/methods.html)
* [Iframe. External websites, Google map etc.](https://sachinchoolur.github.io/lightgallery.js/demos/iframe.html)
* [Captions](https://sachinchoolur.github.io/lightgallery.js/demos/captions.html)
* Responsive images
* [Responsive images](http://sachinchoolur.github.io/lightgallery.js/demos/responsive.html)
* [Responsive images with html5 srcset](http://sachinchoolur.github.io/lightgallery.js/demos/responsive.html#srcset-demo)
* [Gallery with fixed size](http://sachinchoolur.github.io/lightgallery.js/demos/fixed-size.html)
* [Html Markup](http://sachinchoolur.github.io/lightgallery.js/demos/html-markup.html)
* [Facebook comments](http://sachinchoolur.github.io/lightgallery.js/demos/comment-box.html)
* [Easing](http://sachinchoolur.github.io/lightgallery.js/demos/easing.html)
* [History/hash plugin](http://sachinchoolur.github.io/lightgallery.js/demos/hash.html)
* [Social media share](http://sachinchoolur.github.io/lightgallery.js/demos/share.html)

Built in modules
----
1. [Thumbnail](http://sachinchoolur.github.io/lightgallery.js/docs/api.html#lg-thumbnial)
2. [Autoplay](http://sachinchoolur.github.io/lightgallery.js/docs/api.html#lg-autoplay)
3. [Video](http://sachinchoolur.github.io/lightgallery.js/docs/api.html#lg-video)
4. [Fullscreen](http://sachinchoolur.github.io/lightgallery.js/docs/api.html#lg-fullscreen)
5. [Pager](http://sachinchoolur.github.io/lightgallery.js/docs/api.html#lg-pager)
6. [Zoom](http://sachinchoolur.github.io/lightgallery.js/docs/api.html#lg-zoom)
7. [Hash](http://sachinchoolur.github.io/lightgallery.js/docs/api.html#lg-hash)
7. [Share](http://sachinchoolur.github.io/lightgallery.js/docs/api.html#lg-share)

Support
----
Please use GitHub [issue tracker](https://github.com/sachinchoolur/lightgallery.js/issues/new) in the event that you have come across a bug or glitch. It would also be very helpful if you could add a jsFiddle, which would allow you to demonstrate the problem in question.
* [Responsive images](https://sachinchoolur.github.io/lightgallery.js/demos/responsive.html)
* [Responsive images with HTML5 srcset](https://sachinchoolur.github.io/lightgallery.js/demos/responsive.html#srcset-demo)
* [Gallery with fixed size](https://sachinchoolur.github.io/lightgallery.js/demos/fixed-size.html)
* [HTML Markup](https://sachinchoolur.github.io/lightgallery.js/demos/html-markup.html)
* [Facebook comments](https://sachinchoolur.github.io/lightgallery.js/demos/comment-box.html)
* [Easing](https://sachinchoolur.github.io/lightgallery.js/demos/easing.html)
* [History/hash plugin](https://sachinchoolur.github.io/lightgallery.js/demos/hash.html)
* [Social media share](https://sachinchoolur.github.io/lightgallery.js/demos/share.html)

## Built in modules

1. [Thumbnail](https://sachinchoolur.github.io/lightgallery.js/docs/api.html#lg-thumbnial)
2. [Autoplay](https://sachinchoolur.github.io/lightgallery.js/docs/api.html#lg-autoplay)
3. [Video](https://sachinchoolur.github.io/lightgallery.js/docs/api.html#lg-video)
4. [Fullscreen](https://sachinchoolur.github.io/lightgallery.js/docs/api.html#lg-fullscreen)
5. [Pager](https://sachinchoolur.github.io/lightgallery.js/docs/api.html#lg-pager)
6. [Zoom](https://sachinchoolur.github.io/lightgallery.js/docs/api.html#lg-zoom)
7. [Hash](https://sachinchoolur.github.io/lightgallery.js/docs/api.html#lg-hash)
7. [Share](https://sachinchoolur.github.io/lightgallery.js/docs/api.html#lg-share)

## Support

Please use GitHub [issue tracker](https://github.com/sachinchoolur/lightgallery.js/issues/new) in the event that you have come across a bug or glitch. It would also be very helpful if you could add a jsFiddle, which would allow you to demonstrate the problem in question.

Please use [stackoverflow](https://stackoverflow.com/search?q=lightgallery) instead of github issue tracker if you need any help with implementing lightgallery in your project or if you have any personal support requests.

Do you like lightgallery? You can support the project by staring the github repository or [tweet](https://twitter.com/intent/tweet?original_referer=https%3A%2F%2Fabout.twitter.com%2Fresources%2Fbuttons&ref_src=twsrc%5Etfw&text=lightgallery%20-%20Full%20featured%20%23javascript%20lightbox%20gallery%2C%20No%20%23jQuery%20-%20http%3A%2F%2Fbit.ly%2F2amlfJe) about this project.

Follow me on twitter [@sachinchoolur](https://twitter.com/sachinchoolur) for the latest news, updates about this project.
Please use [stackoverflow](https://stackoverflow.com/search?q=lightgallery) instead of GitHub issue tracker if you need any help with implementing lightgallery in your project or if you have any personal support requests.

I am re-writing [lightslider](https://github.com/sachinchoolur/lightslider) too in pure javascript, It will be completely compatible with lightgallery. Watch the repository to get latest updates..
Do you like lightgallery? You can support the project by staring the GitHub repository or [tweet](https://twitter.com/intent/tweet?original_referer=https%3A%2F%2Fabout.twitter.com%2Fresources%2Fbuttons&ref_src=twsrc%5Etfw&text=lightgallery%20-%20Full%20featured%20%23javascript%20lightbox%20gallery%2C%20No%20%23jQuery%20-%20http%3A%2F%2Fbit.ly%2F2amlfJe) about this project.

Follow me on Twitter [@sachinchoolur](https://twitter.com/sachinchoolur) for the latest news, updates about this project.

I am re-writing [lightslider](https://github.com/sachinchoolur/lightslider) too in pure JavaScript, It will be completely compatible with lightgallery. Watch the repository to get latest updates.

0 comments on commit f196b1d

Please sign in to comment.