1(function ($) { 2 "use strict"; 3 4 window.onload = function () { 5 6 // Light/Dark mode 7 const toggleSwitch = document.querySelector('.checkbox'); 8 const currentTheme = localStorage.getItem("theme"); 9 if (currentTheme) { 10 document.documentElement.setAttribute("data-theme", currentTheme); 11 if (currentTheme === "dark") { 12 toggleSwitch.checked = true; 13 $('.darkbutton').css('display', 'none'); 14 $('.lightbutton').css('display', 'block'); 15 } 16 } 17 18 $('.darkbutton').on('click', function() { 19 $('.darkbutton').css('display', 'none'); 20 $('.lightbutton').css('display', 'block'); 21 localStorage.setItem("theme", "dark"); 22 document.documentElement.setAttribute("data-theme", "dark"); 23 toggleSwitch.checked = true; 24 }); 25 26 $('.lightbutton').on('click', function() { 27 $('.darkbutton').css('display', 'block'); 28 $('.lightbutton').css('display', 'none'); 29 localStorage.setItem("theme", "light"); 30 document.documentElement.setAttribute("data-theme", "light"); 31 toggleSwitch.checked = false; 32 }); 33 34 function switchTheme(e) { 35 if (e.target.checked) { 36 document.documentElement.setAttribute("data-theme", "dark"); 37 localStorage.setItem("theme", "dark"); 38 $('.darkbutton').css('display', 'none'); 39 $('.lightbutton').css('display', 'block'); 40 } else { 41 document.documentElement.setAttribute("data-theme", "light"); 42 localStorage.setItem("theme", "light"); 43 $('.darkbutton').css('display', 'block'); 44 $('.lightbutton').css('display', 'none'); 45 } 46 } 47 if (toggleSwitch) { 48 toggleSwitch.addEventListener("change", switchTheme, false); 49 } 50 51 var m = $.cookie('pmiasto'); 52 if(m) 53 { 54 $('.pogoda_widget_dll').val(m); 55 } 56 57 }; 58 59 $("body").delegate(".pogoda_widget_dll", "change", function () { 60 var miasto = $(".pogoda_widget_dll").val(); 61 var expires = new Date(); 62 expires.setTime(expires.getTime() + (10 * 24 * 60 * 60 * 1000)); 63 document.cookie = 'pmiasto=' + miasto + ';expires=' + expires.toUTCString(); 64 location.reload(); 65 }); 66 67 68 69 // Fixed header 70 $(window).on("scroll", function () { 71 if ($("header").hasClass("sticky_on")) { 72 const stickyPlaceHolder = $("#sticky_placeholder"), 73 menu = $("#navbar_wrap"), 74 menuH = menu.outerHeight(), 75 topbarH = $("#topbar_wrap").outerHeight() || 0, 76 targrtScroll = topbarH, 77 header = $("header"); 78 79 if ($(window).scrollTop() > targrtScroll) { 80 header.addClass("fixed"); 81 stickyPlaceHolder.height(menuH); 82 } 83 else { 84 header.removeClass("fixed"); 85 stickyPlaceHolder.height(0); 86 } 87 } 88 }); 89 90 // Fixed header mobile 91 $(window).on("scroll", function () { 92 if ($(".mobile_header").hasClass("mobile_sticky_on")) { 93 const stickyPlaceHolder = $("#mobile_sticky_placeholder"), 94 menu = $("#mobile_menu_bar_wrap"), 95 menuH = menu.outerHeight(), 96 topbarH = $("#topbar_mobile").outerHeight() || 0, 97 targrtScroll = topbarH, 98 header = $(".mobile_header"); 99 100 if ($(window).scrollTop() > targrtScroll) { 101 header.addClass("mobile_fixed"); 102 stickyPlaceHolder.height(menuH); 103 } 104 else { 105 header.removeClass("mobile_fixed"); 106 stickyPlaceHolder.height(0); 107 } 108 } 109 }); 110 111/* mobile menu toggler */ 112 113$(".togler_mobile").on("click", function (e) { 114 e.preventDefault(); 115 if ($(".menu_mobile_nav").is(":visible")) { 116 $(".menu_mobile_nav").slideUp(); 117 $("body").removeClass("menu_mobile_active"); 118 } else { 119 $(".menu_mobile_nav").slideDown(); 120 $("body").addClass("menu_mobile_active"); 121 } 122 }); 123 124/* Ellipsis */ 125 126 $().vEllipsis({ 127 'lines': 3, 128 'responsive':true, 129 'onlyFullWords':true, 130 'delay': 0 131 }); 132 133/* mobile menu dropdown */ 134 const MobileMenu = $(".menu_mobile .menu"); 135 136 if (MobileMenu.length) { 137 MobileMenu.children("li").addClass("menu-item-parent"); 138 MobileMenu.find(".menu_mobile_sub > a").on("click", function (e) { 139 e.preventDefault(); 140 $(this).toggleClass("active"); 141 const n = $(this).next(".menu_mobile_dropdown"), 142 s = $(this).closest(".menu-item-parent").find(".menu_mobile_dropdown"); 143 MobileMenu 144 .find(".menu_mobile_dropdown") 145 .not(s) 146 .slideUp(250) 147 .prev("a") 148 .removeClass("active"), 149 n.slideToggle(250); 150 });
151 MobileMenu 152 .find(".menu-item:not(.menu_mobile_sub) > a").on("click", function (e) { 153 $(".menu_mobile_nav").slideUp(); 154 $("body").removeClass("menu_mobile_active"); 155 }); 156 } 157 158 159/* search box */ 160 161var navSearchTrigger = $('.search_trigger'), 162 navSearchTriggerIcon = navSearchTrigger.find('i'), 163 navSearchBox = $('.search_box'), 164 navSearchInput = $('.search_input'); 165 166navSearchTrigger.on('click', function(e){ 167e.preventDefault(); 168navSearchTriggerIcon.toggleClass('search_close'); 169navSearchBox.slideToggle(); 170navSearchInput.focus(); 171}); 172 173/* scrolled tabs */ 174 175$('.nav-tabs').scrollingTabs({ 176 bootstrapVersion: 4, 177 scrollToTabEdge: true, 178 enableSwiping: true, 179 disableScrollArrowsOnFullyScrolled: true, 180 leftArrowContent: 181 '<div class="scrtabs-tab-scroll-arrow scrtabs-tab-scroll-arrow-left"><i class="fa-solid fa-chevron-left"></i></div>', 182 rightArrowContent: 183 '<div class="scrtabs-tab-scroll-arrow scrtabs-tab-scroll-arrow-right"><i class="fa-solid fa-chevron-right"></i></div>' 184}); 185 186/* helpers */ 187 188$('#pokaz_regulamin_maly').click(function() { 189 $('.regulamin_maly').slideToggle("slow"); 190 return false; 191}); 192$('#Name').click(function() { 193 $('#stophejt').slideToggle("slow"); 194}); 195 196$('textarea').keyup(function() { 197 var 198 characterCount = $(this).val().length, 199 now = $('#now'), 200 max = $('#max'), 201 count = $('#licznik_znakow'); 202 203 now.text(characterCount); 204 205 if (characterCount < 500) { 206 now.css('color', '#7e7e7e'); 207 } 208 if (characterCount >= 350 && characterCount < 400) { 209 now.css('color', '#209e00'); 210 } 211 if (characterCount >= 400 && characterCount < 450) { 212 now.css('color', '#ff9933'); 213 } 214 if (characterCount >= 450 && characterCount < 500) { 215 now.css('color', '#ff0000'); 216 } 217 if (characterCount >= 450) { 218 max.css('color', '#7e7e7e'); 219 now.css('color', '#ff0000'); 220 } else { 221 max.css('color','#7e7e7e'); 222 count.css('font-weight','normal'); 223 } 224}); 225 226// slider dla galerii 227// Autor: Ken Wheeler 228// http://kenwheeler.github.io 229// Licensed MIT 230$('.galeria').slick({ 231 infinite: false, 232 slidesToShow: 3, 233 slidesToScroll: 1, 234 speed: 500, 235 adaptiveHeight: true, 236 responsive: [ 237 { 238 breakpoint: 576, 239 settings: { 240 slidesToShow: 2, 241 slidesToScroll: 1, 242 infinite: false, 243 } 244 } 245 ] 246}); 247 248$('.ad_pogrzeby').slick({ 249 slidesToShow: 3, 250 slidesToScroll: 1, 251 infinite: true, 252 autoplay: true, 253 autoplaySpeed: 2500, 254}); 255 256// FitVids 1.1 Fluid width video embeds 257// Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com 258// Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ 259// Released under the WTFPL license - http://sam.zoy.org/wtfpl/ 260// Target your .container, .wrapper, .post, etc. 261$(".art_video").fitVids(); 262$(".art_video_lista").fitVids(); 263 264 265 266 267})(jQuery);
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.