Added carousel for pages.meet

This commit is contained in:
Niko 2022-02-14 13:35:27 +01:00
parent 6f682bc54b
commit 9dbc43298d
2 changed files with 11 additions and 2 deletions

View File

@ -27,7 +27,7 @@
default_icon: '/assets/images/default_profile.png',
},
}; </script>
<?php tpl_scripts(['base', 'navmenu', 'app']) ?>
<?php tpl_scripts(['base', 'navmenu', 'carousel', 'app']) ?>
<?php tpl_scripts($scripts ?? null) ?>
</head>
<body class="app">

View File

@ -32,7 +32,7 @@ app.pages.meet = {
}; _();
// TODO: just for testing
document.querySelectorAll('.meet.item')[2].style.display = 'inherit';
app.pages.meet.carousel.set(2);
});
});
},
@ -40,4 +40,13 @@ app.pages.meet = {
window.location.href = '#';
app.overlay.hideAll();
},
carousel: {
_current: 0,
_parent: function() { return document.querySelector('#page-meet #content') },
_elements: function() { return app.pages.meet.carousel._parent().querySelectorAll('.meet.item') },
_size: function() { return app.pages.meet.carousel._elements().length },
set: function(i) {
return app.carousel.set(app.pages.meet.carousel, i);
},
},
};