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
// Подгрузка iframe видео с ютуба | |
// при нажатии на превью | |
(function () { | |
// Делаем загрузку превью для видео (poster), | |
// а затем - создание iframe | |
let videos = document.querySelectorAll('.ytvideo'); | |
videos.forEach((video) => { | |
video.style.backgroundImage = 'url(//img.youtube.com/vi/' + video.getAttribute('id') + '/maxresdefault.jpg)'; | |
video.classList.add('poster'); |
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
.smallBlock | |
a.tooltip-my(href="#" data-tooltip="Никуда не ведет.") Ссылка с подсказкой. | |
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
/**** ВСПЛЫВАЮЩАЯ ПОДСКАЗКА для окон просмотра больше 500px *****/ | |
function tipShowHide(){ | |
$(".calendar_image").mousemove(function(e){ | |
var x = e.offsetX;//по горизонтали | |
var y = e.offsetY;//по вертикали | |
var posTop = y - 5 + "px"; | |
var posLeft = x - 5 + "px"; |
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
.imgBlock.hasTooltipBlock | |
img.imgBlock__img(src="img/test/image6.jpg" alt="Природа") | |
.imgBlock__tooltip.hasTooltipBlock__tooltip Прекрасный пейзаж летнего дня | |
.imgBlock.hasTooltipBlock | |
img.imgBlock__img(src="img/test/image6.jpg" alt="Природа") | |
.imgBlock__tooltip.hasTooltipBlock__tooltip Прекрасный пейзаж летнего дня | |
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
// Tabs | |
(function () { | |
let tabBlocks = document.querySelectorAll('.tabBlock'); | |
let items = document.querySelectorAll('.tabs__item'); | |
items[0].classList.add('active'); | |
tabBlocks[0].classList.add('tabBlock_selected'); | |
items.forEach((item) => { | |
item.addEventListener('click', function(e) { | |
items.forEach((item) => { | |
item.classList.remove('active'); |
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
let myImageSlider = new Swiper('.image-slider', { | |
navigation: { | |
nextEl: '.swiper-button-next', | |
prevEl: '.swiper-button-prev' | |
}, | |
pagination: { | |
el: '.swiper-pagination', | |
clickable: true, | |
type: 'progressbar' | |
}, |
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
{ | |
"images": [ | |
{ | |
"src": "img/test/image1.jpg", | |
"alt": "Картинка1" | |
}, | |
{ | |
"src": "img/test/image1.jpg", | |
"alt": "Картинка2" | |
}, |
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
{ | |
"images": [ | |
{ | |
"src": "img/test/image1.jpg", | |
"alt": "Картинка1" | |
}, | |
{ | |
"src": "img/test/image1.jpg", | |
"alt": "Картинка2" | |
}, |
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
mixin shadow () | |
// START shadow | |
.shadow&attributes(attributes) | |
//- Мы сначала смещаем элемент, а затем размываем эту смещенную "копию" | |
//- С помощью примитива наложения мы просто устанавливаем исходный | |
//- элемент поверх размытого результата. | |
//- Использование in="SourceAlpha" альфа-канала исходного изображения | |
//- фактически делает размытый результат черным. Если бы мы использовали | |
//- in="SourceGraphic", тень бы имела цвет исходного элемента. | |
svg.exz1(xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" width="600" height="400") |
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
(function () { | |
let locked = false; | |
let sendButton = $('.send__button'); | |
let sendIcon = $('.send__icon_send'); | |
let sentIcon = $('.send__icon_sent'); | |
let sentBg = $('.send__bg'); | |
let indicatorDots = $('.send__button, .send__indicator-dot'); | |
sendButton.on('click', function (e) { | |
send(); |
NewerOlder