-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1131 lines (1082 loc) · 60.7 KB
/
Copy pathindex.html
File metadata and controls
1131 lines (1082 loc) · 60.7 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" />
<title>优卡导航 · AI 设计工具导航站 | AI生图/视频/PPT/3D/字体工具大全</title>
<link rel="icon" type="image/png" href="./logo.png" />
<link rel="apple-touch-icon" href="./logo.png" />
<meta name="description" content="优卡导航精选 AI 设计工具与 AI 工具大全:AI 生图(即梦/Midjourney)、视频生成、PPT 模板、3D 模型、字体排版、图片素材一站直达,免费 AI 工具推荐。" />
<meta name="keywords" content="优卡导航, AI工具导航, AI设计工具, AI生图, 即梦AI, Midjourney, 视频生成, 可灵, Runway, PPT模板, 优卡素材库, 3D模型, Tripo, 字体排版, 灵感素材, 图片素材, 设计导航站" />
<meta name="robots" content="index, follow, max-image-preview:large" />
<meta name="theme-color" content="#fcfaf5" />
<link rel="canonical" href="https://youkappt.com/" />
<!-- Open Graph -->
<meta property="og:type" content="website" />
<meta property="og:site_name" content="优卡导航" />
<meta property="og:locale" content="zh_CN" />
<meta property="og:title" content="优卡导航 · AI 设计工具导航站" />
<meta property="og:description" content="优卡导航精选 AI 设计工具与 AI 工具大全:AI 生图(即梦/Midjourney)、视频生成、PPT 模板、3D 模型、字体排版、图片素材一站直达,免费 AI 工具推荐。" />
<meta property="og:url" content="https://youkappt.com/" />
<meta property="og:image" content="https://youkappt.com/og-cover.png" />
<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="优卡导航 · AI 设计工具导航站" />
<meta name="twitter:description" content="优卡导航精选 AI 设计工具与 AI 工具大全:AI 生图(即梦/Midjourney)、视频生成、PPT 模板、3D 模型、字体排版、图片素材一站直达,免费 AI 工具推荐。" />
<meta name="twitter:image" content="https://youkappt.com/og-cover.png" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebSite",
"name": "优卡导航",
"url": "https://youkappt.com/",
"description": "优卡导航精选 AI 设计工具与 AI 工具大全:AI 生图(即梦/Midjourney)、视频生成、PPT 模板、3D 模型、字体排版、图片素材一站直达,免费 AI 工具推荐。",
"inLanguage": "zh-CN",
"potentialAction": {
"@type": "SearchAction",
"target": "https://youkappt.com/?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}
</script>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "优卡导航",
"alternateName": "Youka Nav",
"url": "https://youkappt.com/",
"logo": "https://youkappt.com/logo.png",
"image": "https://youkappt.com/og-cover.png",
"description": "优卡导航精选 AI 设计工具与 AI 工具大全:AI 生图、视频生成、PPT 模板、3D 模型、字体排版、图片素材一站直达,免费 AI 工具推荐。",
"slogan": "发现最好用的 AI 设计工具",
"sameAs": [
"https://www.xiaohongshu.com/user/profile/55e286c0c2bdeb696556a64a"
],
"founder": {
"@type": "Person",
"name": "翁昕耀",
"alternateName": "优卡 / youka",
"sameAs": [
"https://www.xiaohongshu.com/user/profile/55e286c0c2bdeb696556a64a"
]
},
"contactPoint": [
{
"@type": "ContactPoint",
"contactType": "customer support",
"name": "微信公众号:优卡说PPT",
"image": "https://youkappt.com/assets/contact/wechat-gzh-qr.jpg"
},
{
"@type": "ContactPoint",
"contactType": "personal",
"name": "YOUKAPPT",
"image": "https://youkappt.com/assets/contact/wechat-qr-youkappt.jpg"
}
]
}
</script>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,800&family=Inter:wght@400;500;600;700&family=Roboto+Mono:wght@400;500&family=Noto+Sans+SC:wght@400;500;700&display=swap" rel="stylesheet" media="print" onload="this.media='all'" />
<noscript><link href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,800&family=Inter:wght@400;500;600;700&family=Roboto+Mono:wght@400;500&family=Noto+Sans+SC:wght@400;500;700&display=swap" rel="stylesheet" /></noscript>
<style>
:root {
/* Colors — SayBriefly cream/forest system */
--color-forest-ink: #1a3300;
--color-highlighter-yellow: #ffe95c;
--color-cream-paper: #fcfaf5;
--color-pencil-gray: #b6b6b6;
--color-whisper-gray: #f1f1f1;
--color-sticky-note-teal: #a8e5e5;
--color-sticky-note-mint: #d5f5c2;
--color-sticky-note-blush: #f6d0ff;
--color-terracotta: #cb5521;
--color-pure-white: #ffffff;
/* Typography */
--font-display: 'Bricolage Grotesque', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', ui-sans-serif, system-ui, sans-serif;
--font-body: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', ui-sans-serif, system-ui, sans-serif;
--font-mono: 'Roboto Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
/* Spacing */
--page-max-width: 1200px;
--section-gap: 64px;
--card-padding: 24px;
--element-gap: 16px;
/* Radius */
--radius-cards: 12px;
--radius-badges: 9999px;
--radius-inputs: 6px;
--radius-buttons: 6px;
--radius-iconcontainers: 9999px;
--radius-nav: 16px;
/* Shadows */
--shadow-subtle: rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;
--shadow-subtle-2: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.1) 0px 1px 2px -1px;
--shadow-nav-glow: rgba(255, 233, 92, 0.4) 0px 10px 34px 0px, rgba(26, 51, 0, 0.05) 0px 2px 8px 0px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
font-family: var(--font-body);
background-color: var(--color-cream-paper);
color: var(--color-forest-ink);
line-height: 1.5;
-webkit-font-smoothing: antialiased;
overflow-x: hidden;
position: relative;
}
a { color: inherit; text-decoration: none; }
.container { width: 100%; max-width: var(--page-max-width); margin: 0 auto; padding: 0 24px; }
/* Header — floating pill nav */
header {
position: sticky; top: 0; z-index: 50;
padding: 14px 16px 0;
background: transparent;
}
.header-pill {
max-width: var(--page-max-width);
margin: 0 auto;
display: flex; align-items: center; justify-content: space-between; gap: 16px;
background: var(--color-cream-paper);
border: 1px solid var(--color-pencil-gray);
border-radius: var(--radius-nav);
padding: 8px 12px;
box-shadow: var(--shadow-nav-glow);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-body); font-weight: 700; font-size: 18px; color: var(--color-forest-ink); letter-spacing: -0.01em; }
.brand .mark { width: 36px; height: 36px; border-radius: 10px; background: var(--color-highlighter-yellow); display: grid; place-items: center; overflow: hidden; border: 1px solid var(--color-forest-ink); flex-shrink: 0; }
.brand .mark img { width: 100%; height: 100%; object-fit: cover; }
.header-actions { display: flex; gap: 12px; align-items: center; flex: 1; justify-content: flex-end; min-width: 0; }
.header-actions .search-wrap { flex: 1; max-width: 420px; margin: 0; padding: 4px 6px 4px 16px; }
.header-actions .search-wrap input { font-size: 14px; min-width: 0; }
.header-actions .search-btn { padding: 6px 16px; }
/* Buttons */
.cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.btn-primary { display: inline-flex; align-items: center; gap: 8px; background: var(--color-forest-ink); color: var(--color-cream-paper); font-family: var(--font-body); font-weight: 500; font-size: 16px; padding: 14px 32px; border-radius: 6px; border: 1px solid var(--color-forest-ink); cursor: pointer; box-shadow: var(--shadow-subtle); transition: transform 0.2s ease, filter 0.2s ease; }
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-primary .arrow { transition: transform 0.2s ease; }
.btn-primary:hover .arrow { transform: translateX(3px); }
.btn-outline { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--color-forest-ink); font-family: var(--font-body); font-weight: 500; font-size: 16px; padding: 14px 28px; border-radius: 6px; border: 1px solid var(--color-forest-ink); cursor: pointer; transition: background 0.2s ease; }
.btn-outline:hover { background: var(--color-sticky-note-mint); }
/* Tagline badge (eyebrow) */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body); font-weight: 500; font-size: 13px; letter-spacing: 0.04em; text-transform: none; color: var(--color-forest-ink); background: var(--color-highlighter-yellow); border: 1px solid var(--color-forest-ink); border-radius: 6px; padding: 6px 14px; }
.eyebrow svg { width: 14px; height: 14px; }
/* Hero */
.hero { padding: 80px 0 40px; text-align: center; position: relative; }
.hero .wordmark { font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 6vw, 60px); line-height: 1.05; letter-spacing: 0.02em; margin: 24px auto 18px; max-width: 16em; text-wrap: balance; color: var(--color-forest-ink); }
.hero .wordmark .hl { background: var(--color-highlighter-yellow); color: var(--color-forest-ink); padding: 0 0.1em; border-radius: 6px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero .tagline { font-size: clamp(16px, 2.4vw, 20px); color: var(--color-forest-ink); max-width: 600px; margin: 0 auto 28px; line-height: 1.5; opacity: 0.85; }
.hero .cta-row { margin-top: 30px; }
.reassure { font-family: var(--font-mono); font-size: 12px; color: var(--color-forest-ink); opacity: 0.6; margin-top: 16px; letter-spacing: 0.02em; }
.search-wrap { display: flex; gap: 10px; align-items: center; background: var(--color-cream-paper); border: 1px solid var(--color-pencil-gray); border-radius: var(--radius-buttons); padding: 6px 6px 6px 16px; transition: border-color 0.2s ease; }
.search-wrap:focus-within { border-color: var(--color-forest-ink); }
.search-wrap .ico { color: var(--color-forest-ink); display: flex; align-items: center; }
.search-wrap input { flex: 1; background: transparent; border: none; outline: none; color: var(--color-forest-ink); font-family: var(--font-body); font-size: 15px; }
.search-wrap input::placeholder { color: var(--color-pencil-gray); opacity: 0.9; }
.search-btn { border: none; border-radius: var(--radius-buttons); padding: 10px 22px; font-size: 14px; font-weight: 500; font-family: var(--font-body); background: var(--color-forest-ink); color: var(--color-cream-paper); cursor: pointer; transition: transform 0.2s ease, filter 0.2s ease; white-space: nowrap; }
.search-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.hero-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(188px, 1fr)); gap: 20px; max-width: 1040px; margin: 56px auto 0; align-items: stretch; position: relative; z-index: 1; }
.float-card { background: #fff; border: 1px solid var(--color-pencil-gray); border-radius: var(--radius-cards); padding: 22px; text-align: left; transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; min-height: 120px; text-decoration: none; }
.float-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-subtle-2); border-color: var(--color-forest-ink); }
.float-card .fc-ico { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; color: var(--color-forest-ink); margin-bottom: 14px; }
.float-card:nth-child(1) .fc-ico { background: var(--color-sticky-note-mint); }
.float-card:nth-child(2) .fc-ico { background: var(--color-sticky-note-teal); }
.float-card:nth-child(3) .fc-ico { background: var(--color-sticky-note-blush); }
.float-card:nth-child(4) .fc-ico { background: var(--color-highlighter-yellow); }
.float-card:nth-child(5) .fc-ico { background: var(--color-sticky-note-mint); }
.float-card:nth-child(6) .fc-ico { background: var(--color-sticky-note-blush); }
.float-card .fc-title { font-family: var(--font-body); font-weight: 700; font-size: 18px; color: var(--color-forest-ink); margin-bottom: 6px; }
.float-card .fc-desc { font-size: 13px; color: var(--color-forest-ink); opacity: 0.75; line-height: 1.5; }
.hero-deco { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.hero-deco .deco { position: absolute; opacity: 0.09; }
.deco-1 { top: 8%; left: 2%; width: 140px; }
.deco-2 { top: 6%; right: 3%; width: 40px; opacity: 0.07; }
.deco-3 { top: 42%; right: 6%; width: 52px; opacity: 0.06; }
/* Section */
.section { padding-top: var(--section-gap); scroll-margin-top: 90px; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 5vw, 44px); color: var(--color-forest-ink); margin: 16px 0 12px; letter-spacing: 0.02em; line-height: 1.05; }
.section-head p { font-size: 16px; color: var(--color-forest-ink); opacity: 0.8; max-width: 640px; margin: 0 auto; }
.result-count { font-family: var(--font-mono); font-size: 13px; color: var(--color-pencil-gray); margin-top: 14px; letter-spacing: 0.04em; }
.category { margin-bottom: 64px; content-visibility: auto; contain-intrinsic-size: auto 900px; scroll-margin-top: 90px; }
.category-head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; padding-bottom: 14px; border-bottom: 1px solid var(--color-pencil-gray); }
.category-head .cat-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--color-highlighter-yellow); display: grid; place-items: center; color: var(--color-forest-ink); flex-shrink: 0; border: 1px solid var(--color-forest-ink); }
.category-head h3 { font-family: var(--font-display); font-weight: 800; font-size: 24px; color: var(--color-forest-ink); letter-spacing: 0.02em; }
.category-head .cat-en { font-family: var(--font-mono); font-size: 12px; color: var(--color-pencil-gray); letter-spacing: 0.08em; margin-left: auto; text-transform: uppercase; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; contain: layout style; }
.subcategory { margin-top: 28px; }
.subcategory-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.subcategory-head h4 { font-family: var(--font-body); font-weight: 600; font-size: 16px; color: var(--color-forest-ink); }
.subcategory-head::before { content: ""; width: 3px; height: 16px; border-radius: 2px; background: var(--color-terracotta); flex-shrink: 0; }
.subcategory-head .cat-en { font-family: var(--font-mono); font-size: 11px; color: var(--color-pencil-gray); letter-spacing: 0.08em; }
.tool-card { background: #fff; border: 1px solid var(--color-pencil-gray); border-radius: var(--radius-cards); padding: var(--card-padding); transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; text-decoration: none; }
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-subtle-2); border-color: var(--color-forest-ink); }
.tool-card.is-hidden, .category.is-hidden, .subcategory.is-hidden, .sn-link.is-hidden { display: none !important; }
.tool-top { display: flex; align-items: center; gap: 12px; }
.tool-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: #fff; border: 1px solid var(--color-pencil-gray); flex-shrink: 0; padding: 4px; }
.tool-logo-fallback { display: grid; place-items: center; color: var(--color-cream-paper); font-family: var(--font-display); font-weight: 800; font-size: 16px; }
.tool-name { font-family: var(--font-body); font-weight: 600; font-size: 17px; color: var(--color-forest-ink); }
.tool-tag { margin-left: auto; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; letter-spacing: 0.02em; border: 1px solid var(--color-forest-ink); }
.tag-free { color: var(--color-forest-ink); background: var(--color-sticky-note-mint); }
.tag-paid { color: var(--color-forest-ink); background: var(--color-sticky-note-blush); }
.tag-daily { color: var(--color-forest-ink); background: #ffd9a0; }
.tool-desc { font-size: 14px; color: var(--color-forest-ink); opacity: 0.78; line-height: 1.5; flex: 1; }
.no-result { text-align: center; color: var(--color-pencil-gray); font-size: 15px; padding: 60px 0; display: none; }
.notice { max-width: 640px; margin: 30px auto; padding: 20px 24px; border: 1px solid var(--color-pencil-gray); border-radius: var(--radius-cards); background: var(--color-cream-paper); color: var(--color-forest-ink); font-size: 14px; line-height: 1.7; display: none; }
.notice code { font-family: var(--font-mono); color: var(--color-forest-ink); background: var(--color-sticky-note-mint); padding: 2px 6px; border-radius: 4px; }
.loading { text-align: center; color: var(--color-pencil-gray); font-size: 15px; padding: 60px 0; letter-spacing: .03em; }
.cat-nav { margin-top: var(--section-gap); padding: 38px 0 10px; border-top: 1px solid var(--color-pencil-gray); }
.cat-nav.is-seo { /* 视觉隐藏,保留 DOM 给 SEO 爬虫与屏幕阅读器(a11y 标准写法,不被判作弊) */
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.cat-nav .cn-head { font-family: var(--font-display); color: var(--color-forest-ink); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; opacity: .55; margin-bottom: 20px; }
.cn-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px 30px; }
.cn-item { display: flex; flex-direction: column; gap: 7px; }
.cn-link { font-family: var(--font-display); font-weight: 600; color: var(--color-forest-ink); font-size: 15px; text-decoration: none; transition: color .2s; }
.cn-link:hover { color: var(--color-terracotta); }
.cn-tools { font-size: 12px; color: var(--color-forest-ink); opacity: 0.6; line-height: 1.55; }
@media (hover: hover) and (pointer: fine) {
.cn-tools { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .2s ease, opacity .2s ease; }
.cn-item:hover .cn-tools, .cn-item:focus-within .cn-tools { max-height: 320px; opacity: 0.6; }
}
/* Layout: 左侧 sticky 分类导航 + 右侧主内容 */
.layout-grid {
display: grid;
grid-template-columns: 232px minmax(0, 1fr);
gap: 40px;
align-items: start;
margin-top: 8px;
}
.layout-main { min-width: 0; }
/* 侧边导航 */
.side-nav {
position: sticky;
top: 88px; /* header 64 + 24 留白 */
align-self: start;
background: var(--color-whisper-gray);
border: 1px solid var(--color-pencil-gray);
border-radius: var(--radius-cards);
padding: 20px 14px;
box-shadow: var(--shadow-subtle);
max-height: calc(100vh - 112px);
overflow-y: auto;
scrollbar-width: thin;
scrollbar-color: var(--color-pencil-gray) transparent;
}
.side-nav::-webkit-scrollbar { width: 6px; }
.side-nav::-webkit-scrollbar-thumb { background: var(--color-pencil-gray); border-radius: 3px; }
.side-nav::-webkit-scrollbar-track { background: transparent; }
.sn-head {
font-family: var(--font-display);
color: var(--color-forest-ink);
font-size: 12px;
letter-spacing: 0.18em;
text-transform: uppercase;
opacity: 0.55;
margin-bottom: 14px;
padding: 0 10px;
}
.sn-list { list-style: none; margin: 0; padding: 0; }
.sn-item { margin: 10px 0 1px; } /* 父分类之间拉开间距,父与子贴紧成簇 */
.sn-item:first-child { margin-top: 2px; }
.sn-item.is-sub {
margin: 1px 0 1px 30px; /* 子分类缩进加深 */
padding-left: 14px;
border-left: 1px solid var(--color-pencil-gray); /* 左侧细灰连线,显层级 */
}
.sn-link {
position: relative;
display: block;
padding: 7px 12px;
border-radius: var(--radius-inputs);
color: var(--color-forest-ink); /* 父分类:森林墨绿 */
font-size: 15px; /* 父分类:放大 */
font-family: var(--font-body);
font-weight: 700; /* 父分类:加粗 */
line-height: 1.4;
letter-spacing: 0.01em;
transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
cursor: pointer;
user-select: none;
}
/* 父分类左侧薄荷竖条(视觉锚,呼应站点强调色) */
.sn-link::before {
content: '';
position: absolute;
left: 0; top: 50%;
transform: translateY(-50%);
width: 3px; height: 60%;
border-radius: 2px;
background: var(--color-sticky-note-mint); /* 未激活:薄荷 */
transition: background 0.18s ease, height 0.18s ease;
}
.sn-item.is-sub .sn-link::before { display: none; } /* 子分类无竖条 */
.sn-item.is-sub .sn-link {
font-size: 12px; /* 子分类:明显缩小 */
color: var(--color-forest-ink);
opacity: 0.55; /* 子分类:明显变灰 */
font-weight: 400;
padding: 4px 10px;
}
.sn-link:hover { background: var(--color-sticky-note-mint); color: var(--color-forest-ink); }
.sn-link.is-active {
background: var(--color-forest-ink);
color: var(--color-cream-paper);
box-shadow: var(--shadow-subtle);
transform: translateX(2px);
}
.sn-link.is-active::before {
background: var(--color-highlighter-yellow); /* 激活:竖条转荧光黄 */
height: 72%;
}
.sn-item.is-sub .sn-link.is-active {
background: var(--color-forest-ink);
transform: none;
font-weight: 500;
color: var(--color-cream-paper);
opacity: 1;
}
/* 移动端:折叠为顶部横向胶囊 */
@media (max-width: 920px) {
.layout-grid { grid-template-columns: 1fr; gap: 20px; }
.side-nav {
position: static;
max-height: none;
padding: 14px;
overflow-x: auto;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
background: var(--color-whisper-gray);
border: 1px solid var(--color-pencil-gray);
box-shadow: var(--shadow-subtle);
}
.sn-head { display: none; }
.sn-list { display: flex; flex-wrap: nowrap; gap: 8px; padding-bottom: 4px; }
.sn-item { flex: 0 0 auto; margin: 0; }
.sn-item.is-sub { padding-left: 0; border-left: none; margin: 0; }
.sn-link { white-space: nowrap; padding: 6px 14px; font-size: 13px; font-weight: 500; border: 1px solid var(--color-pencil-gray); background: var(--color-cream-paper); color: var(--color-forest-ink); }
.sn-link::before { display: none; }
.sn-item.is-sub .sn-link { font-size: 12px; opacity: 0.7; }
.sn-link.is-active { transform: none; border-color: var(--color-forest-ink); background: var(--color-forest-ink); color: var(--color-cream-paper); }
}
footer { margin-top: var(--section-gap); border-top: 1px solid var(--color-pencil-gray); padding: 40px 0 60px; text-align: center; }
footer .f-brand { font-family: var(--font-display); font-weight: 600; color: var(--color-forest-ink); font-size: 16px; margin-bottom: 10px; }
footer .f-note { font-size: 13px; color: var(--color-forest-ink); opacity: 0.7; }
footer .f-contact { margin-top: 18px; display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
footer .f-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: var(--color-sticky-note-mint); border: 1px solid var(--color-pencil-gray); color: var(--color-forest-ink); font-size: 12px; cursor: pointer; transition: background .2s, border-color .2s; }
footer .f-chip:hover { background: var(--color-highlighter-yellow); border-color: var(--color-forest-ink); }
footer .f-chip svg { width: 13px; height: 13px; }
footer .f-qr-modal { display: none; position: fixed; inset: 0; background: rgba(26,51,0,.55); backdrop-filter: blur(8px); z-index: 9999; align-items: center; justify-content: center; padding: 20px; }
footer .f-qr-modal.is-open { display: flex; }
footer .f-qr-card { background: var(--color-cream-paper); border: 1px solid var(--color-forest-ink); border-radius: 16px; padding: 24px; max-width: 320px; text-align: center; box-shadow: var(--shadow-subtle-2); }
footer .f-qr-card img { max-width: min(280px, 70vw); max-height: 70vh; width: auto; height: auto; border-radius: 10px; background: #fff; padding: 8px; box-sizing: border-box; display: block; margin: 0 auto; }
footer .f-qr-card .f-qr-name { margin-top: 14px; color: var(--color-forest-ink); font-size: 14px; font-weight: 600; }
footer .f-qr-card .f-qr-id { color: var(--color-forest-ink); opacity: 0.7; font-size: 12px; margin-top: 4px; letter-spacing: .5px; }
footer .f-qr-card .f-qr-hint { color: var(--color-forest-ink); opacity: 0.6; font-size: 11px; margin-top: 10px; }
footer .f-qr-card .f-qr-close { margin-top: 14px; color: var(--color-forest-ink); opacity: 0.7; font-size: 11px; cursor: pointer; background: none; border: none; padding: 4px 10px; }
@media (max-width: 720px) {
.hero { padding: 64px 0 24px; }
.hero-cards { grid-template-columns: 1fr; gap: 14px; margin-top: 40px; max-width: 320px; }
.float-card { animation: none; }
.search-btn { padding: 10px 16px; }
.category-head .cat-en { display: none; }
.header-actions .search-count { display: none; }
.header-actions .search-wrap { max-width: 220px; padding: 6px 6px 6px 12px; }
.header-actions .search-btn { padding: 8px 12px; }
}
@media (max-width: 420px) {
.brand span { display: none; }
.header-actions .search-wrap { max-width: none; }
}
.search-count {
font-size: 12px;
color: var(--color-forest-ink);
opacity: 0.6;
margin-left: 10px;
white-space: nowrap;
}
.search-count b { color: var(--color-terracotta); font-weight: 600; }
/* 尊重"减少动态效果"系统偏好:关闭平滑滚动与过渡动画,避免晕动不适 */
@media (prefers-reduced-motion: reduce) {
html { scroll-behavior: auto; }
*, *::before, *::after {
animation-duration: 0.001ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.001ms !important;
scroll-behavior: auto !important;
}
}
</style>
</head>
<body>
<header>
<div class="header-pill">
<a class="brand" href="#top">
<span class="mark"><img src="./logo.png" alt="优卡导航" /></span>
<span>优卡导航</span>
</a>
<div class="header-actions">
<form class="search-wrap" id="searchForm" role="search">
<span class="ico" aria-hidden="true">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"><circle cx="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/></svg>
</span>
<input type="text" id="searchInput" placeholder="搜索工具 / 分类 / 关键词…" autocomplete="off" />
<span id="searchCount" class="search-count"></span>
<button type="submit" class="search-btn">搜索</button>
</form>
</div>
</div>
</header>
<main id="top">
<!-- HERO -->
<section class="hero">
<div class="container">
<div class="hero-deco" aria-hidden="true">
<svg class="deco deco-1" viewBox="0 0 180 60" fill="none" stroke="var(--color-terracotta)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 40 C 30 10, 50 10, 70 35 S 110 60, 130 30 160 20, 175 40"/></svg>
<svg class="deco deco-2" viewBox="0 0 48 48" fill="none" stroke="var(--color-forest-ink)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M24 6 L27 21 L42 24 L27 27 L24 42 L21 27 L6 24 L21 21 Z"/></svg>
<svg class="deco deco-3" viewBox="0 0 64 64" fill="none" stroke="var(--color-forest-ink)" stroke-width="2"><circle cx="32" cy="32" r="22"/><circle cx="32" cy="32" r="4" fill="var(--color-forest-ink)" stroke="none"/></svg>
</div>
<span class="eyebrow"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18h6M10 21h4M12 3a6 6 0 0 0-4 10.5c.7.7 1 1.2 1 2.5h6c0-1.3.3-1.8 1-2.5A6 6 0 0 0 12 3z"/></svg>AI × DESIGN × PPT</span>
<h1 class="wordmark">发现最好用的 <span class="hl">AI 设计工具</span></h1>
<p class="tagline">一站直达精选 AI 工具,覆盖生图、视频、PPT、3D、字体与素材。</p>
<div class="cta-row">
<a class="btn-primary" href="#grid">浏览全部工具 <span class="arrow">→</span></a>
<a class="btn-outline" href="#contact">提交 / 合作</a>
</div>
<p class="reassure">✨ 免费收录 · 数据驱动自动更新 · 无广告纯净体验</p>
<div class="hero-cards" id="heroCards">
<a class="float-card is-static" data-index="0" href="./ppthub/" target="_blank" rel="noopener">
<div class="fc-ico" aria-hidden="true"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="3" y="5" width="18" height="14" rx="3"/><path d="m10 9 5 3-5 3z" fill="currentColor" stroke="none"/></svg></div>
<div class="fc-title">PPT术语图鉴</div>
<div class="fc-desc">用大白话,搞懂 PPT 里那些听着耳熟、说不清的词。</div>
</a>
<a class="float-card is-static" data-index="1" href="./ppt-tips/" target="_blank" rel="noopener">
<div class="fc-ico" aria-hidden="true"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M9 18h6M10 21h4M12 3a6 6 0 0 0-3 11.2V16h6v-1.8A6 6 0 0 0 12 3z"/></svg></div>
<div class="fc-title">PPT 制作技巧</div>
<div class="fc-desc">Before/After 对比 + 分步演示,跟着做就会。</div>
</a>
<a class="float-card is-static" data-index="2" href="./template/" target="_blank" rel="noopener">
<div class="fc-ico" aria-hidden="true"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="3" y="3" width="18" height="18" rx="3"/><path d="M3 9h18M9 21V9"/></svg></div>
<div class="fc-title">优卡的素材库</div>
<div class="fc-desc">PPT模板、图片、技巧,应有尽有。</div>
</a>
<a class="float-card" href="./mockup/" target="_blank" rel="noopener">
<div class="fc-ico" aria-hidden="true"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="3" y="3" width="18" height="18" rx="3"/><circle cx="9" cy="9" r="2"/><path d="m21 15-5-5L5 21"/></svg></div>
<div class="fc-title">PPT作品展示图生成器</div>
<div class="fc-desc">多种版式,自定义调整,一键导出高清大图。</div>
</a>
<a class="float-card" href="./strategy-models/" target="_blank" rel="noopener">
<div class="fc-ico" aria-hidden="true"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="3" y="3" width="7" height="7" rx="1.5"/><rect x="14" y="3" width="7" height="7" rx="1.5"/><rect x="3" y="14" width="7" height="7" rx="1.5"/><rect x="14" y="14" width="7" height="7" rx="1.5"/></svg></div>
<div class="fc-title">战略模型画布</div>
<div class="fc-desc">波特五力、波士顿矩阵…在线填画布,导出 PNG/SVG。</div>
</a>
<a class="float-card" href="./pm-handbook/" target="_blank" rel="noopener">
<div class="fc-ico" aria-hidden="true"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M4 5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2z"/><path d="M12 3v18"/><path d="M8 7h0M8 11h0M8 15h0"/></svg></div>
<div class="fc-title">产品经理手册</div>
<div class="fc-desc">PM 全生命周期实操 + 大厂真实案例 + 标准模板。</div>
</a>
</div>
</div>
</section>
<!-- GRID -->
<section class="section" id="grid">
<div class="container">
<div class="section-head">
<span class="eyebrow">CURATED TOOLS</span>
<h2>AI × 设计 工具箱</h2>
<div class="result-count" id="resultCount"></div>
</div>
<div class="notice" id="notice"></div>
<div class="loading" id="loading">⏳ 正在加载工具列表…</div>
</div>
<div class="container layout-grid">
<aside class="side-nav" aria-label="分类导航">
<div class="sn-head">分类导航</div>
<ul class="sn-list" id="sideNav"></ul>
</aside>
<div class="layout-main">
<div id="categories"></div>
<div class="no-result" id="noResult">没有匹配的工具,换个关键词试试~</div>
</div>
</div>
</section>
</main>
<nav class="cat-nav is-seo" aria-label="全部分类导航">
<div class="container">
<div class="cn-head">按分类浏览 · 全部 AI 设计工具</div>
<ul class="cn-list" id="catNav"></ul>
</div>
</nav>
<footer>
<div class="container">
<div class="f-brand">优卡导航</div>
<div class="f-note">由 优卡 / youka 整理 · 收录 AI+设计 工具 · 数据驱动自动更新</div>
<div class="f-contact" id="contact">
<button class="f-chip" data-qr="wechat-gzh" type="button">
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M9.5 4C5.4 4 2 6.7 2 10.1c0 1.9 1.1 3.6 2.9 4.7L4 17l2.5-1.3c.5.1 1 .2 1.5.2.2 0 .4 0 .6-.1-.1-.5-.2-1-.2-1.5 0-3.5 3.3-6.3 7.4-6.3h.5C15.5 5.7 12.8 4 9.5 4zm-2.8 4.5c.5 0 .9.4.9.9s-.4.9-.9.9-.9-.4-.9-.9.4-.9.9-.9zm5.5 0c.5 0 .9.4.9.9s-.4.9-.9.9-.9-.4-.9-.9.4-.9.9-.9zM15.5 9c-3.6 0-6.5 2.4-6.5 5.5s2.9 5.5 6.5 5.5c.6 0 1.2-.1 1.8-.2L19 21l-.6-1.8c1.5-.9 2.6-2.5 2.6-4.2C21 11.4 18.5 9 15.5 9zm-2 3c.4 0 .7.3.7.7s-.3.7-.7.7-.7-.3-.7-.7.3-.7.7-.7zm4 0c.4 0 .7.3.7.7s-.3.7-.7.7-.7-.3-.7-.7.3-.7.7-.7z"/></svg>
微信公众号:优卡说PPT
</button>
<a class="f-chip" href="https://www.xiaohongshu.com/user/profile/55e286c0c2bdeb696556a64a" target="_blank" rel="noopener">
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M3 6.5C3 4.6 4.6 3 6.5 3h11C19.4 3 21 4.6 21 6.5v11c0 1.9-1.6 3.5-3.5 3.5h-11C4.6 21 3 19.4 3 17.5v-11zM6 8v8h2v-3h2l1.5 3H14l-1.7-3.4c1-.4 1.7-1.3 1.7-2.4 0-1.4-1.1-2.5-2.5-2.5H6zm2 2h2v1H8v-1zm6-2v8h2v-3h2v3h2V8h-2v3h-2V8h-2z"/></svg>
小红书:优卡
</a>
<button class="f-chip" data-qr="wechat-personal" type="button">
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M9.5 4C5.4 4 2 6.7 2 10.1c0 1.9 1.1 3.6 2.9 4.7L4 17l2.5-1.3c.5.1 1 .2 1.5.2.2 0 .4 0 .6-.1-.1-.5-.2-1-.2-1.5 0-3.5 3.3-6.3 7.4-6.3h.5C15.5 5.7 12.8 4 9.5 4zM15.5 9c-3.6 0-6.5 2.4-6.5 5.5s2.9 5.5 6.5 5.5c.6 0 1.2-.1 1.8-.2L19 21l-.6-1.8c1.5-.9 2.6-2.5 2.6-4.2C21 11.4 18.5 9 15.5 9z"/></svg>
个人微信:YOUKAPPT
</button>
</div>
</div>
<div class="f-qr-modal" id="f-qr-modal" role="dialog" aria-hidden="true">
<div class="f-qr-card">
<img id="f-qr-img" src="" alt="二维码" />
<div class="f-qr-name" id="f-qr-name"></div>
<div class="f-qr-id" id="f-qr-id"></div>
<div class="f-qr-hint">长按图片识别 / 截图后用对应 App 扫码</div>
<button class="f-qr-close" type="button" id="f-qr-close">关闭</button>
</div>
</div>
</footer>
<script>
(function(){
var modal = document.getElementById('f-qr-modal');
var img = document.getElementById('f-qr-img');
var name = document.getElementById('f-qr-name');
var idEl = document.getElementById('f-qr-id');
var close = document.getElementById('f-qr-close');
var data = {
'wechat-gzh': { src: 'assets/contact/wechat-gzh-qr.jpg', n: '微信公众号', id: '优卡说PPT', use: '微信扫一扫识别公众号' },
'wechat-personal': { src: 'assets/contact/wechat-qr-youkappt.jpg', n: '个人微信号', id: 'YOUKAPPT', use: '微信扫一扫添加好友' }
};
function open(key) {
var d = data[key]; if (!d) return;
img.src = d.src; name.textContent = d.n; idEl.textContent = d.id;
document.querySelector('.f-qr-card .f-qr-hint').textContent = d.use;
modal.classList.add('is-open');
modal.setAttribute('aria-hidden', 'false');
}
function hide() { modal.classList.remove('is-open'); modal.setAttribute('aria-hidden', 'true'); }
document.querySelectorAll('.f-chip[data-qr]').forEach(function(b){
b.addEventListener('click', function(){ open(b.getAttribute('data-qr')); });
});
close.addEventListener('click', hide);
modal.addEventListener('click', function(e){ if (e.target === modal) hide(); });
document.addEventListener('keydown', function(e){ if (e.key === 'Escape') hide(); });
})();
</script>
<script>
// ---------- Icon + color helpers ----------
const ICONS = {
image: '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="3" y="3" width="18" height="18" rx="3"/><circle cx="9" cy="9" r="2"/><path d="m21 15-5-5L5 21"/></svg>',
video: '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="3" y="5" width="18" height="14" rx="3"/><path d="m10 9 5 3-5 3z" fill="currentColor" stroke="none"/></svg>',
ui: '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="3" y="3" width="18" height="18" rx="3"/><path d="M3 9h18M9 21V9"/></svg>',
font: '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M4 7V5h16v2M9 19h6M12 5v14"/></svg>',
d3: '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M12 2 3 7v10l9 5 9-5V7z"/><path d="M3 7l9 5 9-5M12 12v10"/></svg>',
inspo: '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M12 2a7 7 0 0 0-4 12.7V17h8v-2.3A7 7 0 0 0 12 2zM9 21h6"/></svg>',
default: '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M4 4h16v16H4z"/><path d="M4 9h16M9 9v11"/></svg>'
};
function iconFor(name) {
if (/绘画|图像|图/.test(name)) return ICONS.image;
if (/视频/.test(name)) return ICONS.video;
if (/UI|界面|设计/.test(name)) return ICONS.ui;
if (/字体|排版|字/.test(name)) return ICONS.font;
if (/3D|模型/.test(name)) return ICONS.d3;
if (/灵感|素材/.test(name)) return ICONS.inspo;
return ICONS.default;
}
const PALETTE = ['#1a3300', '#cb5521', '#2f6b5e', '#3a5a1e', '#7a4a8c', '#a8631e', '#355c4a', '#6b4f1e'];
function colorFor(str) {
let h = 0;
for (let i = 0; i < str.length; i++) h = (h * 31 + str.charCodeAt(i)) >>> 0;
return PALETTE[h % PALETTE.length];
}
function initial(name) { return name.replace(/[^\u4e00-\u9fa5A-Za-z0-9]/g, "").charAt(0).toUpperCase(); }
function escapeHtml(s) { return s.replace(/[&<>"']/g, c => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }[c])); }
function toolTagHtml(t) {
if (!t.paid) return '';
let cls = 'tag-free';
if (t.paid === '付费') cls = 'tag-paid';
else if (t.paid === '每日免费额度' || t.paid === '每月免费额度') cls = 'tag-daily';
return '<span class="tool-tag ' + cls + '">' + escapeHtml(t.paid) + '</span>';
}
function catEnHtml(cat) {
return cat.en ? '<span class="cat-en">' + escapeHtml(cat.en) + '</span>' : '';
}
// 所有 logo 已预下载到本地 ./logos/(由 fetch_logos.py 按 官网 apple-touch-icon → icon.horse(180px) → favicone 生成,仅收 ≥48px 高清;其余降级色块)。
// 运行时只引用本地文件,不再请求任何远程服务(抗墙、秒加载)。manifest.json 记录 域名→文件名。
function colorBlock(t) {
return '<div class="tool-logo tool-logo-fallback" style="background:' + escapeHtml(t.color) + '">' + escapeHtml(initial(t.name)) + '</div>';
}
function logoHtml(t) {
const domain = (t.url.match(/\/\/([^/]+)/) || [])[1] || '';
if (!domain) return colorBlock(t);
const file = LOGO_MAP[domain];
if (!file) return colorBlock(t);
return '<img class="tool-logo" src="./logos/' + escapeHtml(file) + '" alt="" loading="lazy" decoding="async"'
+ ' data-color="' + escapeHtml(t.color) + '" data-initial="' + escapeHtml(initial(t.name)) + '" onerror="logoFail(this)">';
}
function logoFail(img) {
var block = document.createElement('div');
block.className = 'tool-logo tool-logo-fallback';
block.style.background = img.dataset.color || '#1a3300';
block.textContent = img.dataset.initial || '';
img.replaceWith(block);
}
// ---------- Parse tools.md ----------
function splitTitle(s) {
let title = s.trim(), en = '';
const m = title.match(/^(.*?)\s*\(([^)]+)\)\s*$/);
if (m) { title = m[1].trim(); en = m[2].trim(); }
return { title, en };
}
function parseMarkdown(md) {
const lines = md.split(/\r?\n/);
const cats = [];
let cur = null; // 当前 ## 分类
let sub = null; // 当前 ### 子分类(属于 cur)
for (const raw of lines) {
const line = raw.trim();
if (!line) continue;
const h3 = line.match(/^###\s+(.*)$/);
if (h3) {
if (!cur) continue; // 无父分类的子分类忽略
const t = splitTitle(h3[1]);
sub = { name: t.title, en: t.en, tools: [] };
cur.subs.push(sub);
continue;
}
const h = line.match(/^##\s+(.*)$/);
if (h) {
const t = splitTitle(h[1]);
cur = { name: t.title, en: t.en, icon: iconFor(t.title), tools: [], subs: [] };
sub = null;
cats.push(cur);
continue;
}
const li = line.match(/^[-*]\s+\[([^\]]+)\]\(([^)]+)\)\s*[—\-::]\s*(.+)$/);
if (li && cur) {
let desc = li[3].trim();
let paid = '';
const pm = desc.match(/\s*[||]\s*(付费|免费|每日免费额度|每月免费额度)\s*$/);
if (pm) { paid = pm[1]; desc = desc.replace(pm[0], '').trim(); }
const tool = { name: li[1].trim(), url: li[2].trim(), desc, paid, color: colorFor(li[1]) };
(sub ? sub.tools : cur.tools).push(tool);
}
}
const rankOf = p => p === '付费' ? 2 : (p === '每日免费额度' || p === '每月免费额度' ? 1 : 0);
const byPaid = (a, b) => rankOf(a.paid) - rankOf(b.paid);
cats.forEach(c => {
c.tools.sort(byPaid);
c.subs.forEach(s => s.tools.sort(byPaid));
});
return cats;
}
// 分类下全部工具(含子分类),供计数/搜索/SEO 使用
function allTools(cat) {
return cat.tools.concat((cat.subs || []).reduce((a, s) => a.concat(s.tools), []));
}
// ---------- Render ----------
let CARD_KEYS = []; // 与卡片渲染顺序一致的搜索键,render 后挂到 DOM(避免 innerHTML 序列化转义问题)
const catsRoot = document.getElementById("categories");
const notice = document.getElementById("notice");
const loading = document.getElementById("loading");
function toolCardHtml(t) {
CARD_KEYS.push((t.name + ' ' + t.desc + ' ' + t.url).toLowerCase());
return '<a class="tool-card" href="' + escapeHtml(t.url) + '" target="_blank" rel="noopener">'
+ '<div class="tool-top">'
+ logoHtml(t)
+ '<div class="tool-name">' + escapeHtml(t.name) + '</div>'
+ toolTagHtml(t)
+ '</div>'
+ '<div class="tool-desc">' + escapeHtml(t.desc) + '</div>'
+ '</a>';
}
async function render(list) {
CARD_KEYS = [];
catsRoot.innerHTML = "";
let total = 0;
const sections = [];
list.forEach(cat => {
const subs = (cat.subs || []).filter(s => s.tools.length);
const count = cat.tools.length + subs.reduce((a, s) => a + s.tools.length, 0);
if (!count) return;
total += count;
const sec = document.createElement("div");
sec.className = "category";
const slug = (cat.en || cat.name).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
if (slug) sec.id = "cat-" + slug;
const cards = cat.tools.map(toolCardHtml).join("");
let html = '<div class="category-head">'
+ '<div class="cat-ico">' + cat.icon + '</div>'
+ '<h3>' + escapeHtml(cat.name) + '</h3>'
+ catEnHtml(cat)
+ '</div>';
if (cards) html += '<div class="grid">' + cards + '</div>';
subs.forEach(s => {
const subSlug = (s.en || s.name).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
html += '<div class="subcategory"' + (subSlug ? ' id="subcat-' + slug + '-' + subSlug + '"' : '') + '>'
+ '<div class="subcategory-head"><h4>' + escapeHtml(s.name) + '</h4>'
+ (s.en ? '<span class="cat-en">' + escapeHtml(s.en) + '</span>' : '')
+ '</div>'
+ '<div class="grid">' + s.tools.map(toolCardHtml).join("") + '</div>'
+ '</div>';
});
sec.innerHTML = html;
sections.push(sec);
});
// 分批 append(每帧 3 个),避免一次性同步长任务阻塞主线程,提升慢设备 INP
const CHUNK = 3;
for (let i = 0; i < sections.length; i += CHUNK) {
const end = Math.min(i + CHUNK, sections.length);
for (let j = i; j < end; j++) catsRoot.appendChild(sections[j]);
if (end < sections.length) await new Promise(r => requestAnimationFrame(r));
}
const _cards = catsRoot.querySelectorAll('.tool-card');
_cards.forEach(function (el, i) { el.dataset.k = CARD_KEYS[i] || ''; });
document.getElementById("resultCount").textContent = list === ALL
? `共收录 ${total} 款工具`
: `匹配到 ${total} 款工具`;
document.getElementById("noResult").style.display = total ? "none" : "block";
}
// ---------- Load (single source of truth: tools.md) ----------
let ALL = [];
let LOGO_MAP = {};
const TOOLS_CACHE_KEY = 'youka_nav_tools_md_v1';
function readToolsCache() {
try {
const raw = localStorage.getItem(TOOLS_CACHE_KEY);
if (!raw) return null;
const obj = JSON.parse(raw);
return (obj && typeof obj.text === 'string') ? obj.text : null;
} catch (e) { return null; }
}
function writeToolsCache(text) {
try { localStorage.setItem(TOOLS_CACHE_KEY, JSON.stringify({ text: text, t: Date.now() })); } catch (e) {}
}
function loadLogoMap() {
return fetch('./logos/manifest.json').then(r => { if (r.ok) return r.json(); throw new Error('bad'); })
.then(j => { LOGO_MAP = j; }).catch(() => { LOGO_MAP = {}; });
}
async function applyData() {
await render(ALL);
injectSEOMeta(ALL);
injectItemList(ALL);
fillCatNav(ALL);
fillSideNav(ALL);
// 应用 URL ?q= 预搜索(让 Schema.org SearchAction / 分享链接真实可用)
try {
const q = new URLSearchParams(location.search).get('q');
if (q) { input.value = q; filter(q); }
} catch (e) {}
}
async function load() {
const cached = readToolsCache();
let rendered = false;
if (cached) {
try {
ALL = parseMarkdown(cached);
if (ALL.length) {
await loadLogoMap(); // 始终加载本地 logo 清单(静态、体积小)
notice.style.display = 'none';
loading.style.display = 'none';
await applyData(); // 有缓存先秒开
rendered = true;
}
} catch (e) { ALL = []; }
}
if (!rendered) { loading.style.display = 'block'; notice.style.display = 'none'; }
// 后台重新校验(stale-while-revalidate):缓存秒开后静默拉取最新
try {
const res = await fetch('./tools.md', { cache: 'no-cache' });
if (!res.ok) throw new Error('HTTP ' + res.status);
const text = await res.text();
if (text === cached) return; // 未变化,缓存已是最新
await loadLogoMap();
writeToolsCache(text);
ALL = parseMarkdown(text);
if (!ALL.length) throw new Error('empty');
notice.style.display = 'none';
loading.style.display = 'none';
await applyData();
} catch (err) {
if (!rendered) {
loading.style.display = 'none';
notice.style.display = 'block';
notice.innerHTML = '⚠️ 未能加载 <code>tools.md</code>(' + escapeHtml(String(err.message || err)) + ')。<br>' +
'浏览器在 <code>file://</code> 直接打开时会拦截本地文件读取。请用本地服务器预览:<br>' +
'在本目录运行 <code>python3 -m http.server 8000</code>,再访问 <code>http://localhost:8000</code>;<br>' +
'或把整个文件夹部署到任意静态托管(GitHub Pages / Vercel / 腾讯云等),即可自动读取并更新。';
catsRoot.innerHTML = '';
}
// 若已用缓存渲染,则静默保留缓存内容(离线也可浏览)
}
}
// ---------- SEO: 动态生成 keywords(随 tools.md 自动增长) ----------
function injectSEOMeta(list) {
const names = [];
list.forEach(c => {
names.push(c.name, c.en);
(c.subs || []).forEach(s => names.push(s.name, s.en));
allTools(c).forEach(t => names.push(t.name));
});
const kw = [...new Set(names)].join(', ');
let m = document.querySelector('meta[name="keywords"]');
if (!m) { m = document.createElement('meta'); m.name = 'keywords'; document.head.appendChild(m); }
m.content = kw;
}
// ---------- SEO: 动态注入 ItemList JSON-LD(让爬虫直接拿到所有工具的结构化数据) ----------
function injectItemList(list) {
const items = [];
let pos = 0;
list.forEach(c => {
allTools(c).forEach(t => {
pos++;
items.push({
"@type": "ListItem",
"position": pos,
"item": {
"@type": "WebApplication",
"name": t.name,
"url": t.url,
"description": t.desc
}
});
});
});
const data = {
"@context": "https://schema.org",
"@type": "ItemList",
"name": "优卡导航 · AI 设计工具收录",
"url": "https://youkappt.com/",
"numberOfItems": pos,
"itemListElement": items
};
const old = document.getElementById('ld-itemlist');
if (old) old.remove();
const s = document.createElement('script');
s.type = 'application/ld+json';
s.id = 'ld-itemlist';
try { s.textContent = JSON.stringify(data); } catch (e) { return; }
document.head.appendChild(s);
}
function fillCatNav(list) {
const nav = document.getElementById("catNav");
if (!nav) return;
nav.innerHTML = list.map(cat => {
const ts = allTools(cat);
if (!ts.length) return '';
const slug = (cat.en || cat.name).toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '');
const names = ts.map(t => escapeHtml(t.name)).join('、');
return '<li class="cn-item"><a class="cn-link" href="#cat-' + slug + '">' + escapeHtml(cat.name) + '</a>'
+ '<span class="cn-tools">' + names + '</span></li>';
}).join('');
}
// ---------- 左侧分类导航(sticky sidebar + 滚动联动) ----------
let sideActive = 'top';
const cssEscape = (s) => (window.CSS && CSS.escape ? CSS.escape(s) : s.replace(/["\\]/g, '\\$&'));
function setSideActive(slug) {
if (slug === sideActive) return;
sideActive = slug;
const nav = document.getElementById("sideNav");
if (!nav) return;
nav.querySelectorAll('.sn-link.is-active').forEach(a => a.classList.remove('is-active'));
let sel = null;
if (slug === 'top') sel = nav.querySelector('.sn-link[data-go="top"]');
else sel = nav.querySelector('.sn-link[data-slug="' + cssEscape(slug) + '"]');
if (sel) {
sel.classList.add('is-active');
// 滚动"可滚动的导航容器"(外层 <aside.side-nav>),而非内层 <ul>——否则激活项不会被带进可视区。
// 只滚容器自身,绝不触发页面纵向滚动(scrollIntoView 会连带拽动 window,
// 在移动端横向导航条下会导致"向下滚动被反复往回拽"的 bug)
const scroller = nav.closest('.side-nav') || nav;
try {
const navRect = scroller.getBoundingClientRect();
const selRect = sel.getBoundingClientRect();
if (scroller.scrollWidth > scroller.clientWidth + 1) { // 移动端:横向导航条 → 横向居中
const delta = (selRect.left + selRect.width / 2) - (navRect.left + navRect.width / 2);
scroller.scrollBy({ left: delta, behavior: 'auto' });
} else if (scroller.scrollHeight > scroller.clientHeight + 1) { // 桌面端:竖直侧栏 → 纵向居中(仅滚容器)
const delta = (selRect.top + selRect.height / 2) - (navRect.top + navRect.height / 2);
scroller.scrollBy({ top: delta, behavior: 'auto' });
}
} catch (e) {}
}
}
function fillSideNav(list) {
const nav = document.getElementById("sideNav");
if (!nav) return;
let html = '<li class="sn-item"><a class="sn-link" href="#grid" data-go="top">全部</a></li>';
list.forEach(cat => {
const subs = (cat.subs || []).filter(s => s.tools.length);
if (!cat.tools.length && !subs.length) return;
const slug = (cat.en || cat.name).toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '');
html += '<li class="sn-item"><a class="sn-link" href="#cat-' + slug + '" data-slug="' + escapeHtml(slug) + '">' + escapeHtml(cat.name) + '</a></li>';
subs.forEach(s => {
const subSlug = (s.en || s.name).toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '');
const fullSlug = slug + '-' + subSlug;
html += '<li class="sn-item is-sub"><a class="sn-link" href="#subcat-' + slug + '-' + subSlug + '" data-slug="' + escapeHtml(fullSlug) + '">' + escapeHtml(s.name) + '</a></li>';
});
});
nav.innerHTML = html;
bindSideNav();
}
function bindSideNav() {
const nav = document.getElementById("sideNav");
if (!nav) return;
nav.querySelectorAll('.sn-link').forEach(a => {
a.addEventListener('click', e => {
e.preventDefault();
if (a.dataset.go === 'top') {
const input = document.getElementById('searchInput');
if (input && input.value) { input.value = ''; filter(''); }
const grid = document.getElementById('grid');
if (grid) window.scrollTo({ top: grid.getBoundingClientRect().top + window.scrollY - 80, behavior: 'smooth' });
return;
}
const target = document.querySelector(a.getAttribute('href'));
if (target) {
const top = target.getBoundingClientRect().top + window.scrollY - 88;
window.scrollTo({ top, behavior: 'smooth' });
}
});
});
setupSideSpy();
}
// 滚动联动:基于各分类区块在视口中的真实位置,取"最后一个已越过阈值线的区块"作为当前高亮项。
// 该写法在页面滚到底部时也能正确联动——滚到底时所有区块 top 都已 <= 阈值,自动选中最后一个(含其子分类)。
let sideSections = [];
let sideTick = false;
const SIDE_THRESHOLD = 140;
function refreshSideSections() {
sideSections = Array.from(document.querySelectorAll('[id^="cat-"], [id^="subcat-"]'));
}
function onSideScroll() {
if (sideTick) return;