Commit 0fe6e32ea6

0fe6e32ea6951ecd00436140a151d0364b1df86c

parent: 97d4ffe9ee

Unsigned

Duck <57977673+woducku@users.noreply.github.com> · 2026-06-27 14:07 UTC

visual refresh for settings card

Layout: unified · split

docs/.vitepress/theme/components/HomeFeatures.vue +71 −30
@@ -1,6 +1,5 @@
1<script setup lang="ts"> 1<script setup lang="ts">
2import { computed, nextTick, onMounted, ref, watch } from 'vue' 2import { computed, nextTick, onMounted, ref, watch } from 'vue'
3import { Columns3, LayoutList } from 'lucide-vue-next'
4import type { HomeCard } from '../../configs/constants' 3import type { HomeCard } from '../../configs/constants'
5 4
6const props = defineProps<{ cards: HomeCard[] }>() 5const props = defineProps<{ cards: HomeCard[] }>()
@@ -367,6 +366,9 @@ function onHandlePointerUp() {
367 <button class="tool-btn" aria-label="Hide all" @click="hideAll"> 366 <button class="tool-btn" aria-label="Hide all" @click="hideAll">
368 <span class="i-lucide-eye-off" /> 367 <span class="i-lucide-eye-off" />
369 </button> 368 </button>
369 <button class="tool-btn" aria-label="Reset to default" @click="resetDefaults">
370 <span class="i-lucide-refresh-ccw" />
371 </button>
370 </div> 372 </div>
371 <div class="foot-group"> 373 <div class="foot-group">
372 <div class="settings-wrap"> 374 <div class="settings-wrap">
@@ -375,7 +377,7 @@ function onHandlePointerUp() {
375 <div class="dropdown-section"> 377 <div class="dropdown-section">
376 <div class="dropdown-section-header"> 378 <div class="dropdown-section-header">
377 <span class="dropdown-label"> 379 <span class="dropdown-label">
378 <LayoutList :size="10" stroke-width="2.5" /> 380 <span class="i-lucide-layout-list dropdown-label-icon" />
379 View 381 View
380 </span> 382 </span>
381 <button type="button" class="settings-help-btn" :class="{ active: activeHelpSection === 'view' }" aria-label="View help" @click.stop="toggleHelpSection('view', $event)"> 383 <button type="button" class="settings-help-btn" :class="{ active: activeHelpSection === 'view' }" aria-label="View help" @click.stop="toggleHelpSection('view', $event)">
@@ -390,7 +392,7 @@ function onHandlePointerUp() {
390 <div class="dropdown-section"> 392 <div class="dropdown-section">
391 <div class="dropdown-section-header"> 393 <div class="dropdown-section-header">
392 <span class="dropdown-label"> 394 <span class="dropdown-label">
393 <Columns3 :size="10" stroke-width="2.5" /> 395 <span class="i-lucide-columns-3-cog dropdown-label-icon" />
394 Columns 396 Columns
395 </span> 397 </span>
396 <button type="button" class="settings-help-btn" :class="{ active: activeHelpSection === 'columns' }" aria-label="Columns help" @click.stop="toggleHelpSection('columns', $event)"> 398 <button type="button" class="settings-help-btn" :class="{ active: activeHelpSection === 'columns' }" aria-label="Columns help" @click.stop="toggleHelpSection('columns', $event)">
@@ -412,9 +414,6 @@ function onHandlePointerUp() {
412 <span class="i-lucide-settings-2" /> 414 <span class="i-lucide-settings-2" />
413 </button> 415 </button>
414 </div> 416 </div>
415 <button class="tool-btn" aria-label="Reset to default" @click="resetDefaults">
416 <span class="i-lucide-refresh-ccw" />
417 </button>
418 </div> 417 </div>
419 </div> 418 </div>
420 </div> 419 </div>
@@ -443,28 +442,40 @@ function onHandlePointerUp() {
443 <p class="sh-desc">Controls how cards are displayed on the homepage.</p> 442 <p class="sh-desc">Controls how cards are displayed on the homepage.</p>
444 <div class="sh-options"> 443 <div class="sh-options">
445 <div class="sh-option"> 444 <div class="sh-option">
446 <strong>Default</strong> 445 <strong>
446 <span class="i-lucide-layout-grid sh-option-icon" />
447 Default
448 </strong>
447 <span>Full card with icon, title, and description.</span> 449 <span>Full card with icon, title, and description.</span>
448 </div> 450 </div>
449 <div class="sh-option"> 451 <div class="sh-option">
450 <strong>Mini</strong> 452 <strong>
453 <span class="i-lucide-rows-3 sh-option-icon" />
454 Mini
455 </strong>
451 <span>Compact row with icon and title only.</span> 456 <span>Compact row with icon and title only.</span>
452 </div> 457 </div>
453 </div> 458 </div>
454 </template> 459 </template>
455 <template v-else-if="activeHelpSection === 'columns'"> 460 <template v-else-if="activeHelpSection === 'columns'">
456 <h4 class="sh-title"> 461 <h4 class="sh-title">
457 <span class="i-lucide-columns-3 sh-title-icon" /> 462 <span class="i-lucide-columns-3-cog sh-title-icon" />
458 Columns 463 Columns
459 </h4> 464 </h4>
460 <p class="sh-desc">Controls how many columns the card grid uses.</p> 465 <p class="sh-desc">Controls how many columns the card grid uses.</p>
461 <div class="sh-options"> 466 <div class="sh-options">
462 <div class="sh-option"> 467 <div class="sh-option">
463 <strong>Default</strong> 468 <strong>
469 <span class="i-lucide-columns-2 sh-option-icon" />
470 Default
471 </strong>
464 <span>Adapts automatically based on the number of cards.</span> 472 <span>Adapts automatically based on the number of cards.</span>
465 </div> 473 </div>
466 <div class="sh-option"> 474 <div class="sh-option">
467 <strong>Max</strong> 475 <strong>
476 <span class="i-lucide-columns-3 sh-option-icon" />
477 Max
478 </strong>
468 <span>Always uses the maximum number of columns based on screen resolution.</span> 479 <span>Always uses the maximum number of columns based on screen resolution.</span>
469 </div> 480 </div>
470 </div> 481 </div>
@@ -672,6 +683,12 @@ function onHandlePointerUp() {
672 touch-action: none; 683 touch-action: none;
673} 684}
674 685
686@media (max-width: 767px) {
687 .backdrop {
688 align-items: stretch;
689 }
690}
691
675/* ── Panel ── */ 692/* ── Panel ── */
676.panel { 693.panel {
677 width: min(520px, calc(100vw - 32px)); 694 width: min(520px, calc(100vw - 32px));
@@ -683,6 +700,17 @@ function onHandlePointerUp() {
683 background: var(--vp-c-bg); 700 background: var(--vp-c-bg);
684} 701}
685 702
703@media (max-width: 767px) {
704 .panel {
705 width: 100vw;
706 height: 100vh;
707 height: 100dvh;
708 max-height: none;
709 border-radius: 0;
710 border: none;
711 }
712}
713
686@media (min-width: 768px) { 714@media (min-width: 768px) {
687 .panel { width: min(720px, calc(100vw - 32px)); } 715 .panel { width: min(720px, calc(100vw - 32px)); }
688} 716}
@@ -1048,7 +1076,7 @@ function onHandlePointerUp() {
1048.home-help-popup { 1076.home-help-popup {
1049 position: fixed; 1077 position: fixed;
1050 z-index: 9999; 1078 z-index: 9999;
1051 width: 220px; 1079 width: 280px;
1052 background: var(--vp-c-bg-elv); 1080 background: var(--vp-c-bg-elv);
1053 border: 1px solid var(--vp-c-divider); 1081 border: 1px solid var(--vp-c-divider);
1054 border-radius: 12px; 1082 border-radius: 12px;
@@ -1071,23 +1099,23 @@ function onHandlePointerUp() {
1071 display: flex; 1099 display: flex;
1072 align-items: center; 1100 align-items: center;
1073 gap: 6px; 1101 gap: 6px;
1074 font-size: 0.875rem; 1102 font-size: 1rem;
1075 font-weight: 600; 1103 font-weight: 600;
1076 color: var(--vp-c-text-1); 1104 color: var(--vp-c-text-1);
1077 margin: 0 0 6px; 1105 margin: 0 0 4px;
1078} 1106}
1079 1107
1080.sh-title-icon { 1108.sh-title-icon {
1081 flex-shrink: 0; 1109 flex-shrink: 0;
1082 opacity: 0.8; 1110 width: 16px;
1083 width: 14px; 1111 height: 16px;
1084 height: 14px; 1112 display: block;
1085} 1113}
1086 1114
1087.sh-desc { 1115.sh-desc {
1088 font-size: 0.78rem; 1116 font-size: 0.875rem;
1089 color: var(--vp-c-text-2); 1117 color: var(--vp-c-text-2);
1090 margin: 0 0 10px; 1118 margin: 0 0 6px;
1091 line-height: 1.5; 1119 line-height: 1.5;
1092} 1120}
1093 1121
@@ -1100,20 +1128,29 @@ function onHandlePointerUp() {
1100.sh-option { 1128.sh-option {
1101 display: flex; 1129 display: flex;
1102 flex-direction: column; 1130 flex-direction: column;
1103 gap: 2px; 1131 gap: 4px;
1104 background: var(--vp-c-bg-soft); 1132 background: var(--vp-c-bg-soft);
1105 border-radius: 6px; 1133 border-radius: 12px;
1106 padding: 7px 9px; 1134 padding: 10px 12px;
1107} 1135}
1108 1136
1109.sh-option strong { 1137.sh-option strong {
1110 font-size: 0.78rem; 1138 display: flex;
1139 align-items: center;
1140 gap: 4px;
1141 font-size: 0.875rem;
1111 font-weight: 600; 1142 font-weight: 600;
1112 color: var(--vp-c-text-1); 1143 color: var(--vp-c-text-1);
1113} 1144}
1114 1145
1146.sh-option-icon {
1147 width: 14px;
1148 height: 14px;
1149 flex-shrink: 0;
1150}
1151
1115.sh-option span { 1152.sh-option span {
1116 font-size: 0.74rem; 1153 font-size: 0.875rem;
1117 color: var(--vp-c-text-2); 1154 color: var(--vp-c-text-2);
1118 line-height: 1.4; 1155 line-height: 1.4;
1119} 1156}
@@ -1151,15 +1188,19 @@ function onHandlePointerUp() {
1151.dropdown-label { 1188.dropdown-label {
1152 display: flex; 1189 display: flex;
1153 align-items: center; 1190 align-items: center;
1154 gap: 4px; 1191 gap: 6px;
1155 font-size: 11.5px; 1192 font-size: 14px;
1156 font-weight: 600; 1193 font-weight: 500;
1157 text-transform: uppercase; 1194 color: var(--vp-c-text-1);
1158 letter-spacing: 0.06em;
1159 color: var(--vp-c-text-3, var(--vp-c-text-2));
1160 margin-bottom: 0; 1195 margin-bottom: 0;
1161} 1196}
1162 1197
1198.dropdown-label-icon {
1199 width: 14px;
1200 height: 14px;
1201 flex-shrink: 0;
1202}
1203
1163.dropdown-group { 1204.dropdown-group {
1164 display: flex; 1205 display: flex;
1165 gap: 4px; 1206 gap: 4px;
docs/.vitepress/theme/components/Search.vue +39 −39
@@ -2410,7 +2410,7 @@ function onMouseMove(e: MouseEvent) {
2410 <div class="settings-section"> 2410 <div class="settings-section">
2411 <div class="settings-section-header"> 2411 <div class="settings-section-header">
2412 <div class="settings-section-label"> 2412 <div class="settings-section-label">
2413 <Search :size="10" stroke-width="2.5" /> 2413 <Search :size="14" stroke-width="1.75" />
2414 Search 2414 Search
2415 </div> 2415 </div>
2416 <button 2416 <button
@@ -2456,7 +2456,7 @@ function onMouseMove(e: MouseEvent) {
2456 > 2456 >
2457 <div class="settings-section-header"> 2457 <div class="settings-section-header">
2458 <div class="settings-section-label"> 2458 <div class="settings-section-label">
2459 <LayoutList :size="10" stroke-width="2.5" /> 2459 <LayoutList :size="14" stroke-width="1.75" />
2460 View 2460 View
2461 </div> 2461 </div>
2462 <button 2462 <button
@@ -2491,7 +2491,7 @@ function onMouseMove(e: MouseEvent) {
2491 <div class="settings-section"> 2491 <div class="settings-section">
2492 <div class="settings-section-header"> 2492 <div class="settings-section-header">
2493 <div class="settings-section-label"> 2493 <div class="settings-section-label">
2494 <Clock :size="10" stroke-width="2.5" /> 2494 <Clock :size="14" stroke-width="1.75" />
2495 History 2495 History
2496 </div> 2496 </div>
2497 <button 2497 <button
@@ -2534,28 +2534,28 @@ function onMouseMove(e: MouseEvent) {
2534 > 2534 >
2535 <template v-if="activeHelpSection === 'search'"> 2535 <template v-if="activeHelpSection === 'search'">
2536 <h4 class="sh-title"> 2536 <h4 class="sh-title">
2537 <Search :size="14" stroke-width="1.75" class="sh-title-icon" /> 2537 <Search :size="16" stroke-width="1.75" class="sh-title-icon" />
2538 Search Mode 2538 Search Mode
2539 </h4> 2539 </h4>
2540 <p class="sh-desc">Choose how queries are matched against content.</p> 2540 <p class="sh-desc">Choose how queries are matched against content.</p>
2541 <div class="sh-options"> 2541 <div class="sh-options">
2542 <div class="sh-option"> 2542 <div class="sh-option">
2543 <strong> 2543 <strong>
2544 <Regex :size="12" stroke-width="1.5" /> 2544 <Regex :size="14" stroke-width="1.5" />
2545 Exact 2545 Exact
2546 </strong> 2546 </strong>
2547 <span>Matches the exact phrase you type</span> 2547 <span>Matches the exact phrase you type</span>
2548 </div> 2548 </div>
2549 <div class="sh-option"> 2549 <div class="sh-option">
2550 <strong> 2550 <strong>
2551 <LocateOff :size="12" stroke-width="1.5" /> 2551 <LocateOff :size="14" stroke-width="1.5" />
2552 Fuzzy 2552 Fuzzy
2553 </strong> 2553 </strong>
2554 <span>Approximate matching that tolerates typos</span> 2554 <span>Approximate matching that tolerates typos</span>
2555 </div> 2555 </div>
2556 <div class="sh-option"> 2556 <div class="sh-option">
2557 <strong> 2557 <strong>
2558 <Globe :size="12" stroke-width="1.5" /> 2558 <Globe :size="14" stroke-width="1.5" />
2559 URL 2559 URL
2560 </strong> 2560 </strong>
2561 <span>Searches through hyperlinks</span> 2561 <span>Searches through hyperlinks</span>
@@ -2564,21 +2564,21 @@ function onMouseMove(e: MouseEvent) {
2564 </template> 2564 </template>
2565 <template v-else-if="activeHelpSection === 'view'"> 2565 <template v-else-if="activeHelpSection === 'view'">
2566 <h4 class="sh-title"> 2566 <h4 class="sh-title">
2567 <LayoutList :size="14" stroke-width="1.75" class="sh-title-icon" /> 2567 <LayoutList :size="16" stroke-width="1.75" class="sh-title-icon" />
2568 Result View 2568 Result View
2569 </h4> 2569 </h4>
2570 <p class="sh-desc">Controls how search results are displayed.</p> 2570 <p class="sh-desc">Controls how search results are displayed.</p>
2571 <div class="sh-options"> 2571 <div class="sh-options">
2572 <div class="sh-option"> 2572 <div class="sh-option">
2573 <strong> 2573 <strong>
2574 <TextAlignStart :size="12" stroke-width="1.5" /> 2574 <TextAlignStart :size="14" stroke-width="1.5" />
2575 Detail 2575 Detail
2576 </strong> 2576 </strong>
2577 <span>Shows a content excerpt below each result. Uses more memory.</span> 2577 <span>Shows a content excerpt below each result. Uses more memory.</span>
2578 </div> 2578 </div>
2579 <div class="sh-option"> 2579 <div class="sh-option">
2580 <strong> 2580 <strong>
2581 <List :size="12" stroke-width="1.5" /> 2581 <List :size="14" stroke-width="1.5" />
2582 List 2582 List
2583 </strong> 2583 </strong>
2584 <span>Compact list of titles only. Uses less memory.</span> 2584 <span>Compact list of titles only. Uses less memory.</span>
@@ -2587,7 +2587,7 @@ function onMouseMove(e: MouseEvent) {
2587 </template> 2587 </template>
2588 <template v-else-if="activeHelpSection === 'history'"> 2588 <template v-else-if="activeHelpSection === 'history'">
2589 <h4 class="sh-title"> 2589 <h4 class="sh-title">
2590 <Clock :size="14" stroke-width="1.75" class="sh-title-icon" /> 2590 <Clock :size="16" stroke-width="1.75" class="sh-title-icon" />
2591 Search History 2591 Search History
2592 </h4> 2592 </h4>
2593 <p class="sh-desc">Saves recent searches and shows them when the search bar is empty.</p> 2593 <p class="sh-desc">Saves recent searches and shows them when the search bar is empty.</p>
@@ -3311,42 +3311,40 @@ svg {
3311 z-index: 200; 3311 z-index: 200;
3312 background: var(--vp-c-bg); 3312 background: var(--vp-c-bg);
3313 border: 1px solid var(--vp-c-divider); 3313 border: 1px solid var(--vp-c-divider);
3314 border-radius: 12px; 3314 border-radius: 10px;
3315 padding: 14px; 3315 padding: 10px;
3316 box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25); 3316 box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
3317 display: flex; 3317 display: flex;
3318 flex-direction: column; 3318 flex-direction: column;
3319 min-width: 224px; 3319 min-width: 196px;
3320} 3320}
3321 3321
3322.settings-section { 3322.settings-section {
3323 display: flex; 3323 display: flex;
3324 flex-direction: column; 3324 flex-direction: column;
3325 gap: 8px; 3325 gap: 0;
3326} 3326}
3327 3327
3328.settings-section + .settings-section { 3328.settings-section + .settings-section {
3329 border-top: 1px solid var(--vp-c-divider); 3329 border-top: 1px solid var(--vp-c-divider);
3330 margin-top: 10px; 3330 margin-top: 8px;
3331 padding-top: 10px; 3331 padding-top: 8px;
3332} 3332}
3333 3333
3334.settings-section-header { 3334.settings-section-header {
3335 display: flex; 3335 display: flex;
3336 align-items: center; 3336 align-items: center;
3337 justify-content: space-between; 3337 justify-content: space-between;
3338 margin-bottom: 2px; 3338 margin-bottom: 6px;
3339} 3339}
3340 3340
3341.settings-section-label { 3341.settings-section-label {
3342 display: flex; 3342 display: flex;
3343 align-items: center; 3343 align-items: center;
3344 gap: 4px; 3344 gap: 6px;
3345 font-size: 11.5px; 3345 font-size: 14px;
3346 font-weight: 600; 3346 font-weight: 500;
3347 text-transform: uppercase; 3347 color: var(--vp-c-text-1);
3348 letter-spacing: 0.06em;
3349 color: var(--vp-c-text-3, var(--vp-c-text-2));
3350} 3348}
3351 3349
3352.settings-help-btn { 3350.settings-help-btn {
@@ -3380,7 +3378,7 @@ svg {
3380.search-help-popup { 3378.search-help-popup {
3381 position: fixed; 3379 position: fixed;
3382 z-index: 9999; 3380 z-index: 9999;
3383 width: 260px; 3381 width: 280px;
3384 background: var(--vp-c-bg-elv); 3382 background: var(--vp-c-bg-elv);
3385 border: 1px solid var(--vp-c-divider); 3383 border: 1px solid var(--vp-c-divider);
3386 border-radius: 12px; 3384 border-radius: 12px;
@@ -3403,21 +3401,23 @@ svg {
3403 display: flex; 3401 display: flex;
3404 align-items: center; 3402 align-items: center;
3405 gap: 6px; 3403 gap: 6px;
3406 font-size: 0.875rem; 3404 font-size: 1rem;
3407 font-weight: 600; 3405 font-weight: 600;
3408 color: var(--vp-c-text-1); 3406 color: var(--vp-c-text-1);
3409 margin: 0 0 6px; 3407 margin: 0 0 4px;
3410} 3408}
3411 3409
3412.sh-title-icon { 3410.sh-title-icon {
3413 flex-shrink: 0; 3411 flex-shrink: 0;
3414 opacity: 0.8; 3412 opacity: 0.8;
3413 width: 16px;
3414 height: 16px;
3415} 3415}
3416 3416
3417.sh-desc { 3417.sh-desc {
3418 font-size: 0.78rem; 3418 font-size: 0.875rem;
3419 color: var(--vp-c-text-2); 3419 color: var(--vp-c-text-2);
3420 margin: 0 0 10px; 3420 margin: 0 0 6px;
3421 line-height: 1.5; 3421 line-height: 1.5;
3422} 3422}
3423 3423
@@ -3430,30 +3430,30 @@ svg {
3430.sh-option { 3430.sh-option {
3431 display: flex; 3431 display: flex;
3432 flex-direction: column; 3432 flex-direction: column;
3433 gap: 2px; 3433 gap: 4px;
3434 background: var(--vp-c-bg-soft); 3434 background: var(--vp-c-bg-soft);
3435 border-radius: 6px; 3435 border-radius: 12px;
3436 padding: 7px 9px; 3436 padding: 10px 12px;
3437} 3437}
3438 3438
3439.sh-option strong { 3439.sh-option strong {
3440 display: flex; 3440 display: flex;
3441 align-items: center; 3441 align-items: center;
3442 gap: 5px; 3442 gap: 4px;
3443 font-size: 0.78rem; 3443 font-size: 0.875rem;
3444 font-weight: 600; 3444 font-weight: 600;
3445 color: var(--vp-c-text-1); 3445 color: var(--vp-c-text-1);
3446} 3446}
3447 3447
3448.sh-option span { 3448.sh-option span {
3449 font-size: 0.74rem; 3449 font-size: 0.875rem;
3450 color: var(--vp-c-text-2); 3450 color: var(--vp-c-text-2);
3451 line-height: 1.4; 3451 line-height: 1.4;
3452} 3452}
3453 3453
3454.settings-options { 3454.settings-options {
3455 display: flex; 3455 display: flex;
3456 gap: 5px; 3456 gap: 4px;
3457} 3457}
3458 3458
3459.settings-option { 3459.settings-option {
@@ -3461,13 +3461,13 @@ svg {
3461 align-items: center; 3461 align-items: center;
3462 justify-content: center; 3462 justify-content: center;
3463 gap: 5px; 3463 gap: 5px;
3464 padding: 7px 8px; 3464 padding: 5px 6px;
3465 background: transparent; 3465 background: transparent;
3466 border: none; 3466 border: none;
3467 border-radius: 6px; 3467 border-radius: 5px;
3468 cursor: pointer; 3468 cursor: pointer;
3469 color: var(--vp-c-text-2); 3469 color: var(--vp-c-text-2);
3470 font-size: 14.5px; 3470 font-size: 14px;
3471 font-weight: 500; 3471 font-weight: 500;
3472 transition: background-color 0.15s, color 0.15s; 3472 transition: background-color 0.15s, color 0.15s;
3473 flex: 1; 3473 flex: 1;
docs/.vitepress/theme/components/settings/MenuTitle.vue +1 −1
@@ -9,7 +9,7 @@ const props = defineProps<{
9 <h3 9 <h3
10 class="VPNolebaseEnhancedReadabilitiesMenuTitle" 10 class="VPNolebaseEnhancedReadabilitiesMenuTitle"
11 :class="{ disabled: !!props.disabled }" 11 :class="{ disabled: !!props.disabled }"
12 text="[14px] $vp-nolebase-enhanced-readabilities-menu-text-color" 12 text="[16px] $vp-nolebase-enhanced-readabilities-menu-text-color"
13 inline-flex 13 inline-flex
14 select-none 14 select-none
15 items-center 15 items-center