feat: Добавлен плавающий виджет опроса (триггер + модальное окно, встроить Яндекс Формы)

This commit is contained in:
2026-08-01 11:47:48 +00:00
parent b0913ab7ef
commit aecd708bb5
2 changed files with 145 additions and 3 deletions
+73 -3
View File
@@ -6,12 +6,82 @@
for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)
})(window, document,'script','https://mc.yandex.ru/metrika/tag.js?id=106995329', 'ym');
ym(106995329, 'init', {ssr:true, webvisor:true, clickmap:true, ecommerce:"dataLayer", referrer: document.referrer, url: location.href, accurateTrackBounce:true, trackLinks:true});
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/106995329" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->
<!-- Dzen.Metrika counter -->
<meta name="zen-verification" content="GDc1yxlsRy03jcI1t8NJ8OTleUE3f4I4PEmfOBjz4KBCezoDX1WWctO3l8Z2HGEx" />
<!-- /Dzen.Metrika counter -->
<!-- /Dzen.Metrika counter -->
<!-- Survey widget: floating trigger + modal styles -->
<style>
#survey-trigger {
position: fixed;
z-index: 40;
display: inline-flex;
align-items: center;
gap: 10px;
padding: 14px 22px;
border-radius: 999px;
border: none;
background: #FF5A36;
color: #fff;
font-size: 16px;
font-weight: 600;
cursor: pointer;
opacity: 0;
transform: translateY(10px) scale(0.9);
pointer-events: none;
transition: opacity .25s ease, transform .25s ease, background .2s ease;
box-shadow: 0 4px 14px rgba(255,90,54,.45);
}
#survey-trigger:hover { background: #E8481F; }
#survey-trigger.is-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
#survey-trigger svg { width: 20px; height: 20px; flex-shrink: 0; }
.survey-modal {
position: fixed;
inset: 0;
z-index: 10000;
display: flex;
align-items: center;
justify-content: center;
padding: 16px;
}
.survey-modal[hidden] { display: none; }
.survey-modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.survey-modal__box {
position: relative;
width: 100%;
max-width: 680px;
max-height: calc(100vh - 32px);
max-height: calc(100dvh - 32px);
overflow-y: auto;
background: #fff;
border-radius: 12px;
padding: 44px 8px 8px;
}
.survey-modal__iframe {
width: 100%;
min-height: 420px;
border: 0;
display: block;
}
.survey-modal__close {
position: absolute;
top: 8px;
right: 8px;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
border: none;
background: #f2f2f2;
border-radius: 50%;
font-size: 20px;
line-height: 1;
cursor: pointer;
z-index: 1;
}
.survey-modal__close:hover { background: #e5e5e5; }
</style>