123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- (function ($) {
- 'use strict';
- // Preloader js
- $(window).on('load', function () {
- $('.preloader').fadeOut(300);
- });
- // headroom js
- $('.navigation').headroom();
- // Background-images
- $('[data-background]').each(function () {
- $(this).css({
- 'background-image': 'url(' + $(this).data('background') + ')'
- });
- });
- $('.featured-post-slider').slick({
- dots: false,
- speed: 300,
- autoplay: true,
- arrows: false,
- slidesToShow: 4,
- slidesToScroll: 1,
- responsive: [{
- breakpoint: 1024,
- settings: {
- slidesToShow: 2
- }
- },
- {
- breakpoint: 600,
- settings: {
- slidesToShow: 2
- }
- },
- {
- breakpoint: 480,
- settings: {
- slidesToShow: 1
- }
- }
- ]
- });
- // Masonry
- setTimeout(function(){
- $('.masonry-container').masonry({
- itemSelector: '.masonry-container > div',
- columnWidth: 1
- });
- }, 500);
- // instafeed
- if (($('#instafeed').length) !== 0) {
- var accessToken = $('#instafeed').attr('data-accessToken');
- var userFeed = new Instafeed({
- get: 'user',
- resolution: 'low_resolution',
- accessToken: accessToken,
- template: '<div class="instagram-post"><a href="{{link}}" target="_blank"><img class="img-fluid w-100" src="{{image}}" alt="instagram-image"></a></div>'
- });
- userFeed.run();
- }
- setTimeout(function () {
- $('.instagram-slider').slick({
- dots: false,
- speed: 300,
- autoplay: true,
- arrows: false,
- slidesToShow: 6,
- slidesToScroll: 1,
- responsive: [{
- breakpoint: 1024,
- settings: {
- slidesToShow: 4
- }
- },
- {
- breakpoint: 600,
- settings: {
- slidesToShow: 3
- }
- },
- {
- breakpoint: 480,
- settings: {
- slidesToShow: 2
- }
- }
- ]
- });
- }, 1500);
- // article reading time
- $('article').each(function () {
- let _this = $(this);
- _this.readingTime({
- readingTimeTarget: _this.find('.eta'),
- remotePath: _this.attr('data-file'),
- remoteTarget: _this.attr('data-target')
- });
- });
- })(jQuery);
|