<template>
  <div class="item-box">
    <div class="title">
      <router-link :to="`/news/detail?id=${data.id}`">{{ data.title }}</router-link>
    </div>
    <div class="time">{{ data.published_time }}</div>
    <div class="content" v-html="data.excerpt"></div>
  </div>
</template>
<script>
export default {
  props: {
    data: { type: Object, default: () => ({}) },
  },
}
</script>
<style lang="scss" scoped>
.item-box {
  border-bottom: 1px solid #eee;
  padding-bottom: 32px;
  padding-top: 24px;
  .title {
    font-size: 18px;
    font-weight: bold;
    color: #c01540;
    line-height: 25px;
  }
  .time {
    font-size: 18px;
    color: #666666;
    line-height: 25px;
    margin: 16px 0;
  }
  .content {
    font-size: 18px;
    color: #666666;
    line-height: 30px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
}
</style>
