From ac57b98df77219c8529c4547b13366df3e998b2c Mon Sep 17 00:00:00 2001 From: George Halkiadakis Date: Tue, 26 Nov 2024 04:33:40 +0200 Subject: implement esm version --- esm/scripts/presentation.js | 4 ++-- esm/scripts/slidetray.js | 12 ++++-------- 2 files changed, 6 insertions(+), 10 deletions(-) (limited to 'esm/scripts') diff --git a/esm/scripts/presentation.js b/esm/scripts/presentation.js index 9f33be2..61e6afc 100644 --- a/esm/scripts/presentation.js +++ b/esm/scripts/presentation.js @@ -3,8 +3,8 @@ export default { name: 'test', title: 'some presentation title', - effect: 'none', - pagination: 'classic', + effect: 'flip', + pagination: 'dynamic', css: ` html, diff --git a/esm/scripts/slidetray.js b/esm/scripts/slidetray.js index 9091ec1..bb21aa8 100644 --- a/esm/scripts/slidetray.js +++ b/esm/scripts/slidetray.js @@ -1,10 +1,6 @@ -import Swiper from 'https://unpkg.com/swiper@11.1.15/swiper.mjs?module' - - -// import { Navigation, Pagination } from 'swiper/modules'; - -// using Swiper as global -// TODO: load Swiper via requireJS async mode +/// import Swiper from 'https://unpkg.com/swiper@11.1.15/swiper.mjs?module' +/// import { Navigation, Pagination } from 'https://unpkg.com/swiper@11.1.15/swiper-bundle.mjs?module'; +import Swiper from 'https://unpkg.com/swiper@11.1.15/swiper-bundle.mjs?module'; const slidetray = (setup) => { @@ -141,7 +137,7 @@ const slidetray = (setup) => { }, show: function() { - SwiperCore.use([Navigation, Pagination, Scrollbar]); + console.log('initer', this.presentation.initer); var swp = new Swiper(this.setup.selector, this.presentation.initer); this.swiper = swp; return this; -- cgit v1.2.3