Skip to content

Commit

Permalink
chore: move playground script to html
Browse files Browse the repository at this point in the history
  • Loading branch information
nolimits4web committed Aug 6, 2021
1 parent cab18b4 commit a533958
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 18 deletions.
27 changes: 26 additions & 1 deletion playground/core/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

<body>
<section class="swiper-container">
<div class="swiper-pagination"></div>
<div class="swiper-slide">Slide 1</div>
<div class="swiper-slide">Slide 2</div>
<div class="swiper-slide">Slide 3</div>
Expand Down Expand Up @@ -42,7 +43,31 @@
line-height: 300px;
}
</style>
<script type="module" src="./main.js"></script>
<script type="module">
// eslint-disable-next-line
import 'swiper/swiper-bundle.css';

// eslint-disable-next-line
import Swiper from 'swiper/swiper-bundle.esm.js';

// eslint-disable-next-line
window.swiper = new Swiper({
el: '.swiper-container',
slideToClickedSlide: true,
grabCursor: true,
scrollbar: true,
createElements: true,
speed: 1300,
pagination: {
el: '.swiper-pagination',
clickable: true,
},
navigation: true,
spaceBetween: 20,
cssMode: true,
});

</script>
</body>

</html>
17 changes: 0 additions & 17 deletions playground/core/main.js

This file was deleted.

0 comments on commit a533958

Please sign in to comment.