<commit_before><template>

  <div class="pure-g">
    <slot/>
  </div>

</template>


<script>

  module.exports = {};

</script>


<style>

  @require '~kolibri.styles.definitions'

</style><commit_msg>Making content-grid a bit more robust<commit_after><template>

  <div>
    <content-card
      class="content-card"
      v-for="content in contents"
      :title="content.title"
      :thumbnail="content.thumbnail"
      :kind="content.kind || 'topic'"
      :progress="content.progress"
      :link="item.kind ? genContentLink(item.id) : genTopicLink(item.id)"/>
  </div>

</template>


<script>

  const PageNames = require('../../constants').PageNames;

  module.exports = {
    props: {
      contents: {
        type: Array,
        required: true,
      },
    },
    components: {
      'content-card': require('./content-card'),
    },
    methods: {
      genContentLink(id) {
        return {
          name: PageNames.LEARN_CONTENT,
          params: { channel_id: this.channelId, id },
        };
      },
      genTopicLink(id) {
        return {
          name: PageNames.EXPLORE_TOPIC,
          params: { channel_id: this.channelId, id },
        };
      },
    },
    vuex: {
      getters: {
        channelId: (state) => state.core.channels.currentId,
      },
    }
  };

</script>


<style>

  @require '~kolibri.styles.definitions'

  .content-card
    margin-left: 10px
    margin-right: 10px

</style>
{'fraction_non_alphanumeric': 0.15944055944055943, 'fraction_numerical': 0.002797202797202797, 'mean_word_length': 2.1941964285714284, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 22, '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': '5396948', 'n_tokens_mistral': 492, 'n_tokens_neox': 474, 'n_words': 80}