Commit 81eb908d authored by Simon's avatar Simon

UI completed

parent e3861a11
...@@ -38,6 +38,7 @@ c-: Signify that something is a Component. This is a concrete, implementation-sp ...@@ -38,6 +38,7 @@ c-: Signify that something is a Component. This is a concrete, implementation-sp
@import '_component--membership.css'; @import '_component--membership.css';
@import '_component--modal.css'; @import '_component--modal.css';
@import '_component--nav.css'; @import '_component--nav.css';
@import '_component--newsletter.css';
@import '_component--phone.css'; @import '_component--phone.css';
@import '_component--popup.css'; @import '_component--popup.css';
@import '_component--recommend-friend.css'; @import '_component--recommend-friend.css';
...@@ -88,43 +89,6 @@ c-: Signify that something is a Component. This is a concrete, implementation-sp ...@@ -88,43 +89,6 @@ c-: Signify that something is a Component. This is a concrete, implementation-sp
} }
.t-contacts{ width: 100%; height: auto !important; } .t-contacts{ width: 100%; height: auto !important; }
.t-contacts td {vertical-align: top; display: block; width: 100%; } .t-contacts td {vertical-align: top; display: block; width: 100%; }
.t-contacts p { text-align: left } .t-contacts p { text-align: left }
/*
@media (min-width:480px){
.t-contacts td.t-contacts-col-1{
width:43%
}
.t-contacts td.t-contacts-col-2,.t-contacts td.t-contacts-col-3{
width:50%
}
}
@media (min-width:768px){
.t-contacts td.t-contacts-col-1{
width:34%
}
.t-contacts td.t-contacts-col-2,.t-contacts td.t-contacts-col-3{
width:33%
}
}
@media (max-width:767px){
.t-contacts td{
float:left;
width:50%
}
}
@media (max-width:479px){
.t-contacts td{
width:100%
}
}
*/
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
min-width: 180px; min-width: 180px;
border-radius: 0 3px 3px 0; border-radius: 0 3px 3px 0;
text-align: center; text-align: center;
`
@media (--max--medium) { @media (--max--medium) {
flex: 0 0 60px; flex: 0 0 60px;
border-radius: 0 0 3px 3px; border-radius: 0 0 3px 3px;
...@@ -103,6 +103,16 @@ ...@@ -103,6 +103,16 @@
} }
} }
.c-btn--newsletter {
padding-top: 15px;
padding-bottom: 14px;
@media (--max--medium) {
width: 100%;
margin-top: 13px;
}
}
.c-btn--loading { .c-btn--loading {
position: relative; position: relative;
......
/* ------------- Component: newsletter section ------------- */
.c-newsletter {
padding: 10px 0 45px;
background: linear-gradient(134.06deg, #CBE2EC 0%, #FFFFFF 100%);
@media (--min--medium) {
padding: 70px 0;
}
}
.c-newsletter--inner {
display: flex;
flex-direction: column;
max-width: 420px;
margin: 0 auto;
padding: 0 20px;
@media (--min--medium) {
flex-direction: row;
max-width: 1000px;
align-items: center;
padding: 0 41px;
}
}
.c-newsletter--img {
position: relative;
margin: 0 auto;
width: 151px;
height: 187px;
@media (--max--medium) {
order: 2;
}
@media (--min--medium) {
width: 278px;
height: 345px;
margin: 0 62px 0 0;
}
}
.c-newsletter--ico {
position: absolute;
left: -41px;
bottom: 41px;
@media (--max--medium) {
left: -20px;
bottom: 20px;
width: 51px;
height: 51px;
}
}
.c-newsletter--content {
padding: 25px 0;
@media (--min--medium) {
flex: 0 1 498px;
}
}
.c-newsletter--headline {
margin: 0 0 18px;
color: #2A3644;
font-size: 25px;
font-weight: 500;
line-height: 34px;
@media (--min--medium) {
margin: 0 40px 36px 0;
line-height: 36px;
}
}
.c-newsletter--form {
margin-bottom: 18px;
@media (--min--medium) {
display: flex;
margin-bottom: 36px;
}
}
.c-newsletter--label {
flex: 1 1 auto;
margin-right: 7px;
}
.c-newsletter--input {
height: 48px;
width: 100%;
padding: 0 10px;
border: 0;
border-radius: 3px;
background-color: #fff;
font-size: 15px;
}
.c-newsletter--privacy {
max-width: 460px;
color: #919392;
font-size: 12px;
line-height: 14px;
}
/*.c-contact--inner { max-width: 1000px; padding: 0 10px ;margin: 0 auto;
@media (--min--medium) {
display: flex; justify-content: space-between;
}
}
.c-contact--content { color: #2A3644; font-weight: 500; line-height: 29px; padding: 15px 0 20px 15px;
@media (--min--medium) {
flex: 1 1 40%; max-width: 500px; padding: 75px 0 0 90px;
}
h3 { margin: 0 0 15px; font-size: 25px; color: #2A3644; font-weight: 500; }
p { margin: 0 0 20px; }
img { max-width: 100%; height: auto; }
}
.c-contact--form { max-width: 420px;
@media (--min--medium) {
flex: 1 1 40%;
}
}
*/
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -16,7 +16,6 @@ js-: Signify that this piece of the DOM has some behaviour acting upon it, and t ...@@ -16,7 +16,6 @@ js-: Signify that this piece of the DOM has some behaviour acting upon it, and t
This means print or screen: This means print or screen:
@print, @screen @print, @screen
qa-: Signify that a QA or Test Engineering team is running an automated UI test which needs to find or bind onto these parts of the DOM. Like the JavaScript namespace, this basically just reserves hooks in the DOM for non-CSS purposes. qa-: Signify that a QA or Test Engineering team is running an automated UI test which needs to find or bind onto these parts of the DOM. Like the JavaScript namespace, this basically just reserves hooks in the DOM for non-CSS purposes.
========================================================================== */ ========================================================================== */
...@@ -28,15 +27,19 @@ qa-: Signify that a QA or Test Engineering team is running an automated UI test ...@@ -28,15 +27,19 @@ qa-: Signify that a QA or Test Engineering team is running an automated UI test
@import '06-objects/__objects.css'; @import '06-objects/__objects.css';
@import '07-components/__components.css'; @import '07-components/__components.css';
@import '08-states/__states.css'; @import '08-states/__states.css';
/*@import '09-themes/__themes.css';*/
/*@import '__previous.css';*/ /*
@import '09-themes/__themes.css';
*/
/*
@import '__previous.css';
*/
@import '10-trumps/__utils.css'; @import '10-trumps/__utils.css';
/* critical:start */ /* critical:start */
/* critical:end */ /* critical:end */
/** { border: 1px solid #00f; }*/
input::-webkit-calendar-picker-indicator { input::-webkit-calendar-picker-indicator {
display: none; display: none;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
?> ?>
<script src="/wp-content/themes/biuro/js/main-697fb3c8.min.js" async defer></script> <script src="/wp-content/themes/biuro/js/main.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>
......
...@@ -129,6 +129,37 @@ ...@@ -129,6 +129,37 @@
</div> </div>
</div><!-- .c-contact --> </div><!-- .c-contact -->
<div class="c-newsletter">
<div class="c-newsletter--inner">
<div class="c-newsletter--img">
<picture>
<source type="image/webp" media="(max-width: 959px)" srcset="/wp-content/themes/biuro/i/newsletter/newsletter-sm.webp">
<source type="image/webp" srcset="/wp-content/themes/biuro/i/newsletter/newsletter.webp">
<source media="(max-width: 959px)" srcset="/wp-content/themes/biuro/i/newsletter/newsletter-sm.png">
<img loading="lazy" srcset="/wp-content/themes/biuro/i/newsletter/newsletter-sm.png" alt="">
</picture>
<svg xmlns="http://www.w3.org/2000/svg" width="95px" height="95px" viewBox="0 0 95 95" class="c-newsletter--ico">
<path fill="#FFFFFF" d="M91.769,30.525L66.673,10.365C62.572,7.086,55.56,0,47.5,0 c-7.735,0-14.473,6.516-18.72,9.997l-0.453,0.367C23.788,13.973,4.007,29.883,3.25,30.505C1.456,31.98,0,35.063,0,37.385v48.709 C0,91.012,3.987,95,8.906,95h77.188C91.013,95,95,91.012,95,86.094V37.389C95,35.075,93.552,32,91.769,30.525z M86,84.889 C86,85.502,85.502,86,84.889,86H10.111C9.498,86,9,85.502,9,84.889v-46.95c0-0.335,0.151-0.653,0.412-0.864l24.5-19.674 C37.274,14.716,43.131,9,47.5,9c4.294,0,10.092,5.567,13.381,8.235l14.762,11.839c4.544,3.653,8.645,6.955,9.945,8.006 c0.199,0.161,0.365,0.477,0.403,0.749L86,37.943V84.889z M80.495,49.352c0.784,0.98,0.64,2.431-0.322,3.227L67.077,63.385 C62.887,66.833,55.976,74,48,74c-7.881,0-14.762-7.014-18.861-10.435L15.828,52.579l0,0c-0.962-0.796-1.106-2.247-0.322-3.227 l2.817-3.521c0.771-0.964,2.152-1.11,3.098-0.328l13.027,10.75c3.241,2.664,9.179,8.625,13.553,8.625 c4.172,0,9.705-5.379,13.112-8.257L74.58,45.503l0,0c0.946-0.782,2.327-0.636,3.098,0.328L80.495,49.352z"/>
</svg>
</div>
<div class="c-newsletter--content">
<h2 class="c-newsletter--headline"><?php _e('Sužinok naujienas iš darbo rinkos bei gauk naujausius pasiūlymus!', 'biuro'); ?></h2>
<form name="form-newsletter" class="c-newsletter--form" method="post" action="/">
<label class="c-newsletter--label">
<input type="email" name="email" placeholder="Tavo el. paštas" class="c-newsletter--input" />
</label>
<button type="submit" class="o-btn c-btn--main c-btn--newsletter">Prenumeruoti</button>
</form>
<div class="c-newsletter--privacy"><?php _e('By signing up, you agree to Biuro terms and Privacy Policy', 'biuro'); ?></div>
</div><!-- .c-newsletter--content -->
</div><!-- .c-newsletter--inner -->
</div><!-- .c-newsletter -->
</main><!-- .l-main --> </main><!-- .l-main -->
</div><!-- #content --> </div><!-- #content -->
......
...@@ -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-4bd84d5383.min.css'; ?></style> <style><?php include 'css/core.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-0a1da18b71.min.css" as="style" onload="this.rel='stylesheet'"> <link rel="preload" href="/wp-content/themes/biuro/css/main.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-0a1da18b71.min.css"> <link rel="stylesheet" href="/wp-content/themes/biuro/css/main.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-4bd84d5383.min.css'; ?></style> <style><?php include 'css/core.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-0a1da18b71.min.css" as="style" onload="this.rel='stylesheet'"> <link rel="preload" href="/wp-content/themes/biuro/css/main.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-0a1da18b71.min.css"> <link rel="stylesheet" href="/wp-content/themes/biuro/css/main.min.css">
</noscript> </noscript>
<?php wp_head(); ?> <?php wp_head(); ?>
......
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{7: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 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.
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{11:function(e,o,t){"use strict";t.r(o);var n=t(0);let c=!0;function a(){const e=document.querySelector("#copy-tooltip");e&&(e.style.opacity=1,setTimeout(()=>{e.style.opacity=0},3e3))}function i(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(),i(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){Object(n.a)("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__);\n/* harmony import */ var _utils_load_js_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/load-js.js */ \"./wp-content/themes/biuro/js/utils/load-js.js\");\n\n\nasync function inititateFacebook(ID) {\n Object(_utils_load_js_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('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],{10:function(e,t,n){"use strict";n.r(t);var o,i=n(0);function s(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 a(e,t,n){for(var i=new window.google.maps.LatLngBounds,s=0;s<t.length;s++){const l=t[s],c=new window.google.maps.LatLng(l.lat,l.lng);var a=new window.google.maps.Marker({position:c,map:e,icon:"/wp-content/themes/biuro/i/ico--map-pin.svg",title:l.title||""});o&&o.close(),i.extend(c),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 l(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}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){Object(i.a)("https://maps.googleapis.com/maps/api/js?key=AIzaSyBQjPQnLGLeICbpTTu8kLjVRrLUYYCTS2M").then(()=>{window.google&&setTimeout(()=>{var n=l(e);let o=[];Object.keys(t).forEach(e=>{const n=t[e];"city"===e.substr(0,4)&&(o=o.concat(n))}),document.querySelectorAll(".js-division").forEach(e=>{e.addEventListener("click",()=>{const i=e&&e.dataset.id?e.dataset.id:"";t[i]?a(n,t[i].filter(e=>e.lat&&e.lng),!0):a(n,o.filter(e=>e.lat&&e.lng))})}),a(n,o.filter(e=>e.lat&&e.lng))},50)})}(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?s(l(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);a(l(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/* harmony import */ var _utils_load_js_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/load-js.js */ \"./wp-content/themes/biuro/js/utils/load-js.js\");\n // https://developers-dot-devsite-v2-prod.appspot.com/maps/documentation/javascript/examples/overlay-popup\n\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 Object(_utils_load_js_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('https://maps.googleapis.com/maps/api/js?key=AIzaSyBQjPQnLGLeICbpTTu8kLjVRrLUYYCTS2M').then(() => {\n if (!window.google) {\n return;\n }\n\n setTimeout(() => {\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 }, 50);\n });\n}\n\nconst inititateMap = () => {\n // <script src=\"https://maps.googleapis.com/maps/api/js?key=AIzaSyBQjPQnLGLeICbpTTu8kLjVRrLUYYCTS2M\" async defer></script>\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
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
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