-
Notifications
You must be signed in to change notification settings - Fork 0
/
_header.html
238 lines (193 loc) · 6.45 KB
/
_header.html
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<!-- ======================== Navigation ======================== -->
<nav>
<div class="container">
<a href="index.html" class="logo">
<h4 id="furniture" style="margin-top: 16px; "><i>Modular Furniture</i></h4>
</a>
<!-- ========== Top navigation ========== -->
<div class="navigation navigation-top clearfix">
<ul>
<!--add active class for current page-->
<li class="left-side">
<h4 id="furniture" style="margin-top: 16px;"><i>Modular Furniture</i></h4>
</li>
<li>
<a href="javascript:void(0);" class="open-search"><img
src="https://cdn-icons-png.flaticon.com/128/2989/2989907.png" width="20px" height="20px"></a>
</li>
</ul>
</div>
<!-- ========== Main navigation ========== -->
<div class="navigation navigation-main">
<a href="#" class="open-search"><img src="https://cdn-icons-png.flaticon.com/128/2989/2989907.png" width="20px"
height="20px" style="margin-top: 20px;"></a></a>
<a href="#" class="open-menu"><img src="https://cdn-icons-png.flaticon.com/128/6015/6015685.png" width="20px"
height="20px" style="margin-top: 20px;"></a>
<div class="floating-menu">
<!--mobile toggle menu trigger-->
<div class="close-menu-wrapper">
<span class="close-menu"><img src="https://cdn-icons-png.flaticon.com/128/1828/1828778.png" width="20px"
height="20px" style="margin-top: 20px;"></span>
</div>
<ul>
<li>
<a href="index.html">Home
</a>
</li>
<li>
<a href="about.html">About Us
</a>
</li>
<li>
<a href="contact.html">Contact Us
</a>
</li>
<li>
<a href="gallery.html">gallery
</a>
</li>
<li>
<a href="design.html">Designs
</a>
</li>
<li class="nav-settings">
<a href="javascript:void(0);"><a href="home.php"><span class="nav-settings-value">Account</span></a>
</span>
<div class="navbar-dropdown navbar-dropdown-single">
<div class="navbar-box">
<div class="box-full">
<div class="box clearfix">
<ul>
<li><a href="registration.html">Registration</a></li>
<li><a href="login.html">Login</a></li>
<li><a href="home.php">Account</a></li>
<!-- <li><a href="admin_penal.html">Admin Penal</a></li> -->
</ul>
</div>
</div>
</div>
</div>
</a>
</li>
</div>
</ul>
</div>
</div>
<!-- ========== Search wrapper ========== -->
<div class="search-wrapper">
<input class="form-control" placeholder="Search..." />
<button class="btn btn-outline-dark btn-sm">Search now</button>
</div>
</div>
</div>
</nav>
<!-- ================== Navigation (main menu) ================== -->
<script type="text/javascript">
$(function () {
var objSearch = $(".search-wrapper"),
objLogin = $(".login-wrapper"),
objCart = $(".cart-wrapper"),
objMenu = $(".floating-menu"),
objMenuLink = $(".floating-menu a"),
$search = $(".open-search"),
$login = $(".open-login"),
$cart = $(".open-cart"),
$menu = $(".open-menu"),
$openDropdown = $(".open-dropdown"),
$close = $(".close-menu"),
$settingsItem = $(".nav-settings .nav-settings-list li");
// Open/close login
$login.on("click", function () {
toggleOpen($(this));
objLogin.toggleClass("open");
closeSearch();
closeCart();
});
// Open/close search bar
$search.on("click", function () {
toggleOpen($(this));
objSearch.toggleClass("open");
objSearch.find("input").focus();
closeLogin();
closeCart();
});
// Open/close cart
$cart.on("click", function () {
toggleOpen($(this));
objCart.toggleClass("open");
closeLogin();
closeSearch();
});
// Settings language & currency dropdown
$settingsItem.on("click", function () {
var $value = $(this).closest(".nav-settings").find(".nav-settings-value");
$value.text($(this).text());
});
// Mobile menu open/close
$menu.on("click", function () {
objMenu.addClass("expanded");
closeSearch();
closeLogin();
closeCart();
});
// Floating menu hyperlink
if ($("nav").hasClass("navbar-single-page")) {
objMenuLink.on("click", function () {
objMenu.removeClass("expanded");
});
}
// Open dropdown/megamenu
$openDropdown.on("click", function (e) {
e.preventDefault();
var liParent = $(this).parent().parent(),
liDropdown = liParent.find(".navbar-dropdown");
liParent.toggleClass("expanded");
if (liParent.hasClass("expanded")) {
liDropdown.slideDown();
} else {
liDropdown.slideUp();
}
});
// Close menu (mobile)
$close.on("click", function () {
$("nav").find(".expanded").removeClass("expanded");
$("nav").find(".navbar-dropdown").slideUp();
});
// Global functions
function toggleOpen(el) {
$(el).toggleClass("open");
}
function closeSearch() {
objSearch.removeClass("open");
$search.removeClass("open");
}
function closeLogin() {
objLogin.removeClass("open");
$login.removeClass("open");
}
function closeCart() {
objCart.removeClass("open");
$cart.removeClass("open");
}
// Sticky header
// ----------------------------------------------------------------
var navbarFixed = $("nav.navbar-fixed");
// When reload page - check if page has offset
if ($(document).scrollTop() > 94) {
navbarFixed.addClass("navbar-sticked");
}
// Add sticky menu on scroll
$(document).on("bind ready scroll", function () {
var docScroll = $(document).scrollTop();
if (docScroll >= 10) {
navbarFixed.addClass("navbar-sticked");
} else {
navbarFixed.removeClass("navbar-sticked");
}
});
var navHeight = $("nav").height();
if ($(".owl-slider").hasClass("owl-slider-fullscreen")) {
$(".header-content .item").height($(window).height() - navHeight - 50);
}
});
</script>