Fix bugs in section files

This commit is contained in:
2025-05-12 23:14:24 +02:00
parent f9b1b53c9f
commit c405d0109c
11 changed files with 103 additions and 40 deletions

View File

@@ -1 +1,45 @@
<script src="{{ url_for('static', filename='docs.min.js') }}"></script>
<script src="{{ url_for('static', filename='glightbox.min.js') }}"></script>
<script>
var lightbox = GLightbox();
lightbox.on('open', (target) => {
console.log('lightbox opened');
});
var lightboxDescription = GLightbox({
selector: '.glightbox2'
});
var lightboxVideo = GLightbox({
selector: '.glightbox3'
});
lightboxVideo.on('slide_changed', ({ prev, current }) => {
console.log('Prev slide', prev);
console.log('Current slide', current);
const { slideIndex, slideNode, slideConfig, player } = current;
if (player) {
if (!player.ready) {
// If player is not ready
player.on('ready', (event) => {
// Do something when video is ready
});
}
player.on('play', (event) => {
console.log('Started play');
});
player.on('volumechange', (event) => {
console.log('Volume change');
});
player.on('ended', (event) => {
console.log('Video ended');
});
}
});
var lightboxInlineIframe = GLightbox({
selector: '.glightbox4'
});
</script>