loading screen
parent
c39e88fe25
commit
7ff63fae17
|
@ -18,4 +18,31 @@
|
|||
pointer-events: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
const loadingScreen = document.getElementById('loading-screen');
|
||||
|
||||
// Ladebildschirm anzeigen
|
||||
function showLoadingScreen() {
|
||||
loadingScreen.classList.remove('hidden');
|
||||
}
|
||||
|
||||
// Ladebildschirm ausblenden
|
||||
function hideLoadingScreen() {
|
||||
loadingScreen.classList.add('hidden');
|
||||
}
|
||||
|
||||
// Ladebildschirm beim Seitenwechsel
|
||||
window.addEventListener('beforeunload', function() {
|
||||
showLoadingScreen();
|
||||
});
|
||||
|
||||
// Ladebildschirm beim Laden der Seite ausblenden
|
||||
window.addEventListener('load', function() {
|
||||
hideLoadingScreen();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
{% endif %}
|
Loading…
Reference in New Issue