</div>
<footer>
    <p>&copy; %%CURRENT_YEAR%% %%SITE_TITLE%% | Betreiber: %%SITE_OWNER_NAME%% | <a href="impressum.html">Impressum</a> | <a href="datenschutz.html">Datenschutz</a></p>
</footer>

<a href="#" id="scrollToTopBtn" class="scroll-to-top-btn" title="Nach oben scrollen">▲</a>

<script>
document.addEventListener('DOMContentLoaded', function() {
    const statusBadges = document.querySelectorAll('.online-status-badge[data-status-url]');

    if (statusBadges.length > 0) {
        statusBadges.forEach(badge => {
            const url = badge.dataset.statusUrl + '?v=' + new Date().getTime();
            
            fetch(url)
                .then(response => {
                    if (!response.ok) {
                        throw new Error('Network response was not ok for ' + url);
                    }
                    return response.text();
                })
                .then(text => {
                    badge.classList.remove('unknown');
                    if (text.trim().startsWith('online')) {
                        badge.textContent = 'online';
                        badge.classList.add('online');
                    } else {
                        badge.textContent = 'offline';
                        badge.classList.add('offline');
                    }
                })
                .catch(error => {
                    console.error('Fehler beim Abrufen des Welt-Status:', error);
                    badge.textContent = 'n.a.'; // Nicht verfügbar
                    badge.classList.remove('unknown');
                    badge.classList.add('offline'); // Bei Fehler als offline markieren
                });
        });
    }
});
</script>

</body>
</html>
