hexo-theme-gnix 5.0.3 → 5.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,8 @@
1
- const { Component, Fragment, cacheComponent } = require("../../include/util/common");
1
+ const {
2
+ Component,
3
+ Fragment,
4
+ cacheComponent,
5
+ } = require("../../include/util/common");
2
6
 
3
7
  function isSameLink(a, b) {
4
8
  function santize(url) {
@@ -20,11 +24,11 @@ const renderLinkIcon = (link) => {
20
24
  // start with '<' means svg icon
21
25
  if (link.icon === "travellings") {
22
26
  return (
23
- <svg viewBox="0 0 448 512" role="img" aria-label="Travellings Icon">
24
- <path
25
- fill="var(--text)"
26
- d="M96 0C43 0 0 43 0 96v256c0 48 35.2 87.7 81.1 94.9l-46 46c-7 7-2 19.1 7.9 19.1h39.7c8.5 0 16.6-3.4 22.6-9.4L160 448h128l54.6 54.6c6 6 14.1 9.4 22.6 9.4h39.7c10 0 15-12.1 7.9-19.1l-46-46c46-7.1 81.1-46.9 81.1-94.9V96c0-53-43-96-96-96zM64 128c0-17.7 14.3-32 32-32h80c17.7 0 32 14.3 32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32zm208-32h80c17.7 0 32 14.3 32 32v96c0 17.7-14.3 32-32 32h-80c-17.7 0-32-14.3-32-32v-96c0-17.7 14.3-32 32-32M64 352a32 32 0 1 1 64 0a32 32 0 1 1-64 0m288-32a32 32 0 1 1 0 64a32 32 0 1 1 0-64"
27
- ></path>
27
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
28
+ <title>train_4_line</title>
29
+ <g id="train_4_line" fill="currentColor">
30
+ <path d="M14.72 2a5 5 0 0 1 4.855 3.802l.049.217 1.4 7c.496 2.482-.929 4.83-3.14 5.663l-.21.073L19.6 20.2a1 1 0 0 1-1.095 1.669L18.4 21.8 14.667 19H9.333L5.6 21.8a1 1 0 0 1-1.296-1.518L4.4 20.2l1.926-1.445c-2.26-.735-3.768-3.031-3.39-5.503l.04-.233 1.4-7a5 5 0 0 1 4.68-4.014L9.28 2h5.442Zm0 2H9.28a3 3 0 0 0-2.943 2.412l-1.4 7A3 3 0 0 0 7.88 17h8.242a3 3 0 0 0 2.942-3.588l-1.4-7A3 3 0 0 0 14.72 4m-6.47 9.25a1.25 1.25 0 1 1 0 2.5 1.25 1.25 0 0 1 0-2.5m7.5 0a1.25 1.25 0 1 1 0 2.5 1.25 1.25 0 0 1 0-2.5M14.61 6a1.5 1.5 0 0 1 1.416 1.005l.039.131.75 3a1.5 1.5 0 0 1-1.324 1.858L15.36 12H8.64a1.5 1.5 0 0 1-1.481-1.735l.026-.129.75-3a1.5 1.5 0 0 1 1.319-1.13L9.39 6zm-.39 2H9.78l-.5 2h5.44z"></path>
31
+ </g>
28
32
  </svg>
29
33
  );
30
34
  }
@@ -38,8 +42,13 @@ class Navbar extends Component {
38
42
  return (
39
43
  <nav class="navbar navbar-main" onclick="handleNavbarClick(event);">
40
44
  <div class="navbar-container">
41
- <a href={siteUrl} style={"font-family: homemade-apple; color: var(--text); display: flex; align-items: center; padding: 0 1em;"}>
42
- GnixAij
45
+ <a
46
+ href={siteUrl}
47
+ style={
48
+ "font-family: homemade-apple; color: var(--text); display: flex; align-items: center; padding: 0 1em;"
49
+ }
50
+ >
51
+ GnixAij
43
52
  </a>
44
53
  <div class="navbar-menu">
45
54
  {Object.keys(menu).length ? (
@@ -58,30 +67,14 @@ class Navbar extends Component {
58
67
  <div class="navbar-end">
59
68
  <button
60
69
  type="button"
61
- class="navbar-item theme-selector-trigger"
70
+ class="navbar-item"
62
71
  title="Choose Theme"
63
72
  onclick="window.openThemeModal?.()"
64
73
  >
65
- <svg viewBox="0 0 14 14" role="img" aria-label="Theme Selector">
66
- <g fill="none">
67
- <path
68
- fill="var(--red)"
69
- d="M14 12.5v-3A1.5 1.5 0 0 0 12.5 8H3a3 3 0 1 0 0 6h9.5a1.5 1.5 0 0 0 1.5-1.5"
70
- ></path>
71
- <path
72
- fill="var(--blue)"
73
- d="M12.339 3.783L10.218 1.66a1.5 1.5 0 0 0-2.122 0L.88 8.88a3 3 0 0 0 4.24 4.24l7.218-7.217a1.5 1.5 0 0 0 0-2.121"
74
- ></path>
75
- <path
76
- fill="var(--green)"
77
- d="M4.5 0h-3A1.5 1.5 0 0 0 0 1.5V11a3 3 0 0 0 6 0V1.5A1.5 1.5 0 0 0 4.5 0"
78
- ></path>
79
- <path
80
- fill="var(--base)"
81
- fill-rule="evenodd"
82
- d="M1.395 3.375a.625.625 0 1 0 0 1.25h3.21a.625.625 0 1 0 0-1.25zm0 4.5a.625.625 0 1 0 0 1.25h3.21a.625.625 0 1 0 0-1.25z"
83
- clip-rule="evenodd"
84
- ></path>
74
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
75
+ <title>brightness_fill</title>
76
+ <g id="brightness_fill" fill="currentColor">
77
+ <path d="M12 18.5a1.5 1.5 0 0 1 1.493 1.356L13.5 20v1a1.5 1.5 0 0 1-2.993.144L10.5 21v-1a1.5 1.5 0 0 1 1.5-1.5m4.596-1.904a1.5 1.5 0 0 1 2.008-.103l.114.103.707.707a1.5 1.5 0 0 1-2.008 2.225l-.114-.103-.707-.707a1.5 1.5 0 0 1 0-2.122m-11.314 0a1.5 1.5 0 0 1 2.225 2.008l-.103.114-.707.707a1.5 1.5 0 0 1-2.225-2.008l.103-.114zM12 6a6 6 0 1 1 0 12 6 6 0 0 1 0-12m0 3a3 3 0 0 0-.176 5.995L12 15zm-8 1.5a1.5 1.5 0 0 1 .144 2.993L4 13.5H3a1.5 1.5 0 0 1-.144-2.993L3 10.5zm17 0a1.5 1.5 0 0 1 .144 2.993L21 13.5h-1a1.5 1.5 0 0 1-.144-2.993L20 10.5zM4.575 4.575a1.5 1.5 0 0 1 2.008-.103l.114.103.707.707a1.5 1.5 0 0 1-2.008 2.225l-.114-.103-.707-.707a1.5 1.5 0 0 1 0-2.122m12.728 0a1.5 1.5 0 0 1 2.225 2.008l-.103.114-.707.707a1.5 1.5 0 0 1-2.225-2.008l.103-.114zM12 1.5a1.5 1.5 0 0 1 1.493 1.356L13.5 3v1a1.5 1.5 0 0 1-2.993.144L10.5 4V3A1.5 1.5 0 0 1 12 1.5"></path>
85
78
  </g>
86
79
  </svg>
87
80
  </button>
@@ -109,16 +102,10 @@ class Navbar extends Component {
109
102
  class="navbar-item search"
110
103
  title={searchTitle}
111
104
  >
112
- <svg viewBox="0 0 14 14" role="img" aria-label="Search Icon">
113
- <g fill="none" fill-rule="evenodd" clip-rule="evenodd">
114
- <path
115
- fill="var(--text)"
116
- d="M.5.125a.5.5 0 0 0-.5.5v10a.5.5 0 0 0 .5.5h4.756A4.5 4.5 0 0 1 5 9.625c0-1.271.527-2.42 1.375-3.238v-4.96A2 2 0 0 0 4.5.126zm7.125 1.303v4.105a4.5 4.5 0 0 1 6.347 3.584H14V.625a.5.5 0 0 0-.5-.5h-4a2 2 0 0 0-1.875 1.303"
117
- />
118
- <path
119
- fill="var(--blue)"
120
- d="M7.75 9.625a1.75 1.75 0 1 1 3.5 0a1.75 1.75 0 0 1-3.5 0m1.75-3.25a3.25 3.25 0 1 0 1.706 6.017l1.263 1.263a.75.75 0 0 0 1.06-1.06l-1.262-1.264A3.25 3.25 0 0 0 9.5 6.375"
121
- />
105
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
106
+ <title>search_line</title>
107
+ <g id="search_line" fill="currentColor">
108
+ <path d="M10.5 2a8.5 8.5 0 1 0 5.262 15.176l3.652 3.652a1 1 0 0 0 1.414-1.414l-3.652-3.652A8.5 8.5 0 0 0 10.5 2M4 10.5a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0"></path>
122
109
  </g>
123
110
  </svg>
124
111
  </button>
@@ -29,7 +29,6 @@ class FloatingToc extends Component {
29
29
  stroke-width="2"
30
30
  stroke-linecap="round"
31
31
  stroke-linejoin="round"
32
- aria-label="Table of Contents"
33
32
  >
34
33
  <title>Table of Contents</title>
35
34
  <line x1="8" y1="6" x2="21" y2="6"></line>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-gnix",
3
- "version": "5.0.3",
3
+ "version": "5.0.5",
4
4
  "author": "Efterklang <gaojiaxing0220@gmail.com>",
5
5
  "license": "MIT",
6
6
  "description": "Second generation of Hexo theme Icarus, now with Catppuccin flavor and night mode support.",
@@ -425,7 +425,7 @@ body {
425
425
  top: env(safe-area-inset-top);
426
426
  left: 0;
427
427
  right: 0;
428
- transition: transform 0.3s ease-in-out;
428
+ /* transition: transform 0.3s ease-in-out; */
429
429
  z-index: 100;
430
430
  font-family: var(--font-sans-serif);
431
431
  border-bottom: 0.5px solid var(--surface0);
@@ -437,12 +437,11 @@ body {
437
437
  width: auto;
438
438
  display: flex;
439
439
  min-height: 4rem;
440
- }
441
-
442
- .navbar button {
443
- background: 0 0;
444
- border: none;
445
- cursor: pointer;
440
+ button {
441
+ background: none;
442
+ border: none;
443
+ cursor: pointer;
444
+ }
446
445
  }
447
446
 
448
447
  .navbar-main.navbar--hidden {
@@ -458,8 +457,18 @@ body {
458
457
  position: relative;
459
458
  flex-grow: 0;
460
459
  flex-shrink: 0;
460
+ }
461
+
462
+ .navbar-end {
461
463
  svg {
462
- width: 15px;
464
+ width: 1.2em;
465
+ }
466
+ .navbar-item {
467
+ &:hover {
468
+ scale: 1.1;
469
+ transition: all 0.2s ease;
470
+ color: var(--lavender);
471
+ }
463
472
  }
464
473
  }
465
474
 
@@ -573,16 +582,6 @@ body {
573
582
  opacity: 1;
574
583
  }
575
584
 
576
- .theme-selector-trigger {
577
- cursor: pointer;
578
- transition: all 0.2s ease;
579
-
580
- &:hover {
581
- color: var(--blue);
582
- transform: scale(1.1);
583
- }
584
- }
585
-
586
585
  /* #endregion Theme Selector */
587
586
 
588
587
  /* #region Pagination */
@@ -1315,7 +1314,6 @@ section {
1315
1314
  opacity: 1;
1316
1315
  visibility: visible;
1317
1316
  backdrop-filter: blur(5px);
1318
- -webkit-backdrop-filter: blur(5px);
1319
1317
  }
1320
1318
 
1321
1319
  input.searchbox-input {
@@ -1359,10 +1357,19 @@ input.searchbox-input {
1359
1357
  .searchbox-body {
1360
1358
  flex-grow: 1;
1361
1359
  width: 100%;
1362
- overflow-y: auto;
1363
1360
  border-top: 1px solid var(--base);
1364
1361
  }
1365
1362
 
1363
+ .searchbox-result-section--posts {
1364
+ max-height: 450px;
1365
+ overflow-y: auto;
1366
+ }
1367
+
1368
+ .searchbox-result-section--tags {
1369
+ max-height: 250px;
1370
+ overflow-y: auto;
1371
+ }
1372
+
1366
1373
  .searchbox-result-item,
1367
1374
  .searchbox-result-section header {
1368
1375
  padding: 0.75em 1em;
@@ -126,6 +126,33 @@
126
126
  flex-shrink: 1;
127
127
  }
128
128
 
129
+ .el-textarea__inner {
130
+ display: block;
131
+ resize: vertical;
132
+ padding: 5px 15px;
133
+ line-height: 1.5;
134
+ box-sizing: border-box;
135
+ width: 100%;
136
+ font-size: inherit;
137
+ color: #606266;
138
+ background-color: var(--base);
139
+ border: 1px solid #dcdfe6;
140
+ border-radius: 4px;
141
+ transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
142
+ &::placeholder {
143
+ color: var(--subtext0);
144
+ }
145
+
146
+ &:hover {
147
+ border-color: var(--subtext0);
148
+ }
149
+
150
+ &:focus {
151
+ outline: 0;
152
+ border-color: var(--blue);
153
+ }
154
+ }
155
+
129
156
  .tk-input-image {
130
157
  display: none;
131
158
  }
@@ -187,6 +214,14 @@
187
214
  align-items: center;
188
215
  }
189
216
 
217
+ .tk-action-icon {
218
+ display: inline-block;
219
+ height: 1em;
220
+ width: 1em;
221
+ line-height: 0;
222
+ color: var(--blue);
223
+ }
224
+
190
225
  .tk-action-link .tk-action-icon-solid {
191
226
  display: none;
192
227
  }
@@ -208,14 +243,6 @@
208
243
  line-height: 1.5rem;
209
244
  }
210
245
 
211
- .tk-action-icon {
212
- display: inline-block;
213
- height: 1em;
214
- width: 1em;
215
- line-height: 0;
216
- color: var(--blue);
217
- }
218
-
219
246
  .tk-main {
220
247
  flex: 1;
221
248
  width: 0;
@@ -506,13 +533,11 @@
506
533
  padding: 0;
507
534
  height: 28px;
508
535
  text-align: center;
509
- -moz-appearance: textfield;
510
536
  appearance: textfield;
511
537
  }
512
538
 
513
539
  .tk-pagination .el-input .el-input__inner::-webkit-inner-spin-button,
514
540
  .tk-pagination .el-input .el-input__inner::-webkit-outer-spin-button {
515
- -webkit-appearance: none;
516
541
  appearance: none;
517
542
  margin: 0;
518
543
  }
@@ -594,17 +619,17 @@
594
619
  padding-right: 0.5em;
595
620
  }
596
621
 
597
- .tk-admin-config-groups .tk-admin-config-group,
598
- .tk-admin-config-groups .tk-admin-config-group-title {
599
- background: transparent;
600
- }
601
-
602
622
  .tk-admin-config-group-title {
603
623
  margin-top: 1em;
604
624
  font-size: 1.25rem;
605
625
  font-weight: bold;
606
626
  }
607
627
 
628
+ .tk-admin-config-groups .tk-admin-config-group,
629
+ .tk-admin-config-groups .tk-admin-config-group-title {
630
+ background: transparent;
631
+ }
632
+
608
633
  .tk-admin-config-item {
609
634
  display: grid;
610
635
  align-items: center;
@@ -827,16 +852,13 @@
827
852
  color: currentColor;
828
853
  background-color: transparent;
829
854
  border-color: hsl(from var(--surface1) h s l / 0.31);
830
- }
831
855
 
832
- .twikoo .el-input__inner:hover,
833
- .twikoo .el-textarea__inner:hover {
834
- border-color: hsl(from var(--surface1) h s l / 0.5);
835
- }
836
-
837
- .twikoo .el-input__inner:focus,
838
- .twikoo .el-textarea__inner:focus {
839
- border-color: var(--blue);
856
+ &:hover {
857
+ border-color: hsl(from var(--surface1) h s l / 0.5);
858
+ }
859
+ &:focus {
860
+ border-color: var(--blue);
861
+ }
840
862
  }
841
863
 
842
864
  .twikoo .el-button:not(.el-button--primary):not(.el-button--text) {
@@ -889,16 +911,9 @@
889
911
  */
890
912
 
891
913
  .OwO {
892
- -webkit-user-select: none;
893
- -moz-user-select: none;
894
- -ms-user-select: none;
895
914
  user-select: none;
896
915
  }
897
916
 
898
- .OwO.OwO-open .OwO-body {
899
- display: block;
900
- }
901
-
902
917
  .OwO .OwO-logo {
903
918
  width: 1.125em;
904
919
  display: flex;
@@ -918,6 +933,10 @@
918
933
  z-index: 1000;
919
934
  }
920
935
 
936
+ .OwO.OwO-open .OwO-body {
937
+ display: block;
938
+ }
939
+
921
940
  .night .OwO .OwO-body,
922
941
  .darkmode .OwO .OwO-body,
923
942
  .DarkMode .OwO .OwO-body,
@@ -928,9 +947,6 @@
928
947
  }
929
948
 
930
949
  .OwO .OwO-body .OwO-items {
931
- -webkit-user-select: none;
932
- -moz-user-select: none;
933
- -ms-user-select: none;
934
950
  user-select: none;
935
951
  display: none;
936
952
  padding: 10px;
@@ -948,7 +964,6 @@
948
964
  font-size: 12px;
949
965
  line-height: 14px;
950
966
  cursor: pointer;
951
- -webkit-transition: 0.3s;
952
967
  transition: 0.3s;
953
968
  text-align: center;
954
969
  }
@@ -1035,7 +1050,6 @@
1035
1050
 
1036
1051
  .OwO .OwO-body .OwO-bar .OwO-packages .OwO-package-active {
1037
1052
  background-color: rgba(144, 147, 153, 0.13);
1038
- -webkit-transition: 0.3s;
1039
1053
  transition: 0.3s;
1040
1054
  }
1041
1055
 
@@ -1045,20 +1059,16 @@
1045
1059
  white-space: nowrap;
1046
1060
  cursor: pointer;
1047
1061
  background: var(--base);
1048
- border: 1px solid #dcdfe6;
1049
- color: #606266;
1050
- -webkit-appearance: none;
1062
+ border: 1px solid var(--surface0);
1063
+ color: var(--subtext1);
1064
+
1051
1065
  text-align: center;
1052
- -webkit-box-sizing: border-box;
1053
1066
  box-sizing: border-box;
1054
1067
  outline: 0;
1055
1068
  margin: 0;
1056
- -webkit-transition: 0.1s;
1057
1069
  transition: 0.1s;
1058
1070
  font-weight: 500;
1059
- -moz-user-select: none;
1060
- -webkit-user-select: none;
1061
- -ms-user-select: none;
1071
+ user-select: none;
1062
1072
  padding: 12px 20px;
1063
1073
  font-size: 14px;
1064
1074
  border-radius: 4px;
@@ -1624,8 +1634,6 @@
1624
1634
  .el-input__inner,
1625
1635
  .el-textarea__inner {
1626
1636
  background-image: none;
1627
- -webkit-box-sizing: border-box;
1628
- -webkit-transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
1629
1637
  }
1630
1638
 
1631
1639
  .el-textarea {
@@ -1636,46 +1644,6 @@
1636
1644
  font-size: 14px;
1637
1645
  }
1638
1646
 
1639
- .el-textarea__inner {
1640
- display: block;
1641
- resize: vertical;
1642
- padding: 5px 15px;
1643
- line-height: 1.5;
1644
- box-sizing: border-box;
1645
- width: 100%;
1646
- font-size: inherit;
1647
- color: #606266;
1648
- background-color: var(--base);
1649
- border: 1px solid #dcdfe6;
1650
- border-radius: 4px;
1651
- transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
1652
- }
1653
-
1654
- .el-textarea__inner::-webkit-input-placeholder {
1655
- color: var(--subtext0);
1656
- }
1657
-
1658
- .el-textarea__inner:-ms-input-placeholder {
1659
- color: var(--subtext0);
1660
- }
1661
-
1662
- .el-textarea__inner::-ms-input-placeholder {
1663
- color: var(--subtext0);
1664
- }
1665
-
1666
- .el-textarea__inner::placeholder {
1667
- color: var(--subtext0);
1668
- }
1669
-
1670
- .el-textarea__inner:hover {
1671
- border-color: var(--subtext0);
1672
- }
1673
-
1674
- .el-textarea__inner:focus {
1675
- outline: 0;
1676
- border-color: var(--blue);
1677
- }
1678
-
1679
1647
  .el-textarea .el-input__count {
1680
1648
  color: #909399;
1681
1649
  background: var(--base);
@@ -1755,7 +1723,6 @@
1755
1723
  color: var(--subtext0);
1756
1724
  font-size: 14px;
1757
1725
  cursor: pointer;
1758
- -webkit-transition: color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
1759
1726
  transition: color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
1760
1727
  }
1761
1728
 
@@ -1766,7 +1733,6 @@
1766
1733
  .el-input .el-input__count {
1767
1734
  height: 100%;
1768
1735
  display: inline-flex;
1769
- -webkit-box-align: center;
1770
1736
  -ms-flex-align: center;
1771
1737
  align-items: center;
1772
1738
  color: #909399;
@@ -1789,7 +1755,6 @@
1789
1755
  }
1790
1756
 
1791
1757
  .el-input__inner {
1792
- -webkit-appearance: none;
1793
1758
  background-color: var(--base);
1794
1759
  border-radius: 4px;
1795
1760
  border: 1px solid #dcdfe6;
@@ -1818,18 +1783,6 @@
1818
1783
  display: none;
1819
1784
  }
1820
1785
 
1821
- .el-input__inner::-webkit-input-placeholder {
1822
- color: var(--subtext0);
1823
- }
1824
-
1825
- .el-input__inner:-ms-input-placeholder {
1826
- color: var(--subtext0);
1827
- }
1828
-
1829
- .el-input__inner::-ms-input-placeholder {
1830
- color: var(--subtext0);
1831
- }
1832
-
1833
1786
  .el-input__inner::placeholder {
1834
1787
  color: var(--subtext0);
1835
1788
  }
@@ -1858,7 +1811,6 @@
1858
1811
  height: 100%;
1859
1812
  width: 25px;
1860
1813
  text-align: center;
1861
- -webkit-transition: all 0.3s;
1862
1814
  transition: all 0.3s;
1863
1815
  line-height: 40px;
1864
1816
  }
@@ -1882,9 +1834,6 @@
1882
1834
  cursor: not-allowed;
1883
1835
  }
1884
1836
 
1885
- .el-input.is-disabled .el-input__inner::-webkit-input-placeholder,
1886
- .el-input.is-disabled .el-input__inner:-ms-input-placeholder,
1887
- .el-input.is-disabled .el-input__inner::-ms-input-placeholder,
1888
1837
  .el-input.is-disabled .el-input__inner::placeholder {
1889
1838
  color: var(--subtext1);
1890
1839
  }
@@ -2079,12 +2028,10 @@
2079
2028
  .el-loading-spinner .circular {
2080
2029
  height: 42px;
2081
2030
  width: 42px;
2082
- -webkit-animation: loading-rotate 2s linear infinite;
2083
2031
  animation: loading-rotate 2s linear infinite;
2084
2032
  }
2085
2033
 
2086
2034
  .el-loading-spinner .path {
2087
- -webkit-animation: loading-dash 1.5s ease-in-out infinite;
2088
2035
  animation: loading-dash 1.5s ease-in-out infinite;
2089
2036
  stroke-dasharray: 90, 150;
2090
2037
  stroke-dashoffset: 0;
@@ -2104,7 +2051,6 @@
2104
2051
 
2105
2052
  @keyframes loading-rotate {
2106
2053
  100% {
2107
- -webkit-transform: rotate(360deg);
2108
2054
  transform: rotate(360deg);
2109
2055
  }
2110
2056
  }
@@ -143,6 +143,7 @@ function loadInsight(config, translation) {
143
143
  .join("");
144
144
 
145
145
  const sectionEl = section(sectionTitle);
146
+ sectionEl.classList.add(`searchbox-result-section--${type.toLowerCase()}`);
146
147
  sectionEl.insertAdjacentHTML("beforeend", itemsHTML);
147
148
  return sectionEl;
148
149
  }
@@ -210,11 +211,8 @@ function loadInsight(config, translation) {
210
211
  results.push({ item, weight: w });
211
212
  }
212
213
  }
213
- // 排序并取 Top 5
214
- return results
215
- .sort((a, b) => b.weight - a.weight)
216
- .map((r) => r.item)
217
- .slice(0, 5);
214
+ // 排序返回全部结果(由 CSS 控制显示高度和滚动)
215
+ return results.sort((a, b) => b.weight - a.weight).map((r) => r.item);
218
216
  };
219
217
 
220
218
  return {
@@ -242,15 +240,20 @@ function loadInsight(config, translation) {
242
240
 
243
241
  function scrollTo(item) {
244
242
  if (!item) return;
245
- const wrapperHeight = container.clientHeight;
246
- const itemTop = item.offsetTop;
243
+ // 找到item所在的可滚动section
244
+ const section = item.closest(".searchbox-result-section");
245
+ if (!section) return;
246
+
247
+ const sectionHeight = section.clientHeight;
248
+ const itemTop = item.offsetTop - section.offsetTop;
247
249
  const itemHeight = item.clientHeight;
248
- const scrollTop = container.scrollTop;
249
- if (itemTop + itemHeight > scrollTop + wrapperHeight) {
250
- container.scrollTop = itemTop + itemHeight - wrapperHeight;
250
+ const scrollTop = section.scrollTop;
251
+
252
+ if (itemTop + itemHeight > scrollTop + sectionHeight) {
253
+ section.scrollTop = itemTop + itemHeight - sectionHeight;
251
254
  }
252
255
  if (itemTop < scrollTop) {
253
- container.scrollTop = itemTop;
256
+ section.scrollTop = itemTop;
254
257
  }
255
258
  }
256
259