fangmingyue 2 gadus atpakaļ
vecāks
revīzija
1d7b1c029f
47 mainītis faili ar 378 papildinājumiem un 65 dzēšanām
  1. Binārs
      public/images/bk1/flip.png
  2. Binārs
      public/images/bk1/flower.png
  3. Binārs
      public/images/bk1/flower/花朵生长动画0001.png
  4. Binārs
      public/images/bk1/flower/花朵生长动画0003.png
  5. Binārs
      public/images/bk1/flower/花朵生长动画0005.png
  6. Binārs
      public/images/bk1/flower/花朵生长动画0007.png
  7. Binārs
      public/images/bk1/flower/花朵生长动画0009.png
  8. Binārs
      public/images/bk1/flower/花朵生长动画0011.png
  9. Binārs
      public/images/bk1/flower/花朵生长动画0013.png
  10. Binārs
      public/images/bk1/flower/花朵生长动画0015.png
  11. Binārs
      public/images/bk1/flower/花朵生长动画0017.png
  12. Binārs
      public/images/bk1/flower/花朵生长动画0019.png
  13. Binārs
      public/images/bk1/flower/花朵生长动画0021.png
  14. Binārs
      public/images/bk1/flower/花朵生长动画0023.png
  15. Binārs
      public/images/bk1/flower/花朵生长动画0025.png
  16. Binārs
      public/images/bk1/flower/花朵生长动画0027.png
  17. Binārs
      public/images/bk1/flower/花朵生长动画0029.png
  18. Binārs
      public/images/bk1/flower/花朵生长动画0031.png
  19. Binārs
      public/images/bk1/pg2/header.png
  20. Binārs
      public/images/bk1/pg2/虚线1.png
  21. Binārs
      public/images/bk1/pg2/虚线2.png
  22. Binārs
      public/images/bk1/pg2/虚线3.png
  23. Binārs
      public/images/bk1/pg2/虚线4.png
  24. Binārs
      public/images/bk1/pg2/虚线5.png
  25. Binārs
      public/images/bk1/pg2/虚线6.png
  26. Binārs
      public/images/bk1/pg2/虚线7.png
  27. Binārs
      public/images/bk1/pg2/虚线8.png
  28. Binārs
      public/images/bk1/pg3/header.png
  29. Binārs
      public/images/bk1/pg3/header1.png
  30. Binārs
      public/images/bk1/pg3/header2.png
  31. Binārs
      public/images/bk1/pg3/header3.png
  32. Binārs
      public/images/bk1/poster.png
  33. Binārs
      public/images/logo.png
  34. Binārs
      public/images/pg2/persons.png
  35. 35
    0
      src/pages/bk1/FlipIcon.vue
  36. 5
    0
      src/pages/bk1/index.vue
  37. 8
    1
      src/pages/bk1/pg1.vue
  38. 50
    1
      src/pages/bk1/pg2.vue
  39. 203
    1
      src/pages/bk1/pg3.vue
  40. 13
    0
      src/pages/bk1/useSerial.js
  41. 0
    2
      src/pages/pg1/P1.vue
  42. 0
    2
      src/pages/pg1/P2.vue
  43. 0
    2
      src/pages/pg1/P3.vue
  44. 5
    5
      src/pages/pg1/index.vue
  45. 55
    51
      src/pages/pg2/index.vue
  46. 0
    0
      src/pages/pg4/index.vue
  47. 4
    0
      src/utils/resources.js

Binārs
public/images/bk1/flip.png Parādīt failu


Binārs
public/images/bk1/flower.png Parādīt failu


Binārs
public/images/bk1/flower/花朵生长动画0001.png Parādīt failu


Binārs
public/images/bk1/flower/花朵生长动画0003.png Parādīt failu


Binārs
public/images/bk1/flower/花朵生长动画0005.png Parādīt failu


Binārs
public/images/bk1/flower/花朵生长动画0007.png Parādīt failu


Binārs
public/images/bk1/flower/花朵生长动画0009.png Parādīt failu


Binārs
public/images/bk1/flower/花朵生长动画0011.png Parādīt failu


Binārs
public/images/bk1/flower/花朵生长动画0013.png Parādīt failu


Binārs
public/images/bk1/flower/花朵生长动画0015.png Parādīt failu


Binārs
public/images/bk1/flower/花朵生长动画0017.png Parādīt failu


Binārs
public/images/bk1/flower/花朵生长动画0019.png Parādīt failu


Binārs
public/images/bk1/flower/花朵生长动画0021.png Parādīt failu


Binārs
public/images/bk1/flower/花朵生长动画0023.png Parādīt failu


Binārs
public/images/bk1/flower/花朵生长动画0025.png Parādīt failu


Binārs
public/images/bk1/flower/花朵生长动画0027.png Parādīt failu


Binārs
public/images/bk1/flower/花朵生长动画0029.png Parādīt failu


Binārs
public/images/bk1/flower/花朵生长动画0031.png Parādīt failu


Binārs
public/images/bk1/pg2/header.png Parādīt failu


Binārs
public/images/bk1/pg2/虚线1.png Parādīt failu


Binārs
public/images/bk1/pg2/虚线2.png Parādīt failu


Binārs
public/images/bk1/pg2/虚线3.png Parādīt failu


Binārs
public/images/bk1/pg2/虚线4.png Parādīt failu


Binārs
public/images/bk1/pg2/虚线5.png Parādīt failu


Binārs
public/images/bk1/pg2/虚线6.png Parādīt failu


Binārs
public/images/bk1/pg2/虚线7.png Parādīt failu


Binārs
public/images/bk1/pg2/虚线8.png Parādīt failu


Binārs
public/images/bk1/pg3/header.png Parādīt failu


Binārs
public/images/bk1/pg3/header1.png Parādīt failu


Binārs
public/images/bk1/pg3/header2.png Parādīt failu


Binārs
public/images/bk1/pg3/header3.png Parādīt failu


Binārs
public/images/bk1/poster.png Parādīt failu


Binārs
public/images/logo.png Parādīt failu


Binārs
public/images/pg2/persons.png Parādīt failu


+ 35
- 0
src/pages/bk1/FlipIcon.vue Parādīt failu

@@ -0,0 +1,35 @@
1
+<template>
2
+  <img
3
+    v-show="show"
4
+    class="flip"
5
+    src="/images/bk1/flip.png"
6
+    alt=""
7
+    @touchmove="onTouch"
8
+  >
9
+</template>
10
+
11
+<script setup>
12
+  import { ref } from 'vue';
13
+
14
+  const show = ref(true);
15
+
16
+  const onTouch = () => {
17
+    show.value = false;
18
+
19
+    const t = setTimeout(() => {
20
+      show.value = true;
21
+      clearTimeout(t);
22
+    }, 1000);
23
+  }
24
+</script>
25
+
26
+<style lang="less" scoped>
27
+.flip {
28
+  position: fixed;
29
+  z-index: 100;
30
+  bottom: 0;
31
+  right: 0;
32
+  display: block;
33
+  width: 20vw;
34
+}
35
+</style>

+ 5
- 0
src/pages/bk1/index.vue Parādīt failu

@@ -11,16 +11,21 @@
11 11
 
12 12
 <script setup>
13 13
 import { onMounted } from 'vue'
14
+import { useRoute } from 'vue-router'
14 15
 import GoBack from './GoBack.vue'
15 16
 import Pg1 from './pg1.vue'
16 17
 import Pg2 from './pg2.vue'
17 18
 import Pg3 from './pg3.vue'
18 19
 
20
+const { query } = useRoute()
21
+const { page = 1 } = query || {}
22
+
19 23
 onMounted(() => {
20 24
   $('#bk1').turn({
21 25
     width: '100vw',
22 26
     height: '100vh',
23 27
     display: 'single',
28
+    page,
24 29
     pages: 3
25 30
   })
26 31
 })

+ 8
- 1
src/pages/bk1/pg1.vue Parādīt failu

@@ -1,7 +1,12 @@
1 1
 <template>
2 2
   <div class="page pg-bg bk-pg">
3 3
     <div class="bk-pd">
4
-      <video src="/video/紫金草走向世界010.mp4" autoplay="autoplay"></video>
4
+      <video
5
+        src="/video/紫金草走向世界010.mp4"
6
+        poster="/images/bk1/poster.png"
7
+        controls="controls"
8
+        autoplay="autoplay"
9
+      />
5 10
     </div>
6 11
     <div class="bk-pd content">
7 12
       <img class="map-serial" src="/images/bk1/map/地图散开0001.png" alt="">
@@ -43,12 +48,14 @@
43 48
     </div>
44 49
 
45 50
     <Dot class="dot abs" :active="1" />
51
+    <FlipIcon />
46 52
   </div>
47 53
 </template>
48 54
 
49 55
 <script setup>
50 56
 import { onMounted, ref } from 'vue';
51 57
 import Dot from './Dot.vue';
58
+import FlipIcon from './FlipIcon.vue';
52 59
 
53 60
   // const show = ref([true]);
54 61
 

+ 50
- 1
src/pages/bk1/pg2.vue Parādīt failu

@@ -1,7 +1,10 @@
1 1
 <template>
2 2
   <div class="page pg-bg bk-pg2">
3 3
     <div class="content">
4
-      <img class="header-img" src="/images/bk1/pg2/header.png" alt="">
4
+      <div class="header-img">
5
+        <img src="/images/bk1/pg2/header.png" alt="">
6
+        <div id="flower" class="flower" />
7
+      </div>
5 8
       <br>
6 9
       <img class="badge-img" src="/images/bk1/pg2/badge.png" alt="">
7 10
 
@@ -16,11 +19,40 @@
16 19
     </div>
17 20
 
18 21
     <Dot class="abs dot" :active="2" />
22
+    <FlipIcon />
19 23
   </div>
20 24
 </template>
21 25
 
22 26
 <script setup>
27
+  import { onMounted } from 'vue';
23 28
   import Dot from './Dot.vue';
29
+  import FlipIcon from './FlipIcon.vue';
30
+  import useSerial from './useSerial';
31
+
32
+  const flowerImg = {
33
+    maxHeight: 11200,
34
+    height: 700,
35
+    renderHeight: 150,
36
+    percent: 150 / 700,
37
+  }
38
+
39
+  onMounted(() => {
40
+    const maxHeight = 11200;
41
+    const rawHeight = 700;
42
+    const flower = document.querySelector('#flower');
43
+    const height = flower.offsetHeight;
44
+
45
+    useSerial((t) => {
46
+      const pos = t * flowerImg.height;
47
+
48
+      const backgroundPosition = `0 -${pos * height / rawHeight}px`;
49
+      flower.style.backgroundPosition = backgroundPosition;
50
+
51
+      if (pos >= (maxHeight - rawHeight)) {
52
+        return true;
53
+      }
54
+    })
55
+  });
24 56
 </script>
25 57
 
26 58
 <style lang="less" scoped>
@@ -32,6 +64,23 @@
32 64
     .header-img {
33 65
       width: 90%;
34 66
       display: inline-block;
67
+      position: relative;
68
+
69
+      @width: 30vw;
70
+      @height: (@width / 400 * 700);
71
+
72
+      .flower {
73
+        position: absolute;
74
+        z-index: 2;
75
+        width: @width;
76
+        height: @height;
77
+        left: calc(50% - 20vw);
78
+        top: 0;
79
+        background-image: url(/images/bk1/flower.png);
80
+        background-repeat:no-repeat;
81
+        background-position: 0 0;
82
+        background-size: 100% auto;
83
+      }
35 84
     }
36 85
 
37 86
     .badge-img {

+ 203
- 1
src/pages/bk1/pg3.vue Parādīt failu

@@ -1,7 +1,209 @@
1 1
 <template>
2
-  <div class="page pg-bg">789</div>
2
+  <div class="page pg-bg">
3
+    <div class="header">
4
+      <img
5
+        class="header1 animate__animated animate__rotateIn"
6
+        src="/images/bk1/pg3/header1.png"
7
+        style="animation-delay: 100ms"
8
+        alt=""
9
+      >
10
+      <img
11
+        class="header2 animate__animated animate__rotateIn abs"
12
+        src="/images/bk1/pg3/header2.png"
13
+        style="animation-delay: 300ms"
14
+        alt=""
15
+      >
16
+      <img
17
+        class="header3 animate__animated animate__fadeIn"
18
+        src="/images/bk1/pg3/header3.png"
19
+        style="animation-delay: 600ms"
20
+        alt=""
21
+      >
22
+    </div>
23
+    <div class="content">
24
+      <section class="animate__animated animate__fadeInDown" style="animation-delay: 1s">
25
+        <div class="title txt right">
26
+          <strong>2014年</strong>
27
+          <img src="/images/logo.png" alt="">
28
+        </div>
29
+        <p class="txt right pr16">
30
+          我们第一次以“紫金草”的名字,来到大家身边。我们寻访丛葬地,开设“紫色的哀思”公祭网页,发放紫金草徽章,播撒和平的种子
31
+        </p>
32
+        <img class="abs line1" src="/images/bk1/pg2/虚线1.png" alt="">
33
+      </section>
34
+      <section class="animate__animated animate__fadeInDown" style="animation-delay: 2s">
35
+        <div class="title txt">
36
+          <img src="/images/logo.png" alt="">
37
+          <strong>2015年</strong>
38
+        </div>
39
+        <p class="txt pl16">
40
+          “家脉1937”家史故事征集,3000多个家史故事讲述历史
41
+        </p>
42
+        <img class="abs line2" src="/images/bk1/pg2/虚线2.png" alt="">
43
+      </section>
44
+      <section class="animate__animated animate__fadeInDown" style="animation-delay: 3s">
45
+        <div class="title txt right">
46
+          <strong>2016年</strong>
47
+          <img src="/images/logo.png" alt="">
48
+        </div>
49
+        <p class="txt right pr16">
50
+          200万人线上种植紫金草、更换紫金草头像、手写家史故事
51
+        </p>
52
+        <img class="abs line1" src="/images/bk1/pg2/虚线1.png" alt="">
53
+      </section>
54
+      <section class="animate__animated animate__fadeInDown" style="animation-delay: 4s">
55
+        <div class="title txt">
56
+          <img src="/images/logo.png" alt="">
57
+          <strong>2017年</strong>
58
+        </div>
59
+        <p class="txt pl16">
60
+          5处丛葬地,12.13公里接力骑行,让和平理念在这座经历过伤痛的城市扎根、传播
61
+        </p>
62
+        <img class="abs line2" src="/images/bk1/pg2/虚线2.png" alt="">
63
+      </section>
64
+      <section class="animate__animated animate__fadeInDown" style="animation-delay: 5s">
65
+        <div class="title txt right">
66
+          <strong>2018年</strong>
67
+          <img src="/images/logo.png" alt="">
68
+        </div>
69
+        <p class="txt right pr16">
70
+          线上紫金草活动在全球十多个城市开展,世界个各个角落,都有紫金草的身影。
71
+        </p>
72
+        <img class="abs line1" src="/images/bk1/pg2/虚线1.png" alt="">
73
+      </section>
74
+      <section class="animate__animated animate__fadeInDown" style="animation-delay: 6s">
75
+        <div class="title txt">
76
+          <img src="/images/logo.png" alt="">
77
+          <strong>2019年</strong>
78
+        </div>
79
+        <p class="txt pl16">
80
+          5处丛葬地,12.13公里接力骑行,让和平理念在这座经历过伤痛的城市扎根、传播
81
+        </p>
82
+        <img class="abs line2" src="/images/bk1/pg2/虚线2.png" alt="">
83
+      </section>
84
+      <section class="animate__animated animate__fadeInDown" style="animation-delay: 7s">
85
+        <div class="title txt right">
86
+          <strong>2020年</strong>
87
+          <img src="/images/logo.png" alt="">
88
+        </div>
89
+        <p class="txt right pr16">
90
+          紫金草行动抖音话题播放量超3000万
91
+        </p>
92
+        <img class="abs line1" src="/images/bk1/pg2/虚线1.png" alt="">
93
+      </section>
94
+      <section class="animate__animated animate__fadeInDown" style="animation-delay: 8s">
95
+        <div class="title txt">
96
+          <img src="/images/logo.png" alt="">
97
+          <strong>2021年</strong>
98
+        </div>
99
+        <p class="txt pl16">
100
+          2000多幅公益海报,承载着孩子们对历史的铭记,对和平的祈愿。
101
+        </p>
102
+        <img class="abs line99" src="/images/bk1/pg2/虚线8.png" alt="">
103
+      </section>
104
+    </div>
105
+    <Dot class="dot" :active="3" />
106
+  </div>
3 107
 </template>
4 108
 
5 109
 <script setup>
110
+import Dot from './Dot.vue';
6 111
 
7 112
 </script>
113
+
114
+<style lang="less" scoped>
115
+.header {
116
+  box-sizing: border-box;
117
+  padding: 24px;
118
+  padding-bottom: 0;
119
+
120
+  .header1 {
121
+    width: 50vw;
122
+    left: 0;
123
+  }
124
+
125
+  .header2 {
126
+    width: 36vw;
127
+    right: 5vw;
128
+    top: 5vw
129
+  }
130
+
131
+  .header3 {
132
+    margin-top: -20vw;
133
+  }
134
+}
135
+
136
+.dot {
137
+  position: fixed;
138
+  width: 100vw;
139
+  bottom: 12px;
140
+}
141
+
142
+.content {
143
+  box-sizing: border-box;
144
+  padding: 0 48px 150px;
145
+
146
+  section {
147
+    position: relative;
148
+
149
+    & + section {
150
+      margin-top: 24px;
151
+    }
152
+  }
153
+
154
+  .pr16 {
155
+    padding-right: 16px;
156
+  }
157
+
158
+  .pl16 {
159
+    padding-left: 16px;
160
+  }
161
+
162
+  p {
163
+    margin: 0;
164
+    box-sizing: border-box;
165
+    font-size: 12px;
166
+  }
167
+
168
+  .title {
169
+    & > * {
170
+      vertical-align: middle;
171
+    }
172
+
173
+    img {
174
+      display: inline-block;
175
+      width: 1em;
176
+      vertical-align: middle;
177
+    }
178
+  }
179
+
180
+  .right {
181
+    text-align: right;
182
+  }
183
+
184
+  .left {
185
+    text-align: left;
186
+  }
187
+
188
+  .line1 {
189
+    top: 20px;
190
+    right: -24px;
191
+    width: 70%;
192
+    height: calc(100% + 24px);
193
+  }
194
+
195
+  .line2 {
196
+    top: 20px;
197
+    left: -32px;
198
+    width: 70%;
199
+    height: calc(100% + 24px);
200
+  }
201
+
202
+  .line99 {
203
+    top: 20px;
204
+    left: -32px;
205
+    width: 70%;
206
+    height: calc(100% + 90px);
207
+  }
208
+}
209
+</style>

+ 13
- 0
src/pages/bk1/useSerial.js Parādīt failu

@@ -0,0 +1,13 @@
1
+
2
+export default function useSerial(callback) {
3
+  let times = 0;
4
+
5
+  const i = setInterval(() => {
6
+    const isOver = callback(times);
7
+    times += 1;
8
+
9
+    if (isOver) {
10
+      clearInterval(i);
11
+    }
12
+  }, 2000 / 16);
13
+}

+ 0
- 2
src/pages/pg1/P1.vue Parādīt failu

@@ -6,7 +6,6 @@
6 6
         style="animation-delay: 500ms"
7 7
         src="/images/pg1/earth.png"
8 8
         alt=""
9
-        @click="emit('clickImg', $event)"
10 9
       >
11 10
       <div class="back-line">
12 11
         <img src="/images/pg1/line1.png" alt="">
@@ -23,7 +22,6 @@
23 22
 </template>
24 23
 
25 24
 <script setup>
26
-const emit = defineEmits(['clickImg']);
27 25
 </script>
28 26
 
29 27
 <style lang="less" scoped>

+ 0
- 2
src/pages/pg1/P2.vue Parādīt failu

@@ -6,7 +6,6 @@
6 6
         style="animation-delay: 1.5s"
7 7
         src="/images/pg1/honour.png"
8 8
         alt=""
9
-        @click="emit('clickImg', $event)"
10 9
       >
11 10
       <div class="back-line">
12 11
         <img src="/images/pg1/line2.png" alt="">
@@ -23,7 +22,6 @@
23 22
 </template>
24 23
 
25 24
 <script setup>
26
-const emit = defineEmits(['clickImg']);
27 25
 </script>
28 26
 
29 27
 <style lang="less" scoped>

+ 0
- 2
src/pages/pg1/P3.vue Parādīt failu

@@ -6,7 +6,6 @@
6 6
         style="animation-delay: 3s"
7 7
         src="/images/pg1/peace.png"
8 8
         alt=""
9
-        @click="emit('clickImg', $event)"
10 9
       >
11 10
     </div>
12 11
     <div class="content-right txt">      
@@ -19,7 +18,6 @@
19 18
 </template>
20 19
 
21 20
 <script setup>
22
-const emit = defineEmits(['clickImg']);
23 21
 </script>
24 22
 
25 23
 <style lang="less" scoped>

+ 5
- 5
src/pages/pg1/index.vue Parādīt failu

@@ -5,9 +5,9 @@
5 5
         <Logo class="logo" />
6 6
       </div>
7 7
       <div class="body" parallax-offset='-100'>
8
-        <Part1 class="part1" @clickImg="onClickImg" />
9
-        <Part2 class="part2" />
10
-        <Part3 class="part3" />
8
+        <Part1 class="part1" @click="onClick(1)" />
9
+        <Part2 class="part2" @click="onClick(2)" />
10
+        <Part3 class="part3" @click="onClick(3)" />
11 11
       </div>
12 12
     </div>
13 13
     <div class="footer abs animate__animated animate__fadeInUp" style="animation-delay: 4s">
@@ -33,8 +33,8 @@
33 33
 
34 34
   const router = useRouter();
35 35
 
36
-  const onClickImg = () => {
37
-    router.push('/bk1');
36
+  const onClick = (page) => {
37
+    router.push(`/bk1?page=${page}`);
38 38
   }
39 39
 
40 40
 </script>

+ 55
- 51
src/pages/pg2/index.vue Parādīt failu

@@ -2,42 +2,39 @@
2 2
   <div class="page pg-bg pg2" parallax ref="pgRef">
3 3
     <Cloud class="cloud abs" />
4 4
     <div class="content txt">
5
-      <Animate
6
-        comp="p"
7
-        name="animate__lightSpeedInRight"
8
-        delay="100ms"
9
-        :ready="show"
10
-      >
11
-        1939年 <br >
5
+      <Animate comp="p" name="animate__lightSpeedInRight" delay="100ms" :ready="show">
6
+        1939年
7
+        <br />
12 8
         <strong>一抹紫色</strong>在战争的废墟中……
13 9
       </Animate>
14 10
       <Animate
11
+        @click="onClick"
15 12
         class="story"
16 13
         comp="img"
17 14
         name="animate__fadeInDown"
18 15
         delay="600ms"
19 16
         src="/images/pg2/story.png"
20
-        alt=""
17
+        alt
21 18
         :ready="show"
22 19
       />
23 20
     </div>
24 21
 
25 22
     <div class="hill abs">
26
-      <img class="" src="/images/pg2/mountain.png" alt="" parallax-offset="-100">
23
+      <img class src="/images/pg2/mountain.png" alt parallax-offset="-100" />
27 24
     </div>
28
-    
25
+
29 26
     <div class="groups abs">
30 27
       <div>
31
-        <img class="stele" src="/images/pg2/stele.png" alt="" parallax-offset="-150">
32
-        <div parallax-offset="-300" >
33
-          <img class="ruins" src="/images/pg2/ruins.png" alt="">
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 />
34 31
           <!-- <Smoke class="smoke abs" /> -->
35 32
         </div>
36
-        <img class="persons" src="/images/pg2/persons.png" alt="" parallax-offset="-500">
33
+        <img class="persons" src="/images/pg2/persons.png" alt parallax-offset="-500" />
37 34
       </div>
38 35
     </div>
39 36
 
40
-    <img class="footer abs" src="/images/pg2/footer.png" alt="">
37
+    <img class="footer abs" src="/images/pg2/footer.png" alt />
41 38
 
42 39
     <div class="flower abs">
43 40
       <Animate class="flower1 abs" :comp="Flower1" :name="flowerAnimate.left" :ready="show" />
@@ -48,40 +45,47 @@
48 45
 </template>
49 46
 
50 47
 <script setup>
51
-  import { reactive, ref } from 'vue';
52
-  import Bell from '@/components/Bell.vue';
53
-  import Animate from '@/components/Animate.vue';
54
-  import Cloud from './Cloud.vue';
55
-  import Smoke from './smoke.vue';
56
-  import Flower1 from './flower/Flower1.vue';
57
-  import Flower2 from './flower/Flower2.vue';
58
-  import Flower3 from './flower/Flower3.vue';
59
-  import usePageShow from '../usePageShow';
60
-
61
-  const flowerAnimate = reactive({
62
-    left: '',
63
-    right: '',
64
-  });
65
-
66
-  let lastRatio = 0;
67
-  const flowShow = ({ intersectionRatio }) => {
68
-    console.log(intersectionRatio)
69
-    const isIn = intersectionRatio > 0.5 && intersectionRatio > lastRatio;
70
-    const isOut = intersectionRatio < 0.9 && intersectionRatio < lastRatio;
71
-
72
-    if (isIn) {
73
-      flowerAnimate.left = 'animate__fadeInLeft';
74
-      flowerAnimate.right = 'animate__fadeInRight';
75
-    }
76
-    if (isOut) {
77
-      flowerAnimate.left = 'animate__fadeOutLeft';
78
-      flowerAnimate.right = 'animate__fadeOutRight';
79
-    }
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()
60
+
61
+const onClick = (page) => {
62
+  router.push(`/pg2-2?page=${page}`)
63
+}
64
+
65
+const flowerAnimate = reactive({
66
+  left: '',
67
+  right: ''
68
+})
69
+
70
+let lastRatio = 0
71
+const flowShow = ({ intersectionRatio }) => {
72
+  console.log(intersectionRatio)
73
+  const isIn = intersectionRatio > 0.5 && intersectionRatio > lastRatio
74
+  const isOut = intersectionRatio < 0.9 && intersectionRatio < lastRatio
80 75
 
81
-    lastRatio = intersectionRatio;
76
+  if (isIn) {
77
+    flowerAnimate.left = 'animate__fadeInLeft'
78
+    flowerAnimate.right = 'animate__fadeInRight'
82 79
   }
80
+  if (isOut) {
81
+    flowerAnimate.left = 'animate__fadeOutLeft'
82
+    flowerAnimate.right = 'animate__fadeOutRight'
83
+  }
84
+
85
+  lastRatio = intersectionRatio
86
+}
83 87
 
84
-  const [pgRef, show] = usePageShow(flowShow);
88
+const [pgRef, show] = usePageShow(flowShow)
85 89
 </script>
86 90
 
87 91
 <style lang="less" scoped>
@@ -92,7 +96,7 @@
92 96
     top: 30px;
93 97
     right: 30px;
94 98
   }
95
-  
99
+
96 100
   .cloud {
97 101
     top: 0;
98 102
     left: 0;
@@ -119,7 +123,6 @@
119 123
     }
120 124
   }
121 125
 
122
-
123 126
   .groups {
124 127
     top: 50vh;
125 128
     left: 0;
@@ -140,7 +143,7 @@
140 143
       z-index: 2;
141 144
       position: relative;
142 145
     }
143
-      
146
+
144 147
     .smoke {
145 148
       bottom: 0;
146 149
       left: 55%;
@@ -155,7 +158,6 @@
155 158
       right: 0;
156 159
       top: -60%;
157 160
     }
158
-
159 161
   }
160 162
 
161 163
   .footer {
@@ -189,7 +191,9 @@
189 191
     bottom: 0;
190 192
   }
191 193
 
192
-  .hill, .wall, .flower {
194
+  .hill,
195
+  .wall,
196
+  .flower {
193 197
     img {
194 198
       width: 100%;
195 199
       display: block;

+ 0
- 0
src/pages/pg4/index.vue Parādīt failu


+ 4
- 0
src/utils/resources.js Parādīt failu

@@ -30,4 +30,8 @@ export const resources = [
30 30
   { image: './images/pg2/flower/1-4.png', },
31 31
   { image: './images/pg2/flower/右-小.png', },
32 32
   { image: './images/pg2/flower/左-小.png', },
33
+  { image: './images/bk1/flower/左-小.png', },
34
+  { image: './images/bk1/flip.png', },
35
+  { image: './images/bk1/flower.png', },
36
+  { image: './images/bk1/goback.png', },
33 37
 ];