-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
58 lines (56 loc) · 1.79 KB
/
header.php
File metadata and controls
58 lines (56 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<a class="skip-link" href="#main-content"><?php esc_html_e( 'Skip to main content', 'mgn' ); ?></a>
<?php get_template_part( 'partials/preloader' ); ?>
<?php
$theme_header_args = isset( $args ) && is_array( $args ) ? $args : array();
$theme_header_variant = isset( $theme_header_args['header_variant'] ) ? $theme_header_args['header_variant'] : 'default';
$theme_header_color = isset( $theme_header_args['header_color'] ) ? $theme_header_args['header_color'] : 'default';
$theme_header_classes = array(
$theme_header_variant === 'absolute' ? 'theme-header-absolute' : 'theme-header-standard',
);
if ( $theme_header_color === 'white' ) {
$theme_header_classes[] = 'white';
}
$theme_header_class = implode( ' ', $theme_header_classes );
?>
<header class="<?php echo esc_attr( $theme_header_class ); ?>">
<div class="header-menu-area">
<div class="flex items-center justify-between">
<div class="header-logo">
<?php get_template_part( 'partials/logo' ); ?>
</div>
<?php get_template_part( 'partials/header-links' ); ?>
</div>
<button
type="button"
class="hamburger popup-menu"
data-menu="mobileMenu"
aria-label="<?php esc_attr_e( 'Open menu', 'mgn' ); ?>"
aria-controls="mobile-menu"
aria-expanded="false"
>
<span></span>
<span></span>
<span></span>
</button>
</div>
</header>
<?php get_template_part( 'partials/sticky-header' ); ?>
<?php
get_template_part(
'partials/drawer',
null,
array(
'header_color' => $theme_header_color,
)
);
?>
<main id="main-content" class="<?php echo esc_attr( $theme_header_class ); ?>">