Sherry 1 年之前
父節點
當前提交
d54765d49a

+ 52
- 9
src/fe/mrna/css/all.css 查看文件

13130
   width: 4.5em;
13130
   width: 4.5em;
13131
   z-index: 2;
13131
   z-index: 2;
13132
   cursor: pointer;
13132
   cursor: pointer;
13133
+  transition: 0.3s;
13133
 }
13134
 }
13134
 .goToLine img {
13135
 .goToLine img {
13135
   width: 100%;
13136
   width: 100%;
13136
   height: auto;
13137
   height: auto;
13137
 }
13138
 }
13139
+.goToLine:hover {
13140
+  transform: translateY(-50%) scale(1.1);
13141
+}
13138
 
13142
 
13139
 @media screen and (max-width: 992px) {
13143
 @media screen and (max-width: 992px) {
13140
   .wrapper {
13144
   .wrapper {
13462
   height: 0;
13466
   height: 0;
13463
   padding-bottom: 52.5%;
13467
   padding-bottom: 52.5%;
13464
   margin-bottom: 1em;
13468
   margin-bottom: 1em;
13469
+  box-shadow: none;
13470
+  margin-bottom: 2em;
13465
 }
13471
 }
13466
 .modal__video iframe {
13472
 .modal__video iframe {
13467
   position: absolute;
13473
   position: absolute;
13470
   left: 0;
13476
   left: 0;
13471
   top: 0;
13477
   top: 0;
13472
 }
13478
 }
13479
+.modal .modal-body .video__icon p {
13480
+  color: #0699d2;
13481
+  margin-top: 0.5em;
13482
+}
13473
 
13483
 
13474
 .modal-research::before {
13484
 .modal-research::before {
13475
   content: "";
13485
   content: "";
13685
 }
13695
 }
13686
 .modal-unlimit .modal__intro p {
13696
 .modal-unlimit .modal__intro p {
13687
   font-size: 0.8em;
13697
   font-size: 0.8em;
13688
-  line-height: 1.4;
13698
+  line-height: 1.7;
13689
 }
13699
 }
13690
 .modal-unlimit .modal__intro ul {
13700
 .modal-unlimit .modal__intro ul {
13691
   width: 54%;
13701
   width: 54%;
13714
   padding: 2.5em 2.3em 2.3em;
13724
   padding: 2.5em 2.3em 2.3em;
13715
 }
13725
 }
13716
 .modal-show .modal__title {
13726
 .modal-show .modal__title {
13717
-  margin-bottom: 0.5em;
13727
+  margin-bottom: 1em;
13718
 }
13728
 }
13719
 .modal-show .modal__preface {
13729
 .modal-show .modal__preface {
13720
   margin-bottom: 1.5em;
13730
   margin-bottom: 1.5em;
13771
   font-size: 1.3em;
13781
   font-size: 1.3em;
13772
   color: #db1837;
13782
   color: #db1837;
13773
 }
13783
 }
13784
+.modal-show .modal__video {
13785
+  width: 33.875em;
13786
+  margin: 0 auto 2em;
13787
+}
13774
 
13788
 
13775
 .modal-test .modal-body {
13789
 .modal-test .modal-body {
13776
   padding: 2.5em 2.6em 2.3em;
13790
   padding: 2.5em 2.6em 2.3em;
13857
 }
13871
 }
13858
 
13872
 
13859
 @media screen and (max-width: 992px) {
13873
 @media screen and (max-width: 992px) {
13874
+  .modal .modal-body .video__icon {
13875
+    width: 4em;
13876
+  }
13877
+  .modal .modal-body .video__icon p {
13878
+    font-size: 0.8em;
13879
+    color: #0699d2;
13880
+    margin-top: 0.5em;
13881
+  }
13860
   .modal-research .modal-dialog {
13882
   .modal-research .modal-dialog {
13861
     margin: 1.5em 0.7em;
13883
     margin: 1.5em 0.7em;
13862
   }
13884
   }
13991
     font-size: 1.1em;
14013
     font-size: 1.1em;
13992
     font-weight: 400;
14014
     font-weight: 400;
13993
   }
14015
   }
14016
+  .modal-show .modal__video {
14017
+    width: 100%;
14018
+  }
13994
   .modal-test .modal-body {
14019
   .modal-test .modal-body {
13995
     padding: 2.5em 1em 0.7em;
14020
     padding: 2.5em 1em 0.7em;
13996
   }
14021
   }
14900
   display: flex;
14925
   display: flex;
14901
   justify-content: center;
14926
   justify-content: center;
14902
   flex-wrap: wrap;
14927
   flex-wrap: wrap;
14903
-  width: 60em;
14928
+  width: 70em;
14904
   margin: 0 auto;
14929
   margin: 0 auto;
14905
 }
14930
 }
14906
 .research__item {
14931
 .research__item {
14932
+  width: 21.25em;
14907
   margin: 0 1em 3em;
14933
   margin: 0 1em 3em;
14908
   display: flex;
14934
   display: flex;
14909
   flex-direction: column;
14935
   flex-direction: column;
14916
   border: 0.2em solid #0699d2;
14942
   border: 0.2em solid #0699d2;
14917
   transition: box-shadow 0.3s;
14943
   transition: box-shadow 0.3s;
14918
 }
14944
 }
14945
+.research__item:hover .research__name {
14946
+  animation: pulse 1.5s infinite;
14947
+}
14919
 .research__pic {
14948
 .research__pic {
14920
   border: 0.1em solid rgba(6, 153, 210, 0.3);
14949
   border: 0.1em solid rgba(6, 153, 210, 0.3);
14921
   box-shadow: 0.4em 0.4em 0.6em rgba(0, 0, 0, 0.1);
14950
   box-shadow: 0.4em 0.4em 0.6em rgba(0, 0, 0, 0.1);
14931
 .research__name {
14960
 .research__name {
14932
   display: inline-block;
14961
   display: inline-block;
14933
   border-radius: 1.5em;
14962
   border-radius: 1.5em;
14934
-  padding: 0.6em 1.5em;
14963
+  padding: 0.6em 1em;
14935
   box-shadow: 0 0 0 1em transparent;
14964
   box-shadow: 0 0 0 1em transparent;
14936
-  animation: pulse 2s infinite;
14937
   background-color: #0699d2;
14965
   background-color: #0699d2;
14938
   cursor: pointer;
14966
   cursor: pointer;
14939
 }
14967
 }
14942
   color: #0070a0;
14970
   color: #0070a0;
14943
   font-size: 1.2em;
14971
   font-size: 1.2em;
14944
   color: #ffffff;
14972
   color: #ffffff;
14973
+  line-height: 1;
14945
   cursor: pointer;
14974
   cursor: pointer;
14975
+  display: flex;
14976
+  justify-content: center;
14977
+  align-items: center;
14946
 }
14978
 }
14947
 .research__name p span {
14979
 .research__name p span {
14948
   display: inline-block;
14980
   display: inline-block;
14949
-  font-size: 0.9em;
14981
+  font-size: 0.6em;
14982
+  margin: 0.2em 0.2em 0;
14983
+  line-height: 1;
14950
 }
14984
 }
14951
 @keyframes pulse {
14985
 @keyframes pulse {
14952
   0% {
14986
   0% {
14956
 
14990
 
14957
 @media screen and (max-width: 992px) {
14991
 @media screen and (max-width: 992px) {
14958
   .research .container {
14992
   .research .container {
14993
+    padding: 0;
14959
     padding-bottom: 10em;
14994
     padding-bottom: 10em;
14960
   }
14995
   }
14961
   .research .copywriting {
14996
   .research .copywriting {
14962
     padding: 3em 0 3em;
14997
     padding: 3em 0 3em;
14963
   }
14998
   }
14999
+  .research__body .video__icon p {
15000
+    font-size: 1.2em;
15001
+    color: #0699d2;
15002
+    margin-top: 0.5em;
15003
+  }
15004
+  .research__list {
15005
+    width: 100%;
15006
+  }
14964
   .research__item {
15007
   .research__item {
14965
     margin: 0 0 3em;
15008
     margin: 0 0 3em;
14966
-    width: 48%;
15009
+    width: 30em;
14967
   }
15010
   }
14968
   .research__item:hover .research__pic {
15011
   .research__item:hover .research__pic {
14969
     border: 0.4em solid #0699d2;
15012
     border: 0.4em solid #0699d2;
14972
     width: 25em;
15015
     width: 25em;
14973
     border-radius: 1.5em;
15016
     border-radius: 1.5em;
14974
     box-shadow: 1em 1em 2em rgba(0, 0, 0, 0.1);
15017
     box-shadow: 1em 1em 2em rgba(0, 0, 0, 0.1);
14975
-    margin-bottom: 1em;
15018
+    margin-bottom: 2em;
14976
   }
15019
   }
14977
   .research__name {
15020
   .research__name {
14978
     border-radius: 2.5em;
15021
     border-radius: 2.5em;
14979
     padding: 0.8em 2.5em;
15022
     padding: 0.8em 2.5em;
14980
   }
15023
   }
14981
   .research__name p {
15024
   .research__name p {
14982
-    font-size: 1.6em;
15025
+    font-size: 1.75em;
14983
     white-space: nowrap;
15026
     white-space: nowrap;
14984
   }
15027
   }
14985
 }
15028
 }

+ 1
- 1
src/fe/mrna/css/all.css.map
文件差異過大導致無法顯示
查看文件


+ 4
- 0
src/fe/mrna/css/base/_base.scss 查看文件

138
   width: 4.5em;
138
   width: 4.5em;
139
   z-index: 2;
139
   z-index: 2;
140
   cursor: pointer;
140
   cursor: pointer;
141
+  transition: 0.3s;;
141
   img {
142
   img {
142
     width: 100%;
143
     width: 100%;
143
     height: auto;
144
     height: auto;
144
   }
145
   }
146
+  &:hover {
147
+    transform: translateY(-50%) scale(1.1);
148
+  }
145
 }
149
 }
146
 
150
 
147
 @media screen and (max-width: 992px) {
151
 @media screen and (max-width: 992px) {

+ 31
- 2
src/fe/mrna/css/component/_modal.scss 查看文件

6
         height: 0;
6
         height: 0;
7
         padding-bottom: 52.5%;
7
         padding-bottom: 52.5%;
8
         margin-bottom: 1em;
8
         margin-bottom: 1em;
9
+        box-shadow: none;
10
+        margin-bottom: 2em;
9
         iframe {
11
         iframe {
10
             position: absolute;
12
             position: absolute;
11
             width: 100%;
13
             width: 100%;
14
             top: 0;
16
             top: 0;
15
         }
17
         }
16
     }
18
     }
19
+    .modal-body {
20
+        .video__icon {
21
+            p {
22
+                color: #0699d2;
23
+                margin-top: 0.5em;
24
+            }
25
+        }
26
+    }
17
 }
27
 }
18
 .modal-research {
28
 .modal-research {
19
     &::before {
29
     &::before {
248
             }
258
             }
249
             p {
259
             p {
250
                 font-size: 0.8em;
260
                 font-size: 0.8em;
251
-                line-height: 1.4;
261
+                line-height: 1.7;
252
             }
262
             }
253
             ul {
263
             ul {
254
                 width: 54%;
264
                 width: 54%;
282
             padding: 2.5em 2.3em 2.3em;
292
             padding: 2.5em 2.3em 2.3em;
283
         }
293
         }
284
         &__title {
294
         &__title {
285
-            margin-bottom: 0.5em;
295
+            margin-bottom: 1em;
286
         }
296
         }
287
         &__preface {
297
         &__preface {
288
             margin-bottom: 1.5em;
298
             margin-bottom: 1.5em;
339
                 }
349
                 }
340
             }
350
             }
341
         }
351
         }
352
+        &__video {
353
+            width: 33.875em;
354
+            margin: 0 auto 2em
355
+        }
342
     }
356
     }
343
 }
357
 }
344
 
358
 
435
 }
449
 }
436
 
450
 
437
 @media screen and (max-width: 992px) {
451
 @media screen and (max-width: 992px) {
452
+    .modal {
453
+        .modal-body {
454
+            .video__icon {
455
+                width: 4em;
456
+                p {
457
+                    font-size: 0.8em;
458
+                    color: #0699d2;
459
+                    margin-top: 0.5em;
460
+                }
461
+            }
462
+        }
463
+    }
438
     .modal-research {
464
     .modal-research {
439
         .modal {
465
         .modal {
440
             &-dialog {
466
             &-dialog {
592
                     }
618
                     }
593
                 }
619
                 }
594
             }
620
             }
621
+            &__video {
622
+                width: 100%;
623
+            }
595
         }
624
         }
596
     }
625
     }
597
     .modal-test {
626
     .modal-test {

+ 27
- 15
src/fe/mrna/css/section/_research.scss 查看文件

16
         display: flex;
16
         display: flex;
17
         justify-content: center;
17
         justify-content: center;
18
         flex-wrap: wrap;
18
         flex-wrap: wrap;
19
-        width: 60em;
19
+        width: 70em;
20
         margin: 0 auto;
20
         margin: 0 auto;
21
     }
21
     }
22
     &__item {
22
     &__item {
23
+    width: em(340);
23
         margin: 0 1em 3em;
24
         margin: 0 1em 3em;
24
         display: flex;
25
         display: flex;
25
         flex-direction: column;
26
         flex-direction: column;
32
                 border: 0.2em solid $blue;
33
                 border: 0.2em solid $blue;
33
                 transition: box-shadow 0.3s;
34
                 transition: box-shadow 0.3s;
34
             }
35
             }
35
-            // .research__name {
36
-            //     transition: 0.3s;
37
-            //     animation: none;
38
-            //     transform: scale(1.1);
39
-            //     p {
40
-            //         transition: 0.3s;
41
-            //     }
42
-            // }
36
+            .research__name {
37
+                animation: pulse 1.5s infinite;
38
+            }
43
         }
39
         }
44
     }
40
     }
45
     &__pic {
41
     &__pic {
57
     &__name {
53
     &__name {
58
         display: inline-block;
54
         display: inline-block;
59
         border-radius: 1.5em;
55
         border-radius: 1.5em;
60
-        padding: 0.6em 1.5em;
56
+        padding: 0.6em 1em;
61
         box-shadow: 0 0 0 1em transparent;
57
         box-shadow: 0 0 0 1em transparent;
62
-        animation: pulse 2s infinite;
63
         background-color: $blue;
58
         background-color: $blue;
64
         cursor: pointer;
59
         cursor: pointer;
65
         p {
60
         p {
67
             color: $blue-d;
62
             color: $blue-d;
68
             font-size: 1.2em;
63
             font-size: 1.2em;
69
             color: $white;
64
             color: $white;
65
+            line-height: 1;
70
             cursor: pointer;
66
             cursor: pointer;
67
+            display: flex;
68
+            justify-content: center;
69
+            align-items: center;
71
             span {
70
             span {
72
                 display: inline-block;
71
                 display: inline-block;
73
-                font-size: 0.9em;
72
+                font-size: 0.6em;
73
+                margin: 0.2em 0.2em 0;
74
+                line-height: 1;
74
             }
75
             }
75
         }
76
         }
76
     }
77
     }
84
 @media screen and (max-width: 992px) {
85
 @media screen and (max-width: 992px) {
85
     .research {
86
     .research {
86
         .container {
87
         .container {
88
+            padding: 0;
87
             padding-bottom: 10em;
89
             padding-bottom: 10em;
88
         }
90
         }
89
         .copywriting {
91
         .copywriting {
90
             padding: 3em 0 3em;
92
             padding: 3em 0 3em;
91
         }
93
         }
94
+        &__body {
95
+            .video__icon p {
96
+                font-size: 1.2em;
97
+                color: #0699d2;
98
+                margin-top: 0.5em;
99
+            }
100
+        }
101
+        &__list {
102
+            width: 100%;
103
+        }
92
         &__item {
104
         &__item {
93
             margin: 0 0 3em;
105
             margin: 0 0 3em;
94
-            width: 48%;
106
+            width: 30em;
95
             &:hover {
107
             &:hover {
96
                 .research__pic {
108
                 .research__pic {
97
                     border: 0.4em solid $blue;
109
                     border: 0.4em solid $blue;
102
             width: 25em;
114
             width: 25em;
103
             border-radius: 1.5em;
115
             border-radius: 1.5em;
104
             box-shadow: 1em 1em 2em rgba(#000, 0.1);
116
             box-shadow: 1em 1em 2em rgba(#000, 0.1);
105
-            margin-bottom: 1em;
117
+            margin-bottom: 2em;
106
         }
118
         }
107
         &__name {
119
         &__name {
108
             border-radius: 2.5em;
120
             border-radius: 2.5em;
109
             padding: 0.8em 2.5em;
121
             padding: 0.8em 2.5em;
110
             p {
122
             p {
111
-                font-size: 1.6em;
123
+                font-size: 1.75em;
112
                 white-space: nowrap;
124
                 white-space: nowrap;
113
             }
125
             }
114
         }
126
         }

+ 36
- 6
src/fe/mrna/index.html 查看文件

610
           <div class="modal__title">
610
           <div class="modal__title">
611
             <h2>mRNA疫苗</h4>
611
             <h2>mRNA疫苗</h4>
612
           </div>
612
           </div>
613
-          <div class="modal__video">
614
-            <iframe width="560" height="315" src="https://www.youtube.com/embed/Ipg40ew_xcU?si=bEl_bqUTGc0-Y4fT" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
613
+          <div class="video modal__video">
614
+            <div class="video__overlay">
615
+              <div class="video__frame"></div>
616
+              <div class="video__icon">
617
+                <img src="./images/video-icon.png" alt="">
618
+                <p>影片播放</p>
619
+              </div>
620
+            </div>
621
+            <div class="video__player">
622
+              <div class="video__yt" id="player_proud">
623
+              </div>
624
+            </div>
615
           </div>
625
           </div>
616
           <div class="modal__preface">
626
           <div class="modal__preface">
617
             <h3>mRNA疫苗是如何運作的?</h3>
627
             <h3>mRNA疫苗是如何運作的?</h3>
682
           <div class="modal__title">
692
           <div class="modal__title">
683
             <h2>mRNA疫苗特色</h4>
693
             <h2>mRNA疫苗特色</h4>
684
           </div>
694
           </div>
685
-          <div class="modal__video">
686
-            <iframe width="560" height="315" src="https://www.youtube.com/embed/Ipg40ew_xcU?si=bEl_bqUTGc0-Y4fT" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
695
+          <div class="video modal__video">
696
+            <div class="video__overlay">
697
+              <div class="video__frame"></div>
698
+              <div class="video__icon">
699
+                <img src="./images/video-icon.png" alt="">
700
+                <p>影片播放</p>
701
+              </div>
702
+            </div>
703
+            <div class="video__player">
704
+              <div class="video__yt" id="player_feature">
705
+              </div>
706
+            </div>
687
           </div>
707
           </div>
688
           <div class="modal__principle">
708
           <div class="modal__principle">
689
             <div class="modal__principle__item modal__principle__item-blue">
709
             <div class="modal__principle__item modal__principle__item-blue">
833
           <div class="modal__title">
853
           <div class="modal__title">
834
             <h2>疫情下的mRNA疫苗</h4>
854
             <h2>疫情下的mRNA疫苗</h4>
835
           </div>
855
           </div>
836
-          <div class="modal__video">
837
-            <iframe width="560" height="315" src="https://www.youtube.com/embed/Ipg40ew_xcU?si=bEl_bqUTGc0-Y4fT" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
856
+          <div class="video modal__video">
857
+            <div class="video__overlay">
858
+              <div class="video__frame"></div>
859
+              <div class="video__icon">
860
+                <img src="./images/video-icon.png" alt="">
861
+                <p>影片播放</p>
862
+              </div>
863
+            </div>
864
+            <div class="video__player">
865
+              <div class="video__yt" id="player_show">
866
+              </div>
867
+            </div>
838
           </div>
868
           </div>
839
           <div class="modal__preface">
869
           <div class="modal__preface">
840
             <p>
870
             <p>

+ 26
- 11
src/fe/mrna/js/main.js 查看文件

52
 			category: "understand",
52
 			category: "understand",
53
 			
53
 			
54
 		},
54
 		},
55
+		{
56
+			containerId: "player_proud",
57
+			videoId: "_m-bMZhZT04",
58
+			category: "research",
59
+		},
60
+		{
61
+			containerId: "player_feature",
62
+			videoId: "_m-bMZhZT04",
63
+			category: "research",
64
+		},
65
+		{
66
+			containerId: "player_show",
67
+			videoId: "_m-bMZhZT04",
68
+			category: "research",
69
+		},
55
 	];
70
 	];
56
 
71
 
57
 	// 創建播放器對象數組
72
 	// 創建播放器對象數組
90
 		});
105
 		});
91
 
106
 
92
 		// 點擊 專家影片 關閉此功能
107
 		// 點擊 專家影片 關閉此功能
93
-		// $(".expert__video .video__overlay").on("click", function () {
94
-		// 	let targetIdx = $(this).data("videoIdx");
95
-		// 	let videoBox = $(this).parents(".video");
96
-		// 	if (!videoBox.hasClass("active")) {
97
-		// 		videoBox.addClass("active");
98
-		// 		playVideo(targetIdx);
99
-		// 	} else {
100
-		// 		videoBox.removeClass("active");
101
-		// 		pauseVideo(targetIdx);
102
-		// 	}
103
-		// });
108
+		$(".modal__video .video__overlay").on("click", function () {
109
+			let videoBox = $(this).parents(".video");
110
+			console.log(videoBox)
111
+			if (!videoBox.hasClass("active")) {
112
+				videoBox.addClass("active");
113
+				videoBox.children("iframe").click();
114
+				console.log("videoBox click")
115
+			} else {
116
+				// videoBox.removeClass("active");
117
+			}
118
+		});
104
 
119
 
105
 		// 點擊 歷史軌跡 年份
120
 		// 點擊 歷史軌跡 年份
106
 		$(".history .history__timeline__year").on("click", function () {
121
 		$(".history .history__timeline__year").on("click", function () {