<commit_before>$(document).on 'turbolinks:load', ->
  $('.parallax').parallax()
  # enable the side navigation-menu on mobile
  $('.button-collapse').sideNav
    closeOnClick: true
  $('.carousel.carousel-slider').carousel
    full_width: true
    indicators: true
    time_constant: 100
  $(window).on 'scroll', (e) ->
    # when the top of the window is at the same place as the top of the second nav
    if $(window).scrollTop() >= $('#navsep').offset().top
      # add original background-color and box-shadow
      $('#navigation').removeClass('trans-nav').addClass('vis-nav')
    else
      # remove background-color and box-shadow
      $('#navigation').removeClass('vis-nav').addClass('trans-nav')

  # smooth scrolling
  $('a[href^="#"]').on 'click', (e) ->
    e.preventDefault()

    # get href from the link clicked
    $target = $($(this).attr('href'))

    $('html, body').stop().animate {
      'scrollTop': $target.offset().top - $('#navigation').height() + 1
    }, 500, 'swing'

$(window).on 'load', ->
  $('.carousel').height($('.carousel').height()*0.70)<commit_msg>add todo<commit_after>$(document).on 'turbolinks:load', ->
  $('.parallax').parallax()
  # enable the side navigation-menu on mobile
  $('.button-collapse').sideNav
    closeOnClick: true
  $('.carousel.carousel-slider').carousel
    full_width: true
    indicators: true
    time_constant: 100
  $(window).on 'scroll', (e) ->
    # when the top of the window is at the same place as the top of the second nav
    if $(window).scrollTop() >= $('#navsep').offset().top
      # add original background-color and box-shadow
      $('#navigation').removeClass('trans-nav').addClass('vis-nav')
    else
      # remove background-color and box-shadow
      $('#navigation').removeClass('vis-nav').addClass('trans-nav')

  # smooth scrolling
  $('a[href^="#"]').on 'click', (e) ->
    e.preventDefault()

    # get href from the link clicked
    $target = $($(this).attr('href'))

    $('html, body').stop().animate {
      'scrollTop': $target.offset().top - $('#navigation').height() + 1
    }, 500, 'swing'

$(window).on 'load', ->
  # TODO: check size of display first
  $('.carousel').height($('.carousel').height()*0.70)
{'fraction_non_alphanumeric': 0.19954648526077098, 'fraction_numerical': 0.009070294784580499, 'mean_word_length': 3.511247443762781, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '1547735', 'n_tokens_mistral': 696, 'n_tokens_neox': 680, 'n_words': 166}