ArticleList.vue 809 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
<template>
  <div id="article-list" class="article-wrapper">
    <EmptyIcon v-if="!articles.length" class="empty" />

    <MyTransition
      v-for="(article, index) in articles"
      :key="article.path"
      :delay="index * 0.04"
    >
      <ArticleItem :article="article" />
    </MyTransition>

    <Pagination
      v-model="currentPage"
      :per-page="articlePerPage"
      :total="articleList.length"
    />
  </div>
</template>

<script src="./ArticleList" />

<style lang="stylus">
.article-wrapper
  margin-top -0.5rem - $navbarHeight
  padding-top: $navbarHeight + 0.5rem
  text-align center

  @media (max-width $MQMobile)
    margin-top -0.5rem - $navbarMobileHeight
    padding-top: $navbarMobileHeight + 0.5rem

  .empty
    max-width 560px
    margin 0 auto
    text-align center
</style>