sua nha gia re hcm

sua nha gia re hcm

CÔNG TY TNHH KIẾN TRÚC XÂY DỰNG WINCONS

Made with
if (window.innerWidth < 530 ) { var element = document.querySelector("#best-link-1239254"); var elements2 = document.querySelectorAll('#text-1239254'); var element3 = document.querySelector('#button-1239254'); element.style.setProperty("--color","#dedede"); // if (elements2[0].style.color == "rgb(255, 255, 255)") { // element3.style.backgroundColor = "#fff"; // element3.style.color = "rgb(30, 36, 42)"; // }else { // element3.style.backgroundColor = "#2c2c2c"; // element3.style.color = "rgb(255, 255, 255)"; // } } if (window.innerWidth < 530 ) { var element = document.querySelector("#best-link-1239255"); var elements2 = document.querySelectorAll('#text-1239255'); var element3 = document.querySelector('#button-1239255'); element.style.setProperty("--color","#dedede"); // if (elements2[0].style.color == "rgb(255, 255, 255)") { // element3.style.backgroundColor = "#fff"; // element3.style.color = "rgb(30, 36, 42)"; // }else { // element3.style.backgroundColor = "#2c2c2c"; // element3.style.color = "rgb(255, 255, 255)"; // } } if (window.innerWidth < 530 ) { var element = document.querySelector("#best-link-1239256"); var elements2 = document.querySelectorAll('#text-1239256'); var element3 = document.querySelector('#button-1239256'); element.style.setProperty("--color","#dedede"); // if (elements2[0].style.color == "rgb(255, 255, 255)") { // element3.style.backgroundColor = "#fff"; // element3.style.color = "rgb(30, 36, 42)"; // }else { // element3.style.backgroundColor = "#2c2c2c"; // element3.style.color = "rgb(255, 255, 255)"; // } } if (window.innerWidth < 530 ) { var element = document.querySelector("#best-link-1239257"); var elements2 = document.querySelectorAll('#text-1239257'); var element3 = document.querySelector('#button-1239257'); element.style.setProperty("--color","#dedede"); // if (elements2[0].style.color == "rgb(255, 255, 255)") { // element3.style.backgroundColor = "#fff"; // element3.style.color = "rgb(30, 36, 42)"; // }else { // element3.style.backgroundColor = "#2c2c2c"; // element3.style.color = "rgb(255, 255, 255)"; // } } if (window.innerWidth < 530 ) { var element = document.querySelector("#best-link-1239259"); var elements2 = document.querySelectorAll('#text-1239259'); var element3 = document.querySelector('#button-1239259'); element.style.setProperty("--color","#dedede"); // if (elements2[0].style.color == "rgb(255, 255, 255)") { // element3.style.backgroundColor = "#fff"; // element3.style.color = "rgb(30, 36, 42)"; // }else { // element3.style.backgroundColor = "#2c2c2c"; // element3.style.color = "rgb(255, 255, 255)"; // } } if (window.innerWidth < 530 ) { var element = document.querySelector("#best-link-1239261"); var elements2 = document.querySelectorAll('#text-1239261'); var element3 = document.querySelector('#button-1239261'); element.style.setProperty("--color","#dedede"); // if (elements2[0].style.color == "rgb(255, 255, 255)") { // element3.style.backgroundColor = "#fff"; // element3.style.color = "rgb(30, 36, 42)"; // }else { // element3.style.backgroundColor = "#2c2c2c"; // element3.style.color = "rgb(255, 255, 255)"; // } }
/* Some global variables */ window.altum = {}; let global_token = document.querySelector('input[name="global_token"]').value; let url = document.querySelector('input[name="url"]').value; let decimal_point = document.querySelector('[name="number_decimal_point"]').value; let thousands_separator = document.querySelector('[name="number_thousands_separator"]').value; // setTimeout(() => { // $(".link-content").css('min-height','calc(100vh - '+($(".profile-main").height()+80)+'px)'); // $("footer").css('opacity','1'); // }, 500); $(".btn-tiktok-play").click(function() { $("#create_tiktok_widget").modal('show'); $("#tiktok_iframe").attr('src', $(this).attr('data-url')); }); $(document).on('click',".btn-youtube-play",function() { $("#youtube_play").modal('show'); $("#youtube_iframe").attr('src','https://www.youtube.com/embed/'+$(this).attr('data-url')); }); $("#create_tiktok_widget").on('hidden.bs.modal', function() { $("#tiktok_iframe").attr('src', ''); }); $("#youtube_play").on('hidden.bs.modal', function() { $("#youtube_iframe").attr('src', ''); }); $(document).ready(function() { setTimeout(() => { $(".twitter-card").removeClass('loading-skeleton'); }, 5000); }); if (window.innerWidth < 768) { // $('.links-slider').slick({ // dots: false, // infinite: false, // speed: 300, // slidesToShow: 4, // arrows:false, // responsive: [ // { // breakpoint: 1024, // settings: { // slidesToShow: 3, // slidesToScroll: 3, // infinite: true, // dots: false, // } // }, // { // breakpoint: 767, // settings: { // slidesToShow: 2, // slidesToScroll: 2, // } // }, // { // breakpoint: 500, // settings: { // slidesToShow: 1, // slidesToScroll: 1 // } // } // // You can unslick at a given breakpoint now by adding: // // settings: "unslick" // // instead of a settings object // ] // }); } /* Internal tracking for biolink links */ $('[data-link-url]').on('click', event => { let url = $(event.currentTarget).data('link-url'); $.ajaxSetup({ "headers": { 'X-CSRF-TOKEN': 'uUqeuExepS2z7rnX1yJfil8WHB0Kf01KF7d30tFA' } }) $.ajax({ url: "https://zaap.bio/track-link", type: "POST", data: { url: url, }, }); }); /* Go over all mail buttons to make sure the user can still submit mail */ $(".subscribe-next-btn").click(function() { if ($(this).parent().find('input').val() == '') { GrowlNotification.notify({ description: "Email is required", type: "error", position: "top-right", closeTimeout: 3000 }); return; } else { $(this).parent().addClass('d-none'); $(this).parent().removeClass('d-flex'); $(this).parent().next().addClass('d-flex'); $(this).parent().next().removeClass('d-none'); } }); $(".emailwidget").submit(function(e) { e.preventDefault(); var subscription_email = $(this).find('input[name="email"]'); var subscription_name = $(this).find('input[name="name"]'); var downloadUrl = $(this).find('input[name="download-url"]'); var block_id = $(this).find('input[name="block-id"]'); var dataObject = { subscription_email: subscription_email.val(), subscription_name: subscription_name.val(), }; if (downloadUrl) { dataObject.downloadUrl = downloadUrl.val(); dataObject.block_id = block_id.val(); } if (subscription_name.val() == '') { GrowlNotification.notify({ description: "Name is required", type: "error", position: "top-right", closeTimeout: 3000 }); return false; } if (subscription_email.val() == '') { GrowlNotification.notify({ description: "Email is required", type: "error", position: "top-right", closeTimeout: 3000 }); return false; } $.ajaxSetup({ "headers": { 'X-CSRF-TOKEN': 'uUqeuExepS2z7rnX1yJfil8WHB0Kf01KF7d30tFA' } }) // console.log("https://zaap.bio/suanhagiare"); $.ajax({ url: "https://zaap.bio/suanhagiare", type: "POST", data: dataObject, dataType: "json", success: (data) => { // data = JSON.parse(data); if(data.error){ GrowlNotification.notify({ description: data.error, type: "error", position: "top-right", closeTimeout: 5000 }); return false; } GrowlNotification.notify({ description: "Subscribed Successfully!", type: "success", position: "top-right", closeTimeout: 5000 }); subscription_email.val(''); subscription_name.val(''); if (downloadUrl.val()) { window.location.href = downloadUrl.val(); } return false; }, error: ($xhr) => { var data = $xhr.responseJSON; // console.log(data.status_code); if (data.status_code != 200) { for (i in data.errors) { GrowlNotification.notify({ description: data.errors[i][0], type: "error", position: "top-right", closeTimeout: 3000 }); } } return false; } }); }); $('form[id^="mail_"]').each((index, element) => { let link_id = $(element).find('input[name="link_id"]').val(); let is_converted = localStorage.getItem(`mail_${link_id}`); if (is_converted) { /* Set the submit button to disabled */ $(element).find('button[type="submit"]').attr('disabled', 'disabled'); } }); /* Form handling for mail submissions if any */ $('form[id^="mail_"]').on('submit', event => { let base_url = $('[name="url"]').val(); let link_id = $(event.currentTarget).find('input[name="link_id"]').val(); let is_converted = localStorage.getItem(`mail_${link_id}`); if (!is_converted) { $.ajax({ type: 'POST', url: `${base_url}link-ajax`, data: $(event.currentTarget).serialize(), success: (data) => { let notification_container = $(event.currentTarget).find( '.notification-container'); if (data.status == 'error') { notification_container.html(''); display_notifications(data.message, 'error', notification_container); } else if (data.status == 'success') { display_notifications(data.message, 'success', notification_container); setTimeout(() => { /* Hide modal */ $(event.currentTarget).closest('.modal').modal('hide'); /* Remove the notification */ notification_container.html(''); /* Set the localstorage to mention that the user was converted */ localStorage.setItem(`mail_${link_id}`, true); /* Set the submit button to disabled */ $(event.currentTarget).find('button[type="submit"]').attr( 'disabled', 'disabled'); }, 1000); } }, dataType: 'json' }); } event.preventDefault(); }); $(document).on('submit', '#form_contact', function(e) { e.preventDefault(); var email = $(this).find('input[name="email"]'); var name = $(this).find('input[name="name"]'); var phone = $(this).find('input[name="phone"]'); var message = $(this).find('textarea[name="message"]'); console.log(message); var contact_form_id = $(this).find('input[name="contact_form_id"]'); var url = "https://zaap.bio/suanhagiare/contact-form-submit"; if (name.attr("data-required") && name.val() == '') { GrowlNotification.notify({ description: "Name is required", type: "error", position: "top-right", closeTimeout: 3000 }); return false; } if (email.attr("data-required") && email.val() == '') { GrowlNotification.notify({ description: "Email is required", type: "error", position: "top-right", closeTimeout: 3000 }); return false; } if (phone.attr("data-required") && phone.val() == '') { GrowlNotification.notify({ description: "Phone is required", type: "error", position: "top-right", closeTimeout: 3000 }); return false; } if(message.attr("data-required") && message.val() == ''){ GrowlNotification.notify({ description: "Message is required", type: "error", position: "top-right", closeTimeout: 3000 }); return false; } $.ajaxSetup({ "headers": { 'X-CSRF-TOKEN': 'uUqeuExepS2z7rnX1yJfil8WHB0Kf01KF7d30tFA' } }) $.ajax({ url:url, type: 'POST', data: { email: email.val(), name: name.val(), phone: phone.val(), message: message.val(), contact_form_id: contact_form_id.val(), }, success: (data) => { GrowlNotification.notify({ description: "Form Submitted Successfully!", type: "success", position: "top-right", closeTimeout: 5000 }); email.val(''); name.val(''); phone.val(''); message.val(''); return false; }, error: ($xhr) => { var data = $xhr.responseJSON; // console.log(data.status_code); if (data.status_code != 200) { for (i in data.errors) { GrowlNotification.notify({ description: data.errors[i][0], type: "error", position: "top-right", closeTimeout: 3000 }); } } return false; } }); }); $(".contact-accordion-button").click(function(){ $(this).next().slideDown(500); setTimeout(() => { $(this).remove(); }, 500); }); var postsLoaded = false; $(document).ready(function() { // if (window.location.hash == '#posts') { // $('.container.animate__animated.animate__fadeIn').addClass('contain') // } // else if (window.location.hash == '#home'){ // $('.container.animate__animated.animate__fadeIn').removeClass('contain') // } // Hide all tab content except the active tab $(".tab-content .tab-pane").not(".active").hide(); // Handle tab click event $(".tab").click(function() { var tabId = $(this).attr("data-value"); showTab(tabId); window.location.hash = tabId; // if (tabId == '#posts') { // $('.container.animate__animated.animate__fadeIn').addClass('contain') // } // else if (tabId == '#home'){ // $('.container.animate__animated.animate__fadeIn').removeClass('contain') // } }); }); function showTab(tabId) { $(".tab").removeClass("active"); $('a[data-value="' + tabId + '"]').addClass("active"); $(".tab-content .tab-pane").hide(); $(tabId).show(); if (tabId === "#posts" && !postsLoaded && 0 > 0) { loadPosts(); } } function loadPosts() { var url = "https://zaap.bio/suanhagiare/get-posts"; $.ajaxSetup({ headers: { "X-CSRF-TOKEN": "uUqeuExepS2z7rnX1yJfil8WHB0Kf01KF7d30tFA", }, }); $.ajax({ url: url, type: "GET", success: function(response) { $(".posts-main").html(response); postsLoaded = true; }, error: function(xhr, status, error) { console.log(error); // Check for any error messages }, }); } $(document).ready(function() { function hasQueryParameter(parameterName) { const urlParams = new URLSearchParams(window.location.search); return urlParams.has(parameterName); } // Handle initial tab based on the URL hash var tab = window.location.hash; if (tab) { showTab(tab); } else if(hasQueryParameter("post")){ post(); } function post() { var hash = window.location.href; var startIndex = hash.indexOf("?post=") + 6; // Add the length of "?post=" to get the starting index var slug = hash.substring(startIndex); console.log(slug); // if (window.location.hash == "#posts") { if (slug) { var url = "https://zaap.bio/suanhagiare/get-posts"; console.log(url,"hash"); showLoader(); $.ajaxSetup({ "headers": { 'X-CSRF-TOKEN': 'uUqeuExepS2z7rnX1yJfil8WHB0Kf01KF7d30tFA' } }); $.ajax({ url: url + '?slug=' + slug, type: "GET", success: function(response) { if (response) { $("#postModal").modal('show'); $("#postModal .modal-body").html(response); hideLoader(); } else{ hideLoader(); window.location.hash = "#posts"; // $('.container.animate__animated.animate__fadeIn').addClass('contain') var tab = window.location.hash; console.log(tab) showTab(tab) } } }); $("#postModal").on('hide.bs.modal', function() { var url = window.location.href; if (url.indexOf("?post=") !== -1) { url = url.split("?post=")[0] + '#posts' ; // Update the URL with the modified hash history.pushState(null, null, url); // Update the URL in the browser without reloading the page // $('.container.animate__animated.animate__fadeIn').addClass('contain') showTab("#posts") } // if (window.location.hash.indexOf("#posts#") !== -1) { // window.location.hash = "#posts"; // var tab = window.location.hash; // console.log(tab) // showTab(tab) // } }); } // } } }); $(document).on('click', ".page-post", function() { var slug = $(this).attr('data-slug'); var baseUrl = "https://zaap.bio"; var projectSlug = "suanhagiare"; var url = `${baseUrl}/${projectSlug}/post/${slug}`; window.location.href = url; return; var postid = $(this).attr('data-id'); // Get the data-id of the clicked post var url = "https://zaap.bio/suanhagiare/get-posts"; showLoader(); $.ajaxSetup({ "headers": { 'X-CSRF-TOKEN': 'uUqeuExepS2z7rnX1yJfil8WHB0Kf01KF7d30tFA' } }); $.ajax({ url: url + '?post=' + postid, type: "GET", success: function(response) { hideLoader(); $("#postModal").modal('show'); $("#postModal .modal-body").html(response); var urlhash = window.location.href var url = urlhash.replace('#posts','') + '?post=' + slug ; console.log( url); window.history.pushState('','',url); } }); // $("#postModal").on('hide.bs.modal', function() { // var url = window.location.href; // if (url.indexOf("?post=") !== -1) { // url = url.split("?post=")[0] + "#posts"; // Update the URL with the modified hash // history.pushState(null, null, url); // Update the URL in the browser without reloading the page // } // }); }); var originalUrl = window.location.href; window.addEventListener('hashchange', function() { var updatedUrl = window.location.href; if (updatedUrl !== originalUrl) { originalUrl = updatedUrl; } }); document.querySelector('#postModal').addEventListener('click', function() { var newUrl = originalUrl + '?post=posting'; history.pushState(null, null, newUrl); }); $("#postModal").on('hide.bs.modal', function() { history.pushState(null, null, originalUrl); }); function initializeCardSlider(sliderContainer, leftArrow, leftFade, rightArrow, rightFade, scrollDistance) { // Initial setup $(leftArrow).css("opacity", "0"); $(leftFade).css("display", "none"); var linksArea = $(sliderContainer); // Left arrow click event $(document).on('click',leftArrow,function () { linksArea.animate({ scrollLeft: '-=' + scrollDistance }, 500); }); // Right arrow click event $(document).on('click',rightArrow,function () { $(leftArrow).css("opacity", "1"); linksArea.animate({ scrollLeft: '+=' + scrollDistance }, 500); }); // Scroll event linksArea.scroll(function () { var scrollLeft = linksArea.scrollLeft(); $(leftArrow).toggle(scrollLeft > 0); $(leftFade).toggle(scrollLeft > 0); var containerWidth = linksArea.width(); var scrollWidth = linksArea[0].scrollWidth; var scrollRight = scrollWidth - containerWidth - scrollLeft; $(rightArrow).toggle(scrollRight > 0); $(rightFade).toggle(scrollRight > 0); if (scrollRight === 0) { $(rightArrow).css("opacity", "0"); } else { $(rightArrow).css("opacity", "1"); // $(leftArrow).css("opacity", "0"); } if (scrollLeft === 0) { $(leftArrow).css("opacity", "0"); } else { $(leftArrow).css("opacity", "1"); } }); } $(document).ready(function () { initializeCardSlider(".product-slider", ".product-left-arrow", ".product-left-fade", ".product-right-arrow", ".product-right-fade", 350); initializeCardSlider(".meeting-slider", ".meeting-left-arrow", ".meeting-left-fade", ".meeting-right-arrow", ".meeting-right-fade", 350); }); function initializeSlider(sliderType) { $("." + sliderType + "-slider").each(function () { var sliderId = $(this).data('id'); var sliderContainer = '.' + sliderType + '-slider-' + sliderId; var leftArrow = "." + sliderType + '-left-arrow-' + sliderId; var leftFade = "." + sliderType + '-left-fade-' + sliderId; var rightArrow = "." + sliderType + '-right-arrow-' + sliderId; var rightFade = "." + sliderType + '-right-fade-' + sliderId; initializeCardSlider(sliderContainer, leftArrow, leftFade, rightArrow, rightFade, 350); }); } // Usage initializeSlider("tiktok"); initializeSlider("folder-link"); initializeSlider("youtube"); initializeSlider("instagram"); initializeSlider("posts");
x server