|
@@ -1,13 +1,54 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div class="page pg-bg pg2" parallax ref="pgRef">
|
3
|
|
- <Cloud class="cloud abs" />
|
4
|
|
- <div class="content txt">
|
5
|
|
- <Animate comp="p" name="animate__lightSpeedInRight" delay="100ms" :ready="show">
|
6
|
|
- 1939年
|
7
|
|
- <br />
|
8
|
|
- <strong>一抹紫色</strong>在战争的废墟中……
|
9
|
|
- </Animate>
|
10
|
|
- <Animate
|
|
3
|
+ <div class="bg">
|
|
4
|
+ <div>
|
|
5
|
+ <!-- <img src="/images/pg2/content-bg.png" parallax-offset='200' alt="" /> -->
|
|
6
|
+ <Animate
|
|
7
|
+ comp="img"
|
|
8
|
+ name="animate__fadeInLeft"
|
|
9
|
+ src="/images/pg2/content-bg.png"
|
|
10
|
+ :ready="show"
|
|
11
|
+ />
|
|
12
|
+ </div>
|
|
13
|
+ </div>
|
|
14
|
+ <!-- <Cloud class="cloud abs" /> -->
|
|
15
|
+ <div class="content">
|
|
16
|
+ <div>
|
|
17
|
+ <Animate
|
|
18
|
+ class="year"
|
|
19
|
+ comp="img"
|
|
20
|
+ name="animate__fadeIn"
|
|
21
|
+ src="/images/pg2/1939年.png"
|
|
22
|
+ delay="1000ms"
|
|
23
|
+ :ready="show"
|
|
24
|
+ />
|
|
25
|
+ <!-- <img class="year" src="/images/pg2/1939年.png" alt="" /> -->
|
|
26
|
+ </div>
|
|
27
|
+ <!-- 1939年 -->
|
|
28
|
+ <div>
|
|
29
|
+ <!-- <img class="text1" src="/images/pg2/text1.png" alt="" /> -->
|
|
30
|
+ <Animate
|
|
31
|
+ class="text1"
|
|
32
|
+ comp="img"
|
|
33
|
+ name="animate__fadeInUp"
|
|
34
|
+ src="/images/pg2/text1.png"
|
|
35
|
+ delay="2000ms"
|
|
36
|
+ :ready="show"
|
|
37
|
+ />
|
|
38
|
+ </div>
|
|
39
|
+ <div>
|
|
40
|
+ <Animate
|
|
41
|
+ class="text2"
|
|
42
|
+ comp="img"
|
|
43
|
+ name="animate__fadeIn"
|
|
44
|
+ src="/images/pg2/text2.png"
|
|
45
|
+ delay="3000ms"
|
|
46
|
+ :ready="show"
|
|
47
|
+ />
|
|
48
|
+ <!-- <img class="text2" src="/images/pg2/text2.png" alt="" /> -->
|
|
49
|
+ </div>
|
|
50
|
+ <!-- </Animate> -->
|
|
51
|
+ <!-- <Animate
|
11
|
52
|
@click="onClick"
|
12
|
53
|
class="story"
|
13
|
54
|
comp="img"
|
|
@@ -16,81 +57,101 @@
|
16
|
57
|
src="./images/pg2/story.png"
|
17
|
58
|
alt
|
18
|
59
|
:ready="show"
|
19
|
|
- />
|
20
|
|
- </div>
|
21
|
|
-
|
22
|
|
- <div class="hill abs">
|
23
|
|
- <img class src="/images/pg2/mountain.png" alt parallax-offset="-100" />
|
|
60
|
+ /> -->
|
24
|
61
|
</div>
|
25
|
62
|
|
26
|
63
|
<div class="groups abs">
|
27
|
64
|
<div>
|
28
|
|
- <img class="stele" src="/images/pg2/stele.png" alt parallax-offset="-150" />
|
29
|
|
- <div parallax-offset="-300">
|
30
|
|
- <img class="ruins" src="/images/pg2/ruins.png" alt />
|
31
|
|
- <!-- <Smoke class="smoke abs" /> -->
|
|
65
|
+ <div>
|
|
66
|
+ <img class="ruins" src="/images/pg2/废墟.png" alt />
|
32
|
67
|
</div>
|
33
|
|
- <img class="persons" src="/images/pg2/persons.png" alt parallax-offset="-500" />
|
|
68
|
+ </div>
|
|
69
|
+ </div>
|
|
70
|
+ <div class="flower1">
|
|
71
|
+ <div>
|
|
72
|
+ <img src="/images/pg2/flower1.png" alt="" />
|
|
73
|
+ </div>
|
|
74
|
+ </div>
|
|
75
|
+
|
|
76
|
+ <div class="flower2">
|
|
77
|
+ <div>
|
|
78
|
+ <img src="/images/pg2/flower2.png" alt="" />
|
34
|
79
|
</div>
|
35
|
80
|
</div>
|
36
|
81
|
|
37
|
|
- <img class="footer abs" src="/images/pg2/footer.png" alt />
|
|
82
|
+ <div class="footer txt">
|
|
83
|
+ 了解故事
|
|
84
|
+ <img src="/images/pg2/箭头-右.png" alt />
|
|
85
|
+ </div>
|
|
86
|
+ <!-- <img class="footer abs" src="/images/pg2/footer.png" alt /> -->
|
38
|
87
|
|
39
|
|
- <div class="flower abs">
|
|
88
|
+ <!-- <div class="flower abs">
|
40
|
89
|
<Animate class="flower1 abs" :comp="Flower1" :name="flowerAnimate.left" :ready="show" />
|
41
|
90
|
<Animate class="flower2 abs" :comp="Flower2" :name="flowerAnimate.right" :ready="show" />
|
42
|
91
|
<Animate class="flower3 abs" :comp="Flower3" :name="flowerAnimate.left" :ready="show" />
|
43
|
|
- </div>
|
|
92
|
+ </div> -->
|
44
|
93
|
</div>
|
45
|
94
|
</template>
|
46
|
95
|
|
47
|
96
|
<script setup>
|
48
|
|
-import { reactive, ref } from 'vue'
|
49
|
|
-import { useRouter } from 'vue-router'
|
50
|
|
-import Bell from '@/components/Bell.vue'
|
51
|
|
-import Animate from '@/components/Animate.vue'
|
52
|
|
-import Cloud from './Cloud.vue'
|
53
|
|
-import Smoke from './smoke.vue'
|
54
|
|
-import Flower1 from './flower/Flower1.vue'
|
55
|
|
-import Flower2 from './flower/Flower2.vue'
|
56
|
|
-import Flower3 from './flower/Flower3.vue'
|
57
|
|
-import usePageShow from '../usePageShow'
|
58
|
|
-
|
59
|
|
-const router = useRouter()
|
|
97
|
+import { reactive, ref } from "vue";
|
|
98
|
+import { useRouter } from "vue-router";
|
|
99
|
+import Bell from "@/components/Bell.vue";
|
|
100
|
+import Animate from "@/components/Animate.vue";
|
|
101
|
+import Cloud from "./Cloud.vue";
|
|
102
|
+import Smoke from "./smoke.vue";
|
|
103
|
+import Flower1 from "./flower/Flower1.vue";
|
|
104
|
+import Flower2 from "./flower/Flower2.vue";
|
|
105
|
+import Flower3 from "./flower/Flower3.vue";
|
|
106
|
+import usePageShow from "../usePageShow";
|
|
107
|
+
|
|
108
|
+const router = useRouter();
|
60
|
109
|
|
61
|
110
|
const onClick = () => {
|
62
|
|
- router.push(`/pg2-2`)
|
63
|
|
-}
|
|
111
|
+ router.push(`/pg2-2`);
|
|
112
|
+};
|
64
|
113
|
|
65
|
114
|
const flowerAnimate = reactive({
|
66
|
|
- left: '',
|
67
|
|
- right: ''
|
68
|
|
-})
|
|
115
|
+ left: "",
|
|
116
|
+ right: "",
|
|
117
|
+});
|
69
|
118
|
|
70
|
|
-let lastRatio = 0
|
|
119
|
+let lastRatio = 0;
|
71
|
120
|
const flowShow = ({ intersectionRatio }) => {
|
72
|
|
- console.log(intersectionRatio)
|
73
|
|
- const isIn = intersectionRatio > 0.5 && intersectionRatio > lastRatio
|
74
|
|
- const isOut = intersectionRatio < 0.9 && intersectionRatio < lastRatio
|
|
121
|
+ console.log(intersectionRatio);
|
|
122
|
+ const isIn = intersectionRatio > 0.5 && intersectionRatio > lastRatio;
|
|
123
|
+ const isOut = intersectionRatio < 0.9 && intersectionRatio < lastRatio;
|
75
|
124
|
|
76
|
125
|
if (isIn) {
|
77
|
|
- flowerAnimate.left = 'animate__fadeInLeft'
|
78
|
|
- flowerAnimate.right = 'animate__fadeInRight'
|
|
126
|
+ flowerAnimate.left = "animate__fadeInLeft";
|
|
127
|
+ flowerAnimate.right = "animate__fadeInRight";
|
79
|
128
|
}
|
80
|
129
|
if (isOut) {
|
81
|
|
- flowerAnimate.left = 'animate__fadeOutLeft'
|
82
|
|
- flowerAnimate.right = 'animate__fadeOutRight'
|
|
130
|
+ flowerAnimate.left = "animate__fadeOutLeft";
|
|
131
|
+ flowerAnimate.right = "animate__fadeOutRight";
|
83
|
132
|
}
|
84
|
133
|
|
85
|
|
- lastRatio = intersectionRatio
|
86
|
|
-}
|
|
134
|
+ lastRatio = intersectionRatio;
|
|
135
|
+};
|
87
|
136
|
|
88
|
|
-const [pgRef, show] = usePageShow(flowShow)
|
|
137
|
+const [pgRef, show] = usePageShow(flowShow);
|
89
|
138
|
</script>
|
90
|
139
|
|
91
|
140
|
<style lang="less" scoped>
|
92
|
141
|
.pg2 {
|
93
|
142
|
overflow: hidden;
|
|
143
|
+ // margin-top: -80px;
|
|
144
|
+ .bg {
|
|
145
|
+ position: absolute;
|
|
146
|
+ z-index: 0;
|
|
147
|
+ width: 50%;
|
|
148
|
+ // height: 100%;
|
|
149
|
+ left: 0;
|
|
150
|
+ top: 0;
|
|
151
|
+ & > div {
|
|
152
|
+ position: relative;
|
|
153
|
+ }
|
|
154
|
+ }
|
94
|
155
|
|
95
|
156
|
.bell {
|
96
|
157
|
top: 30px;
|
|
@@ -111,10 +172,23 @@ const [pgRef, show] = usePageShow(flowShow)
|
111
|
172
|
.content {
|
112
|
173
|
z-index: 10;
|
113
|
174
|
width: 80vw;
|
114
|
|
- margin-left: 20vw;
|
|
175
|
+ margin-left: 15vw;
|
115
|
176
|
padding-top: 80px;
|
116
|
177
|
line-height: 2em;
|
117
|
178
|
|
|
179
|
+ .year {
|
|
180
|
+ margin-top: 40px;
|
|
181
|
+ width: 60%;
|
|
182
|
+ }
|
|
183
|
+
|
|
184
|
+ .text1 {
|
|
185
|
+ margin-top: 30px;
|
|
186
|
+ width: 30%;
|
|
187
|
+ }
|
|
188
|
+ .text2 {
|
|
189
|
+ margin-top: 30px;
|
|
190
|
+ width: 60%;
|
|
191
|
+ }
|
118
|
192
|
.story {
|
119
|
193
|
margin-top: 12px;
|
120
|
194
|
width: 45%;
|
|
@@ -144,62 +218,49 @@ const [pgRef, show] = usePageShow(flowShow)
|
144
|
218
|
position: relative;
|
145
|
219
|
}
|
146
|
220
|
|
147
|
|
- .smoke {
|
148
|
|
- bottom: 0;
|
149
|
|
- left: 55%;
|
150
|
|
- z-index: 0;
|
151
|
|
- width: 100%;
|
152
|
|
- background: transparent;
|
153
|
|
- }
|
154
|
|
-
|
155
|
|
- .stele {
|
156
|
|
- position: absolute;
|
157
|
|
- width: 40%;
|
158
|
|
- right: 0;
|
159
|
|
- top: -60%;
|
|
221
|
+ img {
|
|
222
|
+ filter: gray;
|
160
|
223
|
}
|
161
|
224
|
}
|
162
|
|
-
|
163
|
|
- .footer {
|
164
|
|
- left: 0;
|
165
|
|
- bottom: 0;
|
166
|
|
- }
|
167
|
|
-
|
168
|
|
- .flower {
|
169
|
|
- bottom: 0;
|
170
|
|
- left: 0;
|
171
|
|
- width: 100%;
|
172
|
|
- height: 50vh;
|
173
|
|
- z-index: 4;
|
174
|
|
- overflow: hidden;
|
175
|
|
- }
|
176
|
|
-
|
177
|
225
|
.flower1 {
|
178
|
|
- left: 0;
|
179
|
|
- bottom: 0;
|
|
226
|
+ position: absolute;
|
|
227
|
+ z-index: 20;
|
|
228
|
+ width: 50%;
|
|
229
|
+ // height: 100%;
|
|
230
|
+ left: 50px;
|
|
231
|
+ top: 500px;
|
|
232
|
+ & > div {
|
|
233
|
+ position: relative;
|
|
234
|
+ }
|
|
235
|
+ img {
|
|
236
|
+ width: 50px;
|
|
237
|
+ }
|
180
|
238
|
}
|
181
|
|
-
|
182
|
239
|
.flower2 {
|
183
|
|
- width: 20vw;
|
|
240
|
+ position: absolute;
|
|
241
|
+ z-index: 20;
|
|
242
|
+
|
|
243
|
+ // height: 100%;
|
184
|
244
|
right: 0;
|
185
|
|
- bottom: 0;
|
|
245
|
+ top: 250px;
|
|
246
|
+ img {
|
|
247
|
+ width: 80px;
|
|
248
|
+ }
|
186
|
249
|
}
|
187
|
|
-
|
188
|
|
- .flower3 {
|
189
|
|
- width: 20vw;
|
190
|
|
- left: 20vw;
|
|
250
|
+ .footer {
|
|
251
|
+ left: 0;
|
191
|
252
|
bottom: 0;
|
192
|
|
- }
|
193
|
|
-
|
194
|
|
- .hill,
|
195
|
|
- .wall,
|
196
|
|
- .flower {
|
|
253
|
+ position: absolute;
|
|
254
|
+ width: 100%;
|
|
255
|
+ text-align: center;
|
|
256
|
+ font-size: 24px;
|
197
|
257
|
img {
|
198
|
|
- width: 100%;
|
199
|
|
- display: block;
|
200
|
|
- position: relative;
|
201
|
|
- z-index: 100;
|
|
258
|
+ width: 15px;
|
|
259
|
+ height: 25px;
|
|
260
|
+ display: inline;
|
|
261
|
+ width: auto;
|
|
262
|
+ vertical-align: text-bottom;
|
202
|
263
|
}
|
203
|
264
|
}
|
204
|
265
|
}
|
205
|
|
-</style>
|
|
266
|
+</style>
|