Commit 7c200180 authored by Simon's avatar Simon

release 1.6.12

parent 0168f396
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
## Production ## Production
- build CSS & JS assets - `C:\web\dev.biuro\ npm run build` - 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` - 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 ## Production
- update biuro/web image version in .env file (staging or www) - update biuro/web image version in .env file (staging or www)
......
{ {
"name": "biuro", "name": "biuro",
"version": "1.6.4", "version": "1.6.12",
"description": "Biuro WP theme", "description": "Biuro WP theme",
"scripts": { "scripts": {
"dev": "gulp --require @babel/register --gulpfile tasks", "dev": "gulp --require @babel/register --gulpfile tasks",
......
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
<?php <?php
endif; 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 <?php
// global $time_start; // global $time_start;
......
...@@ -748,6 +748,16 @@ document.querySelectorAll('.c-accordion--content').forEach((content) => { ...@@ -748,6 +748,16 @@ document.querySelectorAll('.c-accordion--content').forEach((content) => {
content.classList.add('c-accordion--content--is-collapsed'); 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'); const messenger = document.querySelector('.js-share-messenger');
if (messenger) { if (messenger) {
...@@ -756,16 +766,15 @@ if (messenger) { ...@@ -756,16 +766,15 @@ if (messenger) {
const target = e.currentTarget; const target = e.currentTarget;
const now = new Date().valueOf(); window.location.href = 'fb-messenger://share/?link=' + encodeURIComponent(window.location.href) + '&app_id=' + encodeURIComponent('463001014486058');
setTimeout(function () {
if (new Date().valueOf() - now > 100) { setTimeout(() => {
if (document.hidden || !isPageActive) {
return; return;
} }
window.open(target.href, '_blank'); window.location.href = target.href;
}, 25); }, 100);
window.location = 'fb-messenger://share/?link=' + encodeURIComponent(window.location.href);
}); });
} }
...@@ -777,15 +786,14 @@ if (whatsapp) { ...@@ -777,15 +786,14 @@ if (whatsapp) {
const target = e.currentTarget; const target = e.currentTarget;
const now = new Date().valueOf(); window.location.href = 'whatsapp://send?text=' + encodeURIComponent(target.dataset.text);
setTimeout(function () {
if (new Date().valueOf() - now > 100) { setTimeout(() => {
if (document.hidden || !isPageActive) {
return; return;
} }
window.open(target.href, '_blank'); window.open(target.href, '_blank');
}, 25); }, 100);
window.location = 'whatsapp://send?text=' + encodeURIComponent(target.dataset.text);
}); });
} }
...@@ -3,6 +3,6 @@ Theme Name: Biuro ...@@ -3,6 +3,6 @@ Theme Name: Biuro
Author: Biuro Author: Biuro
Author URI: https://www.biuro.lt/ Author URI: https://www.biuro.lt/
Description: Biuro multiregion theme Description: Biuro multiregion theme
Version: 1.6.4 Version: 1.6.12
Text Domain: biuro Text Domain: biuro
*/ */
...@@ -43,12 +43,12 @@ ...@@ -43,12 +43,12 @@
<div class="c-share"> <div class="c-share">
<p class="c-share--heading"><?php _e('Suggest a friend', 'biuro'); ?></p> <p class="c-share--heading"><?php _e('Suggest a friend', 'biuro'); ?></p>
<div class="c-share--options"> <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"> <svg width="9px" height="18px" class="c-ico--share-facebook">
<use xlink:href="#ico--job-facebook"></use> <use xlink:href="#ico--job-facebook"></use>
</svg> </svg>
</a> </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"> <svg width="15px" height="15px" class="c-ico--share-messenger">
<use xlink:href="#ico--job-messenger"></use> <use xlink:href="#ico--job-messenger"></use>
</svg> </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