1(function($){ 2 "use strict"; 3 4 var $window = $(window); 5 6 $window.on('load', function() { 7 8 $window.trigger("resize"); 9 }); 10 11 12 $window.resize(function(){ 13 stickyNavRemove(); 14 }); 15 16 17 /* Detect Browser Size 18 -------------------------------------------------------*/ 19 var minWidth; 20 if (Modernizr.mq('(min-width: 0px)')) { 21 // Browsers that support media queries 22 minWidth = function (width) { 23 return Modernizr.mq('(min-width: ' + width + 'px)'); 24 }; 25 } 26 else { 27 // Fallback for browsers that does not support media queries 28 minWidth = function (width) { 29 return $window.width() >= width; 30 }; 31 } 32 33 /* Mobile Detect 34 -------------------------------------------------------*/ 35 if (/Android|iPhone|iPad|iPod|BlackBerry|Windows Phone/i.test(navigator.userAgent || navigator.vendor || window.opera)) { 36 $("html").addClass("mobile"); 37 } 38 else { 39 $("html").removeClass("mobile"); 40 } 41 42 /* IE Detect 43 -------------------------------------------------------*/ 44 if(Function('/*@cc_on return document.documentMode===10@*/')()){ $("html").addClass("ie"); } 45 46 47 48 /* Sticky Navigation 49 -------------------------------------------------------*/ 50 51 function stickyNavRemove() { 52 var $navHolder = $('.nav__holder'); 53 if (!minWidth(992)) { 54 $navHolder.removeClass('nav--sticky'); 55 } else { 56 $navHolder.addClass('nav--sticky'); 57 } 58 } 59 60 /* Anchor */ 61 62 $(".anchor-link").click(function(e) { 63 e.preventDefault(); 64 var aid = $(this).attr("href"); 65 $('html, body').animate({scrollTop: $(aid).offset().top}, 1350, "easeInOutQuint"); 66 }); 67 68 /* Add class */ 69 70 $(function() { 71 $(".nav__menu li").click(function() { 72 $("li").removeClass("active"); 73 $(this).addClass("active"); 74 }); 75 }); 76 77 78 $("#text-button").click(function(e) { 79 e.preventDefault(); 80 $(".overlay-case").removeClass("hide"); 81 }); 82 83 $(".overlay-case button.btn-close").click(function(e) { 84 e.preventDefault(); 85 $(".overlay-case").addClass("hide"); 86 }); 87 88 $("#no-text-button-port").click(function(e) { 89 e.preventDefault(); 90 $(".overlay-portfolio").removeClass("hide"); 91 92 }); 93 94 $("#no-text-button").click(function(e) { 95 e.preventDefault(); 96 $(".overlay-portfolio").removeClass("hide"); 97 }); 98 99 $(".overlay-portfolio button.btn-close").click(function(e) { 100 e.preventDefault(); 101 $(".overlay-portfolio").addClass("hide"); 102 $('#video-port').attr('src', `https://pptgo.com.br/player/video/case-claro`); 103 }); 104 105 106 /* Tabs 107 -------------------------------------------------------*/ 108 $('.tabs__trigger').on('click', function(e) { 109 var currentAttrValue = $(this).attr('href'); 110 $('.tabs__content-trigger ' + currentAttrValue).stop().fadeIn(1000).siblings().hide(); 111 $(this).parent('li').addClass('tabs__item--active').siblings().removeClass('tabs__item--active'); 112 e.preventDefault(); 113 }); 114 115 116 /* Sticky Socials 117 -------------------------------------------------------*/ 118 (function() { 119 var $stickyCol = $('.sticky-col'); 120 if($stickyCol) { 121 $stickyCol.stick_in_parent({ 122 offset_top: 100 123 }); 124 } 125 })(); 126 127})(jQuery); 128 129function notification(msg, type = 'info', url = null) { 130 const icons = { 131 success: ` 132 <svg class="flex-shrink-0 w-5 h-5 text-green-700 dark:text-green-400" fill="currentColor" viewBox="0 0 20 20"> 133 <path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-7.778 7.778a1 1 0 01-1.414 0L3.293 10.86a1 1 0 011.414-1.414l3.1 3.1 6.364-6.364a1 1 0 011.414 0z" clip-rule="evenodd"></path> 134 </svg> 135 `, 136 danger: ` 137 <svg class="flex-shrink-0 w-5 h-5 text-red-700 dark:text-red-400" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24"> 138 <path fill-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm11-4a1 1 0 1 0-2 0v5a1 1 0 1 0 2 0V8Zm-1 7a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H12Z" clip-rule="evenodd"/> 139 </svg> 140 `, 141 error: ` 142 <svg class="flex-shrink-0 w-5 h-5 text-red-700 dark:text-red-400" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24"> 143 <path fill-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm11-4a1 1 0 1 0-2 0v5a1 1 0 1 0 2 0V8Zm-1 7a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H12Z" clip-rule="evenodd"/> 144 </svg> 145 146 `, 147 warning: ` 148 <svg class="flex-shrink-0 w-5 h-5 text-yellow-700 dark:text-yellow-400" fill="currentColor" viewBox="0 0 20 20"> 149 <path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.721-1.36 3.486 0l6.518 11.6A1.75 1.75 0 0116.518 17H3.482a1.75 1.75 0 01-1.743-2.301l6.518-11.6zM9 7h2v4H9V7zm0 6h2v2H9v-2z" clip-rule="evenodd"></path> 150 </svg> 151 `, 152 info: ` 153 <svg class="flex-shrink-0 w-5 h-5 text-blue-700 dark:text-blue-400" fill="currentColor" viewBox="0 0 20 20"> 154 <path fill-rule="evenodd" d="M18 10A8 8 0 11 2 10a8 8 0 0116 0zM9 9h2v4H9V9zm0-3h2v2H9V6z" clip-rule="evenodd"></path> 155 </svg> 156 ` 157 }; 158 159 const styles = { 160 success: 'bg-green-50 text-green-700 border border-green-300', 161 danger: 'bg-red-200 text-red-700 border border-red-300', 162 error: 'bg-red-200 text-red-700 border border-red-300', 163 warning: 'bg-yellow-50 text-yellow-700 border border-yellow-300', 164 info: 'bg-blue-50 text-blue-700 border border-blue-300' 165 }; 166 167 const icon = icons[type] || icons.info; 168 const style = styles[type] || styles.info; 169 170 $.notify( 171 { message: msg }, 172 { 173 element: 'body', 174 type: type, 175 allow_dismiss: true, 176 newest_on_top: true, 177 placement: { 178 from: 'top', 179 align: 'center' 180 }, 181 offset: 20, 182 spacing: 10, 183 z_index: 9999, 184 delay: 6000, 185 animate: { 186 enter: 'animate__animated animate__fadeInDown', 187 exit: 'animate__animated animate__fadeOutUp' 188 }, 189 template: ` 190 <div data-notify="container" class="max-w-md w-full mx-auto mb-4 rounded-lg shadow ${style} p-4 flex gap-3" role="alert"> 191 <div class="w-full flex items-center gap-3"> 192 ${icon} 193 <div class="text-sm font-medium" data-notify="message">${msg}</div> 194 <button type="button" class="ml-auto text-gray-400 hover:text-gray-600 dark:hover:text-gray-300" data-notify="dismiss"> 195 <svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"> 196 <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" /> 197 </svg> 198 </button> 199 </div> 200 </div> 201 ` 202 } 203 ); 204 205 if (url) { 206 setTimeout(() => { 207 window.location.href = url; 208 }, 2000); 209 } 210} 211
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.