Commit aae0ddc4 authored by Simonas's avatar Simonas

in progress

parent 9f9866d4
...@@ -91,13 +91,16 @@ ...@@ -91,13 +91,16 @@
.c-btn--popup { .c-btn--popup {
width: 100%; width: 100%;
max-width: 223px;
padding: 13px 24px 12px; padding: 13px 24px 12px;
background-color: #fff; background-color: #fff;
color: #3eb0b1; color: #3eb0b1;
font-size: 15px; font-size: 15px;
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
@media (--min--x-small) {
max-width: 223px;
}
} }
.c-btn--loading { .c-btn--loading {
......
...@@ -2,30 +2,43 @@ ...@@ -2,30 +2,43 @@
/* critical:start */ /* critical:start */
.c-contact-landing-2 { padding: 90px 0 0; background: url(/wp-content/themes/biuro/i/sections/landing-2-xl.jpg) no-repeat 0 0; .c-contact-landing-2 {
padding: 90px 0 0;
background-position: 0 0;
background-repeat: no-repeat;
background-size: cover; background-size: cover;
@media (--max--xxxx-small) { @media (--max--xxxx-small) {
background-size: cover !important; background-size: cover !important;
} }
@media (--max--x-small) { @media (--max--x-small) {
background-size: 250%; background-size: 250%;
} }
@media (--max--medium) { @media (--max--medium) {
margin: 0 auto; margin: 0 auto;
} }
@media (--min--medium) { @media (--min--medium) {
padding: 195px 0 50px; padding: 195px 0 50px;
} }
} }
@supports (background-image: -webkit-image-set(url(/wp-content/themes/biuro/i/sections/landing-2-xl.webp) 1x)) { .no-js,
.js.no-webp {
.c-contact-landing-2 { background-image: url(/wp-content/themes/biuro/i/sections/landing-2-xl.jpg); }
}
.js.webp {
.c-contact-landing-2 { background-image: url(/wp-content/themes/biuro/i/sections/landing-2-xl.webp); } .c-contact-landing-2 { background-image: url(/wp-content/themes/biuro/i/sections/landing-2-xl.webp); }
} }
.c-contact-landing-2--inner { /* */ .c-contact-landing-2--inner {
@media (--max--medium) { @media (--max--medium) {
padding: 0 10px; padding: 0 10px;
} }
@media (--min--medium) { @media (--min--medium) {
display: flex; justify-content: space-between; max-width: 940px; margin: 0 auto; border-radius: 3px; background: rgba(0, 66, 180, 0.78); display: flex; justify-content: space-between; max-width: 940px; margin: 0 auto; border-radius: 3px; background: rgba(0, 66, 180, 0.78);
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
/* critical:start */ /* critical:start */
.c-popup { .c-popup {
/*display: none;*/ display: none;
} }
/* critical:end */ /* critical:end */
...@@ -32,61 +32,110 @@ ...@@ -32,61 +32,110 @@
} }
.c-popup--inner { .c-popup--inner {
display: flex;
justify-content: space-around;
align-items: center;
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
display: flex;
justify-content: space-around;
align-items: center;
flex-direction: column;
width: 786px; width: 786px;
height: 446px;
max-width: 96%; max-width: 96%;
max-height: 96%; max-height: 96%;
margin: 0 auto; margin: 0 auto;
padding: 20px; padding: 20px;
background: #3eb0b1; background-color: #3eb0b1;
background-position: 16px 90%;
background-size: 200px;
background-repeat: no-repeat;
color: #fff; color: #fff;
@media (max-height: 24em) {
background-image: none !important;
}
@media (--min--x-small) {
height: 446px;
flex-direction: row;
background-position: 20px 0;
background-size: auto;
}
}
.no-js,
.js.no-webp {
.c-popup--inner { background-image: url(/wp-content/themes/biuro/i/recommend.png); }
}
.js.webp {
.c-popup--inner { background-image: url(/wp-content/themes/biuro/i/recommend.webp); }
} }
.c-popup--logos { .c-popup--logos {
padding-top: 60px;
@media (max-height: 24em) {
display: none;
}
@media (--max--x-small) {
order: 2;
width: 100%;
}
@media (--min--x-small) {
flex: 0 1 303px; flex: 0 1 303px;
border: 1px solid #f00;
padding-top: 160px; padding-top: 160px;
}
} }
.c-popup--content { .c-popup--content {
flex: 0 1 303px;
border: 1px solid #00f;
font-size: 13px; font-size: 13px;
line-height: 15px; line-height: 15px;
@media (--max--x-small) {
order: 1;
}
@media (--min--x-small) {
flex: 0 1 303px;
}
} }
.c-popup--amount { .c-popup--amount {
position: relative; position: relative;
margin: 0 auto;
left: 31px;
bottom: -16px; bottom: -16px;
width: 108px; width: 78px;
height: 108px; height: 78px;
background: #004ed7; background: #004ed7;
opacity: 0.85; opacity: 0.85;
color: #fff; color: #fff;
font-size: 22px; font-size: 17px;
line-height: 20px;
font-weight: bold; font-weight: bold;
letter-spacing: 0.17px; letter-spacing: 0.17px;
line-height: 25px;
border-radius: 50%; border-radius: 50%;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin: 0 0 0 auto;
@media (--min--x-small) {
margin: 0 auto;
left: 31px;
width: 108px;
height: 108px;
font-size: 22px;
line-height: 25px;
}
} }
.c-popup--gift { .c-popup--gift {
position: relative; position: relative;
margin: 0 auto; margin: 0 43px 0 auto;
width: 70px; width: 50px;
height: 70px; height: 50px;
box-shadow: 0 2px 12px 0 rgba(146,141,141,.5); box-shadow: 0 2px 12px 0 rgba(146,141,141,.5);
background-color: #fff; background-color: #fff;
border-radius: 50%; border-radius: 50%;
...@@ -94,6 +143,12 @@ ...@@ -94,6 +143,12 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
@media (--min--x-small) {
margin: 0 auto;
width: 70px;
height: 70px;
}
} }
.c-popup--headline { .c-popup--headline {
...@@ -101,7 +156,7 @@ ...@@ -101,7 +156,7 @@
line-height: 33px; line-height: 33px;
color: inherit; color: inherit;
@media (min-width: 480px) { @media (--min--x-small) {
margin-bottom: 56px; margin-bottom: 56px;
} }
} }
...@@ -110,7 +165,7 @@ ...@@ -110,7 +165,7 @@
font-size: 15px; font-size: 15px;
line-height: 24px; line-height: 24px;
@media (min-width: 480px) { @media (--min--x-small) {
margin-bottom: 24px; margin-bottom: 24px;
} }
} }
...@@ -17,11 +17,30 @@ ...@@ -17,11 +17,30 @@
.c-recommend--anchor { position: relative; border-bottom: 1px solid #fff; padding: 3px 0; } .c-recommend--anchor { position: relative; border-bottom: 1px solid #fff; padding: 3px 0; }
.c-recommend { position: relative; overflow: hidden; .c-recommend {
&:before { position: relative;
content: ''; position: absolute; width: 221px; height: 253px; top: 15%; left: 50%; background: url(/wp-content/themes/biuro/i/recommend.png) 0 0 repeat; background-size: cover; transform: rotate(-20deg); overflow: hidden;
&::before {
content: '';
position: absolute;
width: 221px;
height: 253px;
top: 15%;
left: 50%;
background-position: 0 0;
background-size: cover;
transform: rotate(-20deg);
} }
strong { display: inline-block; padding: 3px 5px; border-radius: 4px; background: #004ed4; font-weight: 700; }
strong {
display: inline-block;
padding: 3px 5px;
border-radius: 4px;
background: #004ed4;
font-weight: 700;
}
&:hover { &:hover {
.c-recommend--headline, .c-recommend--headline,
.c-recommend--anchor { color: #9adbdc; } .c-recommend--anchor { color: #9adbdc; }
...@@ -29,10 +48,15 @@ ...@@ -29,10 +48,15 @@
} }
} }
@supports (background-image: -webkit-image-set(url(/wp-content/themes/biuro/i/recommend.webp) 1x)) { .no-js,
.js.no-webp {
.c-recommend { .c-recommend {
&:before { &::before { background-image: url(/wp-content/themes/biuro/i/recommend.png); }
background-image: url(/wp-content/themes/biuro/i/recommend.webp) ;
} }
}
.js.webp {
.c-recommend {
&::before { background-image: url(/wp-content/themes/biuro/i/recommend.webp); }
} }
} }
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
?> ?>
<script src="/wp-content/themes/biuro/js/main.min.js" async defer></script> <script src="/wp-content/themes/biuro/js/main-b70b7bcb.min.js" async defer></script>
<script src="/wp-content/themes/biuro/js/vendor/modernizr-custom.js" async defer></script> <script src="/wp-content/themes/biuro/js/vendor/modernizr-custom.js" async defer></script>
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-500.woff2" crossorigin="anonymous" > <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-500.woff2" crossorigin="anonymous" >
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-regular.woff2" crossorigin="anonymous" > <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-regular.woff2" crossorigin="anonymous" >
<style><?php include 'css/core.min.css'; ?></style> <style><?php include 'css/core-cff57f3cfd.min.css'; ?></style>
<script> <script>
document.documentElement.classList.replace('no-js', 'js'); document.documentElement.classList.replace('no-js', 'js');
...@@ -36,13 +36,13 @@ ...@@ -36,13 +36,13 @@
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-300.woff2" crossorigin="anonymous" > <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-300.woff2" crossorigin="anonymous" >
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-700.woff2" crossorigin="anonymous" > <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-700.woff2" crossorigin="anonymous" >
<link rel="preload" href="/wp-content/themes/biuro/css/main.min.css" as="style" onload="this.rel='stylesheet'"> <link rel="preload" href="/wp-content/themes/biuro/css/main-87437ef5f2.min.css" as="style" onload="this.rel='stylesheet'">
<link rel="preconnect" href="https://www.gstatic.com"> <link rel="preconnect" href="https://www.gstatic.com">
<link rel="preconnect" href="https://fonts.gstatic.com"> <link rel="preconnect" href="https://fonts.gstatic.com">
<noscript> <noscript>
<link rel="stylesheet" href="/wp-content/themes/biuro/css/main.min.css"> <link rel="stylesheet" href="/wp-content/themes/biuro/css/main-87437ef5f2.min.css">
</noscript> </noscript>
<?php wp_head(); ?> <?php wp_head(); ?>
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-500.woff2" crossorigin="anonymous" > <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-500.woff2" crossorigin="anonymous" >
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-regular.woff2" crossorigin="anonymous" > <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-regular.woff2" crossorigin="anonymous" >
<style><?php include 'css/core.min.css'; ?></style> <style><?php include 'css/core-cff57f3cfd.min.css'; ?></style>
<script> <script>
document.documentElement.classList.replace('no-js', 'js'); document.documentElement.classList.replace('no-js', 'js');
...@@ -36,13 +36,13 @@ ...@@ -36,13 +36,13 @@
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-300.woff2" crossorigin="anonymous" > <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-300.woff2" crossorigin="anonymous" >
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-700.woff2" crossorigin="anonymous" > <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-700.woff2" crossorigin="anonymous" >
<link rel="preload" href="/wp-content/themes/biuro/css/main.min.css" as="style" onload="this.rel='stylesheet'"> <link rel="preload" href="/wp-content/themes/biuro/css/main-87437ef5f2.min.css" as="style" onload="this.rel='stylesheet'">
<link rel="preconnect" href="https://www.gstatic.com"> <link rel="preconnect" href="https://www.gstatic.com">
<link rel="preconnect" href="https://fonts.gstatic.com"> <link rel="preconnect" href="https://fonts.gstatic.com">
<noscript> <noscript>
<link rel="stylesheet" href="/wp-content/themes/biuro/css/main.min.css"> <link rel="stylesheet" href="/wp-content/themes/biuro/css/main-87437ef5f2.min.css">
</noscript> </noscript>
<?php wp_head(); ?> <?php wp_head(); ?>
......
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{6:function(e,t,n){"use strict";n.r(t);const o=e=>{if(!e)return;const t=e.parentNode.nextElementSibling;if(!t||!t.classList.contains("c-accordion--content"))return;const n=e.classList.contains("c-accordion--header--is-expanded");n?(e=>{const t=e.scrollHeight,n=e.style.transition;e.style.transition="",requestAnimationFrame(()=>{e.style.height=t+"px",e.style.transition=n,requestAnimationFrame(()=>{e.style.height="0px"})})})(t):(history.pushState({},"",e.hash),requestAnimationFrame(()=>{(e=>{const t=e.offsetTop-(Math.max(document.documentElement.clientWidth,window.innerWidth||0)<960?72:117);window.scrollTo({top:t,behavior:"smooth"}),e.blur()})(e),requestAnimationFrame(()=>{(e=>{const t=e.scrollHeight,n=t=>{e.removeEventListener("transitionend",n)};e.style.height=t+"px",e.addEventListener("transitionend",n)})(t)})})),e.classList.toggle("c-accordion--header--is-expanded",!n)};t.default=()=>{document.querySelectorAll(".c-accordion--content").forEach(e=>{e.classList.add("c-accordion--content--is-collapsed")}),window.location.hash&&o(document.querySelector(window.location.hash)),document.querySelectorAll(".js-accordion--header").forEach(e=>{e.addEventListener("click",t=>{t.preventDefault(),o(e)})})}}}]);
\ No newline at end of file
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["accordion"],{
/***/ "./wp-content/themes/biuro/js/components/accordion/accordion.js":
/*!**********************************************************************!*\
!*** ./wp-content/themes/biuro/js/components/accordion/accordion.js ***!
\**********************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nconst collapseContent = n => {\n const h = n.scrollHeight;\n const t = n.style.transition;\n n.style.transition = '';\n requestAnimationFrame(() => {\n n.style.height = h + 'px';\n n.style.transition = t;\n requestAnimationFrame(() => {\n n.style.height = 0 + 'px';\n });\n });\n};\n\nconst expandContent = n => {\n const h = n.scrollHeight;\n\n const done = e => {\n n.removeEventListener('transitionend', done);\n };\n\n n.style.height = h + 'px';\n n.addEventListener('transitionend', done);\n};\n\nconst scrollToSection = header => {\n const top = header.offsetTop - (Math.max(document.documentElement.clientWidth, window.innerWidth || 0) < 960 ? 72 : 117);\n window.scrollTo({\n top: top,\n behavior: 'smooth'\n });\n header.blur();\n};\n\nconst toggleSection = header => {\n if (!header) {\n return;\n }\n\n const node = header.parentNode.nextElementSibling;\n\n if (!node || !node.classList.contains('c-accordion--content')) {\n return;\n }\n\n const isOpen = header.classList.contains('c-accordion--header--is-expanded');\n\n if (isOpen) {\n collapseContent(node);\n } else {\n history.pushState({}, '', header.hash);\n requestAnimationFrame(() => {\n scrollToSection(header);\n requestAnimationFrame(() => {\n expandContent(node);\n });\n });\n }\n\n header.classList.toggle('c-accordion--header--is-expanded', !isOpen);\n};\n\nconst inititateAccordion = () => {\n document.querySelectorAll('.c-accordion--content').forEach(content => {\n content.classList.add('c-accordion--content--is-collapsed');\n });\n\n if (window.location.hash) {\n toggleSection(document.querySelector(window.location.hash));\n }\n\n document.querySelectorAll('.js-accordion--header').forEach(header => {\n header.addEventListener('click', e => {\n e.preventDefault();\n toggleSection(header);\n });\n });\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (inititateAccordion);\n\n//# sourceURL=webpack:///./wp-content/themes/biuro/js/components/accordion/accordion.js?");
/***/ })
}]);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{10:function(e,o,t){"use strict";t.r(o);const n=e=>new Promise((o,t)=>{const n=document.createElement("script");n.src=e,n.async=!0,n.onload=o,n.onerror=t,document.head.appendChild(n)});let c=!0;function a(){const e=document.querySelector("#copy-tooltip");e&&(e.style.opacity=1,setTimeout(()=>{e.style.opacity=0},3e3))}function r(e){if(!navigator.clipboard)return function(e){var o=document.createElement("textarea");o.className="u-hidden",o.value=e,document.querySelector(".c-share").appendChild(o),o.focus(),o.select();try{var t=document.execCommand("copy")?"successful":"unsuccessful";console.log("Fallback: Copying text command was "+t)}catch(e){console.error("Fallback: Oops, unable to copy",e)}document.body.removeChild(o)}(e),void a();navigator.clipboard.writeText(e).then((function(){a()}),(function(e){console.error("Async: Could not copy text: ",e)}))}window.onfocus=function(){c=!0},window.onblur=function(){c=!1};o.default=()=>{document.querySelector(".js-copy-to-clipboard")&&document.querySelector(".js-copy-to-clipboard").addEventListener("click",e=>{e.preventDefault(),r(window.location.origin+window.location.pathname+"?utm_source=copy_share_button_job_page ")});const e=document.querySelector(".js-share-messenger");e&&e.addEventListener("click",e=>{e.preventDefault();const o=e.currentTarget;window.location.href="fb-messenger://share/?link="+encodeURIComponent(window.location.origin+window.location.pathname+"?utm_source=messenger_share_button_job_page&app_id="+o.dataset.id),setTimeout(()=>{!document.hidden&&c&&(window.location.href=o.href)},100)});const o=document.querySelector(".js-share-whatsapp");o&&o.addEventListener("click",e=>{e.preventDefault();const o=e.currentTarget;window.location.href="whatsapp://send?text="+o.dataset.text,setTimeout(()=>{!document.hidden&&c&&window.open(o.href,"_blank")},100)});const t=document.querySelector(".js-biuro-facebook");t&&setTimeout(()=>{!async function(e){n("https://connect.facebook.net/en_US/sdk.js").then(()=>{window.FB&&window.FB.init({appId:e,version:"v3.3",status:!0,xfbml:!0})})}(t.dataset.id)},1500)}}}]);
\ No newline at end of file
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["job-share"],{
/***/ "./wp-content/themes/biuro/js/components/job-share/job-share.js":
/*!**********************************************************************!*\
!*** ./wp-content/themes/biuro/js/components/job-share/job-share.js ***!
\**********************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nconst loadJS = src => {\n return new Promise((resolve, reject) => {\n const s = document.createElement('script');\n s.src = src;\n s.async = true;\n s.onload = resolve;\n s.onerror = reject;\n document.head.appendChild(s);\n });\n};\n\nasync function inititateFacebook(ID) {\n loadJS('https://connect.facebook.net/en_US/sdk.js').then(() => {\n if (!window.FB) {\n return;\n }\n\n window.FB.init({\n appId: ID,\n version: 'v3.3',\n status: true,\n xfbml: true\n });\n });\n}\n\nlet isPageActive = true;\n\nwindow.onfocus = function () {\n isPageActive = true;\n};\n\nwindow.onblur = function () {\n isPageActive = false;\n};\n\nfunction fallbackCopyTextToClipboard(text) {\n var textArea = document.createElement('textarea');\n textArea.className = 'u-hidden';\n textArea.value = text;\n document.querySelector('.c-share').appendChild(textArea);\n textArea.focus();\n textArea.select();\n\n try {\n var successful = document.execCommand('copy');\n var msg = successful ? 'successful' : 'unsuccessful';\n console.log('Fallback: Copying text command was ' + msg);\n } catch (err) {\n console.error('Fallback: Oops, unable to copy', err);\n }\n\n document.body.removeChild(textArea);\n}\n\nfunction showCopyTooltip() {\n const tooltip = document.querySelector('#copy-tooltip');\n\n if (tooltip) {\n tooltip.style.opacity = 1;\n setTimeout(() => {\n tooltip.style.opacity = 0;\n }, 3000);\n }\n}\n\nfunction copyTextToClipboard(text) {\n if (!navigator.clipboard) {\n fallbackCopyTextToClipboard(text);\n showCopyTooltip();\n return;\n }\n\n navigator.clipboard.writeText(text).then(function () {\n showCopyTooltip();\n }, function (err) {\n console.error('Async: Could not copy text: ', err);\n });\n}\n\nconst inititateJobShare = () => {\n if (document.querySelector('.js-copy-to-clipboard')) {\n document.querySelector('.js-copy-to-clipboard').addEventListener('click', e => {\n e.preventDefault();\n copyTextToClipboard(window.location.origin + window.location.pathname + '?utm_source=copy_share_button_job_page ');\n });\n }\n\n const messenger = document.querySelector('.js-share-messenger');\n\n if (messenger) {\n messenger.addEventListener('click', e => {\n e.preventDefault();\n const target = e.currentTarget;\n window.location.href = 'fb-messenger://share/?link=' + encodeURIComponent(window.location.origin + window.location.pathname + '?utm_source=messenger_share_button_job_page&app_id=' + target.dataset.id);\n setTimeout(() => {\n if (document.hidden || !isPageActive) {\n return;\n }\n\n window.location.href = target.href;\n }, 100);\n });\n }\n\n const whatsapp = document.querySelector('.js-share-whatsapp');\n\n if (whatsapp) {\n whatsapp.addEventListener('click', e => {\n e.preventDefault();\n const target = e.currentTarget;\n window.location.href = 'whatsapp://send?text=' + target.dataset.text;\n setTimeout(() => {\n if (document.hidden || !isPageActive) {\n return;\n }\n\n window.open(target.href, '_blank');\n }, 100);\n });\n }\n\n const facebook = document.querySelector('.js-biuro-facebook');\n\n if (facebook) {\n setTimeout(() => {\n inititateFacebook(facebook.dataset.id);\n }, 1500);\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (inititateJobShare);\n\n//# sourceURL=webpack:///./wp-content/themes/biuro/js/components/job-share/job-share.js?");
/***/ })
}]);
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{9:function(e,t,n){"use strict";var o;function i(e,t){const n=function(){function e(e,t,n="top"){this.position=e;var o=document.createElement("div");o.innerHTML=t||"",o.classList.add("popup-bubble"),o.classList.add("popup-bubble--"+n);var i=document.createElement("div");i.classList.add("popup-bubble-anchor"),i.appendChild(o),this.containerDiv=document.createElement("div"),this.containerDiv.classList.add("popup-container"),this.containerDiv.appendChild(i),window.google.maps.OverlayView.preventMapHitsAndGesturesFrom(this.containerDiv)}return e.prototype=Object.create(window.google.maps.OverlayView.prototype),e.prototype.onAdd=function(){this.getPanes().floatPane.appendChild(this.containerDiv)},e.prototype.onRemove=function(){this.containerDiv.parentElement&&this.containerDiv.parentElement.removeChild(this.containerDiv)},e.prototype.draw=function(){var e=this.getProjection().fromLatLngToDivPixel(this.position),t=Math.abs(e.x)<4e3&&Math.abs(e.y)<4e3?"block":"none";"block"===t&&(this.containerDiv.style.left=e.x+"px",this.containerDiv.style.top=e.y+"px"),this.containerDiv.style.display!==t&&(this.containerDiv.style.display=t)},e}(),o=new window.google.maps.LatLngBounds;let i;for(var s=0;s<t.length;s++){const a=t[s],l=new window.google.maps.LatLng(a.lat,a.lng);i=new n(l,a.title,a.pos),i.setMap(e),o.extend(l)}e.fitBounds(o)}function s(e,t,n){for(var i=new window.google.maps.LatLngBounds,s=0;s<t.length;s++){const l=t[s],d=new window.google.maps.LatLng(l.lat,l.lng);var a=new window.google.maps.Marker({position:d,map:e,icon:"/wp-content/themes/biuro/i/ico--map-pin.svg",title:l.title||""});o&&o.close(),i.extend(d),l.content&&(a.content=l.content,window.google.maps.event.addListener(a,"click",(function(){o&&o.close(),(o=new window.google.maps.InfoWindow({content:this.content})).open(e,this)}))),n&&(window.innerWidth<960&&window.scrollTo(0,0),new google.maps.event.trigger(a,"click"))}e.fitBounds(i),window.innerWidth>1020?e.panBy(250,0):window.innerWidth>959&&e.panBy(180,0)}function a(e){var t=new window.google.maps.Map(e,{}),n=new window.google.maps.StyledMapType([{featureType:"all",elementType:"all",stylers:[{saturation:-92},{lightness:-8},{hue:"#004ed4"}]},{featureType:"water",elementType:"all",stylers:[{saturation:-95},{lightness:-25},{hue:"#004ed4"}]}],{name:"Biuro"});return t.mapTypes.set("biuro",n),t.setMapTypeId("biuro"),window.google.maps.event.addListenerOnce(t,"bounds_changed",(function(){this.getZoom()>15&&this.setZoom(14)})),t}n.r(t);t.default=()=>{const e=document.getElementById("js-map--divisions");e&&fetch("/wp-json/api/v1/divisions?langID="+e.dataset.id).then(e=>e.json()).then(t=>{!function e(t,n){if(!window.google)return void setTimeout(()=>{e(t,n)},250);var o=a(t);let i=[];Object.keys(n).forEach(e=>{const t=n[e];"city"===e.substr(0,4)&&(i=i.concat(t))}),document.querySelectorAll(".js-division").forEach(e=>{e.addEventListener("click",()=>{const t=e&&e.dataset.id?e.dataset.id:"";n[t]?s(o,n[t].filter(e=>e.lat&&e.lng),!0):s(o,i.filter(e=>e.lat&&e.lng))})}),s(o,i.filter(e=>e.lat&&e.lng))}(e,t)});const t=document.getElementById("js-map--cities");t&&fetch("/wp-content/themes/biuro/json/"+t.dataset.source+".json").then(e=>e.json()).then(e=>{!function e(t,n){window.google?i(a(t),n):setTimeout(()=>{e(t,n)},250)}(t,e)});const n=document.getElementById("js-map--regions");n&&function e(t){if(!window.google)return void setTimeout(()=>{e(t)},250);s(a(t),[{title:"Vilnius",lat:54.687157,lng:25.279652},{title:"Rīga",lat:56.946285,lng:24.105078},{title:"Tallinn",lat:59.436962,lng:24.753574}])}(n)}}}]);
\ No newline at end of file
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["map"],{
/***/ "./wp-content/themes/biuro/js/components/map/map.js":
/*!**********************************************************!*\
!*** ./wp-content/themes/biuro/js/components/map/map.js ***!
\**********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n// https://developers-dot-devsite-v2-prod.appspot.com/maps/documentation/javascript/examples/overlay-popup\nfunction createPopupClass() {\n function Popup(position, city, pos = 'top') {\n this.position = position;\n var content = document.createElement('div');\n content.innerHTML = city || '';\n content.classList.add('popup-bubble');\n content.classList.add('popup-bubble--' + pos); // This zero-height div is positioned at the bottom of the bubble.\n\n var bubbleAnchor = document.createElement('div');\n bubbleAnchor.classList.add('popup-bubble-anchor');\n bubbleAnchor.appendChild(content); // This zero-height div is positioned at the bottom of the tip.\n\n this.containerDiv = document.createElement('div');\n this.containerDiv.classList.add('popup-container');\n this.containerDiv.appendChild(bubbleAnchor); // Optionally stop clicks, etc., from bubbling up to the map.\n\n window.google.maps.OverlayView.preventMapHitsAndGesturesFrom(this.containerDiv);\n } // ES5 magic to extend google.maps.OverlayView.\n\n\n Popup.prototype = Object.create(window.google.maps.OverlayView.prototype);\n /** Called when the popup is added to the map. */\n\n Popup.prototype.onAdd = function () {\n this.getPanes().floatPane.appendChild(this.containerDiv);\n };\n /** Called when the popup is removed from the map. */\n\n\n Popup.prototype.onRemove = function () {\n if (this.containerDiv.parentElement) {\n this.containerDiv.parentElement.removeChild(this.containerDiv);\n }\n };\n /** Called each frame when the popup needs to draw itself. */\n\n\n Popup.prototype.draw = function () {\n var divPosition = this.getProjection().fromLatLngToDivPixel(this.position); // Hide the popup when it is far out of view.\n\n var display = Math.abs(divPosition.x) < 4000 && Math.abs(divPosition.y) < 4000 ? 'block' : 'none';\n\n if (display === 'block') {\n this.containerDiv.style.left = divPosition.x + 'px';\n this.containerDiv.style.top = divPosition.y + 'px';\n }\n\n if (this.containerDiv.style.display !== display) {\n this.containerDiv.style.display = display;\n }\n };\n\n return Popup;\n}\n\nvar info;\n\nfunction setCitiesMarkers(map, positions) {\n const Popup = createPopupClass();\n const bounds = new window.google.maps.LatLngBounds();\n let popup;\n\n for (var i = 0; i < positions.length; i++) {\n const position = positions[i];\n const pos = new window.google.maps.LatLng(position.lat, position.lng);\n popup = new Popup(pos, position.title, position.pos);\n popup.setMap(map);\n bounds.extend(pos);\n }\n\n map.fitBounds(bounds);\n}\n\nfunction setMarkers(map, positions, focus) {\n var bounds = new window.google.maps.LatLngBounds();\n\n for (var i = 0; i < positions.length; i++) {\n const position = positions[i];\n const pos = new window.google.maps.LatLng(position.lat, position.lng);\n var marker = new window.google.maps.Marker({\n position: pos,\n map: map,\n icon: '/wp-content/themes/biuro/i/ico--map-pin.svg',\n title: position.title || ''\n });\n\n if (info) {\n info.close();\n }\n\n bounds.extend(pos);\n\n if (position.content) {\n marker.content = position.content;\n window.google.maps.event.addListener(marker, 'click', function () {\n if (info) {\n info.close();\n }\n\n info = new window.google.maps.InfoWindow({\n content: this.content\n });\n info.open(map, this);\n });\n }\n\n if (focus) {\n if (window.innerWidth < 960) {\n window.scrollTo(0, 0);\n }\n\n new google.maps.event.trigger(marker, 'click');\n }\n }\n\n map.fitBounds(bounds);\n\n if (window.innerWidth > 1020) {\n map.panBy(250, 0);\n } else if (window.innerWidth > 959) {\n map.panBy(180, 0);\n }\n}\n\nfunction setGoogleMap(node) {\n const mapStyles = [{\n featureType: 'all',\n elementType: 'all',\n stylers: [{\n saturation: -92\n }, {\n lightness: -8\n }, {\n hue: '#004ed4'\n }]\n }, {\n featureType: 'water',\n elementType: 'all',\n stylers: [{\n saturation: -95\n }, {\n lightness: -25\n }, {\n hue: '#004ed4'\n }]\n }];\n var map = new window.google.maps.Map(node, {});\n var biuroMap = new window.google.maps.StyledMapType(mapStyles, {\n name: 'Biuro'\n });\n map.mapTypes.set('biuro', biuroMap);\n map.setMapTypeId('biuro');\n window.google.maps.event.addListenerOnce(map, 'bounds_changed', function () {\n if (this.getZoom() > 15) {\n this.setZoom(14);\n }\n });\n return map;\n}\n\nfunction initCitiesMap(node, cities) {\n if (!window.google) {\n setTimeout(() => {\n initCitiesMap(node, cities);\n }, 250);\n return;\n }\n\n var map = setGoogleMap(node);\n setCitiesMarkers(map, cities);\n}\n\nfunction initRegionsMap(node) {\n if (!window.google) {\n setTimeout(() => {\n initRegionsMap(node);\n }, 250);\n return;\n }\n\n var map = setGoogleMap(node);\n const regions = [{\n title: 'Vilnius',\n lat: 54.687157,\n lng: 25.279652\n }, {\n title: 'Rīga',\n lat: 56.946285,\n lng: 24.105078\n }, {\n title: 'Tallinn',\n lat: 59.436962,\n lng: 24.753574\n }];\n setMarkers(map, regions);\n}\n\nfunction initDivisionsMap(node, data) {\n if (!window.google) {\n setTimeout(() => {\n initDivisionsMap(node, data);\n }, 250);\n return;\n }\n\n var map = setGoogleMap(node);\n let divisions = [];\n Object.keys(data).forEach(key => {\n const division = data[key];\n\n if (key.substr(0, 4) === 'city') {\n divisions = divisions.concat(division);\n }\n });\n document.querySelectorAll('.js-division').forEach(node => {\n node.addEventListener('click', () => {\n const ID = node && node.dataset.id ? node.dataset.id : '';\n\n if (data[ID]) {\n setMarkers(map, data[ID].filter(d => {\n return d.lat && d.lng;\n }), true);\n } else {\n setMarkers(map, divisions.filter(d => {\n return d.lat && d.lng;\n }));\n }\n });\n });\n setMarkers(map, divisions.filter(d => {\n return d.lat && d.lng;\n }));\n}\n\nconst inititateMap = () => {\n const division = document.getElementById('js-map--divisions');\n\n if (division) {\n fetch('/wp-json/api/v1/divisions?langID=' + division.dataset.id).then(t => t.json()).then(data => {\n initDivisionsMap(division, data);\n });\n }\n\n const city = document.getElementById('js-map--cities');\n\n if (city) {\n fetch('/wp-content/themes/biuro/json/' + city.dataset.source + '.json').then(t => t.json()).then(data => {\n initCitiesMap(city, data);\n });\n }\n\n const region = document.getElementById('js-map--regions');\n\n if (region) {\n initRegionsMap(region);\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (inititateMap);\n\n//# sourceURL=webpack:///./wp-content/themes/biuro/js/components/map/map.js?");
/***/ })
}]);
\ No newline at end of file
!function(e){function t(t){for(var o,r,c=t[0],s=t[1],i=0,l=[];i<c.length;i++)r=c[i],Object.prototype.hasOwnProperty.call(n,r)&&n[r]&&l.push(n[r][0]),n[r]=0;for(o in s)Object.prototype.hasOwnProperty.call(s,o)&&(e[o]=s[o]);for(a&&a(t);l.length;)l.shift()()}var o={},n={4:0};function r(t){if(o[t])return o[t].exports;var n=o[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.e=function(e){var t=[],o=n[e];if(0!==o)if(o)t.push(o[2]);else{var c=new Promise((function(t,r){o=n[e]=[t,r]}));t.push(o[2]=c);var s,i=document.createElement("script");i.charset="utf-8",i.timeout=120,r.nc&&i.setAttribute("nonce",r.nc),i.src=function(e){return r.p+"wp-content/themes/biuro/js/components/"+({0:"accordion",1:"autocomplete",2:"feedback",3:"job-share",5:"map"}[e]||e)+"-b70b7bcb.min.js"}(e);var a=new Error;s=function(t){i.onerror=i.onload=null,clearTimeout(l);var o=n[e];if(0!==o){if(o){var r=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src;a.message="Loading chunk "+e+" failed.\n("+r+": "+c+")",a.name="ChunkLoadError",a.type=r,a.request=c,o[1](a)}n[e]=void 0}};var l=setTimeout((function(){s({type:"timeout",target:i})}),12e4);i.onerror=i.onload=s,document.head.appendChild(i)}return Promise.all(t)},r.m=e,r.c=o,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r.oe=function(e){throw console.error(e),e};var c=window.webpackJsonp=window.webpackJsonp||[],s=c.push.bind(c);c.push=t,c=c.slice();for(var i=0;i<c.length;i++)t(c[i]);var a=s;r(r.s=0)}([function(e,t,o){e.exports=o(2)},function(e,t){window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach((function(e){e.hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){null!==this.parentNode&&this.parentNode.removeChild(this)}})}))},function(e,t,o){"use strict";o.r(t);o(1);(e=>{const t=document.getElementById("cookie-warning"),o=document.getElementById("cookie-agree"),n=document.getElementById("cookie-close"),r=!!c()&&localStorage.getItem("biuro-agree");function c(){try{return localStorage.setItem("a","a"),localStorage.removeItem("a"),!0}catch(e){return!1}}t&&o&&n&&!r&&(t.style.display="block",o.addEventListener("click",()=>{c()&&localStorage.setItem("biuro-agree","true"),t.style.display="none"}),n.addEventListener("click",()=>{t.style.display="none"}))})(window),(e=>{const t=document.querySelector(".c-nav--lang");t&&t.addEventListener("click",e=>{e.currentTarget.classList.toggle("c-nav--lang--is-open")})})(window),window,document.querySelectorAll(".js-toggle--nav").forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),document.body.classList.toggle("is-nav--open")})}),document.querySelectorAll(".js-toggle--aside").forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),document.body.classList.remove("is-aside--open"),document.body.classList.remove("is-aside--open-additional"),document.body.classList.remove("is-aside--open-city")})}),document.querySelectorAll(".js-toggle--aside-city").forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),document.body.classList.add("is-aside--open"),document.body.classList.remove("is-aside--open-additional"),document.body.classList.add("is-aside--open-city")})}),document.querySelectorAll(".js-toggle--aside--additional").forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),document.body.classList.toggle("is-aside--open"),document.body.classList.remove("is-aside--open-city"),document.body.classList.add("is-aside--open-additional")})}),document.querySelectorAll(".js-form--input-file").forEach(e=>{e.addEventListener("change",()=>{const t=e.parentNode,o=e.value.split(/\\|\//).pop(),n=t.querySelector(".js-form--input-file-text");n&&o&&(n.innerHTML=o)})}),document.querySelectorAll(".js-toggle--services").forEach(e=>{e.addEventListener("click",()=>{e.parentNode.classList.toggle("c-services--is-open")})}),document.querySelectorAll(".js-toggle--sections").forEach(e=>{e.addEventListener("click",()=>{const t=e.parentNode;t.classList.contains("c-sections--is-open")?t.classList.toggle("c-sections--is-open"):(document.querySelectorAll(".c-sections--is-open").forEach(e=>{e.classList.remove("c-sections--is-open")}),t.classList.toggle("c-sections--is-open"))})}),document.querySelectorAll(".js-expand-jobs-section").forEach(e=>{e.addEventListener("click",t=>{t.preventDefault(),e.parentNode.classList.remove("c-jobs-section--is-closed"),e.remove()})});const n=()=>{const e=document.querySelector('[name="s"][value="1"]');if(e)return void e.click();const t=document.querySelector('[name="name"]');t&&t.focus()};document.querySelector(".js-inititate-position-form")&&document.querySelector(".js-inititate-position-form").addEventListener("click",n),document.querySelector(".js-focus-form")&&document.querySelector(".js-focus-form").addEventListener("click",()=>{const e=document.querySelector(".c-form input:first-of-type");e&&e.focus()}),document.querySelector(".js-modal--close")&&document.querySelector(".js-modal--close").addEventListener("click",()=>{const e=document.querySelector(".c-modal");e&&e.remove();const t=document.querySelector(".c-form [autofocus]");t&&t.focus()}),(e=>{const t=document.querySelector(".c-form [autofocus]");if(t&&t.focus(),location.hash){const e=document.querySelector(".c-form--input-wrap--error input")||document.querySelector(".c-form--checkbox--error");if(e)return void e.focus();const t=document.querySelector('.c-form [name="name"]');t&&t.focus()}})(window),window,document.querySelectorAll(".gtm-share-click").forEach(e=>{e.addEventListener("click",t=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"shareClick",shareLabel:e.dataset.label||""})})});document.querySelectorAll('[name="form-position"], [name="form-employees"], [name="form-employers"], [name="form-recommend"]').forEach(e=>{e.addEventListener("submit",()=>{(e=>{e.querySelector('[type="submit"]')&&(e.querySelector('[type="submit"]').classList.add("c-btn--disabled"),e.querySelector('[type="submit"]').classList.add("c-btn--loading"))})(e)})}),document.querySelector("#submit-recommend")&&document.querySelector("#submit-recommend").addEventListener("click",e=>{e.preventDefault();const t=document.querySelector('[name="form-recommend"] [type="submit"]');t&&(e.currentTarget.classList.add("c-btn--disabled"),e.currentTarget.classList.add("c-btn--loading"),t.click())}),document.querySelector(".js-submit-employees-form")&&document.querySelector(".js-submit-employees-form").addEventListener("click",e=>{const t=document.querySelector('[name="form-employees"] [type="submit"]');t&&(e.preventDefault(),e.currentTarget.classList.add("c-btn--disabled"),e.currentTarget.classList.add("c-btn--loading"),t.click())}),document.querySelector(".js-accordion--header")&&async function(){const{default:e}=await o.e(0).then(o.bind(null,6));return e}().then(e=>{e()}),document.querySelector(".c-feedbacks--inner")&&async function(){const{default:e}=await o.e(2).then(o.bind(null,7));return e}().then(e=>{e()}),(document.getElementById("search")||document.getElementById("form-city")||document.getElementById("recommend-form-city"))&&async function(){const{default:e}=await o.e(1).then(o.bind(null,8));return e}().then(e=>{e()}),(document.getElementById("js-map--divisions")||document.getElementById("js-map--cities")||document.getElementById("js-map--regions"))&&async function(){const{default:e}=await o.e(5).then(o.bind(null,9));return e}().then(e=>{e()}),(document.querySelector(".js-copy-to-clipboard")||document.querySelector(".js-share-messenger")||document.querySelector(".js-share-whatsapp")||document.querySelector(".js-biuro-facebook"))&&async function(){const{default:e}=await o.e(3).then(o.bind(null,10));return e}().then(e=>{e()}),document.querySelector(".js-collapse-row--toggle")&&document.querySelector(".js-collapse-row--toggle").addEventListener("click",e=>{e.currentTarget.parentNode.classList.toggle("c-form--row--collapsed")});const r=e=>{e.clientY<50&&null==e.relatedTarget&&"select"!==e.target.nodeName.toLowerCase()&&(document.removeEventListener("mouseout",r),window.sessionStorage&&window.sessionStorage.setItem("popup-closed","true"),document.getElementById("popup")&&(document.getElementById("popup").style.display="block")),document.querySelector(".c-popup--close")&&document.querySelector(".c-popup--close").addEventListener("click",e=>{e.preventDefault(),document.getElementById("popup")&&(document.getElementById("popup").style.display="none")})};!document.getElementById("popup")||window.sessionStorage&&window.sessionStorage.getItem("popup-closed")||setTimeout(()=>{document.addEventListener("mouseout",r)},1e3)}]);
\ No newline at end of file
...@@ -205,13 +205,26 @@ if (document.querySelector('.js-modal--close')) { ...@@ -205,13 +205,26 @@ if (document.querySelector('.js-modal--close')) {
(global => { (global => {
document.querySelectorAll('.gtm-share-click').forEach((node) => { document.querySelectorAll('.gtm-share-click').forEach((node) => {
node.addEventListener('click', (e) => { node.addEventListener('click', (e) => {
const dataset = node.dataset || {};
window.dataLayer = window.dataLayer || []; window.dataLayer = window.dataLayer || [];
window.dataLayer.push({ window.dataLayer.push({
event: 'shareClick', event: 'shareClick',
shareLabel: node.dataset.label || '' shareLabel: dataset.label || ''
}); });
}); });
}); });
document.querySelectorAll('.gtm-click').forEach((node) => {
node.addEventListener('click', (e) => {
const dataset = node.dataset || {};
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: dataset.event || '',
label: dataset.label || ''
});
});
});
})(window); })(window);
const submitContactsFrom = (form) => { const submitContactsFrom = (form) => {
...@@ -299,6 +312,10 @@ const showPopup = (e) => { ...@@ -299,6 +312,10 @@ const showPopup = (e) => {
if (e.clientY < 50 && e.relatedTarget == null && e.target.nodeName.toLowerCase() !== 'select') { if (e.clientY < 50 && e.relatedTarget == null && e.target.nodeName.toLowerCase() !== 'select') {
document.removeEventListener('mouseout', showPopup); document.removeEventListener('mouseout', showPopup);
if (window.sessionStorage) {
window.sessionStorage.setItem('popup-closed', 'true');
}
if (document.getElementById('popup')) { if (document.getElementById('popup')) {
document.getElementById('popup').style.display = 'block'; document.getElementById('popup').style.display = 'block';
} }
...@@ -315,6 +332,8 @@ const showPopup = (e) => { ...@@ -315,6 +332,8 @@ const showPopup = (e) => {
} }
}; };
setTimeout(() => { if (document.getElementById('popup') && (!window.sessionStorage || !window.sessionStorage.getItem('popup-closed'))) {
setTimeout(() => {
document.addEventListener('mouseout', showPopup); document.addEventListener('mouseout', showPopup);
}, 2000); }, 1000);
}
This source diff could not be displayed because it is too large. You can view the blob instead.
<div id="popup" class="c-popup"> <?php
global $recommendPage;
if ($recommendPage):
?>
<div id="popup" class="c-popup">
<div class="c-popup--inner"> <div class="c-popup--inner">
<div class="c-popup--logos"> <div class="c-popup--logos">
...@@ -24,7 +29,7 @@ ...@@ -24,7 +29,7 @@
<?php _e('Popup message', 'biuro'); ?> <?php _e('Popup message', 'biuro'); ?>
</p> </p>
<p class="c-popup--button"> <p class="c-popup--button">
<a hrefx="#" class="o-btn c-btn--popup"><?php _e('Popup button', 'biuro'); ?></a> <a href="<?php echo $recommendPage; ?>" class="o-btn gtm-click c-btn--popup" data-event="gtm_click" data-label="Recommend Page"><?php _e('Popup button', 'biuro'); ?></a>
</p> </p>
</div> </div>
...@@ -32,4 +37,7 @@ ...@@ -32,4 +37,7 @@
<svg width="12px" height="12px"><use href="#ico--close"></use></svg> <svg width="12px" height="12px"><use href="#ico--close"></use></svg>
</span> </span>
</div> </div>
</div> </div>
<?php
endif;
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment