<commit_before>Template[getTemplate('mobile_nav')].helpers({
  primaryNav: function () {
    return primaryNav;
  },
  secondaryNav: function () {
    return secondaryNav;
  },
  getTemplate: function () {
    return getTemplate(this.template);
  }
});

Template[getTemplate('mobile_nav')].events({
  'click .dropdown-sub-level': function () {
    $('body').toggleClass('mobile-nav-open');
  }
});

Template[getTemplate('mobile_nav')].events({
  'click .dropdown-top-level': function (e) {
    e.preventDefault();
    $(e.currentTarget).next().slideToggle('fast');
  },
  'click .mobile-nav a': function (e) {
    if (e.target.className.indexOf('dropdown-top-level') == -1){
      $('body').removeClass('mobile-nav-open');
    }
  }
});<commit_msg>order items in mobile nav as well<commit_after>Template[getTemplate('mobile_nav')].helpers({
  primaryNav: function () {
    return _.sortBy(primaryNav, 'order');
  },
  secondaryNav: function () {
    return _.sortBy(secondaryNav, 'order');
  },
  getTemplate: function () {
    return getTemplate(this.template);
  }
});

Template[getTemplate('mobile_nav')].events({
  'click .dropdown-sub-level': function () {
    $('body').toggleClass('mobile-nav-open');
  }
});

Template[getTemplate('mobile_nav')].events({
  'click .dropdown-top-level': function (e) {
    e.preventDefault();
    $(e.currentTarget).next().slideToggle('fast');
  },
  'click .mobile-nav a': function (e) {
    if (e.target.className.indexOf('dropdown-top-level') == -1){
      $('body').removeClass('mobile-nav-open');
    }
  }
});
{'fraction_non_alphanumeric': 0.20205920205920205, 'fraction_numerical': 0.001287001287001287, 'mean_word_length': 4.132013201320132, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2621220', 'n_tokens_mistral': 497, 'n_tokens_neox': 502, 'n_words': 76}