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
class DateDiff { | |
constructor(date1, date2) { | |
this.days = null; | |
this.hours = null; | |
this.minutes = null; | |
this.seconds = null; | |
this.date1 = date1; | |
this.date2 = date2; | |
this.init(); | |
} |
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
import * as THREE from 'three'; | |
const OrbitControls = require('three-orbit-controls')(THREE); | |
let camera, | |
controls, | |
scene, | |
renderer, | |
mesh, | |
time = 0; |
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
$('.container').on('change keyup keydown paste cut', 'textarea', function() { | |
$(this).height(0).height(this.scrollHeight); | |
}).find('textarea').change(); |
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
window.onload = function() { | |
var el = document.querySelector('.preloader-wrap'); | |
el.style.opacity = 1; | |
(function fade() { | |
if ((el.style.opacity -= 0.03) < 0) { | |
el.style.display = "none"; | |
} else { | |
requestAnimationFrame(fade); | |
} |
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 fadeOut(el) { | |
el.style.opacity = 1; | |
(function fade() { | |
if ((el.style.opacity -= 0.03) < 0) { | |
el.style.display = "none"; | |
} else { | |
requestAnimationFrame(fade); | |
} | |
})(); |
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 fulltime () { | |
var time = new Date(); | |
var newYear = new Date("January,1,2018,00:00:00"); | |
var totalRemains = (newYear.getTime()-time.getTime()); | |
if (totalRemains > 1) { | |
var RemainsSec = (parseInt(totalRemains / 1000));//сколько всего осталось секунд | |
var RemainsFullDays = (parseInt(RemainsSec / (24*60*60)));//осталось дней | |
var secInLastDay = RemainsSec-RemainsFullDays*24*3600; //осталось секунд в неполном дне | |
var RemainsFullHours = (parseInt(secInLastDay / 3600));//осталось часов в неполном дне |
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
$(this)[0].contentWindow.postMessage('{"event":"command","func":"stopVideo","args":""}', '*') |
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
@font-face { | |
font-family: 'Proxima Nova Rg'; | |
src: url('../../prod/fonts/proxima/ProximaNova-Bold.woff2') format('woff2'), | |
url('../../prod/fonts/proxima/ProximaNova-Bold.woff') format('woff'); | |
font-weight: bold; | |
font-style: normal; | |
} | |
@font-face { | |
font-family: 'Proxima Nova Rg'; |
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
<!-- Подключаем API Яндекс карт внутри тега head --> | |
<script src="https://api-maps.yandex.ru/2.1/?lang=ru_RU" type="text/javascript"></script> | |
<!-- Создаем div с id map в теле документа bofy --> | |
<div id="map" style="width: 100%; height: 400px"></div> | |
<!-- Настраиваем карту через JavaScript --> | |
<script type="text/javascript"> | |
//создаем переменные "Карта" и "Метка" | |
ymaps.ready(init); |
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
&__video { | |
width: 100%; | |
position: relative; | |
padding-bottom: 56.25%; /* 16:9 */ | |
padding-top: 25px; | |
height: 0; | |
iframe { | |
position: absolute; | |
top: 0; | |
left: 0; |