Commit 7c200180 authored by Simon's avatar Simon

release 1.6.12

parent 0168f396
......@@ -20,9 +20,9 @@
## Production
- build CSS & JS assets - `C:\web\dev.biuro\ npm run build`
- build new image `docker build -t biuro/web:1.6.4 .` (update version number)
- build new image `docker build -t biuro/web:1.6.12 .` (update version number)
- login to biuro docker account `docker login --username=biuro --password=9Ndtjd2vKsLvGuFOeFq1KdJs`
- push image to docker repository - `docker push biuro/web:1.6.4`
- push image to docker repository - `docker push biuro/web:1.6.12`
## Production
- update biuro/web image version in .env file (staging or www)
......
{
"name": "biuro",
"version": "1.6.4",
"version": "1.6.12",
"description": "Biuro WP theme",
"scripts": {
"dev": "gulp --require @babel/register --gulpfile tasks",
......
......@@ -149,7 +149,7 @@
<?php
endif;
?>
<script src="/wp-content/themes/biuro/js/main-c31866c5.min.js" async></script>
<script src="/wp-content/themes/biuro/js/main-f4c22a4f.min.js" async></script>
<?php
// global $time_start;
......
......@@ -748,6 +748,16 @@ document.querySelectorAll('.c-accordion--content').forEach((content) => {
content.classList.add('c-accordion--content--is-collapsed');
});
let isPageActive = true;
window.onfocus = function () {
isPageActive = true;
};
window.onblur = function () {
isPageActive = false;
};
const messenger = document.querySelector('.js-share-messenger');
if (messenger) {
......@@ -756,16 +766,15 @@ if (messenger) {
const target = e.currentTarget;
const now = new Date().valueOf();
setTimeout(function () {
if (new Date().valueOf() - now > 100) {
window.location.href = 'fb-messenger://share/?link=' + encodeURIComponent(window.location.href) + '&app_id=' + encodeURIComponent('463001014486058');
setTimeout(() => {
if (document.hidden || !isPageActive) {
return;
}
window.open(target.href, '_blank');
}, 25);
window.location = 'fb-messenger://share/?link=' + encodeURIComponent(window.location.href);
window.location.href = target.href;
}, 100);
});
}
......@@ -777,15 +786,14 @@ if (whatsapp) {
const target = e.currentTarget;
const now = new Date().valueOf();
setTimeout(function () {
if (new Date().valueOf() - now > 100) {
window.location.href = 'whatsapp://send?text=' + encodeURIComponent(target.dataset.text);
setTimeout(() => {
if (document.hidden || !isPageActive) {
return;
}
window.open(target.href, '_blank');
}, 25);
window.location = 'whatsapp://send?text=' + encodeURIComponent(target.dataset.text);
}, 100);
});
}
......@@ -3,6 +3,6 @@ Theme Name: Biuro
Author: Biuro
Author URI: https://www.biuro.lt/
Description: Biuro multiregion theme
Version: 1.6.4
Version: 1.6.12
Text Domain: biuro
*/
......@@ -43,12 +43,12 @@
<div class="c-share">
<p class="c-share--heading"><?php _e('Suggest a friend', 'biuro'); ?></p>
<div class="c-share--options">
<a target="_blank" rel="noopener" href="https://www.facebook.com/dialog/feed?app_id=463001014486058&amp;display=popup&amp;link=<?php echo $requestURL; ?>&redirect_uri=<?php echo $requestURL; ?>" class="gtm-share-click c-share--option c-share--option-facebook" data-label="Facebook">
<a rel="noopener" href="https://www.facebook.com/dialog/feed?app_id=463001014486058&amp;link=<?php echo $requestURL; ?>&redirect_uri=<?php echo $requestURL; ?>" class="gtm-share-click c-share--option c-share--option-facebook" data-label="Facebook">
<svg width="9px" height="18px" class="c-ico--share-facebook">
<use xlink:href="#ico--job-facebook"></use>
</svg>
</a>
<a target="_blank" rel="noopener" href="https://www.facebook.com/dialog/share?app_id=463001014486058&amp;display=popup&amp;href=<?php echo $requestURL; ?>&redirect_uri=<?php echo $requestURL; ?>" class="gtm-share-click js-share-messenger c-share--option c-share--option-messenger" data-label="Messenger">
<a rel="noopener" href="https://www.facebook.com/dialog/send?app_id=463001014486058&amp;link=<?php echo $requestURL; ?>&redirect_uri=<?php echo $requestURL; ?>" class="gtm-share-click js-share-messenger c-share--option c-share--option-messenger" data-label="Messenger">
<svg width="15px" height="15px" class="c-ico--share-messenger">
<use xlink:href="#ico--job-messenger"></use>
</svg>
......
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