import { css } from "@linaria/core";
import { defineComponent, reactive } from "vue";
import { ArrowRightOutlined } from "@ant-design/icons-vue";
import Image from "@/components/Image";
export default defineComponent({
  setup() {
    const state = reactive({
      newsId: "6464aef88dcb7ddb98b57a2e",
      admissionsId: "6464b4ab8dcb7ddb98b57a47",
      admissionsId: "6464b4ab8dcb7ddb98b57a47",
    });

    return () => (
      <div class={[page, "home_lay_item_box"]}>
        <div class={"global_w"}>
          <div class={"home_lay_title"}>
            最新动态<span>/</span>
            <span>News</span>
          </div>
          <div class={"news_lay_box"}>
            <div class={"news_lay_item"}>
              <div class={"news_tit"}>
                新闻公告<span>/</span>
                <span>College News</span>
              </div>
              <div class={"news_list"}>
                <div class={"list_item"}>
                  <a>
                    <Image src={""} />
                    <div class={"first_date"}>2023.09.09</div>
                    <div>
                      国家安全教育丨美术与设计学院深入开展学习贯彻总体国家安全观教育活动
                    </div>
                  </a>
                </div>
                <div class={"list_item"}>
                  <a>
                    分工会活动|“喜迎二十大·筑梦新征程”多媒体课件制作大赛圆满举行…
                  </a>
                  <span>2023.09.09</span>
                </div>
              </div>
              <div class={"list_more"}>
                <a href={`/detail/${state.newsId}`}>
                  查看更多
                  <ArrowRightOutlined class={"arrow"} />
                </a>
              </div>
            </div>
            <div class={"news_lay_item"}>
              <div class={"news_tit"}>
                招生就业<span>/</span>
                <span>Admissions & employment</span>
              </div>
              <div class={"news_list_s"}>
                <div class={"s_item"}>
                  <a>
                    <Image src={""} />
                    <div class={"mt-10px"}>
                      国家安全教育丨美术与设计学院深入开展学习贯彻总体国家安全观教育活动
                    </div>
                  </a>
                </div>
                <div class={"s_item"}>
                  <a>
                    美术与设计学院开展国家安全教育日暨国家安全教育月保密工作专题培训会
                  </a>
                </div>
              </div>
              <div class={"list_more"}>
                <a href={`/detail/${state.admissionsId}`}>
                  查看更多
                  <ArrowRightOutlined class={"arrow"} />
                </a>
              </div>
            </div>
            <div class={"news_lay_item"}>
              <div class={"news_tit"}>
                学科建设<span>/</span>
                <span>Discipline building</span>
              </div>
              <div class={"news_list_s"}>
                <div class={"s_item mt-10px"}>
                  <a>
                    <Image src={""} />
                    <div class={"mt-10px"}>
                      国家安全教育丨美术与设计学院深入开展学习贯彻总体国家安全观教育活动
                    </div>
                  </a>
                </div>
                <div class={"s_item"}>
                  <a>
                    国家安全教育丨美术与设计学院深入开展学习贯彻总体国家安全观教育活动
                  </a>
                </div>
              </div>
              <div class={"list_more"}>
                <a>
                  查看更多
                  <ArrowRightOutlined class={"arrow"} />
                </a>
              </div>
            </div>
          </div>
        </div>
      </div>
    );
  },
});
const page = css`
  .news_tit {
    font-size: 18px;
    color: #333;
    line-height: 1;
    margin-bottom: 14px;
    span {
      padding-left: 5px;
      font-size: 14px;
      color: #666666;
    }
  }
  .news_lay_box {
    display: flex;
    .news_lay_item {
      flex: 1;
      padding: 0 70px;
      border-right: 1px solid #e5e5e5;
      &:first-child {
        padding-left: 0;
        flex: 2;
      }
      &:last-child {
        border-right: none;
        padding-right: 0;
      }
      .list_item {
        img {
          height: 390px;
          width: 100%;
          object-fit: cover;
        }
        padding: 18px 0;
        font-size: 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid #e5e5e5;
        .first_date {
          font-size: 16px;
          margin: 8px 0;
        }
        &:first-child {
          padding-top: 0;
          font-size: 24px;
          line-height: 1.5;
        }
      }
      .s_item {
        img {
          height: 210px;
          width: 100%;
          object-fit: cover;
        }
        padding: 18px 0;
        font-size: 16px;
        line-height: 28px;
        border-bottom: 1px solid #e5e5e5;

        &:first-child {
          padding-top: 0;
          font-size: 18px;
        }
      }
      a {
        color: #333;
        &:hover {
          color: var(--vt-c-primary);
          text-decoration: underline;
        }
      }
      .list_more {
        margin-top: 20px;
        text-align: center;
        a {
          color: var(--vt-c-primary);
        }
        .arrow {
          margin-left: 8px;
          padding: 2px;
          border: 1px solid var(--vt-c-primary);
          font-size: 12px;
          border-radius: 50%;
        }
      }
    }
  }
`;
