PageSourceSearch

https://braincodes.netlify.app/assets/js/common.min.js

js braincodes.netlify.app collected 2026-10-03 10:31:45 UTC 17,304 bytes, 457 lines download raw bytes

1function fullPage() {
2    $("#js-fullpage").fullpage({
3        easingcss3: "cubic-bezier(0.645, 0.045, 0.355, 1)",
4        scrollingSpeed: 1e3,
5        anchors: ["top", "works", "about", "contact"],
6        navigation: !0,
7        navigationPosition: "left",
8        animateAnchor: !1,
9        onLeave: function (index, nextIndex, direction) {
10            if (1 == index)
11                anime({
12                    targets: ".scrollDown",
13                    translateY: "180%",
14                    duration: 500,
15                    easing: "easeInOutCubic",
16                });
17            if (1 == nextIndex)
18                anime({
19                    targets: ".scrollDown",
20                    translateY: ["180%", 0],
21                    duration: 500,
22                    easing: "easeInOutCubic",
23                });
24            if (0 == state) {
25                var nextClass = ".fp-section-" + nextIndex;
26                anime
27                    .timeline()
28                    .add({
29                        targets: nextClass + " .image",
30                        scale: [0.85, 1],
31                        translateX: ["10%", 0],
32                        translateZ: 0,
33                        easing: "easeOutCubic",
34                        duration: 1500,
35                        delay: 500,
36                    })
37                    .add({
38                        targets: nextClass + " .image__cover",
39                        translateX: [0, "110%"],
40                        translateZ: 0,
41                        easing: "easeInOutQuart",
42                        duration: function (el, i) {
43                            return 1200 - 200 * i;
44                        },
45                        offset: "-=1700",
46                    })
47                    .add({
48                        targets: nextClass + " .page-num p",
49                        translateY: ["100%", 0],
50                        translateZ: 0,
51                        easing: "easeInOutCubic",
52                        duration: 1e3,
53                        offset: "-=1200",
54                    })
55                    .add({
56                        targets: nextClass + " .js-letter",
57                        translateX: ["-105%", 0],
58                        translateZ: 0,
59                        easing: "easeInOutCubic",
60                        duration: 800,
61                        delay: function (el, i) {
62                            return 50 * i;
63                        },
64                        offset: "-=1500",
65                    });
66                if (1 == index)
67                    anime({
68                        targets: ".js-moon",
69                        translateX: [0, "100%"],
70                        translateZ: 0,
71                        opacity: [1, 0],
72                        easing: "easeOutCubic",
73                        duration: 800,
74                        delay: function (el, i) {
75                            return 50 * i;
76                        },
77                    });
78                if (1 == nextIndex)
79                    anime({
80                        targets: ".js-moon",
81                        translateX: ["100%", 0],
82                        translateZ: 0,
83                        opacity: [0, 1],
84                        easing: "easeOutCubic",
85                        duration: 800,
86                        delay: function (el, i) {
87                            return 500 + 50 * i;
88                        },
89                    });
90            }
91        },
92        afterLoad: function (anchorLink, index) {},
93        afterRender: function () {
94            $(".section").each(function (i) {
95                var num = i + 1;
96                $(this).addClass("fp-section-" + num);
97            });
98        },
99    });
100}
101
102Barba.Prefetch.init();
103function headerColor() {
104    var pageName = $(".barba-container").attr("data-namespace");
105    $(window).on("scroll", function () {
106        "top" !== pageName && $(window).scrollTop() > $(window).height()
107            ? ($("header").addClass("js-color"), $(".back-arrow").addClass("js-color"))
108            : ($("header").removeClass("js-color"), $(".back-arrow").removeClass("js-color"));
109    });
110}
111null,
112    $('<img src="./assets/img/about.jpg">'),
113    $('<img src="./assets/img/contact.jpg">'),
114    $(window).on("load", function () {
115        anime
116            .timeline()
117            .add({
118                targets: ".loader",
119                translateY: [0, "-100%"],
120                translateZ: 0,
121                easing: "easeInOutCubic",
122                duration: 800,
123                complete: function () {
124                    $(".loader").addClass(".js-hidden");
125                },
126            })
127            .add({
128                targets: ".js-moon",
129                translateX: ["100%", 0],
130                translateZ: 0,
131                opacity: [0, 1],
132                easing: "easeOutCubic",
133                duration: 800,
134                delay: function (el, i) {
135                    return 500 + 50 * i;
136                },
137                offset: "-=1000",
138            })
139            .add({
140                targets: ".active .js-letter",
141                translateX: ["-105%", 0],
142                translateZ: 0,
143                easing: "easeInOutCubic",
144                duration: 800,
145                delay: function (el, i) {
146                    return 50 * i;
147                },
148                offset: "-=1200",
149            });
150    });
151var $win = $(window),
152    fpnav = {},
153    image = {},
154    imageBig = {},
155    isSp = !1;
156$(function () {
157    $win.on("load resize", function () {
158        (isSp = !0),
159            (fpnav = { y: "100%", x: 0 }),
160            (image = {
161                width: "80%",
162                height: "55.633%",
163                top: "9.859%",
164                marginRight: "10%",
165                marginLeft: "10%",
166            }),
167            (imageBig = { width: "100%", height: "65.492%", marginLeft: 0, top: 0 }),
168            window.matchMedia("(min-width: 801px)").matches
169                ? ((isSp = !1),
170                  (fpnav = { y: 0, x: "-100%" }),
171                  (image = {
172                      width: "53.125%",
173                      height: "74.81%",
174                      top: "auto",
175                      marginRight: "8%",
176                      marginLeft: "auto",
177                  }),
178                  (imageBig = {
179                      width: "60.677%",
180                      height: "100vh",
181                      marginLeft: "auto",
182                      top: "auto",
183                  }))
184                : window.matchMedia("(min-width: 421px)").matches &&
185                  ((isSp = !1),
186                  (fpnav = { y: "100%", x: 0 }),
187                  (image = {
188                      width: "53.125%",
189                      height: "74.81%",
190                      marginRight: 40,
191                      marginLeft: "auto",
192                  }),
193                  (imageBig = {
194                      width: "60.677%",
195                      height: "100vh",
196                      top: "auto",
197                      marginLeft: "auto",
198                  }));
199    });
200}),
201    (Barba.Pjax.originalPreventCheck = Barba.Pjax.preventCheck),
202    (Barba.Pjax.preventCheck = function (evt, element) {
203        return (
204            !!($(element).attr("href") && -1 < $(element).attr("href").indexOf("#")) ||
205            Barba.Pjax.originalPreventCheck(evt, element)
206        );
207    });
208var state = 0;
209Barba.Dispatcher.on("newPageReady", function () {
210    if ($("#js-fullpage").length)
211        new Parallax($(".js-parallax-moon").get(0)),
212            new Parallax($(".js-parallax-moonlight").get(0)),
213            new Parallax($(".js-parallax-star").get(0));
214    isSp && $(".page-top").height($(window).height()),
215        ga(
216            "send",
217            "pageview",
218            window.location.pathname.replace(/^\/?/, "/") + window.location.search
219        );
220}),
221    $(function () {
222        fullPage();
223        var height = $(window).height();
224        $(".js-menuBtn").on("click", function () {
225            $(".menuIcon").toggleClass("js-menuOpen"),
226                $(".global-nav").toggleClass("js-open"),
227                $(window).scrollTop() > height && $("header").toggleClass("js-color"),
228                $(this).hasClass("js-menuOpen")
229                    ? (Barba.Pjax.getTransition = function () {
230                          return PageTransitionCurtain;
231                      })
232                    : $("#js-fullpage").length
233                    ? (Barba.Pjax.getTransition = function () {
234                          return PageTransitionTop;
235                      })
236                    : (Barba.Pjax.getTransition = function () {
237                          return PageTransitionUnder;
238                      });
239        });
240    });
241var topTransition = Barba.BaseView.extend({
242    namespace: "top",
243    onEnter: function () {
244        (Barba.Pjax.getTransition = function () {
245            return PageTransitionTop;
246        }),
247            $(".js-contact").on("click", function () {
248                $(".menuIcon").removeClass("js-menuOpen"),
249                    $(".global-nav").removeClass("js-open"),
250                    $.fn.fullpage.moveTo("contact"),
251                    (Barba.Pjax.getTransition = function () {
252                        return PageTransitionTop;
253                    });
254            });
255    },
256    onEnterCompleted: function () {},
257    onLeave: function () {},
258    onLeaveCompleted: function () {
259        $.fn.fullpage.destroy("all");
260    },
261});
262topTransition.init();
263
264var underLayer = Barba.BaseView.extend({
265    namespace: "underlayer",
266    onEnter: function () {
267        (Barba.Pjax.getTransition = function () {
268            return PageTransitionUnder;
269        }),
270            $(window).scroll(function () {
271                $(".js-scroll").each(function (i) {
272                    $(window).scrollTop() + $(window).height() > $(this).offset().top &&
273                        $(this).addClass("in");
274                });
275            }),
276            isSp && $(".page-top").height($(window).height());
277    },
278    onEnterCompleted: function () {
279        headerColor();
280        const back_arrow = $(".back-arrow");
281        const scrollDown = $(".scrollDown");
282        if (back_arrow.length != 0 || scrollDown.length != 0) {
283            $(window).scroll((e) => {
284                if ($(window).scrollTop() >= $(window).height()) {
285                    back_arrow.css("color", "#072142");
286                } else {
287                    back_arrow.css("color", "#ffffff");
288                }
289                if ($(window).scrollTop() >= $(window).height() / 2) {
290                    scrollDown.addClass("scrolled");
291                } else {
292                    scrollDown.removeClass("scrolled");
293                }
294            });
295        }
296
297        anime
298            .timeline({ duration: 500, easing: "easeInOutCubic" })
299            .add({ targets: ".btn-wrap", translateY: ["110%", 0] })
300            .add({ targets: ".back-arrow svg", translateX: ["100%", 0], offset: "-=500" })
301            .add({ targets: ".scrollDown", translateY: ["180%", 0], offset: "-=500" });
302    },
303    onLeave: function () {
304        state = 1;
305        anime
306            .timeline({ duration: 500, easing: "easeInOutCubic" })
307            .add({ targets: ".btn-wrap", translateY: [0, "110%"] })
308            .add({ targets: ".back-arrow svg", translateX: [0, "-100%"], offset: "-=500" });
309    },
310    onLeaveCompleted: function () {
311        fullPage(), (state = 0);
312        anime
313            .timeline({ duration: 500, easing: "easeInOutCubic" })
314            .add({ targets: ".active .page-num p", translateY: ["100%", 0], translateZ: 0 })
315            .add({
316                targets: "#fp-nav ul",
317                translateY: [fpnav.y, 0],
318                translateX: [fpnav.x, 0],
319                translateZ: 0,
320                offset: "-=500",
321            })
322            .add({
323                targets: ".fullpage__slide",
324                background: ["#020b16", "rgba(0,0,0,0)"],
325                offset: "-=500",
326            })
327            .add({
328                targets: ".active .btn-wrap",
329                translateY: ["110%", 0],
330                translateZ: 0,
331                offset: "-=500",
332            });
333    },
334});
335underLayer.init();
336
337var PageTransitionTop = Barba.BaseTransition.extend({
338        start: function () {
339            this.open().then(this.newContainerLoading).then(this.finish.bind(this));
340        },
341        open: function () {
342            return new Promise(function (resolve) {
343                anime
344                    .timeline({
345                        duration: 500,
346                        easing: "easeInOutCubic",
347                        complete: function () {
348                            resolve();
349                        },
350                    })
351                    .add({
352                        targets: ".active .image",
353                        width: [image.width, imageBig.width],
354                        height: [image.height, imageBig.height],
355                        marginRight: [image.marginRight, 0],
356                        marginLeft: [image.marginLeft, imageBig.marginLeft],
357                        top: [image.top, imageBig.top],
358                    })
359                    .add({
360                        targets: ".fullpage__slide",
361                        background: ["rgba(0,0,0,0)", "#020b16"],
362                        offset: "-=500",
363                    })
364                    .add({
365                        targets: ".page-num p",
366                        translateY: [0, "100%"],
367                        translateZ: 0,
368                        offset: "-=500",
369                    })
370                    .add({
371                        targets: "#fp-nav ul",
372                        translateY: [0, fpnav.y],
373                        translateX: [0, fpnav.x],
374                        translateZ: 0,
375                        offset: "-=500",
376                    })
377                    .add({
378                        targets: ".active .btn-wrap",
379                        translateY: [0, "110%"],
380                        translateZ: 0,
381                        offset: "-=500",
382                    })
383                    .play();
384            });
385        },
386        finish: function () {
387            this.done();
388        },
389    }),
390    PageTransitionCurtain = Barba.BaseTransition.extend({
391        start: function () {
392            this.open().then(this.newContainerLoading).then(this.finish.bind(this));
393        },
394        open: function () {
395            return new Promise(function (resolve) {
396                anime({
397                    targets: ".curtain",
398                    translateY: ["100%", 0],
399                    translateZ: 0,
400                    duration: 800,
401                    easing: "easeInOutCubic",
402                    complete: function () {
403                        $(".menuIcon").removeClass("js-menuOpen"),
404                            $(".global-nav").removeClass("js-open"),
405                            $("body,html").scrollTop(0),
406                            resolve();
407                    },
408                });
409            });
410        },
411        finish: function () {
412            anime({
413                targets: ".curtain",
414                translateY: [0, "-100%"],
415                translateZ: 0,
416                duration: 800,
417                easing: "easeInOutCubic",
418            });
419            this.done();
420        },
421    }),
422    PageTransitionUnder = Barba.BaseTransition.extend({
423        start: function () {
424            this.close().then(this.newContainerLoading).then(this.finish.bind(this));
425        },
426        close: function () {
427            return new Promise(function (resolve) {
428                var closeAnime = anime
429                    .timeline({
430                        duration: 500,
431                        easing: "easeInOutCubic",
432                        autoplay: !1,
433                        complete: function () {
434                            resolve();
435                        },
436                    })
437                    .add({
438                        targets: ".page-top .image",
439                        width: [imageBig.width, image.width],
440                        height: [imageBig.height, image.height],
441                        marginRight: [0, image.marginRight],
442                        marginLeft: [imageBig.marginLeft, image.marginLeft],
443                        top: [imageBig.top, image.top],
444                    });
445                0 !== $(window).scrollTop()
446                    ? $("body,html").animate({ scrollTop: 0 }, 500, "swing", closeAnime.play)
447                    : closeAnime.play();
448            });
449        },
450        finish: function () {
451            this.done();
452        },
453    });
454
455$(function () {
456    Barba.Pjax.start(), Barba.Prefetch.init(), (Barba.Utils.xhrTimeout = 1e4);
457});

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.