><div class="box">
<div class="l">Lorem ipsum dolor sit amet consectetur adipisicing elit. Porro ex cum nesciunt non itaque perspiciatis odio reiciendis voluptates optio excepturi? Reprehenderit ut illo harum quia minima odio vel cupiditate repudiandae?</div>
<div class="r"> <div class="r__inner">Этот текст должен быть высотой не выше левой стороны, должен уходить в скролл, если надо. Lorem ipsum dolor sit amet consectetur adipisicing elit.</div></div>
</div>
.box {
display: flex;
border: 1px solid red;
}
.l {
flex: 0 0 75%;
}
.r {
flex: 0 0 25%;
overflow-y: auto;
position: relative;
}
.r__inner{
position: absolute;
top: 0;
left: 0;
}
.l, .r {
border: 1px solid blue;
font-size: 30px;
}
<div>
<span>123</span>
<p>Какой-то текст</p>
</div>
body{
background: gray;
}
div{
margin: 50px auto;
width: 200px;
height: 140px;
background: radial-gradient(40px 40px at center top, transparent 100%, red 100%);
position: relative;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
border-radius: 20px;
}
span{
width: 65px;
height: 65px;
border-radius: 50%;
color: firebrick;
background: aqua;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
top: -32px;
}
RouterProvider
, он может всё что и BrowserRouter
и даже больше location / {
allow 33.33.333.333;
deny all;
root /var/www/test/client/public;
try_files $uri $uri/ /index.html;
}
const canvas = document.createElement('canvas');
canvas.width = 500;
canvas.height = 500;
const ctx = canvas.getContext('2d');
document.body.append(canvas);
let img = new Image();
img.onload = () => {
ctx.drawImage(img, 0, 0);
}
img.src = "https://i.pinimg.com/originals/87/48/07/874807f8cb45e17f44312eb761261ad9.jpg";
В какой жизненный цикл разработки проекта на Next/React внедрять авторизацию пользователей?
const button = document.querySelector('.test');
const circle = document.querySelector('.circle');
button.addEventListener('click', () => {
circle.style.transform = `translate(-50%, -50%) rotate(${circle.style.transform+30}deg)`;
});
server {
listen 443 ssl;
ssl_certificate /etc/ssl/certificate.crt;
ssl_certificate_key /etc/ssl/private.key;
server_name alltech.home.com;
location /v1/doit/completions {
proxy_ssl_server_name on;
proxy_pass https://api.open.my/v1/doit/completions;
}
location / {
root /usr/share/nginx/html/;
autoindex off;
}
}
document.addEventListener( 'wpcf7mailsent', function( event ) {
location = 'https://site.com/thanks';
setTimeout(() => window.open('https://site.com/thanks2', "_blank"))
}, false );
.header__wrap{
min-height: 500px;
display: flex;
flex-direction: column;
}
.header__content{
flex: 1 1 0;
}
const arr = [
{
"name": "Грузинская ж. д.",
"Щебень гранитный не поименованный в алфавите": {
"amount": 275,
"stavka": 0,
"revenue": 0
}
},
{
"name": "Московская ж. д.",
"Щебень гранитный не поименованный в алфавите": {
"amount": 138,
"stavka": 0,
"revenue": 0
}
}
]
console.log(arr.map(n => ({ name: n.name, ...Object.values(n)[1] }) ))
Но когда я дописываю скрипт на проверку пагинации, он не работает
function is_paged() {
return window.location.pathname.split("/").includes('page')
}
какой код для фильтра писать, чтобы добавлялся класс я не знаю.
function isFilter(){
return window.location.pathname.split("/").some(n => n.split('=').includes('?filter_type_test'))
}
MutationObserver
const subtract = (v1, v2) => ({
x: v1.x - v2.x,
y: v1.y - v2.y
});
const magnitude = ({ x, y }) => Math.sqrt(x * x + y * y);
const pointDistance = (point1, point2) => magnitude(subtract(point1, point2));
const curveLength = (points) => {
let lastPoint = points[0];
const pointsSansFirst = points.slice(1);
return pointsSansFirst.reduce((acc, point) => {
const dist = pointDistance(point, lastPoint);
lastPoint = point;
return acc + dist;
}, 0);
};
$(document).on('change', 'input.variable_manage_stock', function (event) {
const variation = event.target.closest('.woocommerce_variation');
const checkbox = event.target;
const checkbox_on_off = checkbox.matches('input.variable_manage_stock:checked') && checkbox.value;
if (checkbox_on_off == 'on' && variation){}
if (checkbox_on_off == 'false'){}
});
let n = 0;
const interval = setInterval(() => {
if(n == 5){
clearInterval(interval);
return;
}
++n;
let t = n;
console.log(`вызов setInterval № ${t} спустя ${100}мс`)
setTimeout(() => {
console.log(`вызов setTimeout № ${t} спустя ${5000}мс`)
}, 5000)
}, 100)