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
* { | |
-webkit-box-sizing: border-box; | |
box-sizing: border-box; | |
} | |
body { | |
font-family: Arial, Helvetica, sans-serif; | |
} | |
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 forcedOriginalScale( containerId ) { | |
var App = document.getElementById( containerId ); | |
App.style.zoom = 1 / devicePixelRatio; | |
} | |
document.addEventListener("DOMContentLoaded", () => { | |
forcedOriginalScale('main-wrapper'); //выполняем функцию, передаём в неё id нашего контейнера | |
}); |
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
document.addEventListener("DOMContentLoaded", () => { | |
// ============================================================ | |
const animation = document.querySelector('.wrapper__progress').getAnimations()[0]; //На этом элементе у нас стоит CSS-анимация, мы её получаем | |
const outputProgress = document.querySelector('.count-progress'); | |
let curVal = 0; | |
const updateValue = () => { | |
if (animation && animation.currentTime) { | |
const newVal = animation.currentTime.value; | |
if (newVal != curVal) { |
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
picture | |
source(srcset="img/main-bg-small.png 700w" media="(max-width: 768px)") | |
source(srcset="img/main-bg-laptop.png 990w" media="(max-width: 992px)") | |
img(src="img/main-bg-desktop-2.png" loading="lazy" decoding="async" alt) |
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="box">Электрообору­дование</div> | |
* { | |
-webkit-box-sizing: border-box; | |
box-sizing: border-box; | |
} | |
body { | |
font-family: Arial; | |
} |
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
// $("#stars-default").rating(); // Вызов рейтинга | |
// Pug структура (пример) | |
// .acc-sect__form-rating#stars-default | |
// input(type="hidden", name="rating") | |
(function ($) { | |
$.fn.rating = function (method, options) { | |
method = method || "create"; |
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
input[type=date] | |
&::-webkit-inner-spin-button, &::-webkit-calendar-picker-indicator | |
cursor: pointer |
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
.text | |
display: -moz-box | |
display: -webkit-box | |
-moz-box-orient: vertical | |
-webkit-box-orient: vertical | |
-moz-line-clamp: 2 | |
-webkit-line-clamp: 2 | |
overflow: hidden |
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
// sass пример | |
input(type="date" placeholder="с") | |
input::before | |
color: #999 | |
content: attr(placeholder) | |
margin-right: 122px | |
input:focus::before | |
content: "" !important |
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 sections = document.querySelectorAll('.section'); | |
let navLinks = document.querySelectorAll('.main-header__nav a'); | |
window.onscroll = () => { | |
let header = document.querySelector('.main-header'); | |
sections.forEach(sec => { | |
let top = window.scrollY; | |
let height = sec.offsetHeight |
NewerOlder