forked from extern/the-glorious-startpage
animate center box to show/hide it
This commit is contained in:
parent
ec4bb1cda1
commit
6ab4ad3193
@ -10,4 +10,16 @@
|
||||
top: 50%;
|
||||
-webkit-transform: translate(-50%, -50%);
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
#centeredBox {
|
||||
opacity: 1;
|
||||
z-index: 2;
|
||||
transition: opacity var(--transition-speed),
|
||||
z-index var(--transition-speed);
|
||||
}
|
||||
|
||||
#centeredBox.hiddenBox {
|
||||
opacity: 0 !important;
|
||||
z-index: 0 !important;
|
||||
}
|
@ -231,6 +231,7 @@
|
||||
<script src="js/weather-screen.js"></script>
|
||||
<script src="js/weather-settings.js"></script>
|
||||
<script src="js/web-menu.js"></script>
|
||||
<script src="js/centered-box.js"></script>
|
||||
<script src="js/mobile-swipe-event.js"></script>
|
||||
<script src="js/mobile-swipe-callback.js"></script>
|
||||
</body>
|
||||
|
6
js/centered-box.js
Normal file
6
js/centered-box.js
Normal file
@ -0,0 +1,6 @@
|
||||
var centeredBox = document.getElementById("centeredBox");
|
||||
|
||||
const toggleCenteredBox = () => {
|
||||
centeredBox.classList.toggle('hiddenBox');
|
||||
console.log('toggle center box');
|
||||
}
|
@ -255,5 +255,8 @@ const toggleWeatherScreen = () => {
|
||||
showWeatherScreen();
|
||||
}
|
||||
|
||||
// Toggle center box
|
||||
toggleCenteredBox();
|
||||
|
||||
console.log('toggle weather screen');
|
||||
}
|
@ -215,6 +215,10 @@ const toggleWebMenu = () => {
|
||||
// Show Web menu
|
||||
showWebMenu();
|
||||
}
|
||||
|
||||
// Toggle center box
|
||||
toggleCenteredBox();
|
||||
|
||||
console.log('toggle web menu');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user