<commit_before><template>
  <div class="root">
    <header>
      <h1>Header Text</h1>
    </header>
    <div class="grid-wrapper">
      <div class="left"></div>
      <div class="main">
        <div id="text">
          <p><span v-for="word in words">{{ word.text }} </span></p>
        </div>
      </div>
      <div class="right"></div>
    </div>
  </div>
</template>

<script>
import axios from 'axios'

export default {
  async asyncData () {
    let { data: book } = await axios.get('http://api.morphgnt.org/v0/book/Luke.json')
    let { data: paragraph } = await axios.get('http://api.morphgnt.org' + book.first_paragraph)
    return { words: paragraph.words }
  }
}
</script>

<style lang="scss">

  /* variables */

  $main-font-family: "PT Serif";<commit_msg>handle prev/next paragraph navigation<commit_after><template>
  <div class="root">
    <header>
      <h1>Header Text</h1>
    </header>
    <div class="grid-wrapper">
      <div class="left"></div>
      <div class="main">
        <div id="text">
          <p><span v-for="word in paragraph.words">{{ word.text }} </span></p>
        </div>
        <a v-if="paragraph.prev" v-on:click="displayParagraph(paragraph.prev)">prev</a> |
        <a v-if="paragraph.next" v-on:click="displayParagraph(paragraph.next)">next</a>
      </div>
      <div class="right"></div>
    </div>
  </div>
</template>

<script>
import axios from 'axios'

async function loadParagraph (path) {
  let { data: paragraph } = await axios.get('http://api.morphgnt.org' + path)
  return { paragraph }
}

export default {
  data () {
    return {
      paragraph: {}
    }
  },
  async asyncData () {
    let { data: book } = await axios.get('http://api.morphgnt.org/v0/book/Matt.json')
    return loadParagraph(book.first_paragraph)
  },
  methods: {
    displayParagraph (path) {
      loadParagraph(path).then(({ paragraph }) => {
        this.paragraph = paragraph
      })
    }
  }
}
</script>

<style lang="scss">

  /* variables */

  $main-font-family: "PT Serif";
{'fraction_non_alphanumeric': 0.18957816377171216, 'fraction_numerical': 0.002977667493796526, 'mean_word_length': 2.712707182320442, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 58, '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': '6976428', 'n_tokens_mistral': 710, 'n_tokens_neox': 701, 'n_words': 139}