<commit_before>import React, { Component, PropTypes } from 'react';
import classNames from 'classnames';

import '../css/reset';
import '../css/markdown-styles';
import '../css/Components/Layout';

import Links from '../data/links';
import Link from '../Components/Link';
import Navbar from '../Components/Navbar';
import OverlayMenu from '../Components/OverlayMenu';

import MouseAnimator from '../Components/MouseAnimator';

const renderLink = (link, index) => <span key={index} className="OverlayMenu-link">{link}</span>;

export default class Template extends Component {
  static propTypes = {
    children: PropTypes.node.isRequired,
  }

  constructor(props) {
    super(props);
    this.state = { overlayOpen: false };
  }

  componentDidMount() {
    this.mouseAnimator = new MouseAnimator();
    this.mouseAnimator.hook();
  }

  toggleOverlayMenu = () =>
    this.setState({ overlayOpen: !this.state.overlayOpen });

  render() {
    const { children } = this.props;
    const { overlayOpen } = this.state;

    const className = classNames({
      'Layout': true,
      'Layout--overlayOpen': overlayOpen,
    });

    return (
      <div className={className}>
        <OverlayMenu isOpen={overlayOpen} onClose={this.toggleOverlayMenu}>
          {Links.map(renderLink)}
          <Link href="tel:+351 916 748 994">+351 916 748 994</Link>
          <Link href="mailto:<EMAIL>"><EMAIL></Link>
        </OverlayMenu>

        <div className="Layout-cut" />
        <nav className="Layout-navbar">
          <Navbar
            overlayOpen={overlayOpen}
            toggleOverlayMenu={this.toggleOverlayMenu}
          />
        </nav>

        <div className="Layout-content">
          {children}
        </div>
      </div>
    );
  }
}<commit_msg>layout cut only appears on index and location page<commit_after>import React, { Component, PropTypes } from 'react';
import classNames from 'classnames';

import '../css/reset';
import '../css/markdown-styles';
import '../css/Components/Layout';

import Links from '../data/links';
import Link from '../Components/Link';
import Navbar from '../Components/Navbar';
import OverlayMenu from '../Components/OverlayMenu';

import MouseAnimator from '../Components/MouseAnimator';

const renderLink = (link, index) => <span key={index} className="OverlayMenu-link">{link}</span>;

export default class Template extends Component {
  static propTypes = {
    children: PropTypes.node.isRequired,
  }

  constructor(props) {
    super(props);
    this.state = { overlayOpen: false };
  }

  componentDidMount() {
    this.mouseAnimator = new MouseAnimator();
    this.mouseAnimator.hook();
  }

  toggleOverlayMenu = () =>
    this.setState({ overlayOpen: !this.state.overlayOpen });

  renderCut() {
    if (['/', '/location/'].indexOf(this.props.location.pathname) == -1) {
      return null;
    }

    return <div className="Layout-cut" />;
  }

  render() {
    const { children } = this.props;
    const { overlayOpen } = this.state;

    const className = classNames({
      'Layout': true,
      'Layout--overlayOpen': overlayOpen,
    });

    return (
      <div className={className}>
        <OverlayMenu isOpen={overlayOpen} onClose={this.toggleOverlayMenu}>
          {Links.map(renderLink)}
          <Link href="tel:+351 916 748 994">+351 916 748 994</Link>
          <Link href="mailto:<EMAIL>"><EMAIL></Link>
        </OverlayMenu>

        {this.renderCut()}
        <nav className="Layout-navbar">
          <Navbar
            overlayOpen={overlayOpen}
            toggleOverlayMenu={this.toggleOverlayMenu}
          />
        </nav>

        <div className="Layout-content">
          {children}
        </div>
      </div>
    );
  }
}
{'fraction_non_alphanumeric': 0.15024232633279483, 'fraction_numerical': 0.013193322563274098, 'mean_word_length': 2.8697916666666665, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 43, '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': '5282641', 'n_tokens_mistral': 1123, 'n_tokens_neox': 1075, 'n_words': 240}