<template>
  <div class="card">
    <div class="card-hd">
      <div class="card-hd__title">
        <slot name="title">{{ title }}</slot>
      </div>
      <div class="card-hd__aside"><slot name="header-aside"></slot></div>
    </div>
    <div class="card-bd"><slot /></div>
  </div>
</template>

<script>
export default {
  props: { title: String },
  computed: {
    isMobile() {
      return this.$store.state.isMobile
    }
  }
}
</script>

<style lang="scss">
.is-pc {
  .card-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
  }
  .card-hd__title {
    flex: 1;
    // border-left: 7px solid #aa1941;
    // padding-left: 20px;
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
    a:hover {
      color: var(--main-color);
    }
  }
  .card-hd__aside {
    font-size: 16px;
    color: #9b9b9b;
    cursor: pointer;
  }
}
.is-h5 {
  .card {
    margin: 0.2rem 0.15rem;
  }
  .card-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.15rem;
  }
  .card-hd__title {
    flex: 1;
    border-left: 0.03rem solid #aa1941;
    padding-left: 0.05rem;
    font-size: 0.17rem;
    font-weight: bold;
    line-height: 1;
  }
  .card-hd__aside {
    font-size: 0.1rem;
    color: #9b9b9b;
  }
}
</style>
