-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
112 lines (108 loc) · 4.88 KB
/
header.php
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
112
<?php
/**
* The header for our theme
*
* This is the template that displays all of the <head> section and everything up until <div id="content">
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package Top_Himalaya
*/
?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="https://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div id="page" class="site">
<header id="masthead" class="header header-down">
<div class="header-nav">
<div class="container">
<div class="flex justify-between items-center">
<?php
$logo_white = get_field( 'logo_white', 'option' );
$logo_main = get_field( 'logo_main', 'option' );
?>
<div class="header-item">
<div class="logo">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" aria-label="Logo Link">
<?php
if( $logo_white ){
echo wp_get_attachment_image( $logo_white['ID'], 'full', false, array( 'class' => 'h-12 sm:h-full logo-white' ) );
}
if( $logo_main ){
echo wp_get_attachment_image( $logo_main['ID'], 'full', false, array( 'class' => 'h-12 sm:h-full logo-primary hidden' ) );
}
?>
</a>
</div>
</div>
<!-- menu start here -->
<div class="header-item">
<div class="menu-overlay"></div>
<nav class="menu">
<div class="mobile-menu-head">
<div class="go-back flex items-center justify-center">
<i class="icon-chevron-left text-2xl"></i></a>
</div>
<div class="current-menu-title"></div>
<div class="mobile-menu-close">×</div>
</div>
<?php top_himalaya_header_menu(); ?>
</nav>
<div class="flex space-x-8 items-center">
<button class="btnsearch openmodelbtn block lg:hidden text-white hover:text-primary" aria-labelledby="Search" data-target="#searchpopup" >
<i class="icon-search text-xl font-medium"></i>
</button>
<!-- mobile menu trigger -->
<div class="mobile-menu-trigger">
<span></span>
</div>
</div>
</div>
<!-- menu end here -->
</div>
</div>
</div>
</header>
<?php
if( ! is_front_page() ){ ?>
<section class="breadcrumbWrapper relative">
<?php
if( is_home() ){
$post_page = get_option( 'page_for_posts' );
echo get_the_post_thumbnail( $post_page, 'full', array( 'class' => 'w-full h-[600px] object-cover' ) );
}else{
the_post_thumbnail( 'full', array( 'class' => 'w-full h-[600px] object-cover' ) );
}
?>
<div class="absolute inset-0 w-full h-full bg-black/20"></div>
<div class="absolute top-1/2 -translate-y-1/2 w-full mx-auto">
<div class="container">
<h1 class="rubik text-4xl md:text-5xl lg:text-[64px] font-bold max-w-4xl text-white">
<?php
if( is_home() ){
single_post_title();
}else{
if( is_page_template( 'templates/booking.php' ) ){
$string = '';
if( isset( $_GET['trip_id'] ) ){
$string = ' For ' . get_the_title( $_GET['trip_id'] );
}
echo the_title( '', '', false ) . $string;
}else{
the_title();
}
}
?>
</h1>
</div>
</div>
</section>
<?php
}