From e3f83438dfd7c4a081bdafa245f6837bc718c0dc Mon Sep 17 00:00:00 2001 From: somrat Date: Mon, 18 Nov 2019 15:17:24 +0600 Subject: modified hugo v0.58.0 deprication --- assets/js/script.js | 320 +++++++++++++++++++++++---------------------- exampleSite/config.toml | 1 + layouts/partials/blog.html | 2 +- theme.toml | 2 +- 4 files changed, 166 insertions(+), 159 deletions(-) diff --git a/assets/js/script.js b/assets/js/script.js index 56fa950..6e5639b 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -1,6 +1,5 @@ - - -(function ($) { "use strict"; +(function ($) { + "use strict"; /* ========================================================================= */ /* Page Preloader @@ -9,137 +8,136 @@ // window.load = function () { // document.getElementById('preloader').style.display = 'none'; // } - - $(window).on("load",function(){ - $('#preloader').fadeOut('slow',function(){$(this).remove();}); + + $(window).on("load", function () { + $('#preloader').fadeOut('slow', function () { + $(this).remove(); + }); }); - - - - + + + + /* ========================================================================= */ /* Portfolio Filtering Hook /* ========================================================================= */ - $('.play-icon i').click(function() { + $('.play-icon i').click(function () { var video = ''; $(this).replaceWith(video); }); - + /* ========================================================================= */ /* Portfolio Filtering Hook /* ========================================================================= */ - - var filterizd = $('.filtr-container').filterizr({}); - //Active changer - $('.filtr-control').on('click', function () { - $('.filtr-control').removeClass("active"); - $(this).addClass("active"); - }); - + setTimeout(function () { + var filterizd = $('.filtr-container').filterizr({}); + //Active changer + $('.filtr-control').on('click', function () { + $('.filtr-control').removeClass("active"); + $(this).addClass("active"); + }); + }, 500); /* ========================================================================= */ /* Testimonial Carousel /* ========================================================================= */ - + //Init the slider $('.testimonial-slider').slick({ slidesToShow: 2, slidesToScroll: 1, infinite: true, - arrows:false, + arrows: false, autoplay: true, - autoplaySpeed: 2000, - responsive: [ - { - breakpoint: 600, - settings: { - slidesToShow: 1, - slidesToScroll: 2 - } - }, - { - breakpoint: 480, - settings: { - slidesToShow: 1, - slidesToScroll: 1 - } - } - ] + autoplaySpeed: 2000, + responsive: [{ + breakpoint: 600, + settings: { + slidesToShow: 1, + slidesToScroll: 2 + } + }, + { + breakpoint: 480, + settings: { + slidesToShow: 1, + slidesToScroll: 1 + } + } + ] }); - - + + /* ========================================================================= */ /* Clients Slider Carousel /* ========================================================================= */ - + //Init the slider $('.clients-logo-slider').slick({ infinite: true, - arrows:false, + arrows: false, autoplay: true, - autoplaySpeed: 2000, - slidesToShow: 5, - slidesToScroll: 1, + autoplaySpeed: 2000, + slidesToShow: 5, + slidesToScroll: 1, }); - - - - + + + + /* ========================================================================= */ /* Company Slider Carousel /* ========================================================================= */ $('.company-gallery').slick({ infinite: true, - arrows:false, + arrows: false, autoplay: true, - autoplaySpeed: 2000, - slidesToShow: 5, - slidesToScroll: 1, + autoplaySpeed: 2000, + slidesToShow: 5, + slidesToScroll: 1, }); /* ========================================================================= */ /* Awars Counter Js /* ========================================================================= */ - $('.counter').each(function() { - var $this = $(this), - countTo = $this.attr('data-count'); - - $({ countNum: $this.text()}).animate({ - countNum: countTo - }, - - { - - duration: 1500, - easing:'linear', - step: function() { - $this.text(Math.floor(this.countNum)); - }, - complete: function() { - $this.text(this.countNum); - //alert('finished'); - } - - }); - - - + $('.counter').each(function () { + var $this = $(this), + countTo = $this.attr('data-count'); + + $({ + countNum: $this.text() + }).animate({ + countNum: countTo + }, + + { + duration: 1500, + easing: 'linear', + step: function () { + $this.text(Math.floor(this.countNum)); + }, + complete: function () { + $this.text(this.countNum); + //alert('finished'); + } + + }); }); - - - - + + + + /* ========================================================================= */ /* Contact Form Validating /* ========================================================================= */ - - + + $('#contact-submit').click(function (e) { - + //stop the form from being submitted e.preventDefault(); - + /* declare the variables, var error is the variable that we use on the end to determine if there was an error or not */ var error = false; @@ -147,7 +145,7 @@ var email = $('#email').val(); var subject = $('#subject').val(); var message = $('#message').val(); - + /* in the next section we do the checking by using VARIABLE.length where VARIABLE is the variable we are checking (like name, email), length is a JavaScript function to get the number of characters. @@ -183,7 +181,7 @@ } else { $('#message').css("border-color", "#666"); } - + //now when the validation is done we check if the error variable is false (no errors) if (error == false) { //disable the submit button to avoid spamming @@ -192,7 +190,7 @@ 'disabled': 'false', 'value': 'Sending...' }); - + /* using the jquery's post(ajax) function and a lifesaver function serialize() which gets all the data from the form we submit it to send_email.php */ @@ -212,73 +210,81 @@ }); } }); - - -})(jQuery); - - - -window.marker = null; - -function initialize() { - var map; - + + + })(jQuery); + + + + window.marker = null; + + function initialize() { + var map; + var latitude = $('#map').data('lat'); var longitude = $('#map').data('long'); - var nottingham = new google.maps.LatLng(latitude, longitude); - - var style = [ - {"stylers": [{"hue": "#ff61a6"},{"visibility": "on"},{"invert_lightness": true},{"saturation": 40},{"lightness": 10}]} - ]; - - var mapOptions = { - // SET THE CENTER - center: nottingham, - - // SET THE MAP STYLE & ZOOM LEVEL - mapTypeId: google.maps.MapTypeId.ROADMAP, - zoom:9, - - // SET THE BACKGROUND COLOUR - backgroundColor:"#000", - - // REMOVE ALL THE CONTROLS EXCEPT ZOOM - zoom:17, - panControl:false, - zoomControl:true, - mapTypeControl:false, - scaleControl:false, - streetViewControl:false, - overviewMapControl:false, - zoomControlOptions: { - style:google.maps.ZoomControlStyle.LARGE - } - - } - map = new google.maps.Map(document.getElementById('map'), mapOptions); - - // SET THE MAP TYPE - var mapType = new google.maps.StyledMapType(style, {name:"Grayscale"}); - map.mapTypes.set('grey', mapType); - map.setMapTypeId('grey'); - - //CREATE A CUSTOM PIN ICON - var marker_image = $('#map').data('marker'); - var pinIcon = new google.maps.MarkerImage(marker_image,null,null, null,new google.maps.Size(25, 33)); - - marker = new google.maps.Marker({ - position: nottingham, - map: map, - icon: pinIcon, - title: 'navigator' - }); -} - -var map = $('#map'); -if(map.length != 0){ - google.maps.event.addDomListener(window, 'load', initialize); -} - - - - \ No newline at end of file + var nottingham = new google.maps.LatLng(latitude, longitude); + + var style = [{ + "stylers": [{ + "hue": "#ff61a6" + }, { + "visibility": "on" + }, { + "invert_lightness": true + }, { + "saturation": 40 + }, { + "lightness": 10 + }] + }]; + + var mapOptions = { + // SET THE CENTER + center: nottingham, + + // SET THE MAP STYLE & ZOOM LEVEL + mapTypeId: google.maps.MapTypeId.ROADMAP, + zoom: 9, + + // SET THE BACKGROUND COLOUR + backgroundColor: "#000", + + // REMOVE ALL THE CONTROLS EXCEPT ZOOM + zoom: 17, + panControl: false, + zoomControl: true, + mapTypeControl: false, + scaleControl: false, + streetViewControl: false, + overviewMapControl: false, + zoomControlOptions: { + style: google.maps.ZoomControlStyle.LARGE + } + + } + map = new google.maps.Map(document.getElementById('map'), mapOptions); + + // SET THE MAP TYPE + var mapType = new google.maps.StyledMapType(style, { + name: "Grayscale" + }); + map.mapTypes.set('grey', mapType); + map.setMapTypeId('grey'); + + //CREATE A CUSTOM PIN ICON + var marker_image = $('#map').data('marker'); + var pinIcon = new google.maps.MarkerImage(marker_image, null, null, null, new google.maps.Size(25, 33)); + + marker = new google.maps.Marker({ + position: nottingham, + map: map, + icon: pinIcon, + title: 'navigator' + }); + } + + var map = $('#map'); + if (map.length != 0) { + google.maps.event.addDomListener(window, 'load', initialize); + } \ No newline at end of file diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 607c69b..36a7497 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -2,6 +2,7 @@ baseURL = "https://example.org/" languageCode = "en-us" title = "Navigator | Responsive Multipurpose Bootstrap Hugo Template" theme = "navigator-hugo" +summaryLength = 10 # Build robots.txt file enableRobotsTXT = true diff --git a/layouts/partials/blog.html b/layouts/partials/blog.html index acd1f28..e366b5e 100644 --- a/layouts/partials/blog.html +++ b/layouts/partials/blog.html @@ -12,7 +12,7 @@
- {{ range first 3 .Data.Pages }} + {{ range first 3 .Site.RegularPages}} {{ "" | safeHTML }}
diff --git a/theme.toml b/theme.toml index 6b23d91..9cf7fb3 100644 --- a/theme.toml +++ b/theme.toml @@ -5,7 +5,7 @@ description = "Hugo port of the Themefisher’s Navigator Template" homepage = "https://themefisher.com/hugo-themes/" tags = ['landing-page', 'business', 'agency-template', 'multilingual', 'themefisher', 'hugo-theme', 'hugo-templates', 'bootstrap', 'blog', 'responsive', 'clean', 'simple', 'company', 'projects', 'dark', 'creative', 'contact-form', 'custom-themes', 'mobile', 'flexbox', 'minimalistic', 'pages'] features = ['bootstrap4','responsive','multilingual'] -min_version = "0.55" +min_version = "0.58.0" [author] name = "Themefisher" -- cgit v1.2.3