This repository has been archived by the owner on Dec 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
ukceh.js
49 lines (42 loc) · 1.49 KB
/
ukceh.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
function toggleLogo(event) {
var elements = document.querySelectorAll(".slide-logo");
if (event.currentSlide.matches('#title-slide') || event.currentSlide.classList.contains('no-logo')) {
// Hide the logo on the title slide
elements.forEach(function(elem) {
elem.style.display = "none";
});
} else {
// Show and position the logo on other slides
elements.forEach(function(elem) {
elem.style.display = "block";
});
}
}
function toggleFooter(event) {
var elements = document.querySelectorAll("div.footer-default");
if (event.currentSlide.matches('#title-slide') || event.currentSlide.classList.contains('no-footer')) {
// Hide the logo on the title slide
elements.forEach(function(elem) {
elem.style.display = "none";
});
} else {
// Show and position the logo on other slides
elements.forEach(function(elem) {
elem.style.display = "block";
});
}
}
window.addEventListener("load", (event) => {
var elements = document.querySelectorAll(".slide-logo");
elements.forEach(function(elem) {
elem.style.display = "none"; // Hide initially
});
var elements = document.querySelectorAll("div.footer-default");
elements.forEach(function(elem) {
elem.style.display = "none"; // Hide initially
});
Reveal.on("slidechanged", function(event) {
toggleLogo(event);
toggleFooter(event);
});
});