-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
353 lines (345 loc) · 17.1 KB
/
index.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
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="css/normalize.css" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="leaflet/leaflet.css" />
<link rel="stylesheet" href="nouislider/nouislider.css" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<title>Кексобукинг</title>
</head>
<body>
<main>
<div class="promo">
<h1 class="promo__title visually-hidden">Keksobooking. Кексы по соседству</h1>
<img src="img/keksobooking.svg" alt="Keksobooking. Кексы по соседству" width="215" height="45" />
</div>
<!-- Карта объявлений -->
<section class="map">
<!-- Блок для вставки карты -->
<div class="map__canvas" id="map-canvas"></div>
<!-- Фильтрация объявлений -->
<div class="map__filters-container">
<form action="#" class="map__filters" autocomplete="off">
<select name="housing-type" id="housing-type" class="map__filter">
<option value="any" selected>Любой тип жилья</option>
<option value="bungalow">Бунгало</option>
<option value="flat">Квартира</option>
<option value="hotel">Отель</option>
<option value="house">Дом</option>
<option value="palace">Дворец</option>
</select>
<select name="housing-price" id="housing-price" class="map__filter">
<option value="any" selected>Любая</option>
<option value="middle">10000 - 50000₽</option>
<option value="low">до 10000₽</option>
<option value="high">от 50000₽</option>
</select>
<select name="housing-rooms" id="housing-rooms" class="map__filter">
<option value="any" selected>Любое число комнат</option>
<option value="1">Одна комната</option>
<option value="2">Две комнаты</option>
<option value="3">Три комнаты</option>
</select>
<select name="housing-guests" id="housing-guests" class="map__filter">
<option value="any" selected>Любое число гостей</option>
<option value="2">Два гостя</option>
<option value="1">Один гость</option>
<option value="0">Не для гостей</option>
</select>
<fieldset id="housing-features" class="map__features">
<input
type="checkbox"
name="features"
value="wifi"
id="filter-wifi"
class="map__checkbox visually-hidden" />
<label class="map__feature map__feature--wifi" for="filter-wifi">Wi-Fi</label>
<input
type="checkbox"
name="features"
value="dishwasher"
id="filter-dishwasher"
class="map__checkbox visually-hidden" />
<label class="map__feature map__feature--dishwasher" for="filter-dishwasher">Посудомоечная машина</label>
<input
type="checkbox"
name="features"
value="parking"
id="filter-parking"
class="map__checkbox visually-hidden" />
<label class="map__feature map__feature--parking" for="filter-parking">Парковка</label>
<input
type="checkbox"
name="features"
value="washer"
id="filter-washer"
class="map__checkbox visually-hidden" />
<label class="map__feature map__feature--washer" for="filter-washer">Стиральная машина</label>
<input
type="checkbox"
name="features"
value="elevator"
id="filter-elevator"
class="map__checkbox visually-hidden" />
<label class="map__feature map__feature--elevator" for="filter-elevator">Лифт</label>
<input
type="checkbox"
name="features"
value="conditioner"
id="filter-conditioner"
class="map__checkbox visually-hidden" />
<label class="map__feature map__feature--conditioner" for="filter-conditioner">Кондиционер</label>
</fieldset>
</form>
</div>
</section>
<!-- Форма объявления -->
<section class="notice">
<h2 class="notice__title">Ваше объявление</h2>
<form
class="ad-form"
action="https://26.javascript.pages.academy/keksobooking"
method="post"
enctype="multipart/form-data"
autocomplete="off">
<fieldset class="ad-form-header">
<legend class="ad-form-header__title">Ваша фотография (для карты)</legend>
<div class="ad-form-header__upload">
<div class="ad-form-header__preview">
<img src="img/muffin-grey.svg" alt="Аватар пользователя" width="40" height="44" />
</div>
<div class="ad-form__field">
<input
type="file"
id="avatar"
name="avatar"
class="ad-form-header__input visually-hidden"
accept="image/png, image/jpeg" />
<label class="ad-form-header__drop-zone" for="avatar">Загрузить<br />фото...</label>
</div>
<p class="ad-form-header__info">
Заполните все обязательные поля, назначьте цену, загрузите аватар и фото жилья. Придумайте интересное
описание. Оно сделает объявление более живым и привлекательным. Получившееся объявление должно давать
гостям полное представление о вашем жилье.
</p>
</div>
</fieldset>
<fieldset class="ad-form__element ad-form__element--wide">
<label class="ad-form__label" for="title">Заголовок объявления</label>
<input
id="title"
name="title"
type="text"
placeholder="Милая, уютная квартирка в центре Токио"
minlength="30"
maxlength="100"
required
data-pristine-required-message="Обязательное поле *"
data-pristine-minlength-message="Минимальная длина 30 символов" />
</fieldset>
<fieldset class="ad-form__element ad-form__element--wide">
<label class="ad-form__label" for="address">Адрес (координаты)</label>
<input
id="address"
name="address"
type="text"
required
data-pristine-required-message="Обязательное поле *" />
</fieldset>
<fieldset class="ad-form__element">
<label class="ad-form__label" for="type">Тип жилья</label>
<select id="type" name="type">
<option value="bungalow">Бунгало</option>
<option value="flat" selected>Квартира</option>
<option value="hotel">Отель</option>
<option value="house">Дом</option>
<option value="palace">Дворец</option>
</select>
</fieldset>
<fieldset class="ad-form__element">
<label class="ad-form__label" for="price">Цена за ночь, руб.</label>
<input
id="price"
name="price"
type="number"
placeholder="5000"
required
data-pristine-required-message="Обязательное поле *" />
<div class="ad-form__slider"></div>
</fieldset>
<fieldset class="ad-form__element ad-form__element--time">
<label class="ad-form__label" for="timein">Время заезда и выезда</label>
<select id="timein" name="timein">
<option value="12:00" selected>После 12</option>
<option value="13:00">После 13</option>
<option value="14:00">После 14</option>
</select>
<select id="timeout" name="timeout" title="Time to go out">
<option value="12:00" selected>Выезд до 12</option>
<option value="13:00">Выезд до 13</option>
<option value="14:00">Выезд до 14</option>
</select>
</fieldset>
<fieldset class="ad-form__element">
<label class="ad-form__label" for="room_number">Количество комнат</label>
<select id="room_number" name="rooms">
<option value="1" selected>1 комната</option>
<option value="2">2 комнаты</option>
<option value="3">3 комнаты</option>
<option value="100">100 комнат</option>
</select>
</fieldset>
<fieldset class="ad-form__element">
<label class="ad-form__label" for="capacity">Количество мест</label>
<select id="capacity" name="capacity">
<option value="3" selected>для 3 гостей</option>
<option value="2">для 2 гостей</option>
<option value="1">для 1 гостя</option>
<option value="0">не для гостей</option>
</select>
</fieldset>
<fieldset class="ad-form__element ad-form__element--wide features">
<legend>Удобства: Wi-Fi, кухня, парковка, стиралка, лифт, кондиционер</legend>
<input
class="features__checkbox visually-hidden"
type="checkbox"
name="feature"
value="wifi"
id="feature-wifi" />
<label class="features__label features__label--wifi" for="feature-wifi">Wi-Fi</label>
<input
class="features__checkbox visually-hidden"
type="checkbox"
name="feature"
value="dishwasher"
id="feature-dishwasher" />
<label class="features__label features__label--dishwasher" for="feature-dishwasher"
>Посудомоечная машина</label
>
<input
class="features__checkbox visually-hidden"
type="checkbox"
name="feature"
value="parking"
id="feature-parking" />
<label class="features__label features__label--parking" for="feature-parking">Парковка</label>
<input
class="features__checkbox visually-hidden"
type="checkbox"
name="feature"
value="washer"
id="feature-washer" />
<label class="features__label features__label--washer" for="feature-washer">Стиральная машина</label>
<input
class="features__checkbox visually-hidden"
type="checkbox"
name="feature"
value="elevator"
id="feature-elevator" />
<label class="features__label features__label--elevator" for="feature-elevator">Лифт</label>
<input
class="features__checkbox visually-hidden"
type="checkbox"
name="feature"
value="conditioner"
id="feature-conditioner" />
<label class="features__label features__label--conditioner" for="feature-conditioner">Кондиционер</label>
</fieldset>
<fieldset class="ad-form__element ad-form__element--wide">
<label class="ad-form__label" for="description">Описание (не обязательно)</label>
<textarea
id="description"
name="description"
placeholder="Здесь расскажите о том, какое ваше жилье замечательное и вообще"></textarea>
</fieldset>
<fieldset class="ad-form__element ad-form__element--wide">
<label class="ad-form__label">Фотография жилья</label>
<div class="ad-form__photo-container">
<div class="ad-form__upload">
<input
type="file"
id="images"
name="images"
class="ad-form__input visually-hidden"
accept="image/png, image/jpeg" />
<label for="images" class="ad-form__drop-zone">Загрузить<br />фото...</label>
</div>
<div class="ad-form__photo"></div>
</div>
</fieldset>
<fieldset class="ad-form__element ad-form__element--submit">
<button class="ad-form__submit" type="submit">Опубликовать</button>
или <button class="ad-form__reset" type="reset">очистить</button>
</fieldset>
</form>
</section>
</main>
<footer class="footer container">
<div class="footer__copyright copyright">
<a class="copyright__link copyright__link--image" href="https://htmlacademy.ru/intensive/javascript">
<img src="img/htmla-logo.svg" width="130" height="45" alt="HTML Academy" class="copyright__logo" />
</a>
<p>
Сделано в
<a class="copyright__link copyright__link--text" href="https://htmlacademy.ru/intensive/javascript"
>HTMLAcademy</a
>
</p>
</div>
<ul class="footer__contacts contacts">
<li>
<a href="https://twitter.com/htmlacademy_ru" class="contacts__link contacts__link--twitter">Twitter</a>
</li>
<li>
<a href="https://vk.com/htmlacademy" class="contacts__link contacts__link--vk">VK</a>
</li>
</ul>
</footer>
<!-- Карточка объявления -->
<template id="card">
<article class="popup">
<img src="img/avatars/user01.png" class="popup__avatar" width="70" height="70" alt="Аватар пользователя" />
<h3 class="popup__title">Уютное гнездышко для молодоженов</h3>
<p class="popup__text popup__text--address">102-0082 Tōkyō-to, Chiyoda-ku, Ichibanchō, 14−3</p>
<p class="popup__text popup__text--price">5200 <span>₽/ночь</span></p>
<h4 class="popup__type">Квартира</h4>
<p class="popup__text popup__text--capacity">2 комнаты для 3 гостей</p>
<p class="popup__text popup__text--time">Заезд после 14:00, выезд до 10:00</p>
<ul class="popup__features">
<li class="popup__feature popup__feature--wifi"></li>
<li class="popup__feature popup__feature--dishwasher"></li>
<li class="popup__feature popup__feature--parking"></li>
<li class="popup__feature popup__feature--washer"></li>
<li class="popup__feature popup__feature--elevator"></li>
<li class="popup__feature popup__feature--conditioner"></li>
</ul>
<p class="popup__description">
Великолепная квартира-студия в центре Токио. Подходит как туристам, так и бизнесменам. Квартира полностью
укомплектована и недавно отремонтирована.
</p>
<div class="popup__photos">
<img src="" class="popup__photo" width="45" height="40" alt="Фотография жилья" />
</div>
</article>
</template>
<!-- Сообщение об успешном создании объявления -->
<template id="success">
<div class="success">
<p class="success__message">Ваше объявление<br />успешно размещено!</p>
</div>
</template>
<!-- Сообщение об ошибке создания объявления -->
<template id="error">
<div class="error">
<p class="error__message">Ошибка размещения объявления</p>
<button type="button" class="error__button">Попробовать снова</button>
</div>
</template>
<script src="leaflet/leaflet.js"></script>
<script src="nouislider/nouislider.js"></script>
<script src="pristine/pristine.min.js"></script>
<script src="js/main.js" type="module"></script>
</body>
</html>