Browse Source

fix scroll issue & css

Sherry 1 year ago
parent
commit
22225e51b3

+ 4
- 4
src/fe/healthpassport/css/all.css View File

@@ -10890,7 +10890,7 @@ button.swiper-pagination-bullet {
10890 10890
 }
10891 10891
 .form__item-agree {
10892 10892
   background: none;
10893
-  margin-bottom: 0.5em;
10893
+  margin-bottom: 1em;
10894 10894
 }
10895 10895
 .form__item-agree::before {
10896 10896
   display: none;
@@ -10906,13 +10906,13 @@ button.swiper-pagination-bullet {
10906 10906
 }
10907 10907
 .form__item-agree .label p {
10908 10908
   display: inline-block;
10909
-  font-size: 1.3em;
10909
+  font-size: 1.5em;
10910 10910
   margin-bottom: 0;
10911 10911
 }
10912 10912
 .form__item-agree .label__checkbox {
10913 10913
   display: inline-block;
10914
-  width: 1em;
10915
-  height: 1em;
10914
+  width: 1.5em;
10915
+  height: 1.5em;
10916 10916
   border: 1px solid #1E2846;
10917 10917
   margin-right: 0.5em;
10918 10918
   display: flex;

+ 4
- 4
src/fe/healthpassport/css/component/_form.scss View File

@@ -39,7 +39,7 @@
39 39
         }
40 40
         &-agree {
41 41
             background: none;
42
-            margin-bottom: 0.5em;
42
+            margin-bottom: 1em;
43 43
             &::before {
44 44
                 display: none;
45 45
             }
@@ -53,13 +53,13 @@
53 53
                 align-items: center;
54 54
                 p {
55 55
                     display: inline-block;
56
-                    font-size: 1.3em;
56
+                    font-size: 1.5em;
57 57
                     margin-bottom: 0;
58 58
                 }
59 59
                 &__checkbox {
60 60
                     display: inline-block;
61
-                    width: 1em;
62
-                    height: 1em;
61
+                    width: 1.5em;
62
+                    height: 1.5em;
63 63
                     border: 1px solid $c-black;
64 64
                     margin-right: 0.5em;
65 65
                     display: flex;

+ 5
- 7
src/fe/healthpassport/index.html View File

@@ -35,8 +35,7 @@
35 35
     </div>
36 36
     <!-- Loading End -->
37 37
   </div>
38
-  <div class="wrapper">
39
-    <div class="wrapper__line-scroll-fixed">
38
+  <div class="wrapper"> 
40 39
       <main class="main">
41 40
         <!-- 表單 form -->
42 41
         <section class="section register">
@@ -371,7 +370,7 @@
371 370
           </div>
372 371
         </section>
373 372
         <!-- 活動辦法 methods -->
374
-        <section class="section methods">
373
+        <section class="section methods wrapper__line-scroll-fixed">
375 374
           <div class="backform"><span><</span><p>回上一頁</p></div>
376 375
           <div class="section__container methods__container">
377 376
             <p>
@@ -397,7 +396,7 @@
397 396
           </div>
398 397
         </section>
399 398
         <!-- 護照 passport -->
400
-        <section class="section passport">
399
+        <section class="section passport wrapper__line-scroll-fixed">
401 400
           <div class="section__container passport__container">
402 401
             <div class="passport__intro">
403 402
               <div class="passport__intro__bg">
@@ -413,10 +412,10 @@
413 412
                 </div>
414 413
                 <div class="passport__intro__content">
415 414
                   <div class="passport__intro__nickname">
416
-                    <h2>王小美</h2>
415
+                    <h2></h2>
417 416
                   </div>
418 417
                   <div class="passport__intro__info">
419
-                    <p><span class="introGender">女性</span> / <span class="introAge">30-39歲 </span></p>
418
+                    <p><span class="introGender"></span> / <span class="introAge"></span></p>
420 419
                   </div>
421 420
                 </div>
422 421
               </div>
@@ -442,7 +441,6 @@
442 441
       </main>
443 442
       <footer class="footer">
444 443
       </footer>
445
-    </div>
446 444
   </div>
447 445
   <!-- Alert Modal -->
448 446
   <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"

+ 20
- 3
src/fe/healthpassport/js/base.js View File

@@ -39,10 +39,25 @@ base = function () {
39 39
 					if(userData === null) {
40 40
 						register.LinePicHandler(profile.pictureUrl)
41 41
 						sectionFadeIn(".register");
42
+						sectionFadeOut(".passport");
43
+						sectionFadeOut(".methods");
42 44
 					}else {
43 45
 						sectionFadeIn(".passport");
46
+						sectionFadeOut(".methods");
47
+						sectionFadeOut(".register");
44 48
 						passport.buildPassportHandler(userData)
45 49
 					}
50
+
51
+					// 測試用
52
+					// sectionFadeIn(".passport");
53
+					// sectionFadeOut(".methods");
54
+					// sectionFadeOut(".register");
55
+					// passport.buildPassportHandler(userData)
56
+
57
+					// register.LinePicHandler(profile.pictureUrl)
58
+					// sectionFadeIn(".register");
59
+					// sectionFadeOut(".passport");
60
+					// sectionFadeOut(".methods");
46 61
 				})
47 62
 		})
48 63
 
@@ -96,7 +111,7 @@ base = function () {
96 111
 
97 112
 	// page進入動態
98 113
 	function sectionFadeIn(el) {
99
-		// $(el).fadeIn();
114
+		$(el).show();
100 115
 		gsap.to(el, {
101 116
 			duration: 0.3,
102 117
 			autoAlpha: 1
@@ -105,10 +120,12 @@ base = function () {
105 120
 
106 121
 	// page離開動態
107 122
 	function sectionFadeOut(el) {
108
-		// $(el).fadeOut();
109 123
 		gsap.to(el, {
110 124
 			duration: 0.3,
111
-			autoAlpha: 0
125
+			autoAlpha: 0,
126
+			onComplete: function() {
127
+				$(el).hide();
128
+			}
112 129
 		})
113 130
 	}
114 131