123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263 |
- <script setup>
- import { ref, onMounted } from "vue"
- import useSizeAdapt from "@/useFunctions/useSizeAdapt"
- const { windowSizeInCssForRef, windowSizeWhenDesignForRef } = useSizeAdapt()
- const isShowOperationTip = ref(true)
- const lastX = ref(0)
- // 开始滑动
- const handletouchstart = (event) => {
- isShowOperationTip.value = false
- lastX.value = event.changedTouches[0].pageX
- }
- // 监听活动
- const touchEnd = (event) => {
- let currentX = event.changedTouches[0].pageX
- let tx = currentX - lastX.value
- if (tx < 0) {
- emit("slide-right")
- } else if (tx > 0) {
- emit("slide-left")
- }
- }
- // const onSwipeLeft = () => {
- // emit('slide-right')
- // }
- // const onSwipeRight = () => {
- // emit('slide-left')
- // }
- const emit = defineEmits(["slide-right", "slide-left", "close"])
- const x = window.innerHeight / 1018
- const innerWidth = ref((15523 / 33) * x + "px")
- const innerHeight = ref(window.innerHeight + "px")
- </script>
- <template>
- <div
- class="screen-box"
- @touchstart="handletouchstart($event)"
- @touchend="touchEnd($event)"
- >
- <!-- 竹叶序列帧 -->
- <div class="xuliezheng-box">
- <div class="xuliezheng" />
- </div>
- <div class="screen-box1">
- <div class="title-box">
- 芥子园画谱
- </div>
- <div class="zhupu-box">
- 竹谱
- </div>
- <OperationTip
- class="operation-h"
- text=""
- direction="h"
- :is-show="isShowOperationTip"
- />
- <!-- <img
- class="disc-img"
- src="@/assets/images/zhupu-disc.png"
- alt=""
- > -->
- <div class="text">
- 《芥子园画传》又称《芥子园画谱》是清代绘画技法图谱,它较系统地介绍了中国画的基本技法。清代文学家李渔曾在南京营造“芥子园”,并支持其婿沈心友及王氏三兄弟(王概、王著、王臬)编绘画谱,故成书出版之时便以此园命名。
- </div>
- <div class="system-btns">
- <BtnBack
- :color="`green`"
- @click="emit('close')"
- />
- </div>
- </div>
- </div>
- </template>
- <style lang="less" scoped>
- .screen-box {
- width: 100%;
- height: 100%;
- position: absolute;
- top: 0;
- left: 0;
- .xuliezheng-box {
- width: 300px;
- height: v-bind(innerHeight);
- overflow: hidden;
- position: absolute;
- bottom: 0;
- right: 0;
- .xuliezheng {
- width: calc(v-bind(innerWidth));
- // max-width: 30px;
- height: v-bind(innerHeight);
- background-image: url(@/assets/images/zhupu-min.png);
- background-size: cover;
- position: absolute;
- bottom: 0;
- right: 0;
- background-position-x: 0;
- background-repeat: no-repeat;
- animation-name: xuliezhen-animation;
- animation-timing-function: steps(33);
- animation-duration: 4s;
- animation-iteration-count: infinite;
- transition-property: bottom;
- @keyframes xuliezhen-animation {
- 0% {
- background-position-x: 0;
- }
- 100% {
- background-position-x: calc(100% - v-bind(innerWidth));
- }
- }
- }
- }
- .screen-box1 {
- width: 100%;
- height: 100%;
- background-image: url(@/assets/images/bg_zhupu.png);
- background-size: 100% 100%;
- writing-mode: vertical-rl;
- /* 垂直排列,从右向左 */
- direction: rtl;
- .title-box {
- color: #ffffff;
- font-size: calc(
- 48 / v-bind("windowSizeWhenDesignForRef") *
- v-bind("windowSizeInCssForRef")
- );
- line-height: calc(
- 56 / v-bind("windowSizeWhenDesignForRef") *
- v-bind("windowSizeInCssForRef")
- );
- position: absolute;
- font-family: "KingHwa_OldSong";
- letter-spacing: 0.3em;
- top: calc(
- 95 / v-bind("windowSizeWhenDesignForRef") *
- v-bind("windowSizeInCssForRef")
- );
- // right: calc(50 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
- right: 13%;
- }
- .zhupu-box {
- color: #ffffff;
- font-size: calc(
- 24 / v-bind("windowSizeWhenDesignForRef") *
- v-bind("windowSizeInCssForRef")
- );
- line-height: calc(
- 28 / v-bind("windowSizeWhenDesignForRef") *
- v-bind("windowSizeInCssForRef")
- );
- position: absolute;
- font-family: "KingHwa_OldSong";
- letter-spacing: 0.3em;
- top: 50%;
- right: 20%;
- // right: calc(75 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
- }
- > .operation-h {
- position: absolute;
- right: 14%;
- // right: calc(55 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
- bottom: 35%;
- width: calc(
- 50 / v-bind("windowSizeWhenDesignForRef") *
- v-bind("windowSizeInCssForRef")
- );
- }
- > .disc-img {
- width: calc(
- 151 / v-bind("windowSizeWhenDesignForRef") *
- v-bind("windowSizeInCssForRef")
- );
- height: calc(
- 456 / v-bind("windowSizeWhenDesignForRef") *
- v-bind("windowSizeInCssForRef")
- );
- position: absolute;
- left: calc(
- 75 / v-bind("windowSizeWhenDesignForRef") *
- v-bind("windowSizeInCssForRef")
- );
- top: calc(
- 153 / v-bind("windowSizeWhenDesignForRef") *
- v-bind("windowSizeInCssForRef")
- );
- // left: 12%;
- // margin-right: calc(170 /v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
- // margin-bottom: calc(250 /v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
- }
- >.text{
- width: calc(
- 170 / v-bind("windowSizeWhenDesignForRef") *
- v-bind("windowSizeInCssForRef")
- );
- height: calc(
- 456 / v-bind("windowSizeWhenDesignForRef") *
- v-bind("windowSizeInCssForRef")
- );
- position: absolute;
- left: calc(
- 75 / v-bind("windowSizeWhenDesignForRef") *
- v-bind("windowSizeInCssForRef")
- );
- top: calc(
- 153 / v-bind("windowSizeWhenDesignForRef") *
- v-bind("windowSizeInCssForRef")
- );
- font-size: calc(
- 20 / v-bind("windowSizeWhenDesignForRef") *
- v-bind("windowSizeInCssForRef")
- );
- line-height: calc(
- 30 / v-bind("windowSizeWhenDesignForRef") *
- v-bind("windowSizeInCssForRef")
- );
- text-indent: 2em;
- color: #7B916B;
- font-family: 'KaiTi';
- writing-mode: initial;
- direction: ltr;
- }
- > .system-btns {
- width: 100%;
- padding: 0
- calc(
- 20 / v-bind(windowSizeWhenDesignForRef) *
- v-bind(windowSizeInCssForRef)
- );
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- position: absolute;
- bottom: calc(
- 20 / v-bind(windowSizeWhenDesignForRef) * v-bind(windowSizeInCssForRef)
- );
- z-index: 2;
- }
- }
- }
- </style>
|