//Перенос файлов PHP
function php() {
return src(path.src.php)
// .pipe(webphtml()) Вот эту хрень выбросите
.pipe(dest(path.build.php))
.pipe(browsersync.stream())
}
<div id="hide_forever">
Div, который прячется навсегда
</div>
<button id="button1">Скрыть DIV</button>
<script>
const div = document.getElementById('hide_forever');
const button = document.getElementById('button1');
const status = localStorage.getItem('div_hidden');
if (status) {
div.style.display = 'none';
}
button.addEventListener('click', () => {
localStorage.setItem('div_hidden', '1');
div.style.display = 'none';
});
</script>
.env.example
с примерами настроек..env
файлы, во-первых, содержат критические данные (логины пароли от дб как минимум), во-вторых, зависят от окружения и могут отличаться на проде , деве и у каждого программиста в команде локально. const navbar = document.querySelector('.navbar');
window.addEventListener('scroll', function(){
navbar.classList.toggle('active', pageYOffset > 0);
});
$('.promocodes-text').each(function(){
const $desc = $('.promocode-text__description', this);
const $text = $('.promocode-more__text', this);
const $more = $('.promocode-more', this);
if ($text.is(':empty')) {
$more.addClass("hides");
}
$desc.click(function () {
if ($(window).width() < 575) {
$text.toggleClass("expand");
$more.toggleClass("hides");
}
});
});
const ms = 183000;
const s = ms / 1000;
const minutes = Math.floor(s / 60); // Оставляем только целую часть
const seconds = s % 60;
console.log(minutes + ':' + seconds); // "3:3"
Я вот непонял Вебшторм типа специально под JS создан или что?