|
@@ -10,12 +10,30 @@
|
|
|
:key="ageName"
|
|
|
class="menu-item"
|
|
|
>
|
|
|
- <div class="cover">
|
|
|
- <span class="age">{{ ageName }}</span>
|
|
|
- <span class="age-en">{{ `${ageCnToEn[ageName]} dynasty` }}</span>
|
|
|
- <span class="author-list">{{ getAuthorList(paintingGroup).join('/') }}</span>
|
|
|
+ <div
|
|
|
+ class="cover"
|
|
|
+ @click="onClickAge(ageName)"
|
|
|
+ >
|
|
|
+ <div class="age">
|
|
|
+ {{ ageName }}
|
|
|
+ </div>
|
|
|
+ <div class="age-en">
|
|
|
+ {{ `${ageCnToEn[ageName]} dynasty` }}
|
|
|
+ </div>
|
|
|
+ <div class="author-list">
|
|
|
+ {{ getAuthorList(paintingGroup).join('\\') }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="hidden-content">
|
|
|
+ <div
|
|
|
+ v-if="ageName !== '清' && !expandedAgeNameList.has(ageName)"
|
|
|
+ class="splitter"
|
|
|
+ />
|
|
|
+ <div
|
|
|
+ class="hidden-content"
|
|
|
+ :style="{
|
|
|
+ width: expandedAgeNameList.has(ageName) ? getHiddenContentWidth(paintingGroup, ageName) : '0',
|
|
|
+ }"
|
|
|
+ >
|
|
|
<div
|
|
|
v-if="ageName === '宋'"
|
|
|
class="special-desc"
|
|
@@ -29,9 +47,17 @@
|
|
|
:key="item['标题']"
|
|
|
class="painting-item"
|
|
|
>
|
|
|
- <span class="author">{{ item['作者'] }}</span>
|
|
|
- <span class="title">{{ item['标题'] }}</span>
|
|
|
- <span class="type">{{ item['装裱\/材质\/笔类型'] }}</span>
|
|
|
+ <div class="top-wrap">
|
|
|
+ <div class="author">
|
|
|
+ {{ item['作者'] }}
|
|
|
+ </div>
|
|
|
+ <div class="title">
|
|
|
+ {{ item['标题'].split('\n').join('') }}
|
|
|
+ </div>
|
|
|
+ <div class="type">
|
|
|
+ {{ item['装裱\/材质\/笔类型'] }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="img-wrap">
|
|
|
<img
|
|
|
class=""
|
|
@@ -40,8 +66,12 @@
|
|
|
draggable="false"
|
|
|
>
|
|
|
</div>
|
|
|
- <span class="size">{{ getPaintingSizeString(item['尺寸']) }}</span>
|
|
|
- <span class="position">{{ item['馆藏'] }}</span>
|
|
|
+ <div class="size">
|
|
|
+ {{ getPaintingSizeString(item['尺寸']) }}
|
|
|
+ </div>
|
|
|
+ <div class="position">
|
|
|
+ {{ item['馆藏'] }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -119,15 +149,25 @@ function getPaintingSizeString(raw) {
|
|
|
width = width.substring(1, width.length - 2)
|
|
|
return `${width}\u00D7${height} 厘米`
|
|
|
}
|
|
|
-const specialDesc = configExcel['其他'][3]['修篁树石图'][1]['作品简介'].split('\n')[0]
|
|
|
-
|
|
|
-function onClickMenuItem(menuItemName) {
|
|
|
- // const targetIdx = poemList.findIndex((item) => {
|
|
|
- // return item['朝代'] === menuItemName
|
|
|
- // })
|
|
|
- // swiper.slideTo(targetIdx)
|
|
|
- // isShowMenu.value = false
|
|
|
+const paintingWidthWhenDesign = 240
|
|
|
+const paintingMarginWhenDesin = 75
|
|
|
+const specialDescWidthWhenDesin = 444
|
|
|
+function getHiddenContentWidth(paintingGroup, ageName) {
|
|
|
+ let temp = paintingGroup.length * (paintingWidthWhenDesign + paintingMarginWhenDesin) + paintingMarginWhenDesin
|
|
|
+ if (ageName === '宋') {
|
|
|
+ temp += specialDescWidthWhenDesin
|
|
|
+ }
|
|
|
+ return `${temp / windowSizeWhenDesignForRef.value * Number(windowSizeInCssForRef.value.substring(0, windowSizeInCssForRef.value.length - 2))}px`
|
|
|
}
|
|
|
+const expandedAgeNameList = ref(new Set())
|
|
|
+function onClickAge(ageName) {
|
|
|
+ if (expandedAgeNameList.value.has(ageName)) {
|
|
|
+ expandedAgeNameList.value.delete(ageName)
|
|
|
+ } else {
|
|
|
+ expandedAgeNameList.value.add(ageName)
|
|
|
+ }
|
|
|
+}
|
|
|
+const specialDesc = configExcel['其他'][3]['修篁树石图'][1]['作品简介'].split('\n')[0]
|
|
|
|
|
|
const isShowOperationTip = ref(true)
|
|
|
watch(menuElScrollLeft, (v) => {
|
|
@@ -146,6 +186,156 @@ watch(menuElScrollLeft, (v) => {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
background-color: #99ab8e;
|
|
|
+ >ul{
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ overflow: auto;
|
|
|
+ >.menu-item{
|
|
|
+ flex: 0 0 auto;
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ >.cover{
|
|
|
+ flex: 0 0 auto;
|
|
|
+ height: 100%;
|
|
|
+ padding-left: calc(22 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ padding-right: calc(22 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ writing-mode: vertical-lr;
|
|
|
+ >.age{
|
|
|
+ margin-top: calc(334 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ font-family: KingHwa_OldSong, KingHwa_OldSong;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: calc(34 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ color: #fff;
|
|
|
+ line-height: calc(40 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ }
|
|
|
+ >.age-en{
|
|
|
+ margin-top: calc(334 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ font-family: KingHwa_OldSong, KingHwa_OldSong;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: calc(20 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ color: #FFFFFF;
|
|
|
+ line-height: calc(23 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ }
|
|
|
+ >.author-list{
|
|
|
+ margin-top: calc(334 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ font-family: KaiTi, KaiTi;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: calc(16 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ color: #FFFFFF;
|
|
|
+ line-height: calc(19 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ letter-spacing: 0.2em;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ >.splitter{
|
|
|
+ height: calc(534 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ width: 1px;
|
|
|
+ background-color: #fff;
|
|
|
+ }
|
|
|
+ >.hidden-content{
|
|
|
+ transition: width 1s;
|
|
|
+ overflow: hidden;
|
|
|
+ display: flex;
|
|
|
+ background-color: #f9f7f2;
|
|
|
+ height: 100%;
|
|
|
+ >.special-desc{
|
|
|
+ flex: 0 0 auto;
|
|
|
+ >img.logo{
|
|
|
+
|
|
|
+ }
|
|
|
+ >p{
|
|
|
+
|
|
|
+ }
|
|
|
+ >button.see-more{
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ >.painting-item:last-of-type {
|
|
|
+ margin-right: calc(v-bind('paintingMarginWhenDesin') / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ }
|
|
|
+ >.painting-item{
|
|
|
+ flex: 0 0 auto;
|
|
|
+ margin-left: calc(v-bind('paintingMarginWhenDesin') / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ width: calc(v-bind('paintingWidthWhenDesign') / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ >.top-wrap{
|
|
|
+ height: 0;
|
|
|
+ width: 0;
|
|
|
+ margin-top: calc(297 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ margin-bottom: calc(29 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ position: relative;
|
|
|
+ >.author{
|
|
|
+ writing-mode: vertical-lr;
|
|
|
+ font-family: KingHwa_OldSong, KingHwa_OldSong;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: calc(34 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ color: #474747;
|
|
|
+ white-space: pre;
|
|
|
+ position: absolute;
|
|
|
+ right: 0;
|
|
|
+ bottom: calc(18 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ }
|
|
|
+ >.title{
|
|
|
+ writing-mode: vertical-lr;
|
|
|
+ font-family: KingHwa_OldSong, KingHwa_OldSong;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: calc(13 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ color: #474747;
|
|
|
+ white-space: pre;
|
|
|
+ position: absolute;
|
|
|
+ left: calc(11 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ bottom: 0;
|
|
|
+ }
|
|
|
+ >.type{
|
|
|
+ writing-mode: vertical-lr;
|
|
|
+ font-family: KingHwa_OldSong, KingHwa_OldSong;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: calc(13 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ color: #474747;
|
|
|
+ white-space: pre;
|
|
|
+ position: absolute;
|
|
|
+ left: calc(31 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ bottom: calc(0 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ >.img-wrap{
|
|
|
+ width: calc(240 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ height: calc(240 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ border-radius: 50%;
|
|
|
+ border: calc(4 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef')) solid #50361E;
|
|
|
+ overflow: hidden;
|
|
|
+ margin-bottom: calc(21 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ >img{
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ object-fit: cover;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ >.size{
|
|
|
+ font-family: KingHwa_OldSong, KingHwa_OldSong;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 13px;
|
|
|
+ color: #474747;
|
|
|
+ line-height: 15px;
|
|
|
+ margin-bottom: 0.5em;
|
|
|
+ }
|
|
|
+ >.position{
|
|
|
+ font-family: KingHwa_OldSong, KingHwa_OldSong;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 13px;
|
|
|
+ color: #474747;
|
|
|
+ line-height: 15px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
>.operation-tip{
|
|
|
position: absolute;
|
|
|
right: calc(20 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|