Upload file header.php via GUI
This commit is contained in:
@@ -9,71 +9,137 @@
|
|||||||
<body <?php body_class(); ?>>
|
<body <?php body_class(); ?>>
|
||||||
<?php wp_body_open(); ?>
|
<?php wp_body_open(); ?>
|
||||||
|
|
||||||
<header id="masthead" class="site-header">
|
<?php
|
||||||
|
$menu_style = get_theme_mod( 'header_menu_style', 'classic' );
|
||||||
|
$branding_pos = get_theme_mod( 'sidebar_branding_position', 'left' );
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php if ( $menu_style === 'sidebar' ) : ?>
|
||||||
|
<!-- ══════════════════════════════════════════════════════════════
|
||||||
|
LAYOUT 3: SIDEBAR
|
||||||
|
═══════════════════════════════════════════════════════════════ -->
|
||||||
|
<aside class="header-sidebar" id="header-sidebar" aria-hidden="true">
|
||||||
|
<div class="header-sidebar-inner">
|
||||||
|
<?php mm_branding( true ); ?>
|
||||||
|
<?php mm_nav(); ?>
|
||||||
|
</div>
|
||||||
|
<button class="sidebar-menu-close" aria-label="Menü schließen"><i class="fas fa-times"></i></button>
|
||||||
|
</aside>
|
||||||
|
<div class="header-sidebar-overlay" id="sidebar-overlay"></div>
|
||||||
|
<header id="masthead" class="site-header site-header--sidebar branding-<?php echo esc_attr( $branding_pos ); ?>">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="header-main">
|
<div class="header-main">
|
||||||
<div class="site-branding">
|
<button class="sidebar-menu-toggle" aria-label="Menü öffnen" aria-expanded="false" aria-controls="header-sidebar">
|
||||||
<?php
|
<i class="fas fa-bars"></i>
|
||||||
if ( function_exists( 'the_custom_logo' ) && has_custom_logo() ) {
|
</button>
|
||||||
the_custom_logo();
|
<?php if ( $branding_pos === 'right' ) : ?>
|
||||||
}
|
<?php mm_icons(); ?>
|
||||||
?>
|
<?php mm_branding( true ); ?>
|
||||||
|
<?php elseif ( $branding_pos === 'center' ) : ?>
|
||||||
<?php
|
<div class="header-center-spacer"></div>
|
||||||
if ( is_front_page() && is_home() ) :
|
<?php mm_branding( true ); ?>
|
||||||
?>
|
<?php mm_icons(); ?>
|
||||||
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
|
<?php else : ?>
|
||||||
<?php else : ?>
|
<?php mm_branding( true ); ?>
|
||||||
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
|
<?php mm_icons(); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- NAVIGATION START -->
|
|
||||||
<nav id="site-navigation" class="main-navigation" role="navigation" aria-label="<?php esc_attr_e('Hauptmenü','minecraft-modern-theme'); ?>">
|
|
||||||
<!-- Mobile Toggle Button -->
|
|
||||||
<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false">
|
|
||||||
<i class="fas fa-bars"></i>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
wp_nav_menu( array(
|
|
||||||
'theme_location' => 'primary',
|
|
||||||
'container' => false,
|
|
||||||
'menu_class' => 'primary-menu',
|
|
||||||
'fallback_cb' => false,
|
|
||||||
) );
|
|
||||||
?>
|
|
||||||
</nav>
|
|
||||||
<!-- NAVIGATION ENDE -->
|
|
||||||
|
|
||||||
<div class="header-info">
|
|
||||||
<div class="social-links">
|
|
||||||
<?php
|
|
||||||
$social_icons = array(
|
|
||||||
'discord' => 'fab fa-discord',
|
|
||||||
'youtube' => 'fab fa-youtube',
|
|
||||||
'twitter' => 'fab fa-x-twitter',
|
|
||||||
'facebook' => 'fab fa-facebook-f',
|
|
||||||
'instagram' => 'fab fa-instagram',
|
|
||||||
'tiktok' => 'fab fa-tiktok',
|
|
||||||
'twitch' => 'fab fa-twitch',
|
|
||||||
'steam' => 'fab fa-steam',
|
|
||||||
'github' => 'fab fa-github',
|
|
||||||
'linkedin' => 'fab fa-linkedin-in',
|
|
||||||
'pinterest' => 'fab fa-pinterest-p',
|
|
||||||
'reddit' => 'fab fa-reddit-alien',
|
|
||||||
'teamspeak' => 'fab fa-teamspeak',
|
|
||||||
'spotify' => 'fab fa-spotify'
|
|
||||||
);
|
|
||||||
|
|
||||||
foreach ( $social_icons as $key => $class ) {
|
|
||||||
if ( get_theme_mod( 'social_' . $key ) ) {
|
|
||||||
echo '<a href="' . esc_url( get_theme_mod( 'social_' . $key ) ) . '" target="_blank" rel="noopener"><i class="' . esc_attr( $class ) . '"></i></a>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div> <!-- .header-main -->
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
<?php elseif ( $menu_style === 'centered' ) : ?>
|
||||||
|
<!-- ══════════════════════════════════════════════════════════════
|
||||||
|
LAYOUT 2: ZENTRIERT
|
||||||
|
═══════════════════════════════════════════════════════════════ -->
|
||||||
|
<header id="masthead" class="site-header site-header--centered">
|
||||||
|
<div class="container">
|
||||||
|
<!-- Zeile 1: Branding + Icons -->
|
||||||
|
<div class="header-row header-row-branding pos-<?php echo esc_attr( $branding_pos ); ?>">
|
||||||
|
<?php if ( $branding_pos === 'left' ) : ?>
|
||||||
|
<?php mm_branding( true ); ?>
|
||||||
|
<div class="header-spacer"></div>
|
||||||
|
<?php mm_icons(); ?>
|
||||||
|
<?php elseif ( $branding_pos === 'right' ) : ?>
|
||||||
|
<?php mm_icons(); ?>
|
||||||
|
<div class="header-spacer"></div>
|
||||||
|
<?php mm_branding( true ); ?>
|
||||||
|
<?php else : ?>
|
||||||
|
<div class="header-spacer"></div>
|
||||||
|
<?php mm_branding( true ); ?>
|
||||||
|
<?php mm_icons(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
<!-- Zeile 2: Navigation zentriert -->
|
||||||
|
<div class="header-row header-row-nav">
|
||||||
|
<?php mm_nav(); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<?php elseif ( $menu_style === 'mega' ) : ?>
|
||||||
|
<!-- ══════════════════════════════════════════════════════════════
|
||||||
|
LAYOUT 4: MEGA-MENÜ
|
||||||
|
═══════════════════════════════════════════════════════════════ -->
|
||||||
|
<header id="masthead" class="site-header site-header--mega">
|
||||||
|
<div class="container">
|
||||||
|
<!-- Zeile 1: Branding + Icons -->
|
||||||
|
<div class="header-row header-row-branding pos-<?php echo esc_attr( $branding_pos ); ?>">
|
||||||
|
<?php if ( $branding_pos === 'left' ) : ?>
|
||||||
|
<?php mm_branding( true ); ?>
|
||||||
|
<div class="header-spacer"></div>
|
||||||
|
<?php mm_icons(); ?>
|
||||||
|
<?php elseif ( $branding_pos === 'right' ) : ?>
|
||||||
|
<?php mm_icons(); ?>
|
||||||
|
<div class="header-spacer"></div>
|
||||||
|
<?php mm_branding( true ); ?>
|
||||||
|
<?php else : ?>
|
||||||
|
<div class="header-spacer"></div>
|
||||||
|
<?php mm_branding( true ); ?>
|
||||||
|
<?php mm_icons(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Zeile 2: Menü volle Breite -->
|
||||||
|
<div class="header-mega-nav-bar">
|
||||||
|
<div class="container">
|
||||||
|
<?php mm_nav('mega-nav'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<?php else : ?>
|
||||||
|
<!-- ══════════════════════════════════════════════════════════════
|
||||||
|
LAYOUT 1: CLASSIC
|
||||||
|
═══════════════════════════════════════════════════════════════ -->
|
||||||
|
<header id="masthead" class="site-header site-header--classic">
|
||||||
|
<div class="container">
|
||||||
|
<?php if ( $branding_pos === 'center' ) : ?>
|
||||||
|
<!-- Center: Branding oben zentriert, Menü darunter -->
|
||||||
|
<div class="header-row header-row-branding pos-center">
|
||||||
|
<div class="header-spacer"></div>
|
||||||
|
<?php mm_branding( true ); ?>
|
||||||
|
<?php mm_icons(); ?>
|
||||||
|
</div>
|
||||||
|
<div class="header-row header-row-nav">
|
||||||
|
<?php mm_nav(); ?>
|
||||||
|
</div>
|
||||||
|
<?php elseif ( $branding_pos === 'right' ) : ?>
|
||||||
|
<!-- Right: Icons + Nav links, Branding rechts -->
|
||||||
|
<div class="header-main">
|
||||||
|
<?php mm_nav(); ?>
|
||||||
|
<div class="header-spacer"></div>
|
||||||
|
<?php mm_icons(); ?>
|
||||||
|
<?php mm_branding( true ); ?>
|
||||||
|
</div>
|
||||||
|
<?php else : ?>
|
||||||
|
<!-- Left: Branding links, Nav Mitte, Icons rechts -->
|
||||||
|
<div class="header-main">
|
||||||
|
<?php mm_branding( true ); ?>
|
||||||
|
<?php mm_nav(); ?>
|
||||||
|
<?php mm_icons(); ?>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<?php endif; ?>
|
||||||
Reference in New Issue
Block a user