Обновление README
This commit is contained in:
parent
8eefc3a98c
commit
5a3d229522
35
README.md
35
README.md
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
## Требования
|
## Требования
|
||||||
|
|
||||||
- [Swiper](https://github.com/nolimits4web/swiper) версии ^10.2.0
|
- [Swiper](https://github.com/nolimits4web/swiper) версии ^11.0.0
|
||||||
|
|
||||||
## Подключение и настройка
|
## Подключение и настройка
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@
|
||||||
<div id="list">
|
<div id="list">
|
||||||
<a href="/example.jpg">...</a>
|
<a href="/example.jpg">...</a>
|
||||||
<a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">...</a>
|
<a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">...</a>
|
||||||
|
<a href="https://vkvideo.ru/video-101556650_456239825">...</a>
|
||||||
</div>
|
</div>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -24,9 +25,9 @@
|
||||||
### Минимальные настройки
|
### Минимальные настройки
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import gallery from '@advdominion/lightbox-gallery';
|
import { gallery } from '@advdominion/lightbox-gallery';
|
||||||
|
|
||||||
gallery(document.getElementById('list'), {
|
gallery(document.querySelector('#list'), {
|
||||||
icons: {
|
icons: {
|
||||||
close: `/icons.svg#close`,
|
close: `/icons.svg#close`,
|
||||||
},
|
},
|
||||||
|
@ -36,9 +37,10 @@ gallery(document.getElementById('list'), {
|
||||||
### Все настройки
|
### Все настройки
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import gallery from '@advdominion/lightbox-gallery';
|
import { gallery } from '@advdominion/lightbox-gallery';
|
||||||
|
|
||||||
gallery(document.getElementById('list'), {
|
gallery(document.querySelector('#list'), {
|
||||||
|
single: false,
|
||||||
swiper: {
|
swiper: {
|
||||||
speed: duration.effect.s,
|
speed: duration.effect.s,
|
||||||
pagination: {
|
pagination: {
|
||||||
|
@ -71,3 +73,26 @@ gallery(document.getElementById('list'), {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Одиночный элемент
|
||||||
|
|
||||||
|
```js
|
||||||
|
import { gallery } from '@advdominion/lightbox-gallery';
|
||||||
|
|
||||||
|
gallery(document.querySelector('#list > a:first-child'), {
|
||||||
|
single: true,
|
||||||
|
animation: {
|
||||||
|
show: {
|
||||||
|
duration: 500,
|
||||||
|
easing: 'linear',
|
||||||
|
},
|
||||||
|
hide: {
|
||||||
|
duration: 500,
|
||||||
|
easing: 'linear',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
icons: {
|
||||||
|
close: `/icons.svg#close`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in New Issue