<commit_before><template>
  <main class='container'>
    <div class='content-summary'>
      <h1>{{ page.Title }}</h1>
      <p v-if='page.Summary'>{{ page.Summary }}</p>
    </div>
    <ul class='content'>
      <li class="item" v-for='item in items'>
        <h2>{{ item.Title }}</h2>
        <div class='description'>{{ item.Description }}</div>
        <div class='image-container' v-for='imageFullPath in item.Images'>
          <span v-for='image in imageURLs' v-if='imageFullPath === image.fullPath'>
            <img :src='image.url' />
          </span>
        </div>
      </li>
    </ul>
    <Loading :loaded='dataLoaded' />
  </main>
</template>

<script>
import { db, storage } from '@/firebase.js'
import Loading from '@/components/Loading'

export default {
  name: 'PrintedMerchandise',
  data: function () {
    return {
      dataLoaded: false,
      imagesLoaded: false,
      imageURLs: []
    }
  },
  components: {
    Loading
  },
  firebase: function () {
    return {
      page: {
        source: db.ref('data/printed merchandise page'),
        asObject: true
      },
      items: {
        source: db.ref('data/printed merchandise'),
        readyCallback: () => {
          this.dataLoaded = true
        }
      },
      images: {
        source: db.ref('images'),
        readyCallback: () => {
          this.imagesLoaded = true
        }
      }
    }
  },
  watch: {
    imagesLoaded: function () {
      const current = this
      let urls = []
      const images = current.images

      for (var i = 0; i < images.length; i++) {
        const fullPath = images[i].fullPath
        const name = images[i].name

        storage.ref(fullPath).getDownloadURL().then(function (url) {
          urls.push({
            fullPath,
            name,
            url<commit_msg>update print services page to get it's content<commit_after><template>
  <main class='container'>
    <div class='content-summary'>
      <h1>{{ page.Title }}</h1>
      <p v-if='page.Summary'>{{ page.Summary }}</p>
    </div>
    <ul class='content'>
      <li class="item" v-for='item in items'>
        <h2>{{ item.Title }}</h2>
        <div class='description'>{{ item.Description }}</div>
        <div class='image-container' v-for='imageFullPath in item.Images'>
          <span v-for='image in imageURLs' v-if='imageFullPath === image.fullPath'>
            <img :src='image.url' />
          </span>
        </div>
      </li>
    </ul>
    <Loading :loaded='dataLoaded' />
  </main>
</template>

<script>
import { db, storage } from '@/firebase.js'
import Loading from '@/components/Loading'

export default {
  name: 'PrintServices',
  data: function () {
    return {
      dataLoaded: false,
      imagesLoaded: false,
      imageURLs: []
    }
  },
  components: {
    Loading
  },
  firebase: function () {
    return {
      page: {
        source: db.ref('data/print services page'),
        asObject: true
      },
      items: {
        source: db.ref('data/print services'),
        readyCallback: () => {
          this.dataLoaded = true
        }
      },
      images: {
        source: db.ref('images'),
        readyCallback: () => {
          this.imagesLoaded = true
        }
      }
    }
  },
  watch: {
    imagesLoaded: function () {
      const current = this
      let urls = []
      const images = current.images

      for (var i = 0; i < images.length; i++) {
        const fullPath = images[i].fullPath
        const name = images[i].name

        storage.ref(fullPath).getDownloadURL().then(function (url) {
          urls.push({
            fullPath,
            name,
            url
{'fraction_non_alphanumeric': 0.15730027548209366, 'fraction_numerical': 0.0027548209366391185, 'mean_word_length': 1.9713584288052373, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 57, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4902243', 'n_tokens_mistral': 1134, 'n_tokens_neox': 1112, 'n_words': 256}