PageSourceSearch

https://ahmedgurbuz.github.io/assets/js/main.js

js ahmedgurbuz.github.io collected 2026-10-03 08:33:42 UTC 2,547 bytes, 117 lines download raw bytes

1/*
2	Strata by HTML5 UP
3	html5up.net | @ajlkn
4	Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
5*/
6
7(function($) {
8
9	var $window = $(window),
10		$body = $('body'),
11		$header = $('#header'),
12		$footer = $('#footer'),
13		$main = $('#main'),
14		settings = {
15
16			// Parallax background effect?
17				parallax: true,
18
19			// Parallax factor (lower = more intense, higher = less intense).
20				parallaxFactor: 20
21
22		};
23
24	// Breakpoints.
25		breakpoints({
26			xlarge:  [ '1281px',  '1800px' ],
27			large:   [ '981px',   '1280px' ],
28			medium:  [ '737px',   '980px'  ],
29			small:   [ '481px',   '736px'  ],
30			xsmall:  [ null,      '480px'  ],
31		});
32
33	// Play initial animations on page load.
34		$window.on('load', function() {
35			window.setTimeout(function() {
36				$body.removeClass('is-preload');
37			}, 100);
38		});
39
40	// Touch?
41		if (browser.mobile) {
42
43			// Turn on touch mode.
44				$body.addClass('is-touch');
45
46			// Height fix (mostly for iOS).
47				window.setTimeout(function() {
48					$window.scrollTop($window.scrollTop() + 1);
49				}, 0);
50
51		}
52
53	// Footer.
54		breakpoints.on('<=medium', function() {
55			$footer.insertAfter($main);
56		});
57
58		breakpoints.on('>medium', function() {
59			$footer.appendTo($header);
60		});
61
62	// Header.
63
64		// Parallax background.
65
66			// Disable parallax on IE (smooth scrolling is jerky), and on mobile platforms (= better performance).
67				if (browser.name == 'ie'
68				||	browser.mobile)
69					settings.parallax = false;
70
71			if (settings.parallax) {
72
73				breakpoints.on('<=medium', function() {
74
75					$window.off('scroll.strata_parallax');
76					$header.css('background-position', '');
77
78				});
79
80				breakpoints.on('>medium', function() {
81
82					$header.css('background-position', 'left 0px');
83
84					$window.on('scroll.strata_parallax', function() {
85						$header.css('background-position', 'left ' + (-1 * (parseInt($window.scrollTop()) / settings.parallaxFactor)) + 'px');
86					});
87
88				});
89
90				$window.on('load', function() {
91					$window.triggerHandler('scroll');
92				});
93
94			}
95
96	// Main Sections: Two.
97
98		// Lightbox gallery.
99			$window.on('load', function() {
100
101				$('#two').poptrox({
102					caption: function($a) { return $a.next('h3').text(); },
103					overlayColor: '#2c2c2c',
104					overlayOpacity: 0.85,
105					popupCloserText: '',
106					popupLoaderText: '',
107					selector: '.work-item a.image',
108					usePopupCaption: true,
109					usePopupDefaultStyling: false,
110					usePopupEasyClose: false,
111					usePopupNav: true,
112					windowMargin: (breakpoints.active('<=small') ? 0 : 50)
113				});
114
115			});
116
117})(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.