|
@@ -1,3 +1,20 @@
|
|
|
+
|
|
|
+<script setup>
|
|
|
+import { ref, computed, watch, onMounted, inject } from "vue"
|
|
|
+import { useRoute, useRouter } from "vue-router"
|
|
|
+import { useStore } from "vuex"
|
|
|
+import Startup from "@/views/StartupView.vue"
|
|
|
+
|
|
|
+
|
|
|
+const route = useRoute()
|
|
|
+const router = useRouter()
|
|
|
+const store = useStore()
|
|
|
+
|
|
|
+const $env = inject("$env")
|
|
|
+
|
|
|
+const curPageIndex = ref(0)
|
|
|
+</script>
|
|
|
+
|
|
|
<template>
|
|
|
<div class="home">
|
|
|
<!-- 背景 -->
|
|
@@ -8,25 +25,65 @@
|
|
|
<!-- 开场动画 -->
|
|
|
<Transition name="fade-out">
|
|
|
<Startup
|
|
|
+ v-if="!store.state.haveShownStartup"
|
|
|
class="startup"
|
|
|
/>
|
|
|
</Transition>
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script setup>
|
|
|
-import { ref, computed, watch, onMounted, inject } from "vue"
|
|
|
-import { useRoute, useRouter } from "vue-router"
|
|
|
-import { useStore } from "vuex"
|
|
|
-import Startup from "@/views/StartupView.vue"
|
|
|
+ <!-- 首页标题 -->
|
|
|
+ <div
|
|
|
+ class="title-wrap"
|
|
|
+ :style="{
|
|
|
+ opacity: curPageIndex == 0 ? 1 : 0,
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ class="title"
|
|
|
+ src="@/assets/images/home-title.png"
|
|
|
+ alt=""
|
|
|
+ draggable="false"
|
|
|
+ >
|
|
|
+ <div class="sub-text">
|
|
|
+ 南京博物院<br>
|
|
|
+ 绢本 墨笔<br>
|
|
|
+ 元 李衎<br>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
+ <!-- 作品、作者简介 -->
|
|
|
+ <div
|
|
|
+ ref="longDesc"
|
|
|
+ class="long-desc"
|
|
|
+ :class="{ 'long-desc-ac': curPageIndex == 0 }"
|
|
|
+ @touchstart="handletouchstart($event)"
|
|
|
+ @touchend="touchEnd($event)"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ class="page2-box"
|
|
|
+ @click="isShowPaintingDesc = true"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ src="@/assets/images/icon_home_detail-min.png"
|
|
|
+ alt=""
|
|
|
+ >
|
|
|
+ <div>作品简介</div>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="page2-box"
|
|
|
+ style="margin-top: 10px"
|
|
|
+ @click="isShowAuthorDesc = true"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ src="@/assets/images/icon_home_author-min.png"
|
|
|
+ alt=""
|
|
|
+ >
|
|
|
+ <div>作者简介</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
-const route = useRoute()
|
|
|
-const router = useRouter()
|
|
|
-const store = useStore()
|
|
|
+ <!-- 滑动提示 -->
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
|
|
|
-const $env = inject("$env")
|
|
|
-</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
.home {
|
|
@@ -38,17 +95,89 @@ const $env = inject("$env")
|
|
|
top: 0;
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
- background: rgba(60, 89, 71, 0.65);
|
|
|
- backdrop-filter: blur(
|
|
|
- calc(
|
|
|
- 22 / v-bind("windowSizeWhenDesignForRef") *
|
|
|
- v-bind("windowSizeInCssForRef")
|
|
|
- )
|
|
|
- );
|
|
|
+ // background: rgba(60, 89, 71, 0.65);
|
|
|
+ background: url(@/assets/images/bg-mask.png);
|
|
|
+ background-size: 100% 100%;
|
|
|
+ // backdrop-filter: blur(
|
|
|
+ // calc(
|
|
|
+ // 22 / v-bind("windowSizeWhenDesignForRef") *
|
|
|
+ // v-bind("windowSizeInCssForRef")
|
|
|
+ // )
|
|
|
+ // );
|
|
|
}
|
|
|
|
|
|
> .startup {
|
|
|
z-index: 20;
|
|
|
}
|
|
|
+
|
|
|
+ > .title-wrap {
|
|
|
+ position: absolute;
|
|
|
+ right: 20%;
|
|
|
+ top: 50%;
|
|
|
+ transform: translateY(-50%);
|
|
|
+ width: 100px;
|
|
|
+ height: 45%;
|
|
|
+ z-index: 5;
|
|
|
+
|
|
|
+ > img.title {
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ > .sub-text {
|
|
|
+ position: absolute;
|
|
|
+ left: 110%;
|
|
|
+ top: 46%;
|
|
|
+ transform: translateY(-50%);
|
|
|
+ writing-mode: vertical-lr;
|
|
|
+ font-family: KaiTi;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 20px;
|
|
|
+ color: #ffffff;
|
|
|
+ line-height:30px;
|
|
|
+ white-space: pre;
|
|
|
+ letter-spacing: 0.2em;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ > .long-desc {
|
|
|
+ position: absolute;
|
|
|
+ bottom: 30px;
|
|
|
+ right: 30px;
|
|
|
+ color: white;
|
|
|
+ overflow: hidden;
|
|
|
+ font-family: KaiTi;
|
|
|
+ color: #ffffff;
|
|
|
+ animation: none;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: space-between;
|
|
|
+ z-index: 2;
|
|
|
+
|
|
|
+ > .page2-box {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ cursor: pointer;
|
|
|
+
|
|
|
+ > img {
|
|
|
+ width: 75%;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ > div {
|
|
|
+ font-size: calc(
|
|
|
+ 20 / v-bind("windowSizeWhenDesignForRef") *
|
|
|
+ v-bind("windowSizeInCssForRef")
|
|
|
+ );
|
|
|
+ font-family: KaiTi;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
</style>
|