-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
1217 lines (1092 loc) · 43 KB
/
index.html
File metadata and controls
1217 lines (1092 loc) · 43 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
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Testanki 的网站</title>
<link rel="stylesheet" href="https://3dtank.com/wp-content/themes/mainsite/style.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
<style>
/* 页面基础布局样式 */
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=M+PLUS+1p:wght@300;400;500;700&display=swap');
.material-symbols-rounded {
font-variation-settings:
'FILL' 0,
'wght' 400,
'GRAD' 0,
'opsz' 24;
font-size: 24px;
display: inline-block;
line-height: 1;
}
/* --- 全局字体设置 --- */
body, button, input, textarea, select {
margin: 0;
font-family: 'Rubik', 'M PLUS 1p', sans-serif;
}
body {
padding-top: 30px;
background-color: #001926;
/* 防止主页面横向滚动 */
overflow-x: hidden;
width: 100%;
}
.logo-container {
width: 100%;
display: flex;
justify-content: center;
margin-bottom: 20px;
}
.logo {
width: 200px;
}
* {
-webkit-tap-highlight-color: transparent;
box-sizing: border-box;
}
.button-row {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 10px;
flex-wrap: wrap;
}
/* --- 按钮样式 --- */
.button {
scrollbar-color: rgba(191, 213, 255, 0.3) rgba(191, 213, 255, 0.1);
scrollbar-width: thin;
-webkit-font-smoothing: antialiased;
position: relative;
border-radius: 6.25rem;
border: none;
padding: 0 3.5rem;
color: rgb(0, 25, 38);
font-size: 1.1rem;
line-height: 1.1rem;
height: 4rem;
letter-spacing: 0.02em;
text-transform: uppercase;
text-decoration: none;
align-self: center;
background-color: #76FF33;
margin: 10px;
display: inline-flex;
justify-content: center;
align-items: center;
font-weight: 700;
cursor: pointer;
transition: all 0.3s ease;
}
.button:hover {
background-color: #62d926;
transform: scale(1.05);
}
.button:active {
background-color: #4caf50;
transform: scale(0.98);
}
/* --- 新闻活动板块样式 --- */
.news-section {
display: flex;
flex-direction: column;
position: relative;
padding-bottom: 5rem;
transition: 0.6s ease-out;
width: 100%;
overflow: hidden; /* 防止父容器溢出 */
}
.news-heading {
margin: 0 0 1rem;
padding-left: 20px;
font-size: 1rem;
font-weight: 500;
text-transform: uppercase;
color: #76FF33;
letter-spacing: 0.0375rem;
}
.news-scroller {
display: flex;
padding-left: 20px;
overflow-x: auto;
padding-bottom: 10px;
-webkit-overflow-scrolling: touch;
/* --- 隐藏横向滚动条的核心代码 --- */
scrollbar-width: none; /* Firefox */
-ms-overflow-style: none; /* IE 10+ */
}
/* 针对 Chrome, Safari, Edge 隐藏横向滚动条 */
.news-scroller::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
}
.news-card {
display: flex;
flex-direction: column;
width: 75vw;
max-width: 270px;
margin-right: 1rem;
text-decoration: none;
flex-shrink: 0;
cursor: pointer;
}
.news-card .image-container {
width: 100%;
border-radius: 1rem;
border: 1px solid rgba(255, 255, 255, 0.25);
position: relative;
margin-bottom: 0.75rem;
overflow: hidden;
transition: border-color 0.3s ease;
}
.news-card .filler {
width: 100%;
padding-top: 56.25%;
}
.news-card .image-wrapper {
position: absolute;
top: 50%;
left: 50%;
width: 99%;
height: 99%;
transform: translate(-50%, -50%);
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: 0.625rem;
overflow: hidden;
}
.news-card img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.3s ease;
}
/* --- 鼠标悬停效果 --- */
.news-card:hover img {
transform: scale(1.05);
}
.news-card:hover .image-container {
border-color: #76FF33;
}
.news-card:hover h3 {
color: #76FF33;
}
.news-card .info {
display: flex;
align-items: center;
color: rgba(255, 255, 255, 0.5);
font-size: 0.75rem;
text-transform: uppercase;
margin-bottom: 0.5rem;
letter-spacing: 0.00375rem;
}
.news-card .date {
margin-right: auto;
font-weight: 500;
}
.news-card .tag {
font-weight: 500;
}
.news-card h3 {
margin: 0;
color: #fff;
font-size: 1.125rem;
font-weight: 500;
text-transform: uppercase;
line-height: 1.2;
transition: color 0.3s ease;
}
/* 查看所有新闻的特殊样式 */
.all-news-overlay {
background: rgba(191, 213, 255, 0.15);
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
}
.all-news-title {
color: rgb(191, 213, 255);
font-size: 1.125rem;
text-transform: uppercase;
text-align: center;
padding: 10px;
}
/* --- 页脚样式 --- */
.footer {
color: rgba(255, 255, 255, 0.6);
font-size: 12px;
margin-bottom: 30px;
text-align: center;
line-height: 1.6;
padding: 0 10px;
}
/* --- 弹窗通用样式 --- */
.popup {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
z-index: 1000;
display: flex;
justify-content: center;
align-items: center;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease, visibility 0.3s ease;
}
.popup.active {
opacity: 1;
visibility: visible;
}
.popup .close-wrapper {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.popup .content {
background: #001926;
border-radius: 1rem;
border: 1px solid rgba(255, 255, 255, 0.15);
position: relative;
z-index: 1001;
max-height: 90vh;
overflow-y: auto;
display: flex;
flex-direction: column;
}
.popup .heading {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1.5rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.popup .heading .title {
color: #fff;
font-size: 1.25rem;
font-weight: 700;
text-transform: uppercase;
}
/* --- 关闭按钮样式 --- */
.close-icon {
width: 1.5rem;
height: 1.5rem;
cursor: pointer;
background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxnIGlkPSJEZWxldGUiIG9wYWNpdHk9IjAuNSI+DQo8cGF0aCBpZD0iVW5pb24iIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMjEgMEwyNCAzTDEyIDE1TDMgMjRMMCAyMUw5IDEyTDAgM0wzIDBMMTIgOUwyMSAwWk0xMiAxNUgxOEwyNCAyMUwyMSAyNEwxMiAxNVoiIGZpbGw9IiNCRkQ1RkYiLz4NCjwvZz4NCjwvc3ZnPg0K");
background-repeat: no-repeat;
background-position: center center;
background-size: contain;
opacity: 0.5;
transition: 0.3s;
margin-left: auto;
}
.close-icon:hover {
opacity: 1;
}
.popup .content .popup-btn-container {
padding: 1.5rem;
display: flex;
flex-direction: column;
gap: 15px;
}
.popup .content .popup-btn-container .button {
margin: 0;
width: 100%;
height: 3rem;
font-size: 0.875rem;
padding: 0 2.25rem;
}
/* --- 新闻弹窗网格布局 --- */
.popup-news-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
gap: 20px;
padding: 20px;
}
.popup-news-grid .news-card {
width: 100%;
max-width: none;
margin-right: 0;
}
/* --- 全屏新闻阅读器样式 --- */
.news-reader-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #001926;
z-index: 9999;
display: flex;
flex-direction: column;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease, visibility 0.3s ease;
}
.news-reader-overlay.active {
opacity: 1;
visibility: visible;
}
/* 阅读器顶部栏 */
.news-reader-header {
width: 100%;
padding: 20px;
display: flex;
background-color: #001926;
z-index: 10000;
flex-shrink: 0;
}
/* 阅读器内容滚动区域 */
.news-reader-scroll-area {
flex: 1;
/* 允许垂直滚动,禁止水平滚动 */
overflow-y: auto;
overflow-x: hidden;
padding: 0 20px 60px 20px;
display: flex;
flex-direction: column;
align-items: center;
/* --- 隐藏垂直滚动条的核心代码 --- */
scrollbar-width: none; /* Firefox */
-ms-overflow-style: none; /* IE 10+ */
}
/* 针对 Chrome, Safari, Edge 隐藏阅读器的垂直滚动条 */
.news-reader-scroll-area::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
}
.news-reader-preview {
width: 100%;
max-width: 700px;
display: flex;
flex-direction: column;
border-radius: 1rem;
border: 1px solid rgba(255, 255, 255, 0.15);
background: #001926;
box-shadow: rgba(0, 0, 0, 0.5) 0px 2.5rem 5rem;
overflow: hidden;
align-items: center;
margin-bottom: 3rem;
color: rgb(0, 0, 0);
flex-shrink: 0;
}
.news-reader-preview .image {
width: 100%;
margin-bottom: 2rem;
position: relative;
}
.news-reader-preview img {
width: 100%;
height: auto;
object-fit: contain;
display: block;
}
.news-reader-preview .tag {
font-size: 0.75rem;
line-height: 1rem;
letter-spacing: 0.0375rem;
text-transform: uppercase;
color: rgb(118, 255, 51);
margin-bottom: 0.75rem;
font-weight: 500;
}
.news-reader-preview h1 {
margin: 0px 0px 2rem;
color: rgb(255, 255, 255);
font-size: 1.5rem;
font-weight: 500;
line-height: 1.3;
text-transform: uppercase;
padding: 0px 1rem;
text-align: center;
}
.news-reader-preview .info {
border-top: 1px solid rgba(255, 255, 255, 0.15);
padding: 0.75rem 2rem;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
}
.news-reader-preview .date {
font-size: 0.75rem;
line-height: 1rem;
letter-spacing: 0.0375rem;
text-transform: uppercase;
color: rgb(191, 213, 255);
font-weight: 500;
}
/* --- 内容区域样式 --- */
.news-reader-content {
display: flex;
flex-direction: column;
padding: 0px 1rem;
font-family: 'Rubik', 'M PLUS 1p', sans-serif;
font-size: 1rem;
line-height: 1.6;
background-color: transparent;
width: 100%;
max-width: 700px;
color: #fff;
}
.news-reader-content p {
margin: 0px 0px 1.5rem;
padding: 0px;
color: rgb(255, 255, 255);
}
/* 确保内容中的图片不超出容器 */
.news-reader-content img,
.news-reader-content video {
max-width: 100%;
height: auto;
}
/* --- 分享区域样式 --- */
.news-share-container {
display: flex;
flex-direction: column; /* 垂直排列 */
align-items: center;
justify-content: center;
margin-top: 2rem;
padding-top: 1.5rem;
border-top: 1px solid rgba(255, 255, 255, 0.1);
cursor: pointer;
opacity: 0.8;
transition: opacity 0.3s;
gap: 10px; /* 文字和图标之间的间距 */
}
.news-share-container:hover {
opacity: 1;
}
/* 图标样式:使用字体图标替换了 SVG */
.news-share-container .icon .material-symbols-rounded {
font-size: 36px; /* 放大图标 */
color: #BFD5FF; /* 设置颜色 */
}
/* 简单的复制成功提示框 */
.toast-notification {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: rgba(0, 25, 38, 0.95);
border: 1px solid #76FF33;
color: #76FF33;
padding: 15px 30px;
border-radius: 8px;
font-size: 14px;
font-weight: 500;
z-index: 20000;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s, visibility 0.3s;
text-transform: uppercase;
pointer-events: none;
}
.toast-notification.show {
opacity: 1;
visibility: visible;
}
</style>
</head>
<body>
<div class="logo-container">
<img src="https://testanki1.github.io/logo.svg" alt="Testanki" class="logo" />
</div>
<!-- 顶部按钮行 -->
<div class="button-row">
<a href="https://testanki1.github.io/servers" class="button" data-translate="server_list">服务器列表</a>
</div>
<!-- 活动新闻板块 (zh-only) -->
<section class="news-section zh-only">
<h2 class="news-heading">公告</h2>
<div class="news-scroller" id="news-container">
<!-- JavaScript 将在这里动态插入前6条新闻 + 查看所有按钮 -->
</div>
</section>
<section class="additional-links">
<div class="links">
<a href="https://space.bilibili.com/1670766752/lists/245461?type=series" class="link" data-translate-link="video_log_link">
<div class="filler"></div>
<div class="content-wrapper">
<div class="image">
<video preload="auto" autoplay="true" loop="true" playsinline="" muted="muted">
<source src="https://web-cdn.tankionline.com/tanki-online/img/videoblog.mp4" type="video/mp4">
</video>
</div>
<div class="info">
<h3 data-translate="video_log_title">视频日志</h3>
<p data-translate="video_log_desc">来自开发领域的最新消息,以视频形式展示。</p>
</div>
</div>
</a>
<a href="https://3dtankwiki.github.io/" class="link" data-translate-link="wiki_link">
<div class="filler"></div>
<div class="content-wrapper">
<div class="image">
<img src="https://tankionline.com/en/wp-content/themes/tanki2023/img/wiki.jpg" alt="">
</div>
<div class="info">
<h3 data-translate="wiki_title">Wiki</h3>
<p data-translate="wiki_desc">3D坦克的知识库,关于游戏的大量信息</p>
</div>
</div>
</a>
<a href="https://testanki1.github.io/ratings" class="link">
<div class="filler"></div>
<div class="content-wrapper">
<div class="image">
<img src="https://tankionline.com/en/wp-content/themes/tanki2023/img/ratings.jpg" alt="">
</div>
<div class="info">
<h3 data-translate="ratings_title">排行榜</h3>
<p data-translate="ratings_desc">个人统计、排行榜和成就系统允许您查看您和其他人的战绩统计数据,争夺每周排行榜的排名,并获得令人难忘的成就“奖牌”</p>
</div>
</div>
</a>
<a href="https://pages.tankionline.com/challenge-accepted?lang=en" class="link">
<div class="filler"></div>
<div class="content-wrapper">
<div class="image">
<img src="https://tankionline.com/en/wp-content/themes/tanki2023/img/challenge-accepted.jpg" alt="">
</div>
<div class="info">
<h3 data-translate="challenge_title">已接受的星级挑战(外服排行榜)</h3>
<p data-translate="challenge_desc">完成 60 个具有挑战性的等级,获得 300 颗星星,并获得有价值的奖励,包括数千颗水晶、堆积如山的道具和幸运礼盒钥匙。</p>
</div>
</div>
</a>
<a href="https://testanki1.github.io/V-LOG_subtitles/search" class="link zh-only">
<div class="filler"></div>
<div class="content-wrapper">
<div class="image">
<img src="https://i.ibb.co/qZ4h8VP/Screenshot-2026-0121-165722.jpg" alt="">
</div>
<div class="info">
<h3>视频日志字幕搜索(中文)</h3>
<p>在往期视频日志字幕中快速查找内容。</p>
</div>
</div>
</a>
<a href="https://testanki1.github.io/alphabet/" class="link">
<div class="filler"></div>
<div class="content-wrapper">
<div class="image">
<img src="https://tankionline.com/en/wp-content/uploads/2025/02/alphabet_1920_1080_web.jpg" alt="">
</div>
<div class="info">
<h3 data-translate="alphabet_title">字母表游戏(英文)</h3>
<p data-translate="alphabet_desc">3D坦克字母表单词解谜与游戏再现。游戏再现:对于每个单词,您可以从一组 16 个可能的字母中选择一个字母。注意:所有单词都与游戏和坦克/战斗有关。</p>
</div>
</div>
</a>
<a href="https://testanki1.github.io/translate" class="link">
<div class="filler"></div>
<div class="content-wrapper">
<div class="image">
<img src="https://s21.ax1x.com/2024/12/15/pAqgnWn.png" alt="">
</div>
<div class="info">
<h3 data-translate="translator_title">物品名称中英互译</h3>
<p data-translate="translator_desc">支持游戏内物品名称的中英互译,包括炮塔、底盘、无人机、道具、防御模块、地图、等级名称等,目前不支持翻译整句。</p>
</div>
</div>
</a>
<!-- 装备图标拼接 -->
<a href="https://testanki1.github.io/augments_icon/custom_splicer" class="link">
<div class="filler"></div>
<div class="content-wrapper">
<div class="image">
<img src="https://s21.ax1x.com/2024/12/15/pAq29k4.jpg" alt="">
</div>
<div class="info">
<h3 data-translate="splicer_title">装备改造图标拼接器</h3>
<p data-translate="splicer_desc">自定义装备改造图标,可将装备与装备改造的图标部分自由组合,可保存为图片,也可保存为矢量图。</p>
</div>
</div>
</a>
<a href="https://testanki1.github.io/models/" class="link">
<div class="filler"></div>
<div class="content-wrapper">
<div class="image">
<img src="https://i.ibb.co/cXtqCrYs/Polish-20260104-174130468.jpg" alt="">
</div>
<div class="info">
<h3 data-translate="models_title">游戏模型展示</h3>
<p data-translate="models_desc">游戏模型展示,可自由组装。</p>
</div>
</div>
</a>
<!-- 网页地图编辑器•重制 -->
<a href="https://testanki1.github.io/maps/editor" class="link">
<div class="filler"></div>
<div class="content-wrapper">
<div class="image">
<img src="https://i.ibb.co/BVt3Wx9h/1000184822.jpg" alt="">
</div>
<div class="info">
<h3 data-translate="map_editor_title">网页地图编辑器•重制</h3>
<p data-translate="map_editor_desc">一个基于网页的地图编辑器,允许您在浏览器中查看和创建地图。(注:目前仍在开发中)</p>
</div>
</div>
</a>
<a href="https://testanki1.github.io/music" class="link">
<div class="filler"></div>
<div class="content-wrapper">
<div class="image">
<img src="https://tankionline.com/en/wp-content/uploads/2024/11/music.jpg" alt="">
</div>
<div class="info">
<h3 data-translate="music_title">音乐</h3>
<p data-translate="music_desc">3D坦克的音乐,包括官方主题音乐、游戏背景音乐、迷你游戏背景音乐。</p>
</div>
</div>
</a>
<a href="https://testanki1.github.io/stickers/" class="link">
<div class="filler"></div>
<div class="content-wrapper">
<div class="image">
<img src="https://ru-cache.tankionline.com/wp-content/uploads/2022/02/image_720.png" alt="">
</div>
<div class="info">
<h3 data-translate="stickers_title">贴纸</h3>
<p data-translate="stickers_desc">3D坦克拥有自己的贴纸!总共有 20 个,它们非常酷!使用这些贴纸并与您的好友分享,让3D坦克与他们更亲近!</p>
</div>
</div>
</a>
<a href="https://drive.google.com/drive/folders/1W8Du0WnT8EdsMBhVjAzp8F5n7-q_IHbK?usp=sharing" class="link">
<div class="filler"></div>
<div class="content-wrapper">
<div class="image">
<img src="https://s21.ax1x.com/2024/12/15/pAqg8wF.png" alt="">
</div>
<div class="info">
<h3 data-translate="promo_title">皮肤、地图宣传视频</h3>
<p data-translate="promo_desc">观看由官方制作的皮肤首发视频与地图特制视频,也可以原画质下载视频保存。</p>
</div>
</div>
</a>
<a href="https://testanki1.github.io/page-icons/" class="link">
<div class="filler"></div>
<div class="content-wrapper">
<div class="image">
<img src="https://s21.ax1x.com/2024/12/15/pAqgQyV.png" alt="">
</div>
<div class="info">
<h3 data-translate="resources_title">网页图标浏览</h3>
<p data-translate="resources_desc">查看游戏内的图标资源,从网页源代码中提取。</p>
</div>
</div>
</a>
<!-- 国服屏蔽词替换器 (zh-only, 位于分析器前) -->
<a href="https://testanki1.github.io/chinese-words-replacer" class="link zh-only">
<div class="filler"></div>
<div class="content-wrapper">
<div class="image">
<img src="https://i.ibb.co/B5Q4yyFD/Screenshot-2026-0202-000655.jpg" alt="">
</div>
<div class="info">
<h3>国服屏蔽词替换器</h3>
<p>解决国服聊天屏蔽词过多导致无法正常交流的问题。</p>
</div>
</div>
</a>
<!-- 中文地图高频词分析 -->
<a href="https://testanki1.github.io/chinese-map-name-analyzer" class="link">
<div class="filler"></div>
<div class="content-wrapper">
<div class="image">
<img src="https://i.ibb.co/Q2P4VbJ/Screenshot-2026-0121-145310.jpg" alt="">
</div>
<div class="info">
<h3 data-translate="map_analysis_title">中文地图高频词分析</h3>
<p data-translate="map_analysis_desc">中文地图高频命名规律探索</p>
</div>
</div>
</a>
<!-- 战斗字体渲染器 -->
<a href="https://testanki1.github.io/font-renderer/" class="link">
<div class="filler"></div>
<div class="content-wrapper">
<div class="image">
<img src="https://i.ibb.co/Xx2Trmp0/Screenshot-2026-0121-145115.jpg" alt="">
</div>
<div class="info">
<h3 data-translate="font_renderer_title">战斗字体渲染器</h3>
<p data-translate="font_renderer_desc">战斗聊天字体渲染,输入内容即可显示结果</p>
</div>
</div>
</a>
</div>
</section>
<!-- 无关页面按钮 -->
<div class="button-row" style="margin-bottom: 3rem;">
<a href="javascript:void(0);" class="button" onclick="togglePopup('unrelated-popup')" data-translate="unrelated_btn">无关工具</a>
</div>
<section class="social-links">
<h2 data-translate="social_title">社交网络</h2>
<div class="social-links-wrapper">
<a href="https://space.bilibili.com/1670766752" class="social-link">
<div class="inner">
<div class="icon">
<img src="https://testanki1.github.io/bilibili.svg" alt="">
</div>
<div class="info">
<div class="name">哔哩哔哩</div>
<p data-translate="social_goto">前往</p>
</div>
</div>
</a>
<a href="https://pd.qq.com/g/3DTankNews" class="social-link">
<div class="inner">
<div class="icon">
<img src="https://testanki1.github.io/qq-pd.svg" alt="">
</div>
<div class="info">
<div class="name">腾讯频道</div>
<p data-translate="social_goto">前往</p>
</div>
</div>
</a>
</div>
</section>
<!-- 更新后的页脚 -->
<div class="footer" data-translate="footer_note">
本站提供与3D坦克游戏相关的内容和工具。<br>
注:本站为玩家制作,与3D坦克官方无关。联系邮箱:testanki@qq.com。
</div>
<!-- 无关页面弹窗 -->
<div class="popup" id="unrelated-popup">
<div class="close-wrapper" onclick="togglePopup('unrelated-popup')"></div>
<div class="content" style="width: auto; min-width: 300px; max-width: 90vw;">
<div class="heading">
<div class="title" data-translate="unrelated_title">无关页面</div>
<div class="close-icon" onclick="togglePopup('unrelated-popup')"></div>
</div>
<div class="popup-btn-container">
<a href="https://testanki1.github.io/video-capture" class="button" data-translate="video_capture">视频帧提取器</a>
<a href="https://testanki1.github.io/html-editor" class="button" data-translate="html_editor">HTML 编辑器</a>
<a href="https://testanki1.github.io/solar-time" class="button" data-translate="solar_time">实时真太阳时</a>
<a href="https://testanki1.github.io/emoji-picker" class="button" data-translate="emoji_picker">Emoji 选择器</a>
</div>
</div>
</div>
<!-- 所有新闻弹窗 -->
<div class="popup" id="all-news-popup">
<div class="close-wrapper" onclick="togglePopup('all-news-popup')"></div>
<div class="content" style="width: 90vw; max-width: 1200px;">
<div class="heading">
<div class="title">所有公告</div>
<div class="close-icon" onclick="togglePopup('all-news-popup')"></div>
</div>
<div class="popup-news-grid" id="popup-news-container">
<!-- JavaScript 将在这里插入所有新闻 -->
</div>
</div>
</div>
<!-- 全屏新闻阅读器 (Full Screen Reader) -->
<div class="news-reader-overlay" id="full-screen-news-reader">
<!-- 顶部栏 (包含原版关闭按钮) -->
<div class="news-reader-header">
<div class="close-icon" onclick="closeNewsReader()"></div>
</div>
<!-- 内容容器 -->
<div class="news-reader-scroll-area">
<div class="news-reader-container" id="news-reader-content">
<!-- 动态插入内容 -->
</div>
</div>
</div>
<!-- 复制成功提示 -->
<div id="toast" class="toast-notification">链接已复制</div>
<script>
// 初始化空数组
let newsData = [];
// --- 异步加载新闻数据 ---
async function fetchNewsData() {
try {
// 请确保 news.json 文件与此 HTML 文件在同一目录下,或者填写正确的 URL
// 添加时间戳参数 ?t=... 以避免浏览器缓存
const response = await fetch('https://testanki1.github.io/news.json?t=' + new Date().getTime());
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
let rawData = await response.json();
// 根据 ID 从大到小排序 (假定 ID 越大新闻越新)
newsData = rawData.sort((a, b) => {
return Number(b.id) - Number(a.id);
});
// 数据加载成功后,渲染页面
renderNews();
renderPopupNews();
// 检查 URL 是否包含 ?p=ID 参数
const urlParams = new URLSearchParams(window.location.search);
const targetId = urlParams.get('p');
if (targetId) {
// 在已排序的数组中查找该 ID 的索引
const index = newsData.findIndex(item => item.id == targetId);
if (index !== -1) {
// 如果找到,自动打开该新闻
openNewsReader(index);
}
}
} catch (error) {
console.error('无法加载新闻数据:', error);
// 可以在这里添加错误提示,例如在页面上显示“加载失败”
}
}
// --- 打开全屏新闻阅读器 ---
function openNewsReader(index) {
const item = newsData[index];
if (!item) return;
const readerOverlay = document.getElementById('full-screen-news-reader');
const readerContainer = document.getElementById('news-reader-content');
const displayTag = item.tag || "新闻";
// 更新 URL 地址栏,添加 ?p=ID,但不刷新页面
const newUrl = new URL(window.location);
newUrl.searchParams.set('p', item.id);
window.history.replaceState({ path: newUrl.href }, '', newUrl.href);
// 格式化内容:如果是纯文本,自动包裹 <p> 并转换换行符
let formattedContent = item.content;
if (!/^\s*<[a-z]/i.test(formattedContent)) {
formattedContent = `<p>${formattedContent.replace(/\n/g, '<br>')}</p>`;
}
// 构建 HTML
// 最后添加分享按钮区域
const html = `
<div class="news-reader-preview">
<div class="image">
<img src="${item.img}" alt="">
</div>
<div class="tag">
<span>${displayTag}</span>
</div>
<h1>${item.title}</h1>
<div class="info">
<div class="date">${item.date}</div>
</div>
</div>
<div class="news-reader-content">
${formattedContent}
<!-- 分享功能区域 -->
<div class="news-share-container" onclick="copyToClipboard('${item.id}')" title="点击复制链接">
<span style="color: rgba(191, 213, 255, 0.4); font-family: Rubik; font-size: 12px; letter-spacing: 0.52px; text-align: center; text-transform: uppercase;">
分享:
</span>
<div class="icon">
<!-- 使用 Material Symbols Rounded 字体图标 -->
<span class="material-symbols-rounded">link</span>
</div>
</div>
</div>
`;
readerContainer.innerHTML = html;
readerOverlay.classList.add('active');
document.body.style.overflow = 'hidden';
}
// --- 复制链接到剪贴板 ---
function copyToClipboard(id) {
// 构建带参数的链接
const origin = window.location.origin;
const pathname = window.location.pathname;
const url = `${origin}${pathname}?p=${id}`;
navigator.clipboard.writeText(url).then(() => {
showToast();
}).catch(err => {
console.error('无法复制链接: ', err);
// 兼容性回退(部分浏览器可能不支持 clipboard API)
const textArea = document.createElement("textarea");
textArea.value = url;
document.body.appendChild(textArea);
textArea.select();
try {
document.execCommand('copy');