66 < meta name ="description " content ="Python IDE - 掌上的 Python & JavaScript 开发环境 " />
77 < title > Python IDE - 掌上的 Python & JavaScript 开发环境</ title >
88 < link rel ="icon " type ="image/png " href ="icon.png " />
9+
10+ <!-- GSAP + ScrollTrigger CDN -->
11+ < script src ="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.5/gsap.min.js "> </ script >
12+ < script src ="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.5/ScrollTrigger.min.js "> </ script >
13+
914 < style >
1015 : root {
1116 --bg : # 050508 ;
7681 z-index : 100 ;
7782 background : linear-gradient (180deg , var (--nav-bg ) 0% , transparent 100% );
7883 backdrop-filter : blur (8px );
84+ background : transparent;
7985 transition : all 0.3s ;
8086 }
8187 .nav-logo { font-weight : 700 ; font-size : 1.25rem ; color : var (--text ); }
138144 -webkit-background-clip : text;
139145 -webkit-text-fill-color : transparent;
140146 background-clip : text;
141- animation : fade-in-up 0.8s ease-out;
142147 }
143148 .hero .tagline {
144149 font-size : clamp (1.1rem , 2.5vw , 1.4rem );
145150 color : var (--text-muted );
146151 margin-bottom : 0.25rem ;
147- animation : fade-in-up 0.8s ease-out 0.1s both;
148152 }
149153 .hero .sub {
150154 font-size : 0.95rem ;
151155 color : var (--text-muted );
152156 opacity : 0.8 ;
153157 margin-bottom : 2.5rem ;
154- animation : fade-in-up 0.8s ease-out 0.2s both;
155- }
156-
157- @keyframes fade-in-up {
158- from { opacity : 0 ; transform : translateY (20px ); }
159- to { opacity : 1 ; transform : translateY (0 ); }
160158 }
161159
162- /* ===== CTA Buttons - 炫酷交互 ===== */
160+ /* ===== CTA Buttons ===== */
163161 .cta {
164162 display : flex;
165163 flex-wrap : wrap;
166164 justify-content : center;
167165 gap : 1rem ;
168166 margin-bottom : 2rem ;
169- animation : fade-in-up 0.8s ease-out 0.3s both;
170167 }
171168 .btn {
172169 position : relative;
205202 box-shadow : 0 20px 50px rgba (0 , 0 , 0 , 0.5 ), 0 0 40px rgba (255 , 255 , 255 , 0.08 ), inset 0 1px 0 rgba (255 , 255 , 255 , 0.2 );
206203 border-color : var (--hover-border );
207204 }
208- .btn-appstore : active { transform : translateY (-2px ) scale (0.98 ); }
209205
210206 .btn-github {
211207 background : var (--card );
223219 color : # fff ;
224220 }
225221
226- /* Tech pills - 悬浮交互 */
222+ /* Tech pills */
227223 .tech-stack {
228224 display : flex;
229225 flex-wrap : wrap;
230226 justify-content : center;
231227 gap : 0.5rem ;
232- animation : fade-in-up 0.8s ease-out 0.4s both;
233228 }
234229 .tech-pill {
235230 padding : 0.5rem 1rem ;
298293 background : linear-gradient (90deg , var (--border ), transparent);
299294 }
300295
301- /* Bento Grid - 为什么选择 */
296+ /* Bento Grid */
302297 .bento {
303298 display : grid;
304299 grid-template-columns : repeat (3 , 1fr );
335330 .bento-card h3 { font-size : 1.2rem ; margin-bottom : 0.5rem ; color : var (--text ); }
336331 .bento-card p { color : var (--text-muted ); font-size : 0.95rem ; }
337332
333+ /* Why grid */
338334 .why-grid {
339335 display : grid;
340336 grid-template-columns : repeat (3 , 1fr );
369365 font-size : 0.9rem ;
370366 }
371367
372- /* Screenshots - 交互卡片 */
368+ /* Screenshots */
373369 .screenshots {
374370 display : grid;
375371 grid-template-columns : repeat (auto-fill, minmax (220px , 1fr ));
419415 }
420416 .screenshot-item : hover p { transform : translateY (0 ); }
421417
422- /* Feature tabs - 可切换 */
418+ /* Feature tabs */
423419 .feature-tabs {
424420 display : flex;
425421 gap : 0.5rem ;
450446 .tab-content { display : none; }
451447 .tab-content .active {
452448 display : block;
453- animation : fade-in 0.4s ease-out;
454449 }
455- @keyframes fade-in { from { opacity : 0 ; } to { opacity : 1 ; } }
456450
457451 .feature-grid {
458452 display : grid;
487481 .install-cta h2 { margin-bottom : 1rem ; }
488482 .install-cta .btn { margin : 0.5rem ; }
489483
490- /* Links - 发光按钮 */
484+ /* Links */
491485 .link-grid {
492486 display : grid;
493487 grid-template-columns : repeat (auto-fit, minmax (200px , 1fr ));
@@ -587,7 +581,7 @@ <h1>Python IDE</h1>
587581 < p class ="sub "> 让编程从电脑走到手机与平板 · Write, Run, Debug on iOS</ p >
588582
589583 < div class ="cta ">
590- < a href ="https://apps.apple.com/app/id6753987304 " class ="btn btn-appstore "> App Store 免费下载</ a >
584+ < a href ="https://apps.apple.com/app/id6753987304 " class ="btn btn-appstore "> App Store 免费下载</ a >
591585 < a href ="https://github.com/jinwandalaohu66/PythonIDE-Landing " class ="btn btn-github "> ⭐ GitHub</ a >
592586 </ div >
593587
@@ -720,7 +714,7 @@ <h2 class="section-title">✨ 核心功能</h2>
720714 < section id ="install " class ="install-cta ">
721715 < h2 > 📥 立即下载</ h2 >
722716 < p style ="color: var(--text-muted); margin-bottom: 1rem; "> iOS 16.2+ · iPhone / iPad · 免费</ p >
723- < a href ="https://apps.apple.com/app/id6753987304 " class ="btn btn-appstore "> App Store 免费下载</ a >
717+ < a href ="https://apps.apple.com/app/id6753987304 " class ="btn btn-appstore "> App Store 免费下载</ a >
724718 </ section >
725719
726720 < section >
@@ -820,7 +814,6 @@ <h2 class="section-title">☕ 支持开发</h2>
820814 h = canvas . height = window . innerHeight ;
821815 } ) ;
822816
823- // 鼠标交互 - 粒子避让
824817 let mouse = { x : null , y : null } ;
825818 document . addEventListener ( 'mousemove' , e => {
826819 mouse . x = e . clientX ;
@@ -851,6 +844,113 @@ <h2 class="section-title">☕ 支持开发</h2>
851844 document . getElementById ( 'tab-' + btn . dataset . tab ) . classList . add ( 'active' ) ;
852845 } ) ;
853846 } ) ;
847+
848+ // ===== GSAP + ScrollTrigger 动画 =====
849+ gsap . registerPlugin ( ScrollTrigger ) ;
850+
851+ // section-title 从左侧滑入 + 模糊到清晰
852+ gsap . utils . toArray ( ".section-title" ) . forEach ( title => {
853+ gsap . from ( title , {
854+ x : - 60 ,
855+ opacity : 0 ,
856+ filter : "blur(6px)" ,
857+ duration : 1.2 ,
858+ ease : "power4.out" ,
859+ scrollTrigger : {
860+ trigger : title ,
861+ start : "top 82%" ,
862+ toggleActions : "play none none reverse"
863+ }
864+ } ) ;
865+ } ) ;
866+
867+ // bento-card 逐个从下方出现 + stagger
868+ gsap . utils . toArray ( ".bento-card" ) . forEach ( ( card , i ) => {
869+ gsap . from ( card , {
870+ y : 50 ,
871+ opacity : 0 ,
872+ duration : 1 ,
873+ ease : "power3.out" ,
874+ scrollTrigger : {
875+ trigger : card ,
876+ start : "top 88%" ,
877+ } ,
878+ delay : i * 0.1
879+ } ) ;
880+ } ) ;
881+
882+ // why-item 从下方淡入
883+ gsap . utils . toArray ( ".why-item" ) . forEach ( ( item , i ) => {
884+ gsap . from ( item , {
885+ y : 30 ,
886+ opacity : 0 ,
887+ duration : 0.8 ,
888+ ease : "power3.out" ,
889+ scrollTrigger : {
890+ trigger : ".why-grid" ,
891+ start : "top 85%" ,
892+ } ,
893+ stagger : 0.07
894+ } ) ;
895+ } ) ;
896+
897+ // screenshot-item 从下方 + 轻微放大
898+ gsap . utils . toArray ( ".screenshot-item" ) . forEach ( ( item , i ) => {
899+ gsap . from ( item , {
900+ y : 40 ,
901+ scale : 0.94 ,
902+ opacity : 0 ,
903+ duration : 1.1 ,
904+ ease : "power3.out" ,
905+ scrollTrigger : {
906+ trigger : item ,
907+ start : "top 90%" ,
908+ } ,
909+ delay : i * 0.06
910+ } ) ;
911+ } ) ;
912+
913+ // feature-chip 集体 stagger + 回弹
914+ gsap . utils . toArray ( ".feature-grid" ) . forEach ( grid => {
915+ gsap . from ( grid . querySelectorAll ( ".feature-chip" ) , {
916+ y : 35 ,
917+ opacity : 0 ,
918+ duration : 0.9 ,
919+ ease : "back.out(1.6)" ,
920+ stagger : 0.06 ,
921+ scrollTrigger : {
922+ trigger : grid ,
923+ start : "top 85%" ,
924+ }
925+ } ) ;
926+ } ) ;
927+
928+ // link-card 从下方出现
929+ gsap . utils . toArray ( ".link-card" ) . forEach ( ( card , i ) => {
930+ gsap . from ( card , {
931+ y : 30 ,
932+ opacity : 0 ,
933+ duration : 0.8 ,
934+ ease : "power3.out" ,
935+ scrollTrigger : {
936+ trigger : card ,
937+ start : "top 90%" ,
938+ } ,
939+ delay : i * 0.05
940+ } ) ;
941+ } ) ;
942+
943+ // install-cta 整体淡入
944+ gsap . from ( ".install-cta" , {
945+ opacity : 0 ,
946+ y : 40 ,
947+ duration : 1.2 ,
948+ ease : "power3.out" ,
949+ scrollTrigger : {
950+ trigger : ".install-cta" ,
951+ start : "top 85%" ,
952+ }
953+ } ) ;
854954 </ script >
855955</ body >
856- </ html >
956+ </ html >
0 commit comments