-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
executable file
·111 lines (78 loc) · 2.98 KB
/
header.php
File metadata and controls
executable file
·111 lines (78 loc) · 2.98 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?php
/**
* The template for displaying the header
*
* Displays all of the head element and everything up until the "container" div.
*
* @package RBMTheme
* @since FoundationPress 1.0.0
*/
?>
<!doctype html>
<html class="no-js" <?php language_attributes(); ?> >
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<?php wp_head(); ?>
</head>
<?php
$body_class = array( 'offcanvas' );
global $has_hero;
global $has_hero_image;
$has_hero = false;
$has_hero_image = false;
if ( ( is_single() || is_singular() ) && has_blocks() ) :
$blocks = parse_blocks( get_the_content() );
if ( ! empty( $blocks ) && isset( $blocks[0] ) ) {
if ( $blocks[0]['blockName'] == 'core/cover' && $blocks[0]['attrs']['align'] == 'wide' ) {
$body_class[] = 'has-hero';
if ( isset( $blocks[0]['attrs']['url'] ) && $blocks[0]['attrs']['url'] ) {
$body_class[] = 'has-hero-image';
$has_hero_image = true;
}
$has_hero = true;
}
}
endif; ?>
<body <?php body_class( $body_class ); ?>>
<?php wp_body_open(); ?>
<nav class="mobile-off-canvas-menu off-canvas position-right" id="off-canvas-menu" data-off-canvas data-auto-focus="false" role="navigation">
<?php foundationpress_mobile_nav(); ?>
</nav>
<div class="off-canvas-content" data-off-canvas-content>
<div data-sticky-container>
<header class="site-header sticky-top-bar<?php echo ( is_admin_bar_showing() ? ' admin-bar' : '' ) ; ?>" data-sticky data-margin-top="<?php echo ( is_admin_bar_showing() ? '0' : '0' ) ; ?>" data-sticky-on="small" role="banner">
<div class="row">
<div class="small-12 columns">
<div class="site-title-bar title-bar">
<div class="title-bar-left">
<span class="site-mobile-title title-bar-title show-for-small-only">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<div class="rbm-logo-svg">
<?php echo file_get_contents( THEME_DIR . '/dist/assets/images/rbm-logo-full.svg' ); ?>
</div>
<div class="rbm-logo-svg small-version">
<?php echo file_get_contents( THEME_DIR . '/dist/assets/images/rbm-logo-small.svg' ); ?>
</div>
</a>
</span>
<button class="menu-icon<?php echo ( is_front_page() ? ' dark' : '' ); ?>" type="button" data-toggle="off-canvas-menu"></button>
</div>
</div>
<nav class="site-navigation top-bar" role="navigation">
<div class="site-desktop-title top-bar-title hide-for-small-only">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<div class="rbm-logo-svg">
<?php echo file_get_contents( THEME_DIR . '/dist/assets/images/rbm-logo-full.svg' ); ?>
</div>
</a>
</div>
<div class="top-bar-right">
<?php foundationpress_top_bar_r(); ?>
</div>
</nav>
</div>
</div>
</header>
</div>
<div class="container">