44< meta charset ="UTF-8 " />
55< meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
66< meta name ="description " content ="HiCode 在线开发环境 v2.00 入口 —— 自动根据设备检测进入手机端(安卓)或电脑端开发界面。 " />
7- < title > HiCode · 入口 v2.00</ title >
7+ < title > HiCode · v2.00 跳转中… </ title >
88< link rel ="icon " href ="../assets/hicode-logo.jpg " type ="image/jpeg " />
9- < style >
10- : root {
11- --bg : # f3eee6 ;
12- --panel : rgba (255 , 252 , 245 , .72 );
13- --line : rgba (90 , 70 , 40 , .14 );
14- --text : # 3a2f1e ;
15- --muted : # 6b5f49 ;
16- --dim : # 9a8c73 ;
17- --accent : # c2965c ;
18- --accent-strong : # b38545 ;
19- --accent-soft : rgba (194 , 150 , 92 , .16 );
20- --glass : linear-gradient (150deg , rgba (255 , 255 , 255 , .62 ), rgba (255 , 255 , 255 , .28 ));
21- }
22- * { box-sizing : border-box; margin : 0 ; padding : 0 ; }
23- body {
24- min-height : 100vh ; display : flex; align-items : center; justify-content : center; padding : 24px ;
25- font-family : -apple-system, BlinkMacSystemFont, "Segoe UI" , "Microsoft YaHei" , "PingFang SC" , sans-serif;
26- color : var (--text ); line-height : 1.7 ; -webkit-font-smoothing : antialiased;
27- background :
28- radial-gradient (70% 60% at 12% 8% , rgba (228 , 196 , 150 , .30 ), transparent 60% ),
29- radial-gradient (60% 55% at 90% 90% , rgba (200 , 160 , 120 , .20 ), transparent 58% ),
30- var (--bg );
31- }
32- a { color : inherit; text-decoration : none; }
33- .card {
34- width : min (440px , 94vw ); padding : 40px 34px ; text-align : center;
35- background : var (--glass ); border : 1px solid var (--line ); border-radius : 22px ;
36- box-shadow : 0 24px 70px rgba (60 , 45 , 20 , .18 ); -webkit-backdrop-filter : blur (18px ); backdrop-filter : blur (18px );
37- }
38- .logo { width : 54px ; height : 54px ; margin : 0 auto; border-radius : 14px ;
39- background : linear-gradient (140deg , # e2b878, # b38545 ); box-shadow : 0 8px 20px rgba (179 , 133 , 69 , .4 ); }
40- h1 { margin : 18px 0 6px ; font-size : 27px ; }
41- h1 .accent { color : var (--accent-strong ); }
42- .sub { color : var (--muted ); font-size : 14px ; }
43- .detect { display : inline-flex; align-items : center; gap : 8px ; margin-top : 8px ; font-size : 12.5px ; color : var (--dim ); }
44- .dot { width : 8px ; height : 8px ; border-radius : 50% ; background : var (--accent ); box-shadow : 0 0 8px rgba (194 , 150 , 92 , .6 ); animation : blink 1.1s infinite; }
45- @keyframes blink { 50% { opacity : .3 ; } }
46- .choices { display : grid; grid-template-columns : 1fr 1fr ; gap : 12px ; margin-top : 26px ; }
47- .choice {
48- display : block; padding : 18px 14px ; border-radius : 14px ; border : 1px solid var (--line );
49- background : rgba (255 , 255 , 255 , .5 ); transition : transform .18s , border-color .18s , box-shadow .2s ;
50- }
51- .choice : hover { transform : translateY (-2px ); border-color : var (--accent ); box-shadow : 0 10px 26px rgba (179 , 133 , 69 , .2 ); }
52- .choice .ic { font-size : 26px ; }
53- .choice h3 { font-size : 15px ; margin : 8px 0 2px ; color : var (--accent-strong ); }
54- .choice p { font-size : 12px ; color : var (--muted ); }
55- .auto { margin-top : 24px ; font-size : 13px ; color : var (--muted ); }
56- .auto .nobtn { color : var (--accent-strong ); font-weight : 700 ; cursor : pointer; }
57- .link { margin-top : 26px ; font-size : 12.5px ; color : var (--dim ); }
58- .link a { color : var (--accent-strong ); }
59- </ style >
9+ < style > html , body {height : 100% ;margin : 0 ;background : # f3eee6 ;}</ style >
6010</ head >
6111< body >
62- < div class ="card ">
63- < div class ="logo "> </ div >
64- < h1 > HiCode < span class ="accent "> v2.00</ span > </ h1 >
65- < div class ="sub "> 图形化前端开发 · 触发区域 · URL 图片 · 文件下载 · 标准库导入</ div >
66- < div class ="detect " id ="detect "> < span class ="dot "> </ span > < span id ="detectTxt "> 正在检测设备类型…</ span > </ div >
67-
68- < div class ="choices ">
69- < a class ="choice " href ="./windows/ ">
70- < div class ="ic "> 🖥️</ div >
71- < h3 > 电脑端</ h3 >
72- < p > 更高分辨率 · 功能更多 · 显示更广</ p >
73- </ a >
74- < a class ="choice " href ="./android/ ">
75- < div class ="ic "> 📱</ div >
76- < h3 > 手机端</ h3 >
77- < p > 触控特调 · 防挤压 · 便捷开发</ p >
78- </ a >
79- </ div >
80-
81- < div class ="auto "> 正在自动进入 < b id ="autoTarget "> …</ b > · < span class ="nobtn " onclick ="cancel() "> 取消并在下方选择</ span > </ div >
82- < div class ="link "> 没有自动跳转?< a href ="# " onclick ="go();return false; "> 立即进入手机端 / 电脑端</ a > · 前往 < a href ="../ "> 官网首页</ a > </ div >
83- </ div >
84-
8512< script >
86- // 设备检测:安卓 / 移动窄屏 → 手机端;其余(电脑等大屏)→ 电脑端
87- var timer = null ;
88- function detectTarget ( ) {
13+ // 无界面设备分流:后台检测 UA 后静默跳转,不显示任何可选页面
14+ ( function ( ) {
8915 var ua = navigator . userAgent ;
9016 var mobile = / A n d r o i d | i P h o n e | i P a d | i P o d | M o b i l e | W i n d o w s P h o n e / i. test ( ua ) ;
9117 var narrow = ( window . innerWidth || document . documentElement . clientWidth ) < 900 ;
92- return ( mobile || narrow ) ? "../android/" : "../windows/" ;
93- }
94- function showTarget ( t , name ) {
95- document . getElementById ( "autoTarget" ) . textContent = name ;
96- document . getElementById ( "detectTxt" ) . textContent = "已识别为" + name + "设备" ;
97- }
98- function doAuto ( ) {
99- var t = detectTarget ( ) ;
100- showTarget ( t , / a n d r o i d / i. test ( t ) ? "手机端" : "电脑端" ) ;
101- timer = setTimeout ( function ( ) { window . location . href = t ; } , 900 ) ;
102- }
103- function go ( ) { location . href = detectTarget ( ) ; }
104- function cancel ( ) { if ( timer ) clearTimeout ( timer ) ; document . getElementById ( "detectTxt" ) . textContent = "已取消自动跳转,请手动选择" ; document . getElementById ( "autoTarget" ) . textContent = "—" ; }
105- window . addEventListener ( "load" , doAuto ) ;
18+ // 手机 / 安卓窄屏 → 手机端;电脑等大屏 → 电脑端
19+ var target = ( mobile || narrow ) ? "../android/" : "../windows/" ;
20+ try { localStorage . setItem ( "hicode_entry" , target ) ; } catch ( e ) { }
21+ window . location . replace ( target ) ;
22+ } ) ( ) ;
10623</ script >
10724</ body >
10825</ html >
0 commit comments