1 document.addEventListener('DOMContentLoaded', function() { 2 3 var mdFormCollection = document.querySelectorAll('div[class*="cu-md-"]'); 4 5 var mdFormUpdateValue = function(e) { 6 var inputValue = e.target.value.trim(); 7 var inputLabel = e.target.closest('.cu-label'); 8 if(inputValue === "") { 9 inputLabel.classList.remove('is-active'); 10 } else { 11 inputLabel.classList.add('is-active'); 12 } 13 } 14 15 Array.prototype.forEach.call(mdFormCollection, function (mdForm) { 16 var inputElementCollection = mdForm.querySelectorAll("input, select, textarea"); 17 18 Array.prototype.forEach.call(inputElementCollection, function (inputElement) { 19 if( inputElement.type.toLowerCase() === 'submit' ) { 20 return; 21 } 22 inputElement.addEventListener('input', mdFormUpdateValue); 23 }); 24 }); 25 26 }); 27 28 29jQuery(function() { 30 31 32 jQuery('span.ast-icon.icon-search').html('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M500.3 443.7l-119.7-119.7c27.22-40.41 40.65-90.9 33.46-144.7C401.8 87.79 326.8 13.32 235.2 1.723C99.01-15.51-15.51 99.01 1.724 235.2c11.6 91.64 86.08 166.7 177.6 178.9c53.8 7.189 104.3-6.236 144.7-33.46l119.7 119.7c15.62 15.62 40.95 15.62 56.57 0C515.9 484.7 515.9 459.3 500.3 443.7zM79.1 208c0-70.58 57.42-128 128-128s128 57.42 128 128c0 70.58-57.42 128-128 128S79.1 278.6 79.1 208z"/></svg>'); 33 34 35 var $button = jQuery('[data-section=section-hb-button-1]').clone(); 36 jQuery('[data-section=section-header-mobile-trigger]') 37 .after($button); 38 39 jQuery('[data-section=section-header-mobile-trigger]') 40 .before('\ 41 <div class="ast-builder-layout-element ast-flex site-header-focus-item ast-header-search" data-section="section-header-search">\ 42 <div class="ast-search-icon">\ 43 <a class="header-cover astra-search-icon mobile" aria-label="Search icon link" href="#">\ 44 <span class="ast-icon icon-search">\ 45 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M500.3 443.7l-119.7-119.7c27.22-40.41 40.65-90.9 33.46-144.7C401.8 87.79 326.8 13.32 235.2 1.723C99.01-15.51-15.51 99.01 1.724 235.2c11.6 91.64 86.08 166.7 177.6 178.9c53.8 7.189 104.3-6.236 144.7-33.46l119.7 119.7c15.62 15.62 40.95 15.62 56.57 0C515.9 484.7 515.9 459.3 500.3 443.7zM79.1 208c0-70.58 57.42-128 128-128s128 57.42 128 128c0 70.58-57.42 128-128 128S79.1 278.6 79.1 208z"/></svg>\ 46 </span>\ 47 </a>\ 48 </div>\ 49 <div class="ast-search-menu-icon header-cover"></div>\ 50 </div>'); 51 52 53 54 jQuery('#ast-mobile-header').prepend('\ 55 <div class="ast-search-box header-cover" id="ast-search-form" style="">\ 56 <div class="ast-search-wrapper">\ 57 <div class="ast-container">\ 58 <form class="search-form" action="https://alittlegesture.org/" method="get">\ 59 <span class="search-text-wrap">\ 60 <label for="s" class="screen-reader-text"> Procurar</label>\ 61 <input name="s" class="search-field" type="text" autocomplete="off" value="" placeholder="Procurar">\ 62 </span>\ 63 <span id="close" class="close"><span class="ast-icon icon-close">\ 64 </span>\ 65 </span>\ 66 </form>\ 67 </div>\ 68 </div>\ 69 </div>'); 70 71 if (jQuery(".page-template-homepage-php")[0]){ 72 73 $homelogo = '<img width="191" height="95" src="//'+window.location.host+'/wp-content/uploads/2022/10/logo-homepage.svg" class="custom-logo astra-logo-svg lazyloaded" alt="A Little Gesture" decoding="async" data-src="//'+window.location.host+'/wp-content/uploads/2022/10/logo-homepage.svg">' 74 75 jQuery("header").find(".advanced-header-logo").append($homelogo) 76 77 } 78 79 80 var $nib = jQuery('[data-section=section-hb-html-1]').clone().addClass('nib'); 81 jQuery('.site-header-primary-section-right.site-header-section.ast-flex.ast-grid-right-section') 82 .prepend($nib); 83 84 jQuery('body').on('click', '.header-cover.astra-search-icon.mobile', function(event) { 85 jQuery('.ast-search-box.header-cover').css({ 86 "display":"block", 87 "opacity":"1", 88 }); 89 jQuery('.ast-search-box.header-cover').find(".search-field").focus(); 90 }); 91 92 jQuery('body').on('click', '.ast-icon.icon-close', function(event) { 93 jQuery('.ast-search-box.header-cover').css({ 94 "display":"none", 95 "opacity":"0", 96 }); 97 jQuery('input[name=s').val(''); 98 }); 99 100 101 jQuery('body').on('click', '.ast-header-search .ast-search-menu-icon .search-submit', function(event) { 102 if (jQuery(".search-field").val() == ""){ 103 jQuery('.search-form').find('.search-field').focus(); 104 event.preventDefault(); 105 } 106 }); 107 108 109 if (jQuery(".search-field").val() != ""){ 110 jQuery("[data-section=section-header-search] .search-form").addClass("active"); 111 }else{ 112 jQuery("[data-section=section-header-search] .search-form").removeClass("active"); 113 } 114 115 jQuery(".footer_home_bottom-borders").parent().addClass("footer_home_bottom-borders_parent"); 116 117 jQuery(".footer_home_bottom-borders2").parent().addClass("footer_home_bottom-borders_parent"); 118 119 jQuery('a[href*="#ppal"]').addClass("open-popup-link"); 120 121 jQuery('a[href*="#como-ajudar"]').addClass("open-popup-link"); 122 123 jQuery(window).resize(function(){ 124 if (window.matchMedia("(max-width: 1500px)").matches) { 125 jQuery('.ast-search-box.header-cover').css({ 126 "display":"none", 127 "opacity":"0", 128 }); 129 jQuery('input[name=s').val(''); 130 131 } 132 jQuery('#astra-footer-menu .menu-item,.ast-desktop .ast-primary-header-bar .main-header-menu > .menu-item,.ast-header-break-point .main-navigation .stack-on-mobile li').removeClass("open-popup-link"); 133 jQuery('#astra-footer-menu .menu-item a[href="#como-ajudar"],.ast-desktop .ast-primary-header-bar .main-header-menu > .menu-item a[href="#como-ajudar"], .ast-header-break-point .main-navigation .stack-on-mobile li a[href="#como-ajudar"]').addClass("open-popup-link"); 134 135 }).resize()// trigger on page load 136 137 jQuery(".cover_paralax").parent().css({ 138 "background-color":"#2A7DE1" 139 }); 140 141 jQuery(document).on('click', 'a[href^="#"]', function(e) { 142 // target element id 143 var id = jQuery(this).attr('href'); 144 145 // target element 146 var $id = jQuery(id); 147 if ($id.length === 0) { 148 return; 149 } 150 151 152 jQuery('html, body').animate({ 153 scrollTop: jQuery($id).offset().top -20 154 }, 900, 'swing'); 155 }); 156 157 158 jQuery(window).load(function() { 159 if (window.location.hash) { 160 var hash = window.location.hash; 161 162 if (jQuery(hash).length) { 163 jQuery('html, body').animate({ 164 scrollTop: jQuery(hash).offset().top -20 165 }, 900, 'swing'); 166 } 167 } 168 169 }); 170 171 172 173 if(jQuery('.sticky-button').length){ 174 175 var elementOffset = jQuery('.sticky-button').offset().top; 176 177 jQuery(window).bind("scroll", function() { 178 if (jQuery(this).scrollTop() > elementOffset + 10) { 179 jQuery(".sticky-button").css('visibility', 'visible'); 180 } else { 181 jQuery(".sticky-button").stop().css('visibility', 'hidden'); 182 } 183 184 }); 185 } 186 187 if (jQuery('.single-layout-1').length > 0) { 188 189 // move cat links 190 jQuery(".cat-links").each(function() { 191 jQuery(this).closest(".entry-header").find("span.date").append(this); 192 193 194 // for category page 195 jQuery(".ast-separate-container #primary").css({"flex-wrap":"wrap"}) 196 jQuery("#main").css({"flex":"0 0 100%"}) 197 }); 198 199 // add query url to cat links 200 jQuery(".cat-links a").each(function() { 201 202 var hrefCat = jQuery(this).attr("href"); 203 204 var parts = hrefCat.split('/'); 205 var lastSegment = parts.pop() || parts.pop(); // handle potential trailing slash 206 207 208 jQuery(this).attr("href", hrefCat+'?category='+lastSegment) 209 210 211 }); 212 213 }else{ 214 jQuery(".cat-links").each(function() { 215 jQuery(this).closest("header.entry-header").prepend(this); 216 }); 217 } 218 219 // animated categories link 220 221 jQuery(document).on('click', '#alm-filters-cat_single ul li', function(e) { 222 var $id = jQuery('.filters-cat'); 223 if ($id.length === 0) { 224 return; 225 } 226 227 e.preventDefault(); 228 229 // top position relative to the document 230 var pos = $id.offset().top; 231 232 // animated top scrolling 233 jQuery('body, html').animate({scrollTop: pos - 20}); 234 }); 235 236 237 238 jQuery('.open-popup-link').magnificPopup({ 239 type:'inline', 240 midClick: true // Allow opening popup on middle mouse click. Always set it to true if you don't provide alternative source in href. 241 }); 242 243 244 var swiper = new Swiper(".mySwiper", { 245 slidesPerView: 1, 246 spaceBetween: 30, 247 loop: true, 248 navigation: { 249 nextEl: ".swiper-button-next", 250 prevEl: ".swiper-button-prev", 251 }, 252 }); 253 254 255 var append = '<form action="https://www.justgiving.com/campaign/educationfund2024/" class="plethorapluginstab_1_tablink_x" target="_Blank"> \ 256 <input type="hidden" name="hosted_button_id" value="GUKZLYPCGKEM8"> \
257 <span>\ 258 <input type="image" width="100%" src="https://umpequenogesto.org/activeapp/wp-content/uploads/2023/03/sm_btn.svg" class="image_input" border="0" name="submit" title="I want to donate" alt="Donate with Just Give"> \ 259 </span> \ 260 </form>'; 261 jQuery( ".js-plethoraplugins-tabs--link" ).parent().css("position","relative") 262 jQuery( ".js-plethoraplugins-tabs--link" ).parent().append( append ); 263 264 265 266 267 268 269 270}); 271 272 window.addEventListener("scroll", function(){ 273 274 if(jQuery('.anime_triger').length){ 275 276 var two1 = document.querySelector('.anime_triger'); 277 278 var two = two1.parentElement; 279 280 var area_newsletter = document.querySelector('.area_newsletter'); 281 var parentDiv = area_newsletter.parentElement; 282 283 if (window.scrollY > two.offsetTop + two.offsetHeight - window.screen.height + (area_newsletter.clientHeight - 280)){ 284 parentDiv.classList.remove("animate__slideInDown"); 285 //parentDiv.classList.add("animate__slideOutUp"); 286 287 parentDiv.classList.add("sticky-news"); 288 }else{ 289 290 291 292 //parentDiv.classList.remove("animate__slideOutUp"); 293 parentDiv.classList.remove("sticky-news"); 294 295 parentDiv.classList.add("animate__slideInDown"); 296 297 298 } 299 300 parentDiv.classList.add("alignfull"); 301 302 } 303 304 }); 305 306window.jQuery = window.$ = jQuery; 307 308$(document).ready(function() { 309 var $stickyDiv = $('.content-to-stick'); 310 var $parent = $stickyDiv.parent(); 311 var stickyDivHeight = $stickyDiv.outerHeight(); 312 var parentOffsetTop = $parent.offset().top; 313 var parentHeight = $parent.outerHeight(); 314 var stickyDivOffsetTop = $stickyDiv.offset().top; 315 var stickyDivBottomPoint = parentOffsetTop + parentHeight - stickyDivHeight; 316 317 $(window).on('scroll', function() { 318 var scrollTop = $(window).scrollTop(); 319 320 if (scrollTop > stickyDivOffsetTop && scrollTop < stickyDivBottomPoint) { 321 $stickyDiv.addClass('stuck'); 322 $stickyDiv.css('width', $parent.width()); 323 } else { 324 $stickyDiv.removeClass('stuck'); 325 } 326 327 if (scrollTop >= stickyDivBottomPoint) { 328 $stickyDiv.addClass('absolute-bottom'); 329 } else { 330 $stickyDiv.removeClass('absolute-bottom'); 331 } 332 }); 333 334 $(window).on('resize', function() { 335 // Recalculate positions on window resize 336 stickyDivHeight = $stickyDiv.outerHeight(); 337 parentOffsetTop = $parent.offset().top; 338 parentHeight = $parent.outerHeight(); 339 stickyDivOffsetTop = $stickyDiv.offset().top; 340 stickyDivBottomPoint = parentOffsetTop + parentHeight - stickyDivHeight; 341 342 // Update the div's width to the parent's width 343 if ($stickyDiv.hasClass('stuck')) { 344 $stickyDiv.css('width', $parent.width()); 345 } 346 }); 347}); 348 349
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.