{"size": 1410, "ext": "js", "max_stars_repo_path": "dev/babel/_nav.js", "max_stars_repo_name": "jsdelivrbot/Portfolio-Page", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "dev/babel/_nav.js", "max_issues_repo_name": "jsdelivrbot/Portfolio-Page", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "dev/babel/_nav.js", "max_forks_repo_name": "jsdelivrbot/Portfolio-Page", "max_forks_repo_forks_event_min_datetime": "2017-08-29T16:21:08.000Z", "max_forks_repo_forks_event_max_datetime": "2018-12-08T19:49:52.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 2, "avg_line_length": 27.1153846154, "max_line_length": 74, "alphanum_fraction": 0.5865248227}
/* Toggle Responsive Nav Start */
var navIsOn = false;
function toggleNav() {
  navIsOn = !navIsOn;
  var btns = document.querySelectorAll('.nav_btn');
  var hr = document.querySelector('.nav_hr');

  if (navIsOn) {
    for (var i = 0; i < btns.length; i++) {
      btns[i].classList.add('nav_btn-on')
    }
    hr.classList.add('nav_btn-on');
  } else {
    for (var i = 0; i < btns.length; i++) {
      btns[i].classList.remove('nav_btn-on')
    }
    hr.classList.remove('nav_btn-on');
  }
}

document.getElementById('nav_toggle').addEventListener("click", toggleNav)
/* Toggle Responsive Nav End */

/* Smooth Scroll Start */
$(document).ready(function() {
  var navHeight = $('nav').outerHeight();
 $('.nav_anchor').click(function(x) {
    var linkHref = $(this).attr('href');
    x.preventDefault();
    if (navIsOn) {toggleNav()} // - toggle off nav
    $('html, body').delay(150).animate({
     scrollTop: $(linkHref).offset().top - navHeight
   }, 800);
 });
});
/* Smooth Scroll End */

/* Nav Sticky Start */
$(function () {
  $(document).on('scroll', function () {
    if ($(window).scrollTop() >= $("#hero").height()) {
      $("#nav").addClass("nav_fixed-on");
      $("#nav_ghost").addClass("nav_ghost");
    }
    if ($(window).scrollTop() < $("#hero").height()) {
      $("#nav").removeClass("nav_fixed-on");
     $("#nav_ghost").removeClass("nav_ghost");
    }
  });
});
/* Nav Sticky End */
