Minecraft-Modern-Theme/footer.php aktualisiert

This commit is contained in:
2026-01-06 17:18:21 +00:00
parent 5987417f36
commit f315469c41

View File

@@ -1,97 +1,103 @@
<footer id="colophon" class="site-footer"> <footer id="colophon" class="site-footer">
<div class="container"> <div class="container">
<div class="footer-widgets-container"> <!-- 1. OBERER BEREICH: Widgets -->
<div class="footer-widgets"> <div class="footer-widgets">
<?php if ( is_active_sidebar( 'footer-1' ) ) : ?> <?php if ( is_active_sidebar( 'footer-1' ) ) : ?>
<div class="footer-widget"><?php dynamic_sidebar( 'footer-1' ); ?></div> <div class="footer-widget"><?php dynamic_sidebar( 'footer-1' ); ?></div>
<?php endif; ?> <?php endif; ?>
<?php if ( is_active_sidebar( 'footer-2' ) ) : ?> <?php if ( is_active_sidebar( 'footer-2' ) ) : ?>
<div class="footer-widget"><?php dynamic_sidebar( 'footer-2' ); ?></div> <div class="footer-widget"><?php dynamic_sidebar( 'footer-2' ); ?></div>
<?php endif; ?> <?php endif; ?>
<?php if ( is_active_sidebar( 'footer-3' ) ) : ?> <?php if ( is_active_sidebar( 'footer-3' ) ) : ?>
<div class="footer-widget"><?php dynamic_sidebar( 'footer-3' ); ?></div> <div class="footer-widget"><?php dynamic_sidebar( 'footer-3' ); ?></div>
<?php endif; ?> <?php endif; ?>
</div> </div>
</div>
<?php if ( has_nav_menu( 'footer' ) ) : ?> <!-- 2. UNTERER BEREICH: Menü, Copyright, Legal -->
<nav class="footer-navigation"> <div class="footer-bottom-bar">
<?php
wp_nav_menu( <div class="footer-left-group">
array( <!-- Copyright -->
'theme_location' => 'footer', <div class="site-info">
'menu_class' => 'footer-menu', <?php
'container' => false, $copyright_text = get_theme_mod( 'footer_copyright', '&copy; ' . date('Y') . ' ' . get_bloginfo('name') );
)
); if ( get_theme_mod('show_footer_credit', true) ) {
?> $full_footer_text = $copyright_text . ' <span class="footer-separator">|</span> <span class="footer-credit">
</nav> <a href="https://m-viper.de" target="_blank" rel="noopener noreferrer">
<?php endif; ?> Minecraft Theme by M_Viper
<div class="site-info"> </a>
<?php </span>';
// Den Copyright-Text aus dem Customizer holen } else {
$copyright_text = get_theme_mod( 'footer_copyright', '&copy; ' . date('Y') . ' ' . get_bloginfo('name') ); $full_footer_text = $copyright_text;
}
// Prüfen, ob der Credit angezeigt werden soll echo '<p>' . wp_kses_post( $full_footer_text ) . '</p>';
if ( get_theme_mod('show_footer_credit', true) ) { ?>
$full_footer_text = $copyright_text . ' | <span class="footer-credit"> </div>
<a href="https://m-viper.de" target="_blank" rel="noopener noreferrer"
style="color: inherit; text-decoration: none;"> <!-- Footer Menü ( falls vorhanden ) -->
Minecraft Theme Erstellt von M_Viper 2025 <?php if ( has_nav_menu( 'footer' ) ) : ?>
</a> <nav class="footer-navigation">
</span>'; <?php
} else { wp_nav_menu(
$full_footer_text = $copyright_text; array(
} 'theme_location' => 'footer',
'menu_class' => 'footer-menu',
'container' => false,
// Den kompletten Text ausgeben 'depth' => 1, // Nur eine Ebene
echo '<p>' . wp_kses_post( $full_footer_text ) . '</p>'; )
?> );
</div> ?>
</nav>
<!-- NEU: Impressum & Datenschutz Links --> <?php endif; ?>
<div class="footer-legal-links"> </div>
<?php
$impressum_url = get_theme_mod('footer_impressum_url'); <div class="footer-right-group">
$datenschutz_url = get_theme_mod('footer_datenschutz_url'); <!-- Impressum & Datenschutz -->
$links = array(); <div class="footer-legal-links">
<?php
if (!empty($impressum_url)) { $impressum_url = get_theme_mod('footer_impressum_url');
$links[] = '<a href="' . esc_url($impressum_url) . '">Impressum</a>'; $datenschutz_url = get_theme_mod('footer_datenschutz_url');
} $links = array();
if (!empty($datenschutz_url)) { if (!empty($impressum_url)) {
$links[] = '<a href="' . esc_url($datenschutz_url) . '">Datenschutz</a>'; $links[] = '<a href="' . esc_url($impressum_url) . '"><i class="fas fa-info-circle"></i> Impressum</a>';
} }
// Nur anzeigen, wenn mindestens ein Link vorhanden ist if (!empty($datenschutz_url)) {
if (!empty($links)) { $links[] = '<a href="' . esc_url($datenschutz_url) . '"><i class="fas fa-shield-alt"></i> Datenschutz</a>';
echo implode(' | ', $links); }
}
?> if (!empty($links)) {
</div> echo implode('', $links); // Kein Trennzeichen mehr, da wir Icons haben
</div> }
?>
<!-- Ovaler Dark / Light Mode Toggle mit Sonne & Mond --> </div>
<button class="theme-toggle" aria-label="Dark/Light Mode umschalten" title="Dark / Light Mode"> </div>
<div class="theme-toggle-icons">
<svg class="icon-moon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"> </div> <!-- Ende footer-bottom-bar -->
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/> </div> <!-- Ende Container -->
</svg>
<svg class="icon-sun" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"> <!-- THEME TOGGLE (Fixiert unten rechts) -->
<circle cx="12" cy="12" r="5"/> <button class="theme-toggle" aria-label="Dark/Light Mode umschalten" title="Dark / Light Mode">
<line x1="12" y1="1" x2="12" y2="3"/> <div class="theme-toggle-icons">
<line x1="12" y1="21" x2="12" y2="23"/> <svg class="icon-moon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/> <path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/> </svg>
<line x1="1" y1="12" x2="3" y2="12"/> <svg class="icon-sun" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<line x1="21" y1="12" x2="23" y2="12"/> <circle cx="12" cy="12" r="5"/>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/> <line x1="12" y1="1" x2="12" y2="3"/>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/> <line x1="12" y1="21" x2="12" y2="23"/>
</svg> <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/>
</div> <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/>
</button> <line x1="1" y1="12" x2="3" y2="12"/>
</footer> <line x1="21" y1="12" x2="23" y2="12"/>
<?php wp_footer(); ?> <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/>
</body> <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/>
</svg>
</div>
</button>
</footer>
<?php wp_footer(); ?>
</body>
</html> </html>