This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="modal" data-modal-id="modal" data-close-on-bg> | |
<div class="modal__wrap"> | |
<div class="modal__window"> | |
<p>MODAL_TEXT</p> | |
<button class="burger is-active modal-close" data-modal-close> | |
<span></span> | |
<span></span> | |
<span></span> | |
</button> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Табы | |
* data-tab - атрибут, который должен иметь контейнер с кнопками и карточками | |
* data-tab-btn - атрибут кнопки | |
* data-tab-card - атрибут карточки | |
* Значение атрибутов связаныых кнопки и карточек должны быть одинаковыми | |
*/ | |
tabs() | |
function tabs() { | |
const tabElems = document.querySelectorAll('[data-tab]') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Плейсхолдер текстовых полей | |
labelTextfield() | |
function labelTextfield() { | |
const textfieldElems = document.querySelectorAll('.tf') | |
for (let i = 0; i < textfieldElems.length; i++) { | |
const textfield = textfieldElems[i]; | |
const input = textfield.querySelector('input, textarea') | |
const label = textfield.querySelector('label') | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Ленивая загрузка изображений | |
lazyLoading(); | |
function lazyLoading() { | |
const imgElems = document.querySelectorAll("[data-lazy-loading]") | |
const windowHeight = document.documentElement.clientHeight | |
imgShow() | |
window.addEventListener("scroll", function () { | |
imgShow() | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="modal" data-modal-id="modal"> | |
<div class="modal__wrap"> | |
<div class="modal__window"> | |
<button class="modal-close"> | |
<span></span> | |
<span></span> | |
</button> | |
</div> | |
<div class="modal__bg"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css" /> | |
<script src="https://unpkg.com/swiper/swiper-bundle.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$name = $_POST['user_name']; | |
$phone = $_POST['user_phone']; | |
$email = $_POST['user_email']; | |
$token = ""; // http://joxi.ru/v295MB7tzM6g72 - при создании бота в BotFather дается токен | |
$chat_id = ""; /* https://api.telegram.org/botXXXXXXXXXXXXXXXXXXXXXXX/getUpdates, где, XXXXXXXXXXXXXXXXXXXXXXX - токен вашего бота, полученный ранее. http://joxi.ru/p27DqBgcWqBVXA - где потом взять chat_id. Сначала бота нужно добавить в группу и отправить сообщение. id у бота начинается с минуса*/ | |
$arr = array( | |
'Имя пользователя: ' => $name, | |
'Телефон: ' => $phone, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
margin: 0; | |
padding: 0; | |
border: 0; | |
box-sizing: border-box; | |
} | |
html, | |
body { | |
width: 100%; |