<commit_before>function hideSmallTopNav() {
  $('#small_nav').removeClass('display_block');
  $('#small_nav').addClass('display_none');
  $('#expand_nav').css({"opacity": 1});
}

function showSmallTopNav() {
  $('#small_nav').removeClass('display_none');
  $('#small_nav').addClass('display_block');
  $('#expand_nav').css({"opacity": 0.8});
}

function hideExpandMe() {
  $('#expand_me').removeClass('display_block');
  $('#expand_me').addClass('display_none');
  $('#me').css({"opacity": 1});
  $('#title_expand').css({"opacity": 1});
}

function showExpandMoment() {
  $('#expand_moment').removeClass('display_none');
  $('#expand_moment').addClass('display_block');
}

function hideExpandMoment() {
  $('#expand_moment').removeClass('display_block');
  $('#expand_moment').addClass('display_none');
  $('#moment').css({"opacity": 1});
  $('#title_expand').css({"opacity": 1});
}

function setHeight() {
  var the_height = $('#header').height();
  $('#header_space').css({"height": the_height});
}

function expandButton() {
  hideSmallTopNav();
  $('#expand_me').toggleClass("display_none");
  $('#me').toggleClass('dim');
  $('#title_expand').toggleClass('dim');
  setHeight();
}

function headerMouseLeave() {
  if ($('#expand_moment').length && $('#expand_moment').hasClass('display_block')) {
    hideExpandMoment();
    setHeight();
  }
}

function expandMomentMouseover() {
  if ($('#expand_moment').hasClass('display_none')) {
    showExpandMoment();

    hideExpandMe();
    setHeight();
  }
}

var onReadyHeader = function() {
  setHeight();

  $('.expand_button').click(expandButton);

  //mobile menu toggling
  $('#expand_nav').click(function() {
    if ($('#small_nav').hasClass('display_none')) {
      showSmallTopNav();
    } else {
      hideSmallTopNav();
    }
  });

  $('.expand_moment_button').mouseover(expandMomentMouseover);

  $('#header').mouseleave(headerMouseLeave);

  $(window).resize(function () {
    setHeight();
  });
};

$(document).on("page:load ready", onReadyHeader);
<commit_msg>Fix header space problem after resizing and close #156<commit_after>function hideSmallTopNav() {
  $('#small_nav').removeClass('display_block');
  $('#small_nav').addClass('display_none');
  $('#expand_nav').css({"opacity": 1});
}

function showSmallTopNav() {
  $('#small_nav').removeClass('display_none');
  $('#small_nav').addClass('display_block');
  $('#expand_nav').css({"opacity": 0.8});
}

function hideExpandMe() {
  $('#expand_me').removeClass('display_block');
  $('#expand_me').addClass('display_none');
  $('#me').css({"opacity": 1});
  $('#title_expand').css({"opacity": 1});
}

function showExpandMoment() {
  $('#expand_moment').removeClass('display_none');
  $('#expand_moment').addClass('display_block');
}

function hideExpandMoment() {
  $('#expand_moment').removeClass('display_block');
  $('#expand_moment').addClass('display_none');
  $('#moment').css({"opacity": 1});
  $('#title_expand').css({"opacity": 1});
}

function setHeight() {
  var the_height = $('#header').height();
  $('#header_space').css({"height": the_height});
}

function expandButton() {
  hideSmallTopNav();
  $('#expand_me').toggleClass("display_none");
  $('#me').toggleClass('dim');
  $('#title_expand').toggleClass('dim');
  setHeight();
}

function headerMouseLeave() {
  if ($('#expand_moment').length && $('#expand_moment').hasClass('display_block')) {
    hideExpandMoment();
    setHeight();
  }
}

function expandMomentMouseover() {
  if ($('#expand_moment').hasClass('display_none')) {
    showExpandMoment();

    hideExpandMe();
    setHeight();
  }
}

var onReadyHeader = function() {
  setHeight();

  $('.expand_button').click(expandButton);

  //mobile menu toggling
  $('#expand_nav').click(function() {
    if ($('#small_nav').hasClass('display_none')) {
      showSmallTopNav();
    } else {
      hideSmallTopNav();
    }
  });

  $('.expand_moment_button').mouseover(expandMomentMouseover);

  $('#header').mouseleave(headerMouseLeave);
};

$(document).on("page:load ready", onReadyHeader);

{'fraction_non_alphanumeric': 0.2325062034739454, 'fraction_numerical': 0.004218362282878412, 'mean_word_length': 6.0472027972027975, 'pattern_counts': {'":': 14, '<': 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': '3200016', 'n_tokens_mistral': 1274, 'n_tokens_neox': 1292, 'n_words': 168}