PageSourceSearch

https://sabanciuniv.edu/themes/custom/su/components/_global/script.js?v=1.3.9

js sabanciuniv.edu collected 2026-09-24 08:34:49 UTC 4,903 bytes, 143 lines download raw bytes

1(function ($, Drupal, drupalSettings) {
2    Drupal.behaviors.suScriptsGlobal = {
3      attach: function (context, settings) {
4        $("#image-link-contain-slider").owlCarousel({
5          items: 3,
6          margin: 76,
7          loop: false,
8          nav:true,
9          dots: false,
10          responsiveClass:true,
11          responsive: {
12            992: {
13              items: 3
14            },
15            768: {
16              items: 2
17            },
18            480: {
19              items: 2
20            },
21            320: {
22              items: 1
23            }
24          }
25        });
26        var sections = $('.easy-container');
27        var sectionProps = sections.map(function(index, section) {
28          return {
29            id: section.attributes[0].value,
30            yPos: section.getBoundingClientRect().top - ($('.main-header').outerHeight())
31          };
32        }).get();
33  
34        var anchorLinks = $('.node-baglantılar .erisim-title');
35  
36        anchorLinks.each(function(index, link) {
37          $(link).on('click', function() {
38            var linkNoHash = $(link).attr('href');
39            linkNoHash = linkNoHash.replace(/ /g, ''); // Tüm boşlukları kaldır
40            if (linkNoHash) {  
41              linkNoHash = linkNoHash.replace('#', ''); // '#' karakterini kaldır
42              $(link).attr('href','#'+linkNoHash);
43             
44            } else { 
45              return;
46            }
47            for (var i = 0; i < sectionProps.length; i++) {
48              if (linkNoHash === sectionProps[i].id) {
49                var yPos = sectionProps[i].yPos;
50                $('html, body').animate({
51                  scrollTop: yPos - $('.main-header').outerHeight(),
52                  left: 0,
53                  behavior: 'smooth'
54                }, 80);
55              }
56            }
57          });
58        });
59        $(document).ready(function(){
60          var $searchTrigger = $('[data-ic-class="search-trigger"]');
61          var $searchInput = $('[data-ic-class="search-input"]');
62          var $searchClear = $('[data-ic-class="search-clear"]');
63          var $modalOverlay = $('.modal-overlay');
64          var $header = $('.main-header'); 
65          
66          $searchTrigger.click(function(){
67            var $this = $(this);
68            $this.addClass('active');
69            $searchInput.focus();
70            $modalOverlay.addClass('active');
71            $header.addClass('active'); 
72          });
73        
74          $searchInput.blur(function(){
75            if($searchInput.val().length > 0){
76              return false;
77            } else {
78              $searchTrigger.removeClass('active');
79              $modalOverlay.removeClass('active');
80              $header.removeClass('active'); 
81            }
82          });
83        
84          $searchInput.focus(function(){
85            $searchTrigger.addClass('active');
86            $modalOverlay.addClass('active');
87            $header.addClass('active'); 
88          });
89        
90          $searchClear.click(function(){
91            $searchTrigger.removeClass('active');
92            $modalOverlay.removeClass('active');
93            $header.removeClass('active'); 
94          });
95        
96          $('.fa-times-circle').click(function(){
97            $('.icon-search-container').removeClass('active');
98            $modalOverlay.removeClass('active');
99            $header.removeClass('active'); // Header'dan "active" sınıfını kaldırın
100          });
101        });
102
103        var openSidebarButton = document.querySelector(".open-sidebar");
104        var contentSidebar = document.querySelector(".content-sidebar");
105        var modalOverlay = document.querySelector(".modal-overlay");
106        if (openSidebarButton) {
107         openSidebarButton.addEventListener("click", function () {
108            contentSidebar.classList.add("active");
109            modalOverlay.classList.add("active");
110         });
111       }
112        var closeSidebarButton = document.querySelector(".close-sidebar");
113        var contentSidebar = document.querySelector(".content-sidebar");
114        var modalOverlay = document.querySelector(".modal-overlay");
115        if (closeSidebarButton) {
116         closeSidebarButton.addEventListener("click", function () {
117            contentSidebar.classList.remove("active");
118            modalOverlay.classList.remove("active");
119         });
120        }
121
122        $(document).ready(function(){
123          $(window).scroll(function () {
124              if ($(this).scrollTop() > 30) {
125                $('#back-to-top').fadeIn();
126              } else {
127                $('#back-to-top').fadeOut();
128              }
129            });
130            // scroll body to 0px on click
131            $('#back-to-top').click(function () {
132              $('body,html').animate({
133                scrollTop: 0
134              }, 50);
135              
136            });
137        });
138
139    
140      }
141    };
142  })(jQuery, Drupal, drupalSettings);
143  

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.