<commit_before># current page indicator on sidebar
$ ->
  setNavigation()
  revealNavigation()

$(window).resize ->
  revealNavigation()

setNavigation = ->
  baseUrl = "/open-source-club-website" # github repo name
  p = window.location.pathname # p = url path
  u = window.location.host.indexOf("github.io") # u = site url

  if u > -1
    # baseUrl is defined in main.coffee
    # strips the baseUrl from the path
    p = p.replace(baseUrl, "")

  p = p.replace(/\/$/, '') # remove initial '/' from path

  $('#main-nav>a').each ->
    href = $(this).attr('href')

    if p.substring(0, href.length) == href
      if href.length > 1
        $(this).addClass 'active'
    else if href.length == 1
      # if on the root of the domain ...
      $(this).addClass 'active'
    return

  return

revealNavigation = ->
  width = $(window).width()
  height = $(window).height()

  $('#page-content-wrapper').scroll ->
    if $('#page-content-wrapper').scrollTop() > $('.landing').height() and width > height and height <= 1000
      $('.navbar').css 'display', 'none'
      $('#page-content-wrapper').css({'margin-top' : '0', 'height' : '100%'})
      $('.menu-toggle').css({
        'margin': '1rem 0 0 1rem',
        'background' : 'rgba(75,75,75,.35)',
        'box-shadow': '0 1px 1px 0 rgba(0,0,0,.45)'
      })

    else
      $('.navbar').css 'display', ''
      $('#page-content-wrapper').css({'margin-top' : '', 'height' : ''})
      $('.menu-toggle').css({
        'margin' : '',
        'background' : '',
        'box-shadow': ''
      })<commit_msg>changed when the navabar becomes hidden<commit_after># current page indicator on sidebar
$ ->
  setNavigation()
  revealNavigation()

$(window).resize ->
  revealNavigation()

setNavigation = ->
  baseUrl = "/open-source-club-website" # github repo name
  path = window.location.pathname # p = url path

  if window.location.host.indexOf("github.io") > -1
    # baseUrl is defined in main.coffee
    # strips the baseUrl from the path
    path = path.replace(baseUrl, "")

  path = path.replace(/\/$/, '') # remove initial '/' from path

  $('#main-nav>a').each ->
    href = $(this).attr('href')

    if path.substring(0, href.length) == href
      if href.length > 1
        $(this).addClass 'active'
    else if href.length == 1
      # if on the root of the domain ...
      $(this).addClass 'active'
    return

  return

revealNavigation = ->
  width = $(window).width()
  height = $(window).height()

  $('#page-content-wrapper').scroll ->

    if $('.landing').length > 0
      heightHidden =
        $('.landing').height() + $('.about').height() + $('.subscribe').height() + $('.contact').outerHeight()
    else
      heightHidden = 400


    if $('#page-content-wrapper').scrollTop() > heightHidden and width > height and height <= 1000
      $('.navbar').css 'display', 'none'
      $('#page-content-wrapper').css({'margin-top' : '0', 'height' : '100%'})
      $('.menu-toggle').css({
        'margin': '1rem 0 0 1rem',
        'background' : 'rgba(75,75,75,.35)',
        'box-shadow': '0 1px 1px 0 rgba(0,0,0,.45)'
      })

    else
      $('.navbar').css 'display', ''
      $('#page-content-wrapper').css({'margin-top' : '', 'height' : ''})
      $('.menu-toggle').css({
        'margin' : '',
        'background' : '',
        'box-shadow': ''
      })
{'fraction_non_alphanumeric': 0.20402644230769232, 'fraction_numerical': 0.021033653846153848, 'mean_word_length': 2.610629067245119, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 26, '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': '2844501', 'n_tokens_mistral': 1120, 'n_tokens_neox': 1046, 'n_words': 251}