From 5a3d2295227b009252cf37c4d476396055aba5d2 Mon Sep 17 00:00:00 2001 From: Valentin Silytuin Date: Tue, 21 Jan 2025 15:46:18 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e2df089..0780e3d 100644 --- a/README.md +++ b/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 @@
... ... + ...
``` @@ -24,9 +25,9 @@ ### Минимальные настройки ```js -import gallery from '@advdominion/lightbox-gallery'; +import { gallery } from '@advdominion/lightbox-gallery'; -gallery(document.getElementById('list'), { +gallery(document.querySelector('#list'), { icons: { close: `/icons.svg#close`, }, @@ -36,9 +37,10 @@ gallery(document.getElementById('list'), { ### Все настройки ```js -import gallery from '@advdominion/lightbox-gallery'; +import { gallery } from '@advdominion/lightbox-gallery'; -gallery(document.getElementById('list'), { +gallery(document.querySelector('#list'), { + single: false, swiper: { speed: duration.effect.s, 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`, + }, +}); +```