forked from Shuhard89/pocket-menu-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
search_empty.html
295 lines (276 loc) · 11.6 KB
/
search_empty.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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Search empty</title>
<link rel="stylesheet" href="fonts/fonts.css" />
<link rel="stylesheet" href="css/font-awesome.min.css" />
<link rel="stylesheet" href="css/normalize.css" />
<link rel="stylesheet" href="css/main.css" />
<link rel="stylesheet" href="css/mediaq.css" />
<link rel="stylesheet" href="css/fSelect.css" />
</head>
<body>
<div class="p-loader visible"></div>
<header class="main-header">
<div class="content-wrapper clearfix">
<a href="#" class="header-logo">
<img src="img/logo.svg" alt="Service name" />
</a>
<div class="main-header-right clearfix">
<div class="main-header-lang-switcher">
<span class="current-lang">En</span>
<ul class="lang-list">
<li>En</li>
<li>Ru</li>
<li>Ua</li>
</ul>
</div>
<span class="header-btn" id="login-btn">Войти</span>
</div>
</div>
</header>
<div class="page-wrapper">
<main>
<div class="search-wrapper">
<div class="search-container">
<div class="search-map-container" id="search-map-container"></div>
<div class="place-search-show-btn hidden">Поиск</div>
<div class="places-list-show-btn hidden">Заведения</div>
<span class="btn-geo" title="Определить мое местоположение"></span>
<div class="search-status">
Поиск: <span class="search-status-text">Включен</span>
<div class="status-tip">
<p>Поиск заведений на карте работает только в пределах вашего города</p>
<span class="status-tip-close"></span>
</div>
</div>
<div class="place-search-block">
<h2>Поиск</h2>
<div class="hide-search-btn"></div>
<form action="#" method="POST" class="search-place-form">
<input type="text" name="place-name" id="place-name" class="search-place-input" placeholder="Введите название заведения" />
<div class="clearfix">
<div class="place-search-chekbox">
<input type="checkbox" name="dayandnight" id="dayandnight" />
<label for="dayandnight">Круглосуточно</label>
</div>
<div class="place-search-chekbox">
<input type="checkbox" name="currently-opened" id="currently-opened" />
<label for="currently-opened">Открыто сейчас</label>
</div>
</div>
<div class="search-dropdown">
<label for="place-type">Тип заведения</label>
<select name="place-type" id="place-type" multiple class="search-dropdown-select">
<option value="restaurant">Ресторан</option>
<option value="pizza">Пиццерия</option>
<option value="smoke-bar">Кальян-бар</option>
<option value="bar">Бар</option>
<option value="cafe">Кафе</option>
<option value="bistro">Бистро</option>
<option value="restaurant">Ресторан</option>
<option value="pizza">Пиццерия</option>
<option value="smoke-bar">Кальян-бар</option>
<option value="bar">Бар</option>
<option value="cafe">Кафе</option>
<option value="bistro">Бистро</option>
<option value="restaurant">Ресторан</option>
<option value="pizza">Пиццерия</option>
<option value="smoke-bar">Кальян-бар</option>
<option value="bar">Бар</option>
<option value="cafe">Кафе</option>
<option value="bistro">Бистро</option>
<option value="restaurant">Ресторан</option>
<option value="pizza">Пиццерия</option>
<option value="smoke-bar">Кальян-бар</option>
<option value="bar">Бар</option>
<option value="cafe">Кафе</option>
<option value="bistro">Бистро</option>
</select>
</div>
<div class="mobile-menu-overlay"></div>
<div class="search-dropdown">
<label for="services-select">Сервисы</label>
<select name="services" id="services-select" multiple class="search-dropdown-select">
<option value="banket-hall">Банкетный зал</option>
<option value="wine-card">Винная карта</option>
<option value="grill-menu">Гриль-меню</option>
<option value="shipment">Доставка</option>
<option value="food-outdoor">Еда на вынос</option>
<option value="smoke">Кальян</option>
<option value="out-hall">Летняя терраса</option>
<option value="mangal-menu">Мангал-меню</option>
<option value="parking">Парковка</option>
<option value="vega-menu">Постное меню</option>
<option value="corporatives">Корпоративы</option>
<option value="panorama">Панорамный вид</option>
<option value="hosper-menu">Хоспер-меню</option>
<option value="gift-cards">Подарочные сертификаты</option>
<option value="birthdays">Проведение дня рождения, юбилея, свидания</option>
</select>
</div>
<!-- <button type="submit" class="search-btn">Найти</button> -->
</form>
</div>
<div class="places-list-block">
<div class="hide-places-list-btn"></div>
<div class="places-list-block-container">
<div class="no-places-container">
<h2 class="no-places-title">Заведения не найдены</h2>
<span class="closest-place-btn">Найти ближайшее заведение</span>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<div class="light-overlay"></div>
<div class="login-modal">
<div class="login-modal-content">
<span class="login-modal-content-heading">Вход</span>
<span class="login-modal-content-message">Войдите в свою учетную запись с помощью</span>
<div class="login-modal-btn-wrapper">
<span class="login-modal-btn facebook">Facebook</span>
<span class="login-modal-btn messenger">Messenger</span>
</div>
</div>
</div>
<div class="modal-msg">
<p>Заведений по вашему запросу не найдено</p>
</div>
<!-- JS -->
<script src="js/libs/jquery-3.2.1.min.js"></script>
<script src="js/libs/fSelect.js"></script>
<script src="js/main.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCFJl-oqf0NECka4ZBhXlOVfeUnLvAa-Yw"></script>
<script>
// Google maps
// Create and Initialise the Map (required) our google map below
google.maps.event.addDomListener(window, 'load', init(49.441984, 32.064614));
function init(lat, lng) {
// Basic options for a simple Google Map
var mapOptions = {
// How zoomed in you want the map to start at (always required)
zoom: 18,
scrollwheel: true,
// The latitude and longitude to center the map (always required)
center: new google.maps.LatLng(49.441984, 32.064614),
disableDefaultUI: true,
draggable: true,
styles:
[{featureType:"landscape",elementType:"labels",stylers:[{visibility:"on"}]},{featureType:"transit",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"labels.icon",stylers:[{visibility:"off"}]},{stylers:[{hue:"#00aaff"},{saturation:-100},{gamma:2.15},{lightness:12}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{visibility:"on"},{lightness:24}]},{featureType:"road",elementType:"geometry",stylers:[{lightness:57}]}]
};
var mapElement = document.getElementById('search-map-container');
// Create the Google Map using out element and options defined above
var map = new google.maps.Map(mapElement, mapOptions);
var image = "img/icons/icon-pin.svg";
// Define the Lattitude and Longitude for the map location
var myLatLng = new google.maps.LatLng(49.441984, 32.064614);
// Define the map marker characteristics
var mapMarker = new
google.maps.Marker({
position: myLatLng,
map: map,
title: '',
icon: image
});
// On gmap zoom example
google.maps.event.addListener(map, 'zoom_changed', function() {
zoomLevel = map.getZoom();
if (zoomLevel <= 12) {
$('.search-status').addClass('deactivated').find('.search-status-text').html('Выключен');
} else {
$('.search-status').removeClass('deactivated').find('.search-status-text').html('Включен');
}
});
}
// Multiselect plugin
if ( $(window).width() > 767 ){
$('#place-type').fSelect({
placeholder: 'Выберите тип заведения',
numDisplayed: 3,
overflowText: '{n} выбрано',
searchText: 'Поиск',
showSearch: true,
optionFormatter: false
});
$('#services-select').fSelect({
placeholder: 'Выберите сервисы',
numDisplayed: 3,
overflowText: '{n} выбрано',
searchText: 'Поиск',
showSearch: true,
optionFormatter: false
});
}
// Toggle search card
$('.hide-search-btn').on('click', function(event) {
event.preventDefault();
$('.place-search-block').addClass('hidden');
$('.place-search-show-btn').removeClass('hidden');
});
$('.place-search-show-btn').on('click', function(event) {
event.preventDefault();
$('.place-search-block').removeClass('hidden');
$('.place-search-show-btn').addClass('hidden');
});
// Toggle places cards
$('.hide-places-list-btn').on('click', function(event) {
event.preventDefault();
$('.places-list-block').addClass('hidden');
$('.places-list-show-btn').removeClass('hidden');
});
$('.places-list-show-btn').on('click', function(event) {
event.preventDefault();
if ( $(this).hasClass('hidden') ){
$('.places-list-block').addClass('hidden');
$('.places-list-show-btn').removeClass('hidden');
$('.mobile-menu-overlay').removeClass('visible');
} else {
$('.places-list-block').removeClass('hidden');
$('.places-list-show-btn').addClass('hidden');
$('.mobile-menu-overlay').addClass('visible');
}
});
// Disabled checkboxes
$('#dayandnight').on('change', function() {
if ( $(this).is(':checked') ){
$('#currently-opened').prop('checked',false).closest('.place-search-chekbox').addClass('disabled');
} else {
$('#currently-opened').prop('checked',false).closest('.place-search-chekbox').removeClass('disabled');
}
});
$('#currently-opened').on('change', function() {
if ( $(this).is(':checked') ){
$('#dayandnight').prop('checked',false).closest('.place-search-chekbox').addClass('disabled');
} else {
$('#dayandnight').prop('checked',false).closest('.place-search-chekbox').removeClass('disabled');
}
});
// Top line loader example
setTimeout(function(){
$('.p-loader').removeClass('visible');
}, 4000);
// Search closest place (not found) example
var modalMsgTimeout;
$('.closest-place-btn').on('click', function() {
$('.modal-msg').addClass('visible');
clearTimeout(modalMsgTimeout);
var modalMsgTimeout = setTimeout(function(){
$('.modal-msg').removeClass('visible');
}, 2000);
});
// Hidden places list on mobile
if ( $(window).width() < 768 ){
$('.places-list-block').addClass('hidden');
$('.places-list-show-btn').removeClass('hidden');
}
$('.status-tip-close').on('click', function() {
$('.status-tip').addClass('hidden');
});
</script>
</body>
</html>