# gallry

> Simple lightbox gallry plugin

Latest version **1.1.2** (published 2018-11-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install gallry
pnpm add gallry
yarn add gallry
bun add gallry
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2018-11-30 |
| First published | 2018-08-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 107.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | gusdemayo |

## Links

- npm: https://www.npmjs.com/package/gallry
- npm.io page: https://npm.io/package/gallry

## Recent versions

- 1.1.2 (latest) — 2018-11-30
- 1.1.1 — 2018-09-26
- 1.1.0 — 2018-09-25
- 1.0.9 — 2018-09-25
- 1.0.8 — 2018-09-21
- 1.0.7 — 2018-08-31
- 1.0.6 — 2018-08-31
- 1.0.4 — 2018-08-31
- 1.0.3 — 2018-08-30

## README

# gallry

Simple lightbox gallery plugin

## Usage
Will look for images with the attribute `data-gallery-src` and open a lightbox gallery on click.

Look in `example.html` for example usage.

### Available tags
#### `data-gallery-src`
URL to large image to use in gallery

#### `data-gallery-desc`
*(Optional)* Description text/html to use below image in gallery

#### `data-gallery-id`
*(Optional)* Used to group multiple images in a gallery. If not specified will treat image to be part of global gallery.

## Install
### As npm package
```
npm install gallry
```

```javascript
const gallery = require('gallry')

// Init galleries found inside document
gallery(document)

// Init galleries found inside specific node
gallery(document.querySelector('.some-node'))
```

### As included script
```html
<script src="gallry.min.js"></script>
```

Will automatically look for galleries on current page but also exposes a global method `initGallery(parent)`.

## Override styles
You can override the styles in `gallery` by plain css. The selectors used that can be overriden are:
```
.gallery-lightbox
.gallery-lightbox.-open
.gallery-lightbox > .close
.gallery-lightbox > .close
.gallery-lightbox > .close:after
.gallery-lightbox > .close:before
.gallery-lightbox > .description
.gallery-lightbox > .image
.gallery-lightbox > .image > img
.gallery-lightbox > .next
.gallery-lightbox > .next:after
.gallery-lightbox > .next:before
.gallery-lightbox > .prev
.gallery-lightbox > .prev:after
.gallery-lightbox > .prev:before
```

---
_Source: https://npm.io/package/gallry · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
