<commit_before>// Native
import Head from 'next/head'

// Packages
import moment from 'moment'

// Layouts
import Page from '../layouts/page'

// Components
import Link from '../components/link'
import Title from '../components/title'

// Data
import posts from '../data/essays'

const parseDate = date => moment(date, 'DD-MM-YYYY')

// Assign a URL to each post and
// sort them by date (most recent one first)
const preparePosts = () => posts.map(post => Object.assign({
  url: `/${parseDate(post.date).year()}/${post.id}`
}, post)).sort((a, b) => parseDate(b.date).diff(parseDate(a.date)))

export default () => (
  <Page>
    <Title/>

    <Head>
      <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Cardo&text=Leo%27s%20Essays"/>
    </Head>

    <h1>{`Leo's Essays`}</h1>
    <Link href="/"><a className="back">&#8617;</a></Link>

    <ul>
      {
        preparePosts().map(post => (
          <li key={post.id}>
            <Link href={post.url}><a>
              <b>{post.title}</b>
              <span>{parseDate(post.date).format('MMMM Do YYYY')}</span>
            </a></Link>
          </li>
        ))
      }
    </ul>

    <style jsx>{`
      ul {
        margin: 0;
        padding: 0 0 30px 0;
        list-style: none;
      }

      li {
        margin: 23px 0;
        text-decoration: none;
      }

      li:last-child {
        margin-bottom: 0;
      }

      a {
        text-decoration: none;
        display: block;
      }

      b {
        color: #000;
        font-size: 16px;
        display: inline-block;
        font-weight: normal;
      }

      .back {
        font-size: 17px;
        text-align: center;
        background: #efefef;
        font-weight: bold;
        box-sizing: border-box;
        padding: 10px 0;
        color: #000;
        position: absolute;
        right: 40px;
        top: 40px;
        height: 37px;
        width: 37px;
        border-radius: 100%;
        font-family: 'Courier New', serif;
      }

      span {
        display: block;
        color: #c1c1c1;
        font-size: 13px;
        margin-top: 5px;
      }

      h1 {
        margin: 5px 0 40px 0;
        font-size: 35px;<commit_msg>Avoid Emoji conversions of back arrow<commit_after>// Native
import Head from 'next/head'

// Packages
import moment from 'moment'

// Layouts
import Page from '../layouts/page'

// Components
import Link from '../components/link'
import Title from '../components/title'

// Data
import posts from '../data/essays'

const parseDate = date => moment(date, 'DD-MM-YYYY')

// Assign a URL to each post and
// sort them by date (most recent one first)
const preparePosts = () => posts.map(post => Object.assign({
  url: `/${parseDate(post.date).year()}/${post.id}`
}, post)).sort((a, b) => parseDate(b.date).diff(parseDate(a.date)))

export default () => (
  <Page>
    <Title/>

    <Head>
      <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Cardo&text=Leo%27s%20Essays"/>
    </Head>

    <h1>{`Leo's Essays`}</h1>
    <Link href="/"><a className="back">&#8617;&#xFE0E;</a></Link>

    <ul>
      {
        preparePosts().map(post => (
          <li key={post.id}>
            <Link href={post.url}><a>
              <b>{post.title}</b>
              <span>{parseDate(post.date).format('MMMM Do YYYY')}</span>
            </a></Link>
          </li>
        ))
      }
    </ul>

    <style jsx>{`
      ul {
        margin: 0;
        padding: 0 0 30px 0;
        list-style: none;
      }

      li {
        margin: 23px 0;
        text-decoration: none;
      }

      li:last-child {
        margin-bottom: 0;
      }

      a {
        text-decoration: none;
        display: block;
      }

      b {
        color: #000;
        font-size: 16px;
        display: inline-block;
        font-weight: normal;
      }

      .back {
        font-size: 17px;
        text-align: center;
        background: #efefef;
        font-weight: bold;
        box-sizing: border-box;
        color: #000;
        position: absolute;
        line-height: 40px;
        right: 30px;
        top: 40px;
        height: 37px;
        width: 37px;
        border-radius: 100%;
        font-family: 'Courier New', serif;
      }

      span {
        display: block;
        color: #c1c1c1;
        font-size: 13px;
        margin-top: 5px;
      }

      h1 {
        margin: 5px 0 40px 0;
        font-size: 35px;
{'fraction_non_alphanumeric': 0.15856428895956384, 'fraction_numerical': 0.026351658337119492, 'mean_word_length': 1.7450124688279303, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 63, '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': '3986915', 'n_tokens_mistral': 1590, 'n_tokens_neox': 1463, 'n_words': 343}