{"size": 775, "ext": "js", "max_stars_repo_path": "assets/js/kosmos-style.js", "max_stars_repo_name": "kosmos-industrie40/kosmos-styleguide", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "assets/js/kosmos-style.js", "max_issues_repo_name": "kosmos-industrie40/kosmos-styleguide", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "assets/js/kosmos-style.js", "max_forks_repo_name": "kosmos-industrie40/kosmos-styleguide", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.724137931, "max_line_length": 63, "alphanum_fraction": 0.6490322581}
/*
    KOSMos Style Guide
 */
// toggle sidebar menu
// no . needed here
const MAIN_CONTAINER = '#main_container';
const COLLAPSED_CLASS = 'sidebar_collapsed';
const TOGGLE_BUTTON = '#menu_toggle';
let CollapsedState;
CollapsedState = false;

$(document).ready( function() {
  $(TOGGLE_BUTTON).on('click', function() {
    console.info('Toggling Sidebar');
    $(MAIN_CONTAINER).toggleClass(COLLAPSED_CLASS);

    // switch out the icon
    if (CollapsedState === false) {
      $(TOGGLE_BUTTON).find('.fa').addClass('fa-chevron-right')
          .removeClass('fa-chevron-left');
      CollapsedState = true;
    } else {
      $(TOGGLE_BUTTON).find('.fa').addClass('fa-chevron-left')
          .removeClass('fa-chevron-right');
      CollapsedState = false;
    }
  });
});
