<template>
  <div class="container">
    <div class="bread-container">
      <el-breadcrumb separator=">">
        <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item>专题资源</el-breadcrumb-item>
      </el-breadcrumb>
    </div>

    <div class="subject-banner">
      <el-carousel height="500px" arrow="always">
        <!-- <el-carousel-item v-for="item in bannerList" :key="item.id">
        <img :src="item.imgUrl" alt="">
      </el-carousel-item> -->
        <el-carousel-item v-for="item in 4">
          <img src="@/assets/images/subject-banner.png" alt="">
        </el-carousel-item>
      </el-carousel>
    </div>

    <el-card style="margin-top: 20px;">
      <div class="title">
        专题资源
      </div>
      <div class="more">
        19个专题
      </div>

      <div class="subject-content">
        <div class="subject-card" v-for="item in 12">
          <RouterLink to="subSubject">
            <el-card>
              <img src="@/assets/images/subject.png" />
            </el-card>
            <div class="subject-top">1790个资源</div>
          </RouterLink>
        </div>
      </div>
      <el-pagination class="book-page" background layout="prev, pager, next, sizes,jumper" :total="1000" />
    </el-card>
  </div>
</template>

<script setup>
import { ref } from 'vue'
</script>

<style lang="scss" scoped>
.container {
  .title {
    font-size: 20px;
    font-weight: bold;
  }

  .more {
    margin-top: 10px;
    margin-bottom: 20px;
    font-size: 15px;
    color: #8A8178;
  }

  .bread-container {
    padding: 25px 0;

    :deep(.el-breadcrumb__inner) {
      color: #fff;
      font-size: 16px;
    }

    :deep(.el-breadcrumb__separator) {
      color: #fff;
    }
  }

  .subject-banner {
    margin-top: 20px;
    width: 1240px;
    height: 500px;

    img {
      width: 100%;
      height: 500px;
      border-radius: 5px;
    }
  }

  .subject-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 10px;

    .subject-card {
      position: relative;

      .subject-top {
        position: absolute;
        top: 0;
        left: 0;
        background-color: #FCB124;
        font-size: 14px;
        font-weight: bold;
        color: #fff;
        line-height: 28px;
        width: 100px;
        text-align: center;
      }
    }
  }

  .book-page {
    margin-top: 20px;
    display: flex;
    justify-content: end
  }
}
</style>