1MicroModal.init({ 2 awaitOpenAnimation: false, 3 awaitCloseAnimation: false, 4}); 5 6jQuery(function ($) { 7 $(document).ready(function () { 8 const rev = $(".artwork-gallery"); 9 10 rev 11 .on("init", function (event, slick, currentSlide) { 12 const cur = $(slick.$slides[slick.currentSlide]), 13 next = cur.next(), 14 next2 = cur.next().next(), 15 prev = cur.prev(), 16 prev2 = cur.prev().prev(); 17 prev.addClass("slick-sprev"); 18 next.addClass("slick-snext"); 19 prev2.addClass("slick-sprev2"); 20 next2.addClass("slick-snext2"); 21 cur 22 .removeClass("slick-snext") 23 .removeClass("slick-sprev") 24 .removeClass("slick-snext2") 25 .removeClass("slick-sprev2"); 26 slick.$prev = prev; 27 slick.$next = next; 28 }) 29 .on("beforeChange", function (event, slick, currentSlide, nextSlide) { 30 const cur = $(slick.$slides[nextSlide]); 31 slick.$prev.removeClass("slick-sprev"); 32 slick.$next.removeClass("slick-snext"); 33 slick.$prev.prev().removeClass("slick-sprev2"); 34 slick.$next.next().removeClass("slick-snext2"); 35 (next = cur.next()), (prev = cur.prev()); 36 //prev2.prev().prev(); 37 //next2.next().next(); 38 prev.addClass("slick-sprev"); 39 next.addClass("slick-snext"); 40 prev.prev().addClass("slick-sprev2"); 41 next.next().addClass("slick-snext2"); 42 slick.$prev = prev; 43 slick.$next = next; 44 cur 45 .removeClass("slick-next") 46 .removeClass("slick-sprev") 47 .removeClass("slick-next2") 48 .removeClass("slick-sprev2"); 49 }); 50 51 rev.slick({ 52 speed: 1000, 53 arrows: true, 54 dots: false, 55 focusOnSelect: true, 56 infinite: true, 57 centerMode: true, 58 slidesPerRow: 1, 59 slidesToShow: 1, 60 slidesToScroll: 1, 61 centerPadding: "0", 62 swipe: true, 63 customPaging: function (slider, i) { 64 return ""; 65 }, 66 }); 67 68 // Code courtousy of https://codepen.io/PointC/pen/zJVmMd 69 let targets = document.querySelectorAll(".tabs-block > li"); 70 let articles = document.querySelectorAll(".article"); 71 let activeTab = 0; 72 let old = 0; 73 let dur = 0.4; 74 let animation; 75 76 for (let i = 0; i < targets.length; i++) { 77 targets[i].index = i; 78 79 targets[i].addEventListener("click", loadTabContent); 80 } 81 82 gsap.set(articles[0], { display: "block", opacity: 1 }); 83 gsap.set(".slider", { 84 x: targets[0].offsetLeft, 85 width: targets[0].offsetWidth, 86 }); 87 gsap.set(targets[0], { color: "#c1b597" }); 88 gsap.set(".article-block", { display: "block", opacity: 1 }); 89 90 function loadTabContent() { 91 if (this.index != activeTab) { 92 if (animation && animation.isActive()) { 93 animation.progress(1); 94 } 95 rev.slick("refresh"); 96 animation = gsap.timeline({ defaults: { duration: 0.4 } }); 97 old = activeTab; 98 activeTab = this.index; 99 100 animation.to(".slider", { 101 x: targets[activeTab].offsetLeft, 102 width: targets[activeTab].offsetWidth, 103 rotation: "+=180", 104 }); 105 animation.to(targets[old], { color: "#a09b95" }, 0); 106 animation.to(targets[activeTab], { color: "#c1b597" }, 0); 107 108 animation.to(articles[old], { display: "none", opacity: 0 }, 0); 109 animation.to(articles[activeTab], { 110 display: "block", 111 opacity: 1, 112 }); 113 } 114 } 115 }); 116 117 $("#blog-post-slider").slick({ 118 infinite: false, 119 slidesToShow: 2, 120 slidesToScroll: 2, 121 dots: true, 122 responsive: [ 123 { 124 breakpoint: 900, 125 settings: { 126 slidesToShow: 1, 127 slidesToScroll: 1, 128 }, 129 }, 130 ], 131 }); 132}); 133 134 135 136 137 const openButton = document.getElementById('open-modal-button-3'); 138 const modal = document.getElementById('youtube-modal'); 139 const closeButton = document.querySelector('.youtube-modal-close'); 140 const iframe = document.getElementById('youtube-iframe'); 141 142 const youtubeURL = 'https://www.youtube.com/embed/Cts0e59EU6c?si=jIYJE7il3kzGJxXH%22'; 143 144 openButton.addEventListener('click', () => { 145 iframe.src = youtubeURL; 146 modal.style.display = 'block'; 147 }); 148 149 closeButton.addEventListener('click', () => { 150 iframe.src = ''; 151 modal.style.display = 'none'; 152 }); 153 154 window.addEventListener('click', (event) => { 155 if (event.target === modal) { 156 iframe.src = ''; 157 modal.style.display = 'none'; 158 } 159 }); 160 161 162 163 const siteHeader = document.querySelector('.site-header'); 164 let lastScrollY = 0; 165 166 window.addEventListener('scroll', () => { 167 const currentScrollY = window.scrollY; 168 169 if (currentScrollY > 50) { 170 siteHeader.classList.add('scrolled'); 171 } else { 172 siteHeader.classList.remove('scrolled'); 173 } 174 175 lastScrollY = currentScrollY; 176 }); 177 178 179 180 181 182 // Open modal 183 document.querySelector(".wreath-image").addEventListener("click", function () { 184 document.getElementById("wishlist-modal").style.display = "block"; 185 }); 186 187 // Close modal 188 document.querySelector(".wishlist-close").addEventListener("click", function () { 189 document.getElementById("wishlist-modal").style.display = "none"; 190 }); 191 192 // Close on outside click 193 window.onclick = function (event) { 194 const modal = document.getElementById("wishlist-modal"); 195 if (event.target === modal) { 196 modal.style.display = "none"; 197 } 198 }; 199 200 201
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.