<commit_before>/*global document, window, location */
'use strict';
var _ = require('lodash');
var $ = require('jquery');
var React = require('react/addons');
var Router = require('react-router');

var ContactOverlay = require('./ContactOverlay');
var MenuOverlay = require('./MenuOverlay');
var Collections = require('./Collections');
var HeadMixin = require('../lib/HeadMixin');

var PictureFill;

try {
  PictureFill = require('picturefill');
} catch (e) {
  if (! e instanceof ReferenceError)
    throw e;
}

var RESPONSIVE_BREAKPOINT = 800;

var Layout = React.createClass({
  mixins: [HeadMixin],

  getInitialState: function() {
    return {
      menuOpen: false,
      contactOpen: false,
      small: false
    }
  },
  
  componentWillMount: function() {
    if (typeof location !== 'undefined' && location.hash === '#contact') {
      this.setState({contactOpen: true});
    }
  },
  
  componentDidMount: function() {
    // need to bind this at a higher level
    $(document).on('keydown', this.handleKeyDown);

    $(window).on('resize', this.handleWindowResize);

    this.pictureFill();<commit_msg>Fix broken HeadMixin ref<commit_after>/*global document, window, location */
'use strict';
var _ = require('lodash');
var $ = require('jquery');
var React = require('react/addons');
var Router = require('react-router');

var ContactOverlay = require('./ContactOverlay');
var MenuOverlay = require('./MenuOverlay');
var Collections = require('./Collections');

var PictureFill;

try {
  PictureFill = require('picturefill');
} catch (e) {
  if (! e instanceof ReferenceError)
    throw e;
}

var RESPONSIVE_BREAKPOINT = 800;

var Layout = React.createClass({
  getInitialState: function() {
    return {
      menuOpen: false,
      contactOpen: false,
      small: false
    }
  },
  
  componentWillMount: function() {
    if (typeof location !== 'undefined' && location.hash === '#contact') {
      this.setState({contactOpen: true});
    }
  },
  
  componentDidMount: function() {
    // need to bind this at a higher level
    $(document).on('keydown', this.handleKeyDown);

    $(window).on('resize', this.handleWindowResize);

    this.pictureFill();
{'fraction_non_alphanumeric': 0.15561694290976058, 'fraction_numerical': 0.0027624309392265192, 'mean_word_length': 3.8612975391498883, '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': '7025565', 'n_tokens_mistral': 650, 'n_tokens_neox': 644, 'n_words': 163}