<commit_before>import React from "react";
import PropTypes from "prop-types";
import glamorous from "glamorous";
import * as s from "./styles.js";

const config = {
  yearFound: 2015,
  yearCurrent: new Date().getFullYear()
};

class Layout extends React.Component {
  static propTypes = {
    children: PropTypes.node.isRequired
  };

  render() {
    return (
      <Page>
        {/* {% include 'components/header.njk' %} */}
        <PageCentered>
          <PageMain>{this.props.children}</PageMain>

          <Footer>
            <FooterParagraph>2015&ndash;{config.yearCurrent}</FooterParagraph>
            <FooterParagraph author>
              Written by{" "}
              <FooterParagraphLink href="mailto:<EMAIL>">
                <NAME>
              </FooterParagraphLink>
            </FooterParagraph>
          </Footer>

          {/* {% include 'components/footer.njk' %} */}
        </PageCentered>
      </Page>
    );
  }
}

const Page = glamorous.div({
  display: "flex",
  alignItems: "center",
  flexDirection: "column",
  minHeight: "100vh",
  textRendering: "optimizeLegibility" /* TODO: is this doing anyting? */
  /* TODO http://usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/ */
});

const PageCentered = glamorous.div({
  display: "flex",
  flex: 1,
  flexDirection: "column",
  width: "100%",

  /* TODO: move into mixin once they are avaliable - same code used in header.css & page.css */
  padding: `0 ${s.dimensions.contentSpacing}`,
  maxWidth: s.dimensions.contentMaxWidth
});

const PageMain = glamorous.main({
  flex: 1 // To make footer sticky
});

const Footer = glamorous.footer({
  padding: `${s.grid(8)} 0 ${s.grid(2)}`
});

const FooterParagraph = glamorous.p(
  {
    ...s.fonts.paragraphSmall,
    margin: 0,
    lineHeight: 1,
    textAlign: "center"
  },
  props => {
    if (props.author) {
      return {
        marginTop: s.grid(1)
      };
    }
  }
);

const FooterParagraphLink = glamorous.a({
  ...s.fonts.paragraphSmall,
  lineHeight: 1,
  color: s.colors.blueDark,
  textDecoration: "none"
});

export default Layout;<commit_msg>rewrite: renaming<commit_after>import React from "react";
import PropTypes from "prop-types";
import glamorous from "glamorous";
import * as s from "./styles.js";

const config = {
  yearFound: 2015,
  yearCurrent: new Date().getFullYear()
};

class Layout extends React.Component {
  static propTypes = {
    children: PropTypes.node.isRequired
  };

  render() {
    return (
      <Page>
        {/* {% include 'components/header.njk' %} */}
        <PageCentered>
          <PageMain>{this.props.children}</PageMain>

          <Footer>
            <FooterParagraph>2015&ndash;{config.yearCurrent}</FooterParagraph>
            <FooterParagraph withMarginTop>
              Written by{" "}
              <FooterParagraphLink href="mailto:<EMAIL>">
                <NAME>
              </FooterParagraphLink>
            </FooterParagraph>
          </Footer>

          {/* {% include 'components/footer.njk' %} */}
        </PageCentered>
      </Page>
    );
  }
}

const Page = glamorous.div({
  display: "flex",
  alignItems: "center",
  flexDirection: "column",
  minHeight: "100vh",
  textRendering: "optimizeLegibility" /* TODO: is this doing anyting? */
  /* TODO http://usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/ */
});

const PageCentered = glamorous.div({
  display: "flex",
  flex: 1,
  flexDirection: "column",
  width: "100%",

  /* TODO: move into mixin once they are avaliable - same code used in header.css & page.css */
  padding: `0 ${s.dimensions.contentSpacing}`,
  maxWidth: s.dimensions.contentMaxWidth
});

const PageMain = glamorous.main({
  flex: 1 // To make footer sticky
});

const Footer = glamorous.footer({
  padding: `${s.grid(8)} 0 ${s.grid(2)}`
});

const FooterParagraph = glamorous.p(
  {
    ...s.fonts.paragraphSmall,
    margin: 0,
    lineHeight: 1,
    textAlign: "center"
  },
  props => {
    if (props.withMarginTop) {
      return {
        marginTop: s.grid(1)
      };
    }
  }
);

const FooterParagraphLink = glamorous.a({
  ...s.fonts.paragraphSmall,
  lineHeight: 1,
  color: s.colors.blueDark,
  textDecoration: "none"
});

export default Layout;
{'fraction_non_alphanumeric': 0.15014231499051234, 'fraction_numerical': 0.015180265654648957, 'mean_word_length': 2.6797556719022686, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 37, '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': '1851390', 'n_tokens_mistral': 1463, 'n_tokens_neox': 1379, 'n_words': 300}