Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Page Load Strategy
- */
- window.$window.on('load', function () {
- new Animations();
- // load fonts first
- fontObserver()
- // prepare all the texts
- .then(() => SetText.splitText({
- target: window.$document.find('.js-split-text')
- }))
- .then(() => SetText.setLines({
- target: window.$document.find('.split-text[data-split-text-set="lines"]')
- }))
- .then(() => SetText.setWords({
- target: window.$document.find('.split-text[data-split-text-set="words"]')
- }))
- .then(() => SetText.setChars({
- target: window.$document.find('.split-text[data-split-text-set="chars"]')
- }))
- // init template components
- .then(() => {
- new LazyLoad({
- scope: window.$document,
- setPaddingBottom: true,
- run: true
- });
- initComponents(window.$document);
- })
- .then(() => window.PagePreloader.finish())
- .then(() => {
- // init cursor only on non-touch browsers
- if (window.theme.cursorFollower.enabled && !window.Modernizr.touchevents) {
- new Cursor({
- scope: window.$document,
- target: $('#js-cursor'),
- cursorElements: '[data-arts-cursor]',
- highlightElements: 'a:not(a[data-arts-cursor]):not(.social__item a):not(.section-video__link):not(.no-highlight), button:not(button[data-arts-cursor]), .filter__item, .section-nav-projects__header', // links to highlight
- highlightScale: 1.5, // default highlight scaling
- magneticElements: '[data-arts-cursor-magnetic]', // magnetic elements
- magneticScaleCursorBy: 1.3, // default magnetic scaling
- animDuration: 0.25,
- });
- }
- // begin animations
- window.SMController.enabled(true);
- window.SMController.update(true);
- });
- // init AJAX navigation
- if (window.theme.ajax.enabled) {
- new PJAX({
- target: window.$barbaWrapper,
- scope: window.$document
- });
- }
- });
Add Comment
Please, Sign In to add comment