<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:yandex="http://news.yandex.ru" xmlns:turbo="http://turbo.yandex.ru" xmlns:media="http://search.yahoo.com/mrss/">
  <channel>
    <title>Кейсы</title>
    <link>https://lyapotaproduction.ru</link>
    <description/>
    <language>ru</language>
    <lastBuildDate>Tue, 16 Jun 2026 03:06:39 +0300</lastBuildDate>
    <item turbo="true">
      <title>Кампейн для для бренда lounge &amp;amp; slip wear</title>
      <link>https://lyapotaproduction.ru/cases/hkisjp3fr1-kampein-dlya-dlya-brenda-lounge-amp-slip</link>
      <amplink>https://lyapotaproduction.ru/cases/hkisjp3fr1-kampein-dlya-dlya-brenda-lounge-amp-slip?amp=true</amplink>
      <pubDate>Tue, 16 Jun 2026 03:00:00 +0300</pubDate>
      <author>Продюсер: Мария Наумова</author>
      <description>Смотреть кейс →</description>
      <turbo:content><![CDATA[<header><h1>Кампейн для для бренда lounge &amp; slip wear</h1></header><div class="t-redactor__embedcode"><script>
(function() {
  const state = { items: [], cur: 0, ready: false };

  function isContentImg(img) {
    return img.src &&
           img.src.includes('static.tildacdn.com') &&
           !img.src.includes('.svg') &&
           img.className === '';
  }

  function isKinescope(iframe) {
    return iframe.src && iframe.src.includes('kinescope.io');
  }

  function init() {
    const allItems = [];

    document.querySelectorAll('img, iframe').forEach(el => {
      if (el.tagName === 'IMG' && isContentImg(el)) allItems.push({type: 'img', el});
      if (el.tagName === 'IFRAME' && isKinescope(el)) allItems.push({type: 'video', el});
    });

    if (!allItems.length) return;
    if (state.ready) return;
    state.ready = true;

    allItems.forEach(item => {
      const wrap = item.el.closest('figure, p, div') || item.el.parentElement;
      wrap.style.display = 'none';
    });

    const slides = allItems.map(item => {
      if (item.type === 'img') {
        return `<div class="tg-slide"><img src="${item.el.src}"></div>`;
      } else {
        const videoSrc = item.el.src.includes('?')
          ? item.el.src + '&autoplay=1&muted=1'
          : item.el.src + '?autoplay=1&muted=1';
        return `<div class="tg-slide tg-slide-video">
          <iframe src="${videoSrc}" frameborder="0" allow="autoplay; fullscreen; muted" allowfullscreen style="width:100%;height:100%;"></iframe>
          <div class="tg-video-overlay"></div>
        </div>`;
      }
    }).join('');

    const gallery = document.createElement('div');
    gallery.id = 'tg-main';
    gallery.className = 'tg-gallery';
    gallery.innerHTML = `
      <div class="tg-track">${slides}</div>
      ${allItems.length > 1 ? `
        <button class="tg-prev">❮</button>
        <button class="tg-next">❯</button>
        <div class="tg-dots">
          ${allItems.map((item, i) => `<span class="tg-dot${i===0?' active':''}">${item.type==='video'?'▶':''}</span>`).join('')}
        </div>
        <div class="tg-counter">1 / ${allItems.length}</div>
      ` : ''}
    `;

    const firstWrap = allItems[0].el.closest('figure, p, div') || allItems[0].el.parentElement;
    firstWrap.parentElement.insertBefore(gallery, firstWrap);

    if (allItems.length < 2) return;

    const track = gallery.querySelector('.tg-track');
    const dots = gallery.querySelectorAll('.tg-dot');
    const counter = gallery.querySelector('.tg-counter');

    function goTo(n) {
      state.cur = (n + allItems.length) % allItems.length;
      track.style.transform = `translateX(-${state.cur * 100}%)`;
      dots.forEach((d, i) => d.classList.toggle('active', i === state.cur));
      counter.textContent = `${state.cur + 1} / ${allItems.length}`;
      gallery.querySelectorAll('.tg-video-overlay').forEach(o => o.style.display = '');
    }

    gallery.querySelector('.tg-prev').onclick = () => goTo(state.cur - 1);
    gallery.querySelector('.tg-next').onclick = () => goTo(state.cur + 1);

    let sx = 0;
    let sy = 0;
    let swiping = false;

    gallery.addEventListener('touchstart', e => {
      sx = e.touches[0].clientX;
      sy = e.touches[0].clientY;
      swiping = false;
    }, {passive: true});

    gallery.addEventListener('touchmove', e => {
      const dx = Math.abs(e.touches[0].clientX - sx);
      const dy = Math.abs(e.touches[0].clientY - sy);
      if (dx > dy && dx > 10) {
        swiping = true;
        e.preventDefault();
      }
    }, {passive: false});

    gallery.addEventListener('touchend', e => {
      const dx = sx - e.changedTouches[0].clientX;
      if (swiping && Math.abs(dx) > 40) {
        goTo(dx > 0 ? state.cur + 1 : state.cur - 1);
      }
    }, {passive: true});

    gallery.querySelectorAll('.tg-video-overlay').forEach(overlay => {
      overlay.addEventListener('click', () => {
        overlay.style.display = 'none';
      });
    });
  }

  init();
  window.addEventListener('load', init);
})();
</script>

<style>
.tg-gallery {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: #111;
}
.tg-track {
  display: flex;
  height: 100%;
  transition: transform 0.35s ease;
}
.tg-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}
.tg-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tg-slide-video iframe {
  width: 100%;
  height: 100%;
}
.tg-video-overlay {
  display: none;
}
@media (max-width: 640px) {
  .tg-video-overlay {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 5;
    background: transparent;
  }
}
.tg-prev, .tg-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  z-index: 10;
}
.tg-prev { left: 12px; }
.tg-next { right: 12px; }
.tg-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
}
.tg-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  font-size: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.tg-dot.active { background: #fff; }
.tg-counter {
  position: absolute;
  top: 12px;
  right: 12px;
  color: #fff;
  font-size: 12px;
  background: rgba(0,0,0,0.4);
  padding: 2px 8px;
  border-radius: 10px;
}
@media (max-width: 640px) {
  .tg-prev, .tg-next { display: none; }
}
</style></div><img src="https://static.tildacdn.com/tild6637-6236-4364-b563-356436616561/DSC_9987.JPG"><img src="https://static.tildacdn.com/tild3164-3535-4762-b864-376461313338/DSC_9720.JPG"><img src="https://static.tildacdn.com/tild3234-6337-4139-b031-313462643738/DSC_0163.JPG"><img src="https://static.tildacdn.com/tild3930-3935-4962-a134-346363396331/DSC_9756.JPG"><img src="https://static.tildacdn.com/ffb6456b-781b-40e8-9517-ffb5225e8bcd/imgfish.jpg"><img src="https://static.tildacdn.com/ffb6456b-781b-40e8-9517-ffb5225e8bcd/imgfish.jpg"><img src="https://static.tildacdn.com/ffb6456b-781b-40e8-9517-ffb5225e8bcd/imgfish.jpg"><img src="https://static.tildacdn.com/ffb6456b-781b-40e8-9517-ffb5225e8bcd/imgfish.jpg"><img src="https://static.tildacdn.com/ffb6456b-781b-40e8-9517-ffb5225e8bcd/imgfish.jpg"><img src="https://static.tildacdn.com/ffb6456b-781b-40e8-9517-ffb5225e8bcd/imgfish.jpg"><h2  class="t-redactor__h2">О проекте:</h2>]]></turbo:content>
    </item>
  </channel>
</rss>
