Sherry před 1 rokem
rodič
revize
d54765d49a

+ 52
- 9
src/fe/mrna/css/all.css Zobrazit soubor

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

+ 1
- 1
src/fe/mrna/css/all.css.map
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 4
- 0
src/fe/mrna/css/base/_base.scss Zobrazit soubor

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

+ 31
- 2
src/fe/mrna/css/component/_modal.scss Zobrazit soubor

@@ -6,6 +6,8 @@
6 6
         height: 0;
7 7
         padding-bottom: 52.5%;
8 8
         margin-bottom: 1em;
9
+        box-shadow: none;
10
+        margin-bottom: 2em;
9 11
         iframe {
10 12
             position: absolute;
11 13
             width: 100%;
@@ -14,6 +16,14 @@
14 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 28
 .modal-research {
19 29
     &::before {
@@ -248,7 +258,7 @@
248 258
             }
249 259
             p {
250 260
                 font-size: 0.8em;
251
-                line-height: 1.4;
261
+                line-height: 1.7;
252 262
             }
253 263
             ul {
254 264
                 width: 54%;
@@ -282,7 +292,7 @@
282 292
             padding: 2.5em 2.3em 2.3em;
283 293
         }
284 294
         &__title {
285
-            margin-bottom: 0.5em;
295
+            margin-bottom: 1em;
286 296
         }
287 297
         &__preface {
288 298
             margin-bottom: 1.5em;
@@ -339,6 +349,10 @@
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,6 +449,18 @@
435 449
 }
436 450
 
437 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 464
     .modal-research {
439 465
         .modal {
440 466
             &-dialog {
@@ -592,6 +618,9 @@
592 618
                     }
593 619
                 }
594 620
             }
621
+            &__video {
622
+                width: 100%;
623
+            }
595 624
         }
596 625
     }
597 626
     .modal-test {

+ 27
- 15
src/fe/mrna/css/section/_research.scss Zobrazit soubor

@@ -16,10 +16,11 @@
16 16
         display: flex;
17 17
         justify-content: center;
18 18
         flex-wrap: wrap;
19
-        width: 60em;
19
+        width: 70em;
20 20
         margin: 0 auto;
21 21
     }
22 22
     &__item {
23
+    width: em(340);
23 24
         margin: 0 1em 3em;
24 25
         display: flex;
25 26
         flex-direction: column;
@@ -32,14 +33,9 @@
32 33
                 border: 0.2em solid $blue;
33 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 41
     &__pic {
@@ -57,9 +53,8 @@
57 53
     &__name {
58 54
         display: inline-block;
59 55
         border-radius: 1.5em;
60
-        padding: 0.6em 1.5em;
56
+        padding: 0.6em 1em;
61 57
         box-shadow: 0 0 0 1em transparent;
62
-        animation: pulse 2s infinite;
63 58
         background-color: $blue;
64 59
         cursor: pointer;
65 60
         p {
@@ -67,10 +62,16 @@
67 62
             color: $blue-d;
68 63
             font-size: 1.2em;
69 64
             color: $white;
65
+            line-height: 1;
70 66
             cursor: pointer;
67
+            display: flex;
68
+            justify-content: center;
69
+            align-items: center;
71 70
             span {
72 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,14 +85,25 @@
84 85
 @media screen and (max-width: 992px) {
85 86
     .research {
86 87
         .container {
88
+            padding: 0;
87 89
             padding-bottom: 10em;
88 90
         }
89 91
         .copywriting {
90 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 104
         &__item {
93 105
             margin: 0 0 3em;
94
-            width: 48%;
106
+            width: 30em;
95 107
             &:hover {
96 108
                 .research__pic {
97 109
                     border: 0.4em solid $blue;
@@ -102,13 +114,13 @@
102 114
             width: 25em;
103 115
             border-radius: 1.5em;
104 116
             box-shadow: 1em 1em 2em rgba(#000, 0.1);
105
-            margin-bottom: 1em;
117
+            margin-bottom: 2em;
106 118
         }
107 119
         &__name {
108 120
             border-radius: 2.5em;
109 121
             padding: 0.8em 2.5em;
110 122
             p {
111
-                font-size: 1.6em;
123
+                font-size: 1.75em;
112 124
                 white-space: nowrap;
113 125
             }
114 126
         }

+ 36
- 6
src/fe/mrna/index.html Zobrazit soubor

@@ -610,8 +610,18 @@
610 610
           <div class="modal__title">
611 611
             <h2>mRNA疫苗</h4>
612 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 625
           </div>
616 626
           <div class="modal__preface">
617 627
             <h3>mRNA疫苗是如何運作的?</h3>
@@ -682,8 +692,18 @@
682 692
           <div class="modal__title">
683 693
             <h2>mRNA疫苗特色</h4>
684 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 707
           </div>
688 708
           <div class="modal__principle">
689 709
             <div class="modal__principle__item modal__principle__item-blue">
@@ -833,8 +853,18 @@
833 853
           <div class="modal__title">
834 854
             <h2>疫情下的mRNA疫苗</h4>
835 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 868
           </div>
839 869
           <div class="modal__preface">
840 870
             <p>

+ 26
- 11
src/fe/mrna/js/main.js Zobrazit soubor

@@ -52,6 +52,21 @@ main = function () {
52 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,17 +105,17 @@ main = function () {
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 121
 		$(".history .history__timeline__year").on("click", function () {