Compare commits

..

5 Commits
master ... v1

Author SHA1 Message Date
Valentin Silytuin 0be687757c v1.0.3 2024-03-26 14:14:58 +04:00
Valentin Silytuin 0f2a69fac5 Доработки по коду 2024-03-26 14:13:30 +04:00
Valentin Silytuin cba9f4ed0f Fix 2024-03-26 14:13:00 +04:00
Valentin Silytuin ad7538ffc4 v1.0.2 2023-08-28 14:34:56 +04:00
Valentin Silytuin 9adb3b4717 Правки по CSS 2023-08-28 14:34:43 +04:00
11 changed files with 1281 additions and 936 deletions

19
.gitignore vendored
View File

@ -1,16 +1,21 @@
# Настройки редакторов
.idea
.vscode
# Node.js
node_modules
# Yarn (https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored)
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
**/.pnp.*
**/.yarn/*
!**/.yarn/patches
!**/.yarn/plugins
!**/.yarn/releases
!**/.yarn/sdks
!**/.yarn/versions
# ESLint

View File

@ -1,6 +1,5 @@
.yarn
.editorconfig
.pnp.cjs
.pnp.loader.mjs
.nvmrc
.prettierrc
.yarnrc.yml

File diff suppressed because one or more lines are too long

874
.yarn/releases/yarn-3.6.0.cjs vendored Executable file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,7 @@
compressionLevel: mixed
nodeLinker: node-modules
enableGlobalCache: false
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
yarnPath: .yarn/releases/yarn-4.1.1.cjs
yarnPath: .yarn/releases/yarn-3.6.0.cjs

View File

@ -2,7 +2,7 @@
## Требования
- [Swiper](https://github.com/nolimits4web/swiper) версии ^10.2.0
- [Swiper](https://github.com/nolimits4web/swiper) версии 4.5.x
## Подключение и настройка

View File

@ -97,10 +97,8 @@ const show = async (duration = 500, easing = 'linear') => {
};
const init = async (items = [], options = {}, index = 0) => {
const [{default: Swiper}, {Navigation, Pagination}] = await Promise.all([
import('swiper'),
import('swiper/modules'),
]);
const {Swiper, Navigation, Pagination} = await import('swiper');
Swiper.use([Navigation, Pagination]);
let isVideoInGallery = false;
items = items.map((item) => {
@ -133,9 +131,9 @@ const init = async (items = [], options = {}, index = 0) => {
},
set init(val) {
this.state = val;
for (const i of this.callback) {
this.callback.forEach((i) => {
i(val);
}
});
},
callback: [],
addListener(callback) {
@ -155,7 +153,7 @@ const init = async (items = [], options = {}, index = 0) => {
<button class="advdominion-lg__close" type="button">
<svg class="advdominion-lg__close-icon"><use href="${options.icons.close}" /></svg>
</button>
<div class="advdominion-lg__container swiper">
<div class="advdominion-lg__container swiper-container">
<div class="advdominion-lg__wrapper swiper-wrapper">
${items.join('')}
</div>
@ -176,7 +174,7 @@ const init = async (items = [], options = {}, index = 0) => {
const swiper = new Swiper(
gallery.querySelector('.advdominion-lg__container'),
Object.assign({modules: [Navigation, Pagination], init: false, initialSlide: index}, options.swiper)
Object.assign({init: false, initialSlide: index}, options.swiper)
);
swiper.on('init', function () {

View File

@ -1,8 +1,8 @@
{
"name": "@advdominion/lightbox-gallery",
"version": "2.1.0",
"version": "1.0.3",
"type": "module",
"packageManager": "yarn@4.1.1",
"packageManager": "yarn@3.6.0",
"main": "index.js",
"repository": {
"type": "git",
@ -13,6 +13,6 @@
"@advdominion/get-scrollbar-width": "^1.0.0"
},
"peerDependencies": {
"swiper": "^11.0.0"
"swiper": "4.5.1"
}
}

View File

@ -21,20 +21,17 @@
width: 25px;
}
.advdominion-lg__container.swiper {
.advdominion-lg__container {
height: 100%;
}
.advdominion-lg__wrapper.swiper-wrapper {
}
.advdominion-lg__item.swiper-slide {
.advdominion-lg__item {
align-items: center;
display: flex;
justify-content: center;
}
.advdominion-lg__item_video.swiper-slide {
.advdominion-lg__item_video {
}
.advdominion-lg__image {

View File

@ -2,22 +2,22 @@
# Manual changes might be lost - proceed with caution!
__metadata:
version: 8
cacheKey: 10
version: 6
cacheKey: 8
"@advdominion/gallery@workspace:.":
version: 0.0.0-use.local
resolution: "@advdominion/gallery@workspace:."
dependencies:
"@advdominion/get-scrollbar-width": ^1.0.0
peerDependencies:
swiper: 4.5.1
languageName: unknown
linkType: soft
"@advdominion/get-scrollbar-width@npm:^1.0.0":
version: 1.0.0
resolution: "@advdominion/get-scrollbar-width@npm:1.0.0"
checksum: 10/8e97af1f7e221e5ceb0676a5bd8fb3654a9bf5b2e514a5ff7ed7793f7f4b0da50e2245363698c1a45af9a5354260e019a74f891acebacfaa3b7babf680a4faa2
checksum: 8e97af1f7e221e5ceb0676a5bd8fb3654a9bf5b2e514a5ff7ed7793f7f4b0da50e2245363698c1a45af9a5354260e019a74f891acebacfaa3b7babf680a4faa2
languageName: node
linkType: hard
"@advdominion/lightbox-gallery@workspace:.":
version: 0.0.0-use.local
resolution: "@advdominion/lightbox-gallery@workspace:."
dependencies:
"@advdominion/get-scrollbar-width": "npm:^1.0.0"
peerDependencies:
swiper: ^10.2.0
languageName: unknown
linkType: soft