-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
968 lines (873 loc) · 46.4 KB
/
Copy pathindex.html
File metadata and controls
968 lines (873 loc) · 46.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SGA - 砂糖代理 v3</title>
<!-- 引入外部资源 -->
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.8/dist/chart.umd.min.js"></script>
<!-- Tailwind 配置 -->
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#4CAF50', // 主色调:绿色,匹配SGA图素
secondary: '#81C784', // 次要绿色
accent: '#FFB74D', // 强调色:暖橙色,与绿色形成对比
dark: '#121212',
'dark-light': '#1E1E1E',
'dark-lighter': '#2D2D2D',
},
fontFamily: {
sans: ['Inter', 'system-ui', 'sans-serif'],
},
},
}
}
</script>
<!-- 自定义工具类 -->
<style type="text/tailwindcss">
@layer utilities {
.content-auto {
content-visibility: auto;
}
.text-gradient {
background-clip: text;
-webkit-background-clip: text;
color: transparent;
}
.bg-glass {
backdrop-filter: blur(10px);
background-color: rgba(30, 30, 30, 0.7);
}
}
</style>
<style>
html {
scroll-behavior: smooth;
}
body {
background-color: #121212;
background-image:
radial-gradient(circle at 25% 25%, rgba(76, 175, 80, 0.1) 0%, transparent 25%),
radial-gradient(circle at 75% 75%, rgba(129, 199, 132, 0.1) 0%, transparent 25%);
background-attachment: fixed;
}
.module-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px -5px rgba(76, 175, 80, 0.2);
}
.module-card {
transition: all 0.3s ease;
}
.nav-link {
position: relative;
}
.nav-link::after {
content: '';
position: absolute;
width: 0;
height: 2px;
bottom: -4px;
left: 0;
background-color: #4CAF50;
transition: width 0.3s ease;
}
.nav-link:hover::after {
width: 100%;
}
.btn-primary {
transition: all 0.3s ease;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}
.step-number {
transition: all 0.3s ease;
}
.step-card:hover .step-number {
background-color: #4CAF50;
color: white;
}
</style>
</head>
<body class="text-gray-200 font-sans">
<!-- 导航栏 -->
<header class="fixed w-full z-50 transition-all duration-300" id="navbar">
<nav class="bg-glass border-b border-gray-800">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between h-16">
<div class="flex items-center">
<div class="flex-shrink-0 flex items-center">
<i class="fa fa-leaf text-primary text-2xl mr-2"></i>
<span class="text-xl font-bold bg-gradient-to-r from-primary to-secondary text-gradient">SGA v3</span>
</div>
<div class="hidden md:block ml-10">
<div class="flex items-center space-x-8">
<a href="#intro" class="nav-link text-gray-300 hover:text-white px-3 py-2 text-sm font-medium">项目介绍</a>
<a href="#modules" class="nav-link text-gray-300 hover:text-white px-3 py-2 text-sm font-medium">功能模块</a>
<a href="#interface" class="nav-link text-gray-300 hover:text-white px-3 py-2 text-sm font-medium">界面展示</a>
<a href="#download" class="nav-link text-gray-300 hover:text-white px-3 py-2 text-sm font-medium">下载</a>
<a href="#guide" class="nav-link text-gray-300 hover:text-white px-3 py-2 text-sm font-medium">快速上手</a>
<a href="#faq" class="nav-link text-gray-300 hover:text-white px-3 py-2 text-sm font-medium">问题解决</a>
</div>
</div>
</div>
<div class="flex items-center">
<a href="https://github.com/Kin-L/SucroseGameAssistant" target="_blank" class="text-gray-300 hover:text-white px-3 py-2 text-sm font-medium flex items-center">
<i class="fa fa-github mr-1"></i> GitHub
</a>
<a href="https://gitee.com/huixinghen/SucroseGameAssistant" target="_blank" class="text-gray-300 hover:text-white px-3 py-2 text-sm font-medium hidden md:block">
Gitee
</a>
</div>
</div>
</div>
</nav>
</header>
<!-- 英雄区域 -->
<section class="pt-32 pb-20 px-4 sm:px-6 lg:px-8 max-w-7xl mx-auto">
<div class="flex flex-col md:flex-row items-center">
<div class="md:w-1/2 mb-10 md:mb-0">
<h1 class="text-2xl md:text-3xl lg:text-4xl font-bold mb-6 leading-tight">
<span class="bg-gradient-to-r from-primary to-secondary text-gradient">砂糖代理</span>
<span class="block mt-2">SucroseGameAssistant v3</span>
</h1>
<p class="text-xl text-gray-300 mb-8">
一款功能强大的游戏辅助工具,支持多款热门游戏的自动化操作,让你的游戏体验更轻松。
</p>
<div class="flex flex-wrap gap-4">
<a href="#download" class="btn-primary bg-primary hover:bg-primary/90 text-white px-6 py-3 rounded-lg font-medium flex items-center">
<i class="fa fa-download mr-2"></i> 立即下载
</a>
<a href="#guide" class="bg-dark-lighter hover:bg-dark-lighter/80 text-white px-6 py-3 rounded-lg font-medium flex items-center border border-gray-700">
<i class="fa fa-book mr-2"></i> 快速上手
</a>
</div>
<div class="mt-8 flex items-center text-gray-400">
<span class="mr-4"><i class="fa fa-check-circle text-secondary mr-1"></i> 开源免费</span>
<span class="mr-4"><i class="fa fa-check-circle text-secondary mr-1"></i> 绿色免安装</span>
<span><i class="fa fa-check-circle text-secondary mr-1"></i> 多游戏支持</span>
</div>
</div>
<div class="md:w-1/2 flex justify-center">
<div class="relative">
<div class="absolute inset-0 bg-gradient-to-r from-primary/20 to-secondary/20 rounded-xl blur-3xl opacity-70"></div>
<img src=".\resource\loadback.png" alt="SGA界面展示" class="relative rounded-xl shadow-2xl border border-gray-800 w-full max-w-md">
</div>
</div>
</div>
</section>
<!-- 项目介绍 -->
<section id="intro" class="py-20 px-4 sm:px-6 lg:px-8 max-w-7xl mx-auto">
<div class="mb-16 text-center">
<h2 class="text-3xl md:text-4xl font-bold mb-4">项目介绍</h2>
<div class="w-24 h-1 bg-gradient-to-r from-primary to-secondary mx-auto rounded-full"></div>
</div>
<div class="bg-dark-light rounded-2xl p-8 border border-gray-800 shadow-xl">
<p class="text-lg mb-6">
砂糖代理(SGA)是一款运行在Windows 10系统上的游戏辅助工具,用于定时循环执行各模块的相关功能。可设置完成后睡眠和从睡眠中唤醒,从而避免电脑在非必要时长期运行。
</p>
<p class="text-lg mb-6">
目前SGA已适配尘白禁区,原神,MAA,三月七助手等游戏,并支持使用通用执行模块启用其他第三方自动化软件。
</p>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mt-10">
<div class="bg-dark-lighter p-6 rounded-xl border border-gray-700">
<div class="w-12 h-12 bg-primary/20 rounded-lg flex items-center justify-center mb-4">
<i class="fa fa-clock-o text-primary text-xl"></i>
</div>
<h3 class="text-xl font-semibold mb-2">定时任务</h3>
<p class="text-gray-400">支持定时执行任务,完成后可自动睡眠,需要时自动唤醒,节省能源</p>
</div>
<div class="bg-dark-lighter p-6 rounded-xl border border-gray-700">
<div class="w-12 h-12 bg-secondary/20 rounded-lg flex items-center justify-center mb-4">
<i class="fa fa-gamepad text-secondary text-xl"></i>
</div>
<h3 class="text-xl font-semibold mb-2">多游戏支持</h3>
<p class="text-gray-400">已适配多款热门游戏,持续更新中,满足不同玩家的需求</p>
</div>
<div class="bg-dark-lighter p-6 rounded-xl border border-gray-700">
<div class="w-12 h-12 bg-accent/20 rounded-lg flex items-center justify-center mb-4">
<i class="fa fa-plug text-accent text-xl"></i>
</div>
<h3 class="text-xl font-semibold mb-2">扩展性强</h3>
<p class="text-gray-400">支持通用执行模块,可启用其他第三方自动化软件,功能无限扩展</p>
</div>
</div>
<div class="mt-10 p-6 bg-dark-lighter/50 rounded-xl border border-gray-700">
<h3 class="text-xl font-semibold mb-4 flex items-center">
<i class="fa fa-info-circle text-primary mr-2"></i> 建议运行环境
</h3>
<ul class="list-disc list-inside space-y-2 text-gray-300">
<li>SGA推荐环境为win10 专业版</li>
<li>游戏窗口最佳分辨率1920×1080(最低1600×900)</li>
<li>尘白禁区模块的推荐启动器为专用尘白禁区启动器</li>
</ul>
</div>
</div>
</section>
<!-- 功能模块 -->
<section id="modules" class="py-20 px-4 sm:px-6 lg:px-8 max-w-7xl mx-auto">
<div class="mb-16 text-center">
<h2 class="text-3xl md:text-4xl font-bold mb-4">功能模块</h2>
<p class="text-gray-400 max-w-2xl mx-auto">v2已支持所有模块,v3版本将陆续增加相关适配</p>
<div class="w-24 h-1 bg-gradient-to-r from-primary to-secondary mx-auto rounded-full mt-4"></div>
</div>
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
<!-- 模块卡片 -->
<div class="module-card bg-dark-light rounded-xl overflow-hidden border border-gray-800">
<div class="h-40 bg-gradient-to-br from-primary/20 to-primary/5 flex items-center justify-center">
<i class="fa fa-building text-5xl text-primary"></i>
</div>
<div class="p-5">
<h3 class="text-xl font-semibold mb-2">环行旅舍</h3>
<p class="text-gray-400 text-sm"><span class="text-accent">注:</span>功能停止更新</p>
</div>
</div>
<div class="module-card bg-dark-light rounded-xl overflow-hidden border border-gray-800">
<div class="h-40 bg-gradient-to-br from-green-500/20 to-green-500/5 flex items-center justify-center">
<i class="fa fa-leaf text-5xl text-green-400"></i>
</div>
<div class="p-5">
<h3 class="text-xl font-semibold mb-2">原神</h3>
<p class="text-gray-400 text-sm">支持自动秘境等功能</p>
</div>
</div>
<div class="module-card bg-dark-light rounded-xl overflow-hidden border border-gray-800">
<div class="h-40 bg-gradient-to-br from-blue-500/20 to-blue-500/5 flex items-center justify-center">
<i class="fa fa-shield text-5xl text-blue-400"></i>
</div>
<div class="p-5">
<h3 class="text-xl font-semibold mb-2">MAA</h3>
<p class="text-gray-400 text-sm">明日方舟辅助模块</p>
</div>
</div>
<div class="module-card bg-dark-light rounded-xl overflow-hidden border border-gray-800">
<div class="h-40 bg-gradient-to-br from-purple-500/20 to-purple-500/5 flex items-center justify-center">
<i class="fa fa-star text-5xl text-purple-400"></i>
</div>
<div class="p-5">
<h3 class="text-xl font-semibold mb-2">三月七助手</h3>
<p class="text-gray-400 text-sm">崩坏:星穹铁道辅助</p>
</div>
</div>
<div class="module-card bg-dark-light rounded-xl overflow-hidden border border-gray-800">
<div class="h-40 bg-gradient-to-br from-cyan-500/20 to-cyan-500/5 flex items-center justify-center">
<i class="fa fa-snowflake-o text-5xl text-cyan-400"></i>
</div>
<div class="p-5">
<h3 class="text-xl font-semibold mb-2">尘白禁区</h3>
<p class="text-gray-400 text-sm">推荐使用专用启动器</p>
</div>
</div>
<div class="module-card bg-dark-light rounded-xl overflow-hidden border border-gray-800">
<div class="h-40 bg-gradient-to-br from-amber-500/20 to-amber-500/5 flex items-center justify-center">
<i class="fa fa-cogs text-5xl text-amber-400"></i>
</div>
<div class="p-5">
<h3 class="text-xl font-semibold mb-2">通用执行</h3>
<p class="text-gray-400 text-sm">启用第三方自动化软件</p>
</div>
</div>
<div class="module-card bg-dark-light rounded-xl overflow-hidden border border-gray-800">
<div class="h-40 bg-gradient-to-br from-red-500/20 to-red-500/5 flex items-center justify-center">
<i class="fa fa-mouse-pointer text-5xl text-red-400"></i>
</div>
<div class="p-5">
<h3 class="text-xl font-semibold mb-2">连点器</h3>
<p class="text-gray-400 text-sm">自动点击辅助功能</p>
</div>
</div>
<div class="module-card bg-dark-light rounded-xl overflow-hidden border border-gray-800">
<div class="h-40 bg-gradient-to-br from-pink-500/20 to-pink-500/5 flex items-center justify-center">
<i class="fa fa-rocket text-5xl text-pink-400"></i>
</div>
<div class="p-5">
<h3 class="text-xl font-semibold mb-2">更多模块</h3>
<p class="text-gray-400 text-sm">绝区零助手、鸣潮助手等</p>
</div>
</div>
</div>
</section>
<!-- 界面展示区域(新幻灯片版本) -->
<section id="interface" class="py-20 px-4 sm:px-6 lg:px-8 max-w-7xl mx-auto">
<div class="mb-16 text-center">
<h2 class="text-3xl md:text-4xl font-bold mb-4">SGA界面展示</h2>
<p class="text-gray-400 max-w-2xl mx-auto">直观了解SGA的主要界面和操作布局</p>
<div class="w-24 h-1 bg-gradient-to-r from-primary to-secondary mx-auto rounded-full mt-4"></div>
</div>
<!-- 幻灯片容器 -->
<div class="relative bg-dark-light rounded-2xl overflow-hidden border border-gray-800" style="min-height: 500px;">
<!-- 幻灯片轨道容器 -->
<div class="overflow-hidden">
<!-- 幻灯片轨道 -->
<div id="slider-track" class="flex transition-transform duration-500 ease-in-out">
<!-- 幻灯片1 - 全局设置界面概览 -->
<div class="min-w-full p-6">
<div class="p-6 border-b border-gray-800">
<h3 class="text-2xl font-semibold">全局设置界面</h3>
<p class="text-gray-400 mt-2">定时任务 | 实时信息栏 | 自动更新 | 自定义快捷键 | 详细日志信息 | 版本更新日志</p>
</div>
<div class="p-6 flex flex-col md:flex-row gap-6 items-center">
<div class="md:w-2/3">
<img src="./resource/page-overall.png" alt="全局设置界面" class="rounded-xl border border-gray-700 w-full shadow-lg" onerror="this.src='https://picsum.photos/800/500?random=1'">
</div>
<div class="md:w-1/3 space-y-4">
<div class="bg-dark-lighter p-4 rounded-xl border border-gray-700">
<h4 class="font-semibold text-primary mb-2 flex items-center">
<i class="fa fa-tachometer mr-2"></i>1.信息栏
</h4>
<p class="text-gray-300 text-sm">右侧信息栏显示实时指示信息和任务执行信息,方便查验最近任务执行情况。</p>
</div>
<div class="bg-dark-lighter p-4 rounded-xl border border-gray-700">
<h4 class="font-semibold text-primary mb-2 flex items-center">
<i class="fa fa-list mr-2"></i>2.全局设置页面
</h4>
<p class="text-gray-300 text-sm">左侧全局设置页面,是SGA的核心功能设置区,可进行定时任务设置,自定义OCR路径和快捷键等,可查看详细日志信息和版本信息。</p>
</div>
<div class="bg-dark-lighter p-4 rounded-xl border border-gray-700">
<h4 class="font-semibold text-primary mb-2 flex items-center">
<i class="fa fa-info-circle mr-2"></i>3.全局操作按钮
</h4>
<p class="text-gray-300 text-sm">齿轮按钮用以切换界面,保存按钮在两个界面分别执行保存当下页面信息,历史按钮可查看当日日志文件</p>
</div>
</div>
</div>
</div>
<!-- 幻灯片2 - 模块设置界面概览 -->
<div class="min-w-full p-6">
<div class="p-6 border-b border-gray-800">
<h3 class="text-2xl font-semibold">连续任务界面</h3>
<p class="text-gray-400 mt-2">连续任务模块 | 任务模块化设置与执行</p>
</div>
<div class="p-6 flex flex-col md:flex-row gap-6 items-center">
<div class="md:w-2/3">
<img src="./resource/page-mix.png" alt="全局设置界面" class="rounded-xl border border-gray-700 w-full shadow-lg" onerror="this.src='https://picsum.photos/800/500?random=1'">
</div>
<div class="md:w-1/3 space-y-4">
<div class="bg-dark-lighter p-4 rounded-xl border border-gray-700">
<h4 class="font-semibold text-primary mb-2 flex items-center">
<i class="fa fa-tachometer mr-2"></i>1.连续任务模块设置界面
</h4>
<p class="text-gray-300 text-sm">配合其他模块,可线性连续执行多个任务。左侧添加其他子任务。中部设置任务执行前、后操作,会覆盖子任务的同类设置。</p>
</div>
<div class="bg-dark-lighter p-4 rounded-xl border border-gray-700">
<h4 class="font-semibold text-primary mb-2 flex items-center">
<i class="fa fa-list mr-2"></i>2.子配置操作区
</h4>
<p class="text-gray-300 text-sm">上方为子设置编辑/操作区,控制任务启停。</p>
</div>
</div>
</div>
</div>
<!-- 幻灯片3 - 全局设置 -->
<div class="min-w-full p-6">
<div class="p-6 border-b border-gray-800">
<h3 class="text-2xl font-semibold">尘白禁区模块任务设置界面</h3>
<p class="text-gray-400 mt-2">尘白禁区模块暂时只支持PC任务,不支持后台操作。推荐使用win10专业版,游戏分辨率1920*1080窗口/全屏,尘白禁区启动器,多屏玩家可能遇到适配问题,可自行调整窗口位置。</p>
</div>
<div class="p-6 flex flex-col md:flex-row gap-6 items-center">
<div class="md:w-1/3 space-y-4 order-2 md:order-1">
<div class="bg-dark-lighter p-4 rounded-xl border border-gray-700">
<h4 class="font-semibold text-primary mb-2 flex items-center">
<i class="fa fa-cog mr-2"></i>1.任务选择
</h4>
<p class="text-gray-300 text-sm">任务功能包括:体力扫荡,日常周常任务,收集信源断片,抽卡记录识别等。</p>
</div>
<div class="bg-dark-lighter p-4 rounded-xl border border-gray-700">
<h4 class="font-semibold text-primary mb-2 flex items-center">
<i class="fa fa-clock-o mr-2"></i>2.任务详细设置
</h4>
<p class="text-gray-300 text-sm">更多任务执行的自定义选项,满足不同需求</p>
</div>
<div class="bg-dark-lighter p-4 rounded-xl border border-gray-700">
<h4 class="font-semibold text-primary mb-2 flex items-center">
<i class="fa fa-keyboard-o mr-2"></i>3.多种小游戏自动化
</h4>
<p class="text-gray-300 text-sm">限时活动-验证战场刷取,基地游戏-猜心对局刷取。</p>
</div>
</div>
<div class="md:w-2/3 order-1 md:order-2">
<img src="./resource/page-snow.png" alt="全局设置界面" class="rounded-xl border border-gray-700 w-full shadow-lg" onerror="this.src='https://picsum.photos/800/500?random=4'">
</div>
</div>
</div>
</div>
</div>
<!-- 幻灯片控制按钮 -->
<button id="prev-slide" class="absolute left-4 top-1/2 -translate-y-1/2 w-10 h-10 bg-dark-lighter/80 hover:bg-primary rounded-full flex items-center justify-center border border-gray-700 transition-all duration-300 focus:outline-none z-10">
<i class="fa fa-chevron-left"></i>
</button>
<button id="next-slide" class="absolute right-4 top-1/2 -translate-y-1/2 w-10 h-10 bg-dark-lighter/80 hover:bg-primary rounded-full flex items-center justify-center border border-gray-700 transition-all duration-300 focus:outline-none z-10">
<i class="fa fa-chevron-right"></i>
</button>
<!-- 幻灯片指示器 -->
<div class="flex justify-center gap-2 py-4 absolute bottom-0 left-0 right-0 bg-dark-light/80 z-10">
<button class="slide-indicator w-3 h-3 rounded-full bg-primary transition-all duration-300" data-index="0"></button>
<button class="slide-indicator w-3 h-3 rounded-full bg-gray-600 hover:bg-primary transition-all duration-300" data-index="1"></button>
<button class="slide-indicator w-3 h-3 rounded-full bg-gray-600 hover:bg-primary transition-all duration-300" data-index="2"></button>
</div>
</div>
</section>
<!-- 幻灯片功能脚本 -->
<script>
// 确保DOM加载完成后执行
document.addEventListener('DOMContentLoaded', function() {
// 获取DOM元素
const track = document.getElementById('slider-track');
const prevBtn = document.getElementById('prev-slide');
const nextBtn = document.getElementById('next-slide');
const indicators = document.querySelectorAll('.slide-indicator');
// 初始化变量
let currentIndex = 0;
const slideCount = indicators.length;
let autoplayTimer;
// 更新幻灯片位置
function updateSlidePosition() {
if (!track) return; // 安全检查
track.style.transform = `translateX(-${currentIndex * 100}%)`;
// 更新指示器状态
indicators.forEach((indicator, index) => {
if (index === currentIndex) {
indicator.classList.add('bg-primary');
indicator.classList.remove('bg-gray-600');
} else {
indicator.classList.remove('bg-primary');
indicator.classList.add('bg-gray-600');
}
});
}
// 上一张幻灯片
function goToPrevSlide() {
currentIndex = (currentIndex - 1 + slideCount) % slideCount;
updateSlidePosition();
resetAutoplay();
}
// 下一张幻灯片
function goToNextSlide() {
currentIndex = (currentIndex + 1) % slideCount;
updateSlidePosition();
resetAutoplay();
}
// 跳转到指定幻灯片
function goToSlide(index) {
currentIndex = index;
updateSlidePosition();
resetAutoplay();
}
// 自动播放功能
function startAutoplay() {
autoplayTimer = setInterval(goToNextSlide, 6000);
}
// 重置自动播放计时器
function resetAutoplay() {
if (autoplayTimer) {
clearInterval(autoplayTimer);
}
startAutoplay();
}
// 事件监听
if (prevBtn) prevBtn.addEventListener('click', goToPrevSlide);
if (nextBtn) nextBtn.addEventListener('click', goToNextSlide);
// 指示器点击事件
indicators.forEach(indicator => {
indicator.addEventListener('click', () => {
const index = parseInt(indicator.dataset.index, 10);
goToSlide(index);
});
});
// 鼠标悬停暂停自动播放
const sliderContainer = track ? track.closest('.relative') : null;
if (sliderContainer) {
sliderContainer.addEventListener('mouseenter', () => {
if (autoplayTimer) {
clearInterval(autoplayTimer);
}
});
sliderContainer.addEventListener('mouseleave', startAutoplay);
}
// 键盘导航
document.addEventListener('keydown', (e) => {
if (e.key === 'ArrowLeft') {
goToPrevSlide();
} else if (e.key === 'ArrowRight') {
goToNextSlide();
}
});
// 启动自动播放
startAutoplay();
});
</script>
<!-- 下载区域 -->
<section id="download" class="py-20 px-4 sm:px-6 lg:px-8 max-w-7xl mx-auto">
<div class="mb-16 text-center">
<h2 class="text-3xl md:text-4xl font-bold mb-4">下载中心</h2>
<p class="text-gray-400 max-w-2xl mx-auto">选择合适的下载方式获取最新版本的SGA</p>
<div class="w-24 h-1 bg-gradient-to-r from-primary to-secondary mx-auto rounded-full mt-4"></div>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
<!-- 主程序下载 -->
<div class="bg-dark-light rounded-2xl p-8 border border-gray-800">
<div class="flex items-center mb-6">
<div class="w-12 h-12 bg-primary/20 rounded-lg flex items-center justify-center mr-4">
<i class="fa fa-download text-primary text-xl"></i>
</div>
<h3 class="text-2xl font-semibold">SGA-full 包体</h3>
</div>
<p class="text-gray-300 mb-6">从网盘下载带"full"的最新安装包。蓝奏云有最大包体限制,需额外下载OCR组件。</p>
<div class="space-y-4">
<a href="https://wwrv.lanzouu.com/b002v5cgdg" target="_blank" class="flex items-center justify-between bg-dark-lighter hover:bg-dark-lighter/80 p-4 rounded-xl border border-gray-700 transition-all">
<div class="flex items-center">
<i class="fa fa-cloud text-primary mr-3 text-xl"></i>
<div>
<div class="font-medium">蓝奏云下载</div>
</div>
</div>
<i class="fa fa-arrow-right text-gray-400"></i>
</a>
<div class="text-sm text-gray-400">密码: faml</div>
<a href="https://www.123pan.com/s/PjLbVv-9kEuA.html?pwd=stdl" target="_blank" class="flex items-center justify-between bg-dark-lighter hover:bg-dark-lighter/80 p-4 rounded-xl border border-gray-700 transition-all">
<div class="flex items-center">
<i class="fa fa-cloud text-primary mr-3 text-xl"></i>
<div>
<div class="font-medium">123云盘下载</div>
</div>
</div>
<i class="fa fa-arrow-right text-gray-400"></i>
</a>
<a href="https://pan.baidu.com/s/1OhXjg--R-a2YRPj9f5TNxA?pwd=33vp" target="_blank" class="flex items-center justify-between bg-dark-lighter hover:bg-dark-lighter/80 p-4 rounded-xl border border-gray-700 transition-all">
<div class="flex items-center">
<i class="fa fa-cloud text-primary mr-3 text-xl"></i>
<div>
<div class="font-medium">百度云盘下载</div>
</div>
</div>
<i class="fa fa-arrow-right text-gray-400"></i>
</a>
</div>
</div>
<!-- OCR组件下载 -->
<div class="bg-dark-light rounded-2xl p-8 border border-gray-800">
<div class="flex items-center mb-6">
<div class="w-12 h-12 bg-secondary/20 rounded-lg flex items-center justify-center mr-4">
<i class="fa fa-file-text-o text-secondary text-xl"></i>
</div>
<h3 class="text-2xl font-semibold">OCR-json 组件</h3>
</div>
<p class="text-gray-300 mb-6">大多数电脑使用"PaddleOCR-json",需与主程序一同下载才能正常使用。</p>
<div class="space-y-4">
<a href="https://wwrv.lanzouu.com/b033h9ybi" target="_blank" class="flex items-center justify-between bg-dark-lighter hover:bg-dark-lighter/80 p-4 rounded-xl border border-gray-700 transition-all">
<div class="flex items-center">
<i class="fa fa-cloud text-secondary mr-3 text-xl"></i>
<div>
<div class="font-medium">蓝奏云下载</div>
</div>
</div>
<i class="fa fa-arrow-right text-gray-400"></i>
</a>
<div class="text-sm text-gray-400">密码: 1siv</div>
<a href="https://www.123865.com/s/PjLbVv-9R1uA?pwd=ICSl" target="_blank" class="flex items-center justify-between bg-dark-lighter hover:bg-dark-lighter/80 p-4 rounded-xl border border-gray-700 transition-all">
<div class="flex items-center">
<i class="fa fa-cloud text-secondary mr-3 text-xl"></i>
<div>
<div class="font-medium">123云盘下载</div>
</div>
</div>
<i class="fa fa-arrow-right text-gray-400"></i>
</a>
<a href="https://pan.baidu.com/s/1w6hD8UaCDQ7gj7kB8jvFnw?pwd=xrvx" target="_blank" class="flex items-center justify-between bg-dark-lighter hover:bg-dark-lighter/80 p-4 rounded-xl border border-gray-700 transition-all">
<div class="flex items-center">
<i class="fa fa-cloud text-secondary mr-3 text-xl"></i>
<div>
<div class="font-medium">百度云盘下载</div>
</div>
</div>
<i class="fa fa-arrow-right text-gray-400"></i>
</a>
</div>
</div>
</div>
<!-- 更新说明 -->
<div class="mt-10 bg-dark-light rounded-2xl p-6 border border-gray-800">
<h3 class="text-xl font-semibold mb-4 flex items-center">
<i class="fa fa-refresh text-primary mr-2"></i> 更新方案
</h3>
<p class="text-gray-300 mb-4">每个更新包有最低适用版本的限制,无法在低于版本限制的版本上应用该更新包</p>
<ol class="list-decimal list-inside space-y-2 text-gray-300 ml-4">
<li>在全局设置页面可选自动更新,和立即检查更新。</li>
<li>手动更新,在gitee的<a href="https://gitee.com/huixinghen/SucroseGameAssistant/releases" target="_blank" class="text-primary hover:underline">release</a>中找到对应版本号,下载带有"replace"后缀的压缩包,解压后将SGA文件夹与原SGA文件夹中同名文件夹进行合并并替换。</li>
</ol>
</div>
</section>
<!-- 快速上手 -->
<section id="guide" class="py-20 px-4 sm:px-6 lg:px-8 max-w-7xl mx-auto">
<div class="mb-16 text-center">
<h2 class="text-3xl md:text-4xl font-bold mb-4">快速上手教程</h2>
<p class="text-gray-400 max-w-2xl mx-auto">简单几步,即可开始使用SGA的强大功能</p>
<div class="w-24 h-1 bg-gradient-to-r from-primary to-secondary mx-auto rounded-full mt-4"></div>
</div>
<div class="space-y-10">
<!-- 步骤1 -->
<div class="step-card flex flex-col md:flex-row gap-6 bg-dark-light rounded-2xl p-6 border border-gray-800">
<div class="step-number w-12 h-12 rounded-full bg-dark-lighter text-primary font-bold flex items-center justify-center text-xl md:mt-1">1</div>
<div class="flex-1">
<h3 class="text-2xl font-semibold mb-3">启动程序</h3>
<p class="text-gray-300">使用管理员权限打开SGA.exe文件。管理员权限是必须的,用于软件启动、设置定时等功能的正常运行。</p>
</div>
<div class="md:w-1/3 flex items-center justify-center">
<img src=".\resource\step1.png" alt="启动程序" class="rounded-lg border border-gray-700 max-w-full h-auto">
</div>
</div>
<!-- 步骤2 -->
<div class="step-card flex flex-col md:flex-row gap-6 bg-dark-light rounded-2xl p-6 border border-gray-800">
<div class="step-number w-12 h-12 rounded-full bg-dark-lighter text-primary font-bold flex items-center justify-center text-xl md:mt-1">2</div>
<div class="flex-1">
<h3 class="text-2xl font-semibold mb-3">选择模块</h3>
<p class="text-gray-300">点击左侧"连续任务"下拉选框,选择要执行的模块。然后点击右侧齿轮样图标进入模块设置页面,选择服务器并输入启动器绝对路径。</p>
</div>
<div class="md:w-1/3 flex items-center justify-center">
<img src=".\resource\step2.png" alt="选择模块" class="rounded-lg border border-gray-700 max-w-full h-auto">
</div>
</div>
<!-- 步骤3 -->
<div class="step-card flex flex-col md:flex-row gap-6 bg-dark-light rounded-2xl p-6 border border-gray-800">
<div class="step-number w-12 h-12 rounded-full bg-dark-lighter text-primary font-bold flex items-center justify-center text-xl md:mt-1">3</div>
<div class="flex-1">
<h3 class="text-2xl font-semibold mb-3">配置任务</h3>
<p class="text-gray-300">勾选左侧要执行的任务,点击对应齿轮样图标进入子设置页面,选择要执行的具体任务内容。</p>
</div>
<div class="md:w-1/3 flex items-center justify-center">
<img src=".\resource\step3.png" alt="配置任务" class="rounded-lg border border-gray-700 max-w-full h-auto">
</div>
</div>
<!-- 步骤4 -->
<div class="step-card flex flex-col md:flex-row gap-6 bg-dark-light rounded-2xl p-6 border border-gray-800">
<div class="step-number w-12 h-12 rounded-full bg-dark-lighter text-primary font-bold flex items-center justify-center text-xl md:mt-1">4</div>
<div class="flex-1">
<h3 class="text-2xl font-semibold mb-3">设置OCR组件</h3>
<p class="text-gray-300">如果从蓝奏云下载,需要额外指定OCR组件路径。点击上方齿轮按钮,切换到全局设置界面,输入或指定OCR.exe的绝对路径。也可参考文档将OCR组件的文件置于指定目录结构中。</p>
</div>
<div class="md:w-1/3 flex items-center justify-center">
<img src=".\resource\step4.png" alt="设置OCR组件" class="rounded-lg border border-gray-700 max-w-full h-auto">
</div>
</div>
<!-- 步骤5 -->
<div class="step-card flex flex-col md:flex-row gap-6 bg-dark-light rounded-2xl p-6 border border-gray-800">
<div class="step-number w-12 h-12 rounded-full bg-dark-lighter text-primary font-bold flex items-center justify-center text-xl md:mt-1">5</div>
<div class="flex-1">
<h3 class="text-2xl font-semibold mb-3">开始与中止</h3>
<p class="text-gray-300">点击上方"开始"按钮,开始执行任务。使用快捷键(默认为"ctrl+/")可快捷中止运行中的任务。</p>
</div>
<div class="md:w-1/3 flex items-center justify-center">
<img src=".\resource\title.png" alt="开始与中止" class="rounded-lg border border-gray-700 max-w-full h-auto">
</div>
</div>
</div>
<div class="mt-12 text-center">
<p class="text-gray-400 mb-6">需要更详细的教程?查看视频指南</p>
<div class="flex flex-wrap justify-center gap-4">
<a href="https://www.bilibili.com/video/BV1tSGnzXEdg" target="_blank" class="bg-dark-lighter hover:bg-dark-lighter/80 text-white px-5 py-3 rounded-lg font-medium flex items-center border border-gray-700">
<i class="fa fa-play-circle text-primary mr-2"></i> SGAv3介绍
</a>
<a href="https://www.bilibili.com/video/BV13kGuzfERf" target="_blank" class="bg-dark-lighter hover:bg-dark-lighter/80 text-white px-5 py-3 rounded-lg font-medium flex items-center border border-gray-700">
<i class="fa fa-play-circle text-primary mr-2"></i> 快速上手指南
</a>
</div>
</div>
</section>
<!-- 问题解决 -->
<section id="faq" class="py-20 px-4 sm:px-6 lg:px-8 max-w-7xl mx-auto">
<div class="mb-16 text-center">
<h2 class="text-3xl md:text-4xl font-bold mb-4">BUG反馈 / 问题解决</h2>
<div class="w-24 h-1 bg-gradient-to-r from-primary to-secondary mx-auto rounded-full mt-4"></div>
</div>
<div class="bg-dark-light rounded-2xl p-8 border border-gray-800">
<div class="space-y-6">
<div>
<h3 class="text-xl font-semibold mb-3 text-primary">遇到问题?先尝试这些步骤</h3>
<ol class="list-decimal list-inside space-y-3 text-gray-300 ml-2">
<li>遇到bug可尝试更新,确认是否为最新版本</li>
<li>
若SGA主体部分出现问题(如闪退,卡死等),确认自己系统是否为win10。
<br>
SGA在win10 专业版上开发和测试,在 win7/win11/win10其他精简版 可能遇到未知问题,作者暂时没有条件解决。
</li>
<li>
如果在执行任务过程中遇到问题
<ul class="list-disc list-inside space-y-1 mt-1 ml-4">
<li>如果是SGA自带的功能模块,出现点击不到位的,无效点击,超时等问题,可以尝试将游戏窗口调至1920*1080分辨率。</li>
<li>如果是SGA启动第三方自动化软件的模块,如果已经将第三方软件启动成功,开始执行,则可能是第三方自动化软件的问题</li>
<li>如果第三方软件启动过程报错,可能是SGA的BUG</li>
</ul>
</li>
<li>
SGA卸载删除前请 <strong class="text-accent">清除定时</strong>,否则您的电脑可能遇到仍在您原来设定过的时间 睡眠中自行唤醒 的情况。
<br>
如果您已经卸载删除且遇到该情况,可在按照百度教程找到 任务计划程序 ,找到 SGA-awake 的条目,禁用/删除即可解决该问题。
</li>
<li>
SGA为绿色免安装版,无联网功能,运行需要管理员权限,用于软件启动、设置定时等。
<br>
若出现报毒和添加信任事件,信则用,本人没有心情也没有能力写病毒和盗号功能。
<br>
添加信任可参考:<a href="https://zhuanlan.zhihu.com/p/645089615" target="_blank" class="text-primary hover:underline">知乎帖子</a>
</li>
</ol>
</div>
<div class="pt-4 border-t border-gray-800">
<h3 class="text-xl font-semibold mb-3 text-primary">需要进一步帮助?联系我们</h3>
<p class="text-gray-300 mb-4">如果以上说明不能解决你遇到的问题,可以通过以下方式联系/反馈,如果问题较复杂可以获取Q群聊号,群聊仅作反馈bug和交流开发SGA用</p>
<div class="grid grid-cols-1 sm:grid-cols-3 gap-4">
<a href="https://space.bilibili.com/406315493" target="_blank" class="bg-dark-lighter hover:bg-dark-lighter/80 p-4 rounded-xl border border-gray-700 transition-all flex flex-col items-center text-center">
<i class="fa fa-play-circle text-2xl text-primary mb-2"></i>
<div class="font-medium">bilibili账号</div>
<div class="text-sm text-gray-400">绘星痕</div>
</a>
<a href="mailto:2805137028@qq.com" class="bg-dark-lighter hover:bg-dark-lighter/80 p-4 rounded-xl border border-gray-700 transition-all flex flex-col items-center text-center">
<i class="fa fa-envelope text-2xl text-primary mb-2"></i>
<div class="font-medium">邮箱</div>
<div class="text-sm text-gray-400">2805137028@qq.com</div>
</a>
<a href="https://gitee.com/huixinghen/SucroseGameAssistant/issues" target="_blank" class="bg-dark-lighter hover:bg-dark-lighter/80 p-4 rounded-xl border border-gray-700 transition-all flex flex-col items-center text-center">
<i class="fa fa-github text-2xl text-primary mb-2"></i>
<div class="font-medium">GitHub / Gitee</div>
<div class="text-sm text-gray-400">issues</div>
</a>
</div>
</div>
<div class="pt-4 border-t border-gray-800">
<h3 class="text-xl font-semibold mb-3 text-primary">反馈BUG建议提供的信息</h3>
<p class="text-gray-300 mb-2">越详细越能助我快速定位和解决问题</p>
<ol class="list-decimal list-inside space-y-2 text-gray-300 ml-2">
<li>自己的环境(win10/win11/win7, 官服/B服)</li>
<li>触发bug的流程/停留的界面/bug触发的录屏、截图</li>
<li>
SGA文件夹中"personal"文件夹中的"errorsc","logs"(重要)文件夹,
<br>
压缩打包发给我,如果可能请将整个"personal"文件夹打包
</li>
</ol>
</div>
</div>
</div>
</section>
<!-- 特别感谢 -->
<section class="py-16 px-4 sm:px-6 lg:px-8 max-w-7xl mx-auto">
<div class="mb-10 text-center">
<h2 class="text-2xl md:text-3xl font-bold mb-4">特别感谢</h2>
<div class="w-24 h-1 bg-gradient-to-r from-primary to-secondary mx-auto rounded-full"></div>
</div>
<div class="bg-dark-light rounded-2xl p-8 border border-gray-800">
<ul class="space-y-4 text-gray-300">
<li class="flex items-start">
<i class="fa fa-check-circle text-secondary mt-1 mr-3"></i>
<div>
<span class="font-medium text-white">SGA用户界面</span> 使用了
<a href="https://github.com/zhiyiYo/PyQt-Fluent-Widgets" target="_blank" class="text-primary hover:underline">PyQt-Fluent-Widgets</a>
</div>
</li>
<li class="flex items-start">
<i class="fa fa-check-circle text-secondary mt-1 mr-3"></i>
<div>
<span class="font-medium text-white">SGA部分代码和学习过程中</span> 参考了三月七助手,并组合使用了
<a href="https://moesnow.github.io/March7thAssistant" target="_blank" class="text-primary hover:underline">三月七助手</a>
</div>
</li>
<li class="flex items-start">
<i class="fa fa-check-circle text-secondary mt-1 mr-3"></i>
<div>
<span class="font-medium text-white">SGA原神模块的自动秘境功能</span> 组合使用了
<a href="https://github.com/babalae/better-genshin-impact" target="_blank" class="text-primary hover:underline">BGI</a>
的自动秘境功能
</div>
</li>
<li class="flex items-start">
<i class="fa fa-check-circle text-secondary mt-1 mr-3"></i>
<div>
<span class="font-medium text-white">SGA</span> 组合使用了
<a href="https://github.com/MaaAssistantArknights/MaaAssistantArknights" target="_blank" class="text-primary hover:underline">MAA</a>
</div>
</li>
</ul>
</div>
</section>
<!-- 页脚 -->
<footer class="bg-dark-light border-t border-gray-800 py-10 px-4 sm:px-6 lg:px-8">
<div class="max-w-7xl mx-auto">
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="flex items-center mb-6 md:mb-0">
<i class="fa fa-leaf text-primary text-2xl mr-2"></i>
<span class="text-xl font-bold bg-gradient-to-r from-primary to-secondary text-gradient">SGA v3</span>
</div>
<div class="flex space-x-6 mb-6 md:mb-0">
<a href="https://github.com/Kin-L/SucroseGameAssistant" target="_blank" class="text-gray-400 hover:text-primary transition-colors">
<i class="fa fa-github text-xl"></i>
</a>
<a href="https://gitee.com/huixinghen/SucroseGameAssistant" target="_blank" class="text-gray-400 hover:text-primary transition-colors">
<i class="fa fa-code-fork text-xl"></i>
</a>
<a href="https://space.bilibili.com/406315493" target="_blank" class="text-gray-400 hover:text-primary transition-colors">
<i class="fa fa-play-circle text-xl"></i>
</a>
<a href="mailto:2805137028@qq.com" class="text-gray-400 hover:text-primary transition-colors">
<i class="fa fa-envelope text-xl"></i>
</a>
</div>
</div>
<div class="mt-8 pt-8 border-t border-gray-800 text-center text-gray-500 text-sm">
<p>© 2023 砂糖代理(SGA). 开源免费,仅供学习交流使用。</p>
<p class="mt-2">本项目与游戏官方无关,请勿用于商业用途。</p>
</div>
</div>
</footer>
<!-- 返回顶部按钮 -->
<button id="backToTop" class="fixed bottom-8 right-8 bg-primary/80 hover:bg-primary text-white w-12 h-12 rounded-full flex items-center justify-center shadow-lg transition-all opacity-0 invisible">
<i class="fa fa-arrow-up"></i>
</button>
<script>
// 导航栏滚动效果
const navbar = document.getElementById('navbar');
const backToTop = document.getElementById('backToTop');
window.addEventListener('scroll', () => {
if (window.scrollY > 50) {
navbar.classList.add('bg-dark-light', 'shadow-md');
navbar.classList.remove('bg-glass');
backToTop.classList.remove('opacity-0', 'invisible');
backToTop.classList.add('opacity-100', 'visible');
} else {
navbar.classList.remove('bg-dark-light', 'shadow-md');
navbar.classList.add('bg-glass');
backToTop.classList.add('opacity-0', 'invisible');
backToTop.classList.remove('opacity-100', 'visible');
}
});
// 返回顶部功能
backToTop.addEventListener('click', () => {
window.scrollTo({
top: 0,
behavior: 'smooth'
});
});
// 平滑滚动
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
const targetId = this.getAttribute('href');
const targetElement = document.querySelector(targetId);
if (targetElement) {
const navbarHeight = navbar.offsetHeight;
const targetPosition = targetElement.getBoundingClientRect().top + window.pageYOffset - navbarHeight;
window.scrollTo({
top: targetPosition,
behavior: 'smooth'
});
}
});
});
</script>
</body>
</html>