From 9dbc43298d2e3737a0bd59b545ff8a137be8388d Mon Sep 17 00:00:00 2001 From: Niko Date: Mon, 14 Feb 2022 13:35:27 +0100 Subject: [PATCH] Added carousel for pages.meet --- web/src/_templates/app/header.php | 2 +- web/src/app/js/pages/meet.js | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/web/src/_templates/app/header.php b/web/src/_templates/app/header.php index f7d3839..6f821c5 100644 --- a/web/src/_templates/app/header.php +++ b/web/src/_templates/app/header.php @@ -27,7 +27,7 @@ default_icon: '/assets/images/default_profile.png', }, }; - + diff --git a/web/src/app/js/pages/meet.js b/web/src/app/js/pages/meet.js index 09a48ca..c02da54 100644 --- a/web/src/app/js/pages/meet.js +++ b/web/src/app/js/pages/meet.js @@ -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); + }, + }, };