<template>
  <div class="main">
    <div class="content">
      <sub-header />
      <div class="left">
        <n-tabs type="line" pane-class="tab-content">
          <template #prefix>
            <span class="meta-title">
              <img src="img/subtitle_1.png" />
            </span>
          </template>
          <n-tab-pane name="展览" tab="展览">
            <n-grid x-gap="30" y-gap="30" :cols="3" class="tab-grid">
              <template v-for="(_, index) in 16">
                <n-gi>
                  <infoBox
                    :id="index + 1"
                    title="卡片"
                    cover="https://07akioni.oss-cn-beijing.aliyuncs.com/07akioni.jpeg"
                    time="2023-01-02"
                  />
                </n-gi>
              </template>
            </n-grid>
          </n-tab-pane>
          <n-tab-pane name="活动" tab="活动">
            <n-grid x-gap="30" y-gap="30" :cols="3" class="tab-grid">
              <template v-for="item in 16">
                <n-gi>
                  <infoBox
                    title="卡片"
                    cover="https://07akioni.oss-cn-beijing.aliyuncs.com/07akioni.jpeg"
                    time="2023-01-02"
                  />
                </n-gi>
              </template>
            </n-grid>
          </n-tab-pane>
          <n-tab-pane name="新闻" tab="新闻">
            <n-grid x-gap="30" y-gap="30" :cols="3" class="tab-grid">
              <template v-for="item in 16">
                <n-gi>
                  <infoBox
                    title="卡片"
                    cover="https://07akioni.oss-cn-beijing.aliyuncs.com/07akioni.jpeg"
                    time="2023-01-02"
                  />
                </n-gi>
              </template>
            </n-grid>
          </n-tab-pane>
          <n-tab-pane name="通知" tab="通知">
            <n-grid y-gap="20" :cols="1" class="tab-grid">
              <template v-for="item in 16">
                <n-gi>
                  <notice-box
                    title="这是一段标题这是一段标题"
                    content="这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段摘要这是一段..."
                    time="2023-01-02"
                  />
                </n-gi>
              </template>
            </n-grid>
          </n-tab-pane>
        </n-tabs>
      </div>
      <side-menu />
    </div>
  </div>
</template>

<script setup>
import { onMounted } from "vue";
import { useFullscreen } from "@vueuse/core";
import infoBox from "../components/infoBox";
import subHeader from "../components/subHeader";
import sideMenu from "../components/sideMenu";
import noticeBox from "../components/noticeBox";
import { useInfoStore } from "../store/info";

const { isFullscreen, enter, exit, toggle } = useFullscreen();
const InfoStore = useInfoStore();

onMounted(() => {
  InfoStore.getData();
});
</script>

<style lang="scss" scoped>
.meta-title {
  font-size: 1.375rem;
  text-align: center;
  width: var(--main-sub-nav-title-width);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  img {
    width: auto;
    height: calc(var(--main-sub-nav-height) - 0.75rem);
  }
}

:deep(.n-tabs) {
  --n-tab-font-size: 1.25rem !important;
  --n-tab-gap: 60px !important;
  height: 100%;
  overflow: hidden;
  .n-tab-pane {
    overflow-y: scroll;
  }
  .n-tabs-bar {
    height: 0.25rem;
    border-radius: 1.875rem !important;
  }
}
.tab-content {
  width: calc(100% - 12rem);
  margin: 0 auto;
  &::-webkit-scrollbar {
    display: none;
  }
}
</style>
