<template>
  <div class="container">
    <HomeBanner />

    <div class="column">
      <el-row :gutter="10">
        <el-col :span="12">
          <el-card style="height: 290px;">
            <template #header>
              <div class="title">学校动态</div>

              <div class="card-left-header">
                <span>校园资讯常看常新</span>
                <span class="more">
                  <RouterLink to="news">查看更多></RouterLink>
                </span>
              </div>
            </template>

            <ul class="card-left-list">
              <li>
                <span>当AI融入课堂，会带来怎样的体验?</span>
                <span>2024-04-12</span>
              </li>
              <li>
                <span>跟胡老师一起读:现代文篇②</span>
                <span>2024-04-12</span>
              </li>
              <li>
                <span>周末实验室-不伤鱼的三维立体方便测量盆</span>
                <span>2024-04-12</span>
              </li>
              <li>
                <span>构建智慧课堂 促生深度学习|赋能小学高效课堂教学...</span>
                <span>2024-04-12</span>
              </li>
              <li>
                <span>在线学习平台应用研讨会顺利举行</span>
                <span>2024-04-12</span>
              </li>
            </ul>
          </el-card>
        </el-col>

        <el-col :span="12">
          <el-card style="height: 290px;">
            <template #header>
              <div class="title">同步教材</div>

              <div class="card-right-header">
                <span>数字化教材云平台</span>
                <span class="more">查看更多></span>
              </div>
            </template>

            <div class="card-right-content">
              <el-radio-group v-model="grade" class="grade-radio">
                <el-radio-button label="小学" value="small" />
                <el-radio-button label="初中" value="middle" />
              </el-radio-group>
              <el-tabs type="border-card">
                <el-tab-pane label="一年级" class="class-book">
                  <el-tag type="info">语文</el-tag>
                  <el-tag type="info">数学</el-tag>
                  <el-tag type="info">英语</el-tag>
                  <el-tag type="info">音乐</el-tag>
                  <el-tag type="info">美术</el-tag>
                  <el-tag type="info">特殊教育</el-tag>
                  <el-tag type="info">科学</el-tag>
                  <el-tag type="info">道德与法治</el-tag>
                  <el-tag type="info">体育与健康</el-tag>
                  <el-tag type="info">小学劳动与技术</el-tag>
                </el-tab-pane>
                <el-tab-pane label="二年级">二年级</el-tab-pane>
                <el-tab-pane label="三年级">三年级</el-tab-pane>
                <el-tab-pane label="四年级">四年级</el-tab-pane>
                <el-tab-pane label="五年级">五年级</el-tab-pane>
                <el-tab-pane label="六年级">六年级</el-tab-pane>
              </el-tabs>
            </div>
          </el-card>
        </el-col>
      </el-row>
    </div>

    <div class="subject">
      <el-card>
        <template #header>
          <div class="title">专题资源</div>
          <div class="card-subject-header">
            <span>助力加强理论学习</span>
            <span class="more">查看更多>></span>
          </div>
        </template>
        <div class="subject-content">
          <el-card v-for="item in 8">
            

            <template #footer>
              <div class="subject-title">【金版学案】2016-2017学年高中语文人教版(必修3、必修4)检测+课件</div>
              <div class="subject-date">2024-04-12</div>
            </template>
          </el-card>
        </div>
      </el-card>
    </div>

    <div class="teacher">
      <el-card>
        <template #header>
          <div class="title">校园名师</div>
          <div class="card-teacher-header">
            <span>教育大计老师为本</span>
            <span class="more">查看更多>></span>
          </div>
        </template>

        <ul class="card-teacher-list">
          <li class="item" v-for="item in 4">
            <el-card>
              <img src="@/assets/images/teacher.png" alt="">
              <p class="teacher-name">程晨</p>
              <p class="teacher-class">一年级（1）班 | 语文</p>
              <p class="teacher-desc">教师介绍教师介绍教师介绍教师介绍教师介绍教师介绍。</p>
            </el-card>
          </li>
        </ul>
      </el-card>
    </div>
  </div>
</template>

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

const grade = ref('small')
</script>

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

  .more {
    font-size: 15px;
    color: #8A8178;
  }

  .column {
    height: 290px;
    margin-top: 20px;

    .card-left-header {
      display: flex;
      justify-content: space-between;
      margin-top: 5px;
      color: #8A8178;
    }

    .card-left-list {
      li {
        display: flex;
        justify-content: space-between;
        padding: 7px;
        font-size: 15px;
      }
    }

    .card-right-header {
      display: flex;
      justify-content: space-between;
      margin-top: 5px;
      color: #8A8178;
    }

    .grade-radio {
      margin-top: -25px;
      vertical-align: middle;
    }

    .card-right-content {
      padding: 0;

      .class-book {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
      }
    }
  }

  .subject {
    margin-top: 20px;

    .card-subject-header {
      display: flex;
      justify-content: space-between;
      margin-top: 5px;
    }

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

      img {
        border-radius: 5px;
      }

      .subject-title {
        font-size: 15px;
      }

      .subject-date {
        margin-top: 5px;
        color: #DADADA;
      }
    }
  }

  .teacher {
    margin-top: 20px;

    .card-teacher-header {
      display: flex;
      justify-content: space-between;
      margin-top: 5px;
    }

    .card-teacher-list {
      display: flex;
      justify-content: space-between;

      .item {
        flex: 0 1 24%;
        text-align: center;

        .teacher-name {
          line-height: 45px;
          font-size: 18px;
          font-weight: bold;
        }

        .teacher-class {
          line-height: 40px;
          font-size: 17px;
        }

        .teacher-desc {
          font-size: 16px;
          color: #7F7F7F;
          text-align: left;
        }
      }
    }
  }
}
</style>