20260602173115

This commit is contained in:
oneao committed 2026-06-02 17:31:15 +08:00
1 parent 44dce232f4
commit 8e61b1f6cd
4 files changed
+424 -126

No files matched your search

@@ -0,0 +1,66 @@
# 书签导入与整理计划
## 需求分析
用户希望将浏览器书签文件 `D:\bookmarks_2026_5_26.html` 中的内容导入并整理到 `docs/resources.mdx` 文件中。
## 书签文件结构分析
从读取的书签文件中识别出以下主要分组:
### 第一层分组
1. **AI 智能助手** - 包含 ChatGPT、腾讯元宝、v0 等
2. **前端开发** - 包含多个子文件夹:
* 图标库 (expo icons, iconfont, icones, lucide)
* 前端模板库 (uiverse, codepen, htmlrev, lottiefiles, mockuphone)
* TinyMCE 相关
* Uniapp 相关
* 前端组件库 (Arco Design)
* React Native 第三方库
* 插画库 (undraw, storyset, manypixels)
* React Native 开发相关
3. **Python** - PaddlePaddle 相关
## 实现方案
### 步骤
1. 创建一个 Node.js 脚本来解析书签 HTML 文件
2. 将解析结果转换为资源导航所需的分组格式
3. 更新 `docs/resources.mdx` 文件
### 修改文件
* `docs/resources.mdx` - 更新为解析后的书签内容
## 输出格式
使用现有的 `SearchableLinkGrid` 组件格式,保持分组结构清晰。
## 过滤规则
1. 跳过重复链接
2. 清理过长的标题(超过50字符截断)
3. 提取有意义的描述信息
## 风险评估
* 文件较大(50KB+),需要处理大量数据
* 部分链接可能失效,建议用户后续验证
## 测试计划
1. 解析书签文件
2. 生成新的 resources.mdx
3. 启动开发服务器验证显示效果
+84 -14
View File
@@ -30,7 +30,10 @@ import SearchableLinkGrid from '@site/src/components/Link/SearchableLinkGrid';
], ],
}, },
{ {
groupName: '大模型', groupName: '大模型与AI',
subGroups: [
{
title: '大模型',
items: [ items: [
{ {
title: 'Qwen', title: 'Qwen',
@@ -50,7 +53,7 @@ import SearchableLinkGrid from '@site/src/components/Link/SearchableLinkGrid';
], ],
}, },
{ {
groupName: 'AI工具', title: 'AI工具',
items: [ items: [
{ {
title: 'MinerU', title: 'MinerU',
@@ -65,7 +68,7 @@ import SearchableLinkGrid from '@site/src/components/Link/SearchableLinkGrid';
], ],
}, },
{ {
groupName: 'AI部署与推理', title: 'AI部署与推理',
items: [ items: [
{ {
title: 'Ollama', title: 'Ollama',
@@ -85,7 +88,7 @@ import SearchableLinkGrid from '@site/src/components/Link/SearchableLinkGrid';
], ],
}, },
{ {
groupName: 'AI评测与资源', title: 'AI评测与资源',
items: [ items: [
{ {
title: 'OpenCompass', title: 'OpenCompass',
@@ -104,6 +107,8 @@ import SearchableLinkGrid from '@site/src/components/Link/SearchableLinkGrid';
}, },
], ],
}, },
],
},
{ {
groupName: '视觉与OCR', groupName: '视觉与OCR',
items: [ items: [
@@ -151,6 +156,9 @@ import SearchableLinkGrid from '@site/src/components/Link/SearchableLinkGrid';
}, },
{ {
groupName: '移动端开发', groupName: '移动端开发',
subGroups: [
{
title: 'React Native',
items: [ items: [
{ {
title: 'gluestack-ui', title: 'gluestack-ui',
@@ -187,6 +195,11 @@ import SearchableLinkGrid from '@site/src/components/Link/SearchableLinkGrid';
description: '不使用 EAS 的热更新方案', description: '不使用 EAS 的热更新方案',
href: 'https://juejin.cn/post/7390659669113929779', href: 'https://juejin.cn/post/7390659669113929779',
}, },
],
},
{
title: 'UniApp',
items: [
{ {
title: '原生插件集成指南', title: '原生插件集成指南',
description: 'uni-app 原生插件文档', description: 'uni-app 原生插件文档',
@@ -197,10 +210,20 @@ import SearchableLinkGrid from '@site/src/components/Link/SearchableLinkGrid';
description: 'Android 离线打包制作', description: 'Android 离线打包制作',
href: 'https://ask.dcloud.net.cn/article/35482', href: 'https://ask.dcloud.net.cn/article/35482',
}, },
{
title: '天地图 UniApp',
description: 'UniApp 插件',
href: 'https://ext.dcloud.net.cn/plugin?id=22630',
},
],
},
], ],
}, },
{ {
groupName: 'UI资源', groupName: 'UI资源',
subGroups: [
{
title: '图标资源',
items: [ items: [
{ {
title: 'IconFont', title: 'IconFont',
@@ -227,6 +250,11 @@ import SearchableLinkGrid from '@site/src/components/Link/SearchableLinkGrid';
description: 'React Native 图标库', description: 'React Native 图标库',
href: 'https://icons.expo.fyi/Index', href: 'https://icons.expo.fyi/Index',
}, },
],
},
{
title: '插画素材',
items: [
{ {
title: 'unDraw', title: 'unDraw',
description: '开源插画库', description: '开源插画库',
@@ -242,6 +270,11 @@ import SearchableLinkGrid from '@site/src/components/Link/SearchableLinkGrid';
description: '免费插画素材', description: '免费插画素材',
href: 'https://www.manypixels.co/gallery', href: 'https://www.manypixels.co/gallery',
}, },
],
},
{
title: '动画与模板',
items: [
{ {
title: 'LottieFiles', title: 'LottieFiles',
description: '动画资源平台', description: '动画资源平台',
@@ -269,6 +302,8 @@ import SearchableLinkGrid from '@site/src/components/Link/SearchableLinkGrid';
}, },
], ],
}, },
],
},
{ {
groupName: '后端开发', groupName: '后端开发',
items: [ items: [
@@ -281,6 +316,9 @@ import SearchableLinkGrid from '@site/src/components/Link/SearchableLinkGrid';
}, },
{ {
groupName: '开发环境', groupName: '开发环境',
subGroups: [
{
title: '编程语言',
items: [ items: [
{ {
title: 'JDK', title: 'JDK',
@@ -300,7 +338,7 @@ import SearchableLinkGrid from '@site/src/components/Link/SearchableLinkGrid';
], ],
}, },
{ {
groupName: 'IDE', title: '传统IDE',
items: [ items: [
{ {
title: 'IntelliJ IDEA', title: 'IntelliJ IDEA',
@@ -320,28 +358,53 @@ import SearchableLinkGrid from '@site/src/components/Link/SearchableLinkGrid';
], ],
}, },
{ {
groupName: '地图服务', title: 'AI IDE',
items: [ items: [
{ {
title: '天地图', title: 'Cursor',
description: '地理编码服务', description: 'AI 驱动的代码编辑器',
href: 'http://lbs.tianditu.gov.cn/home.html', href: 'https://cursor.com/',
}, },
{ {
title: '天地图 UniApp', title: 'ChatGPT Codex',
description: 'UniApp 插件', description: 'AI 代码生成助手',
href: 'https://ext.dcloud.net.cn/plugin?id=22630', href: 'https://chatgpt.com/zh-Hans-CN/codex/',
},
{
title: 'Trae',
description: 'Trae AI 助手平台',
href: 'https://www.trae.cn/',
},
],
}, },
], ],
}, },
{ {
groupName: '开发资源', groupName: '开发资源',
subGroups: [
{
title: '镜像源',
items: [ items: [
{ {
title: '清华镜像源', title: '清华镜像源',
description: '清华大学开源软件镜像站', description: '清华大学开源软件镜像站',
href: 'https://mirrors.tuna.tsinghua.edu.cn/', href: 'https://mirrors.tuna.tsinghua.edu.cn/',
}, },
],
},
{
title: '地图服务',
items: [
{
title: '天地图',
description: '地理编码服务',
href: 'http://lbs.tianditu.gov.cn/home.html',
},
],
},
{
title: '工具网站',
items: [
{ {
title: 'URL Encoder', title: 'URL Encoder',
description: 'SVG URL 编码工具', description: 'SVG URL 编码工具',
@@ -349,8 +412,13 @@ import SearchableLinkGrid from '@site/src/components/Link/SearchableLinkGrid';
}, },
], ],
}, },
],
},
{ {
groupName: '系统工具', groupName: '系统与效率工具',
subGroups: [
{
title: '系统工具',
items: [ items: [
{ {
title: 'VMware Workstation', title: 'VMware Workstation',
@@ -360,7 +428,7 @@ import SearchableLinkGrid from '@site/src/components/Link/SearchableLinkGrid';
], ],
}, },
{ {
groupName: '效率办公', title: '效率办公',
items: [ items: [
{ {
title: 'DeepL翻译', title: 'DeepL翻译',
@@ -384,5 +452,7 @@ import SearchableLinkGrid from '@site/src/components/Link/SearchableLinkGrid';
}, },
], ],
}, },
],
},
]} ]}
/> />
@@ -3,9 +3,15 @@ import React, { useEffect, useMemo, useRef, useState } from 'react'
import LinkCard from './LinkCard' import LinkCard from './LinkCard'
import styles from './styles.module.css' import styles from './styles.module.css'
export interface SubGroup {
title: string
items: LinkCardProps[]
}
export interface GroupedLinkCardProps { export interface GroupedLinkCardProps {
groupName: string groupName: string
items: LinkCardProps[] items?: LinkCardProps[]
subGroups?: SubGroup[]
} }
interface SearchableLinkGridProps { interface SearchableLinkGridProps {
@@ -15,6 +21,7 @@ interface SearchableLinkGridProps {
export default function SearchableLinkGrid({ groups }: SearchableLinkGridProps) { export default function SearchableLinkGrid({ groups }: SearchableLinkGridProps) {
const [searchTerm, setSearchTerm] = useState('') const [searchTerm, setSearchTerm] = useState('')
const [activeSection, setActiveSection] = useState('') const [activeSection, setActiveSection] = useState('')
const [expandedGroups, setExpandedGroups] = useState<Set<number>>(new Set([0]))
const sidebarRef = useRef<HTMLDivElement>(null) const sidebarRef = useRef<HTMLDivElement>(null)
useEffect(() => { useEffect(() => {
@@ -46,11 +53,17 @@ export default function SearchableLinkGrid({ groups }: SearchableLinkGridProps)
}, },
) )
groups.forEach((_, index) => { groups.forEach((group, groupIndex) => {
const element = document.getElementById(`group-${index}`) const groupElement = document.getElementById(`group-${groupIndex}`)
if (element) { if (groupElement) {
observer.observe(element) observer.observe(groupElement)
} }
group.subGroups?.forEach((_, subIndex) => {
const subGroupElement = document.getElementById(`subgroup-${groupIndex}-${subIndex}`)
if (subGroupElement) {
observer.observe(subGroupElement)
}
})
}) })
return () => { return () => {
@@ -58,31 +71,102 @@ export default function SearchableLinkGrid({ groups }: SearchableLinkGridProps)
} }
}, [groups]) }, [groups])
const countGroupItems = (group: GroupedLinkCardProps): number => {
let count = group.items?.length || 0
if (group.subGroups) {
count += group.subGroups.reduce((sum, sg) => sum + sg.items.length, 0)
}
return count
}
const filterGroup = (group: GroupedLinkCardProps, lowerTerm: string): GroupedLinkCardProps | null => {
const filteredItems = group.items?.filter(
item =>
item.title.toLowerCase().includes(lowerTerm)
|| item.description.toLowerCase().includes(lowerTerm),
) || []
const filteredSubGroups = group.subGroups?.map(sg => ({
...sg,
items: sg.items.filter(
item =>
item.title.toLowerCase().includes(lowerTerm)
|| item.description.toLowerCase().includes(lowerTerm),
),
})).filter(sg => sg.items.length > 0) || []
if (filteredItems.length > 0 || filteredSubGroups.length > 0) {
return {
...group,
items: filteredItems.length > 0 ? filteredItems : undefined,
subGroups: filteredSubGroups.length > 0 ? filteredSubGroups : undefined,
}
}
return null
}
const filteredGroups = useMemo(() => { const filteredGroups = useMemo(() => {
if (!searchTerm.trim()) if (!searchTerm.trim())
return groups return groups
const lowerTerm = searchTerm.toLowerCase() const lowerTerm = searchTerm.toLowerCase()
return groups.map(group => ({ return groups.map(group => filterGroup(group, lowerTerm)).filter(Boolean) as GroupedLinkCardProps[]
...group,
items: group.items.filter(
item =>
item.title.toLowerCase().includes(lowerTerm)
|| item.description.toLowerCase().includes(lowerTerm),
),
})).filter(group => group.items.length > 0)
}, [searchTerm, groups]) }, [searchTerm, groups])
const totalItems = groups.reduce((sum, group) => sum + group.items.length, 0) const totalItems = groups.reduce((sum, group) => sum + countGroupItems(group), 0)
const filteredTotalItems = filteredGroups.reduce((sum, group) => sum + group.items.length, 0) const filteredTotalItems = filteredGroups.reduce((sum, group) => sum + countGroupItems(group), 0)
const scrollToSection = (index: number) => { const scrollToSection = (groupIndex: number, subGroupIndex?: number) => {
const element = document.getElementById(`group-${index}`) if (subGroupIndex !== undefined) {
const element = document.getElementById(`subgroup-${groupIndex}-${subGroupIndex}`)
if (element) {
element.scrollIntoView({ behavior: 'smooth', block: 'start' })
return
}
}
const element = document.getElementById(`group-${groupIndex}`)
if (element) { if (element) {
element.scrollIntoView({ behavior: 'smooth', block: 'start' }) element.scrollIntoView({ behavior: 'smooth', block: 'start' })
} }
} }
const toggleGroup = (index: number) => {
setExpandedGroups((prev) => {
const newSet = new Set(prev)
if (newSet.has(index)) {
newSet.delete(index)
}
else {
newSet.add(index)
}
return newSet
})
}
const renderItems = (items: LinkCardProps[]) => (
<div className={styles.grid}>
{items.map((item, itemIndex) => (
<LinkCard key={itemIndex} {...item} />
))}
</div>
)
const renderGroup = (group: GroupedLinkCardProps, groupIndex: number) => (
<div key={groupIndex} id={`group-${groupIndex}`} className={styles.group}>
<h3 className={styles.groupTitle}>{group.groupName}</h3>
{group.items && group.items.length > 0 && renderItems(group.items)}
{group.subGroups && group.subGroups.map((subGroup, subIndex) => (
<div key={subIndex} id={`subgroup-${groupIndex}-${subIndex}`} className={styles.subGroup}>
<h4 className={styles.subGroupTitle}>{subGroup.title}</h4>
<div className={styles.subGroupContent}>
{renderItems(subGroup.items)}
</div>
</div>
))}
</div>
)
return ( return (
<div className={styles.container}> <div className={styles.container}>
<div className={styles.mainContent}> <div className={styles.mainContent}>
@@ -122,16 +206,7 @@ export default function SearchableLinkGrid({ groups }: SearchableLinkGridProps)
{filteredGroups.length > 0 {filteredGroups.length > 0
? ( ? (
filteredGroups.map((group, groupIndex) => ( filteredGroups.map((group, groupIndex) => renderGroup(group, groupIndex))
<div key={groupIndex} id={`group-${groupIndex}`} className={styles.group}>
<h3 className={styles.groupTitle}>{group.groupName}</h3>
<div className={styles.grid}>
{group.items.map((item, itemIndex) => (
<LinkCard key={itemIndex} {...item} />
))}
</div>
</div>
))
) )
: ( : (
<div className={styles.noResults}> <div className={styles.noResults}>
@@ -158,16 +233,45 @@ export default function SearchableLinkGrid({ groups }: SearchableLinkGridProps)
<nav className={styles.sidebar} ref={sidebarRef}> <nav className={styles.sidebar} ref={sidebarRef}>
<div className={styles.sidebarHeader}>快速导航</div> <div className={styles.sidebarHeader}>快速导航</div>
<div className={styles.sidebarLinks}> <div className={styles.sidebarLinks}>
{groups.map((group, index) => ( {groups.map((group, groupIndex) => {
const hasSubGroups = group.subGroups && group.subGroups.length > 0
const isExpanded = expandedGroups.has(groupIndex)
return (
<div key={groupIndex} className={styles.sidebarGroup}>
<button <button
key={index} onClick={() => {
onClick={() => scrollToSection(index)} if (hasSubGroups) {
className={`${styles.sidebarLink} ${activeSection === `group-${index}` ? styles.active : ''}`} toggleGroup(groupIndex)
}
scrollToSection(groupIndex)
}}
className={`${styles.sidebarLink} ${styles.sidebarLinkParent} ${activeSection === `group-${groupIndex}` ? styles.active : ''}`}
> >
{hasSubGroups && (
<span className={styles.chevron}>
{isExpanded ? '▼' : '▶'}
</span>
)}
{group.groupName} {group.groupName}
</button> </button>
{hasSubGroups && isExpanded && (
<div className={styles.sidebarSubLinks}>
{group.subGroups!.map((subGroup, subIndex) => (
<button
key={subIndex}
onClick={() => scrollToSection(groupIndex, subIndex)}
className={`${styles.sidebarLink} ${styles.sidebarLinkChild} ${activeSection === `subgroup-${groupIndex}-${subIndex}` ? styles.active : ''}`}
>
{subGroup.title}
</button>
))} ))}
</div> </div>
)}
</div>
)
})}
</div>
</nav> </nav>
</div> </div>
) )
@@ -1,7 +1,7 @@
/* 容器布局 */ /* 容器布局 */
.container { .container {
display: flex; display: flex;
gap: 24px; gap: 32px;
} }
.mainContent { .mainContent {
@@ -10,40 +10,45 @@
/* 右侧导航 */ /* 右侧导航 */
.sidebar { .sidebar {
width: 180px; width: 192px;
flex-shrink: 0; flex-shrink: 0;
position: sticky; position: sticky;
top: 2rem; top: calc(var(--ifm-navbar-height, 64px) + 1.5rem);
height: fit-content; height: fit-content;
padding: 16px;
background: var(--ifm-card-background-color);
border-radius: 16px;
border: 1px solid var(--ifm-color-emphasis-200);
} }
.sidebarHeader { .sidebarHeader {
font-size: 14px; font-size: 13px;
font-weight: 600; font-weight: 600;
color: var(--ifm-color-emphasis-600); color: var(--ifm-color-emphasis-500);
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 12px; margin-bottom: 12px;
padding-left: 8px; padding: 0 4px;
} }
.sidebarLinks { .sidebarLinks {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 4px; gap: 2px;
} }
.sidebarLink { .sidebarLink {
display: block; display: flex;
padding: 8px 12px; align-items: center;
padding: 9px 12px;
font-size: 14px; font-size: 14px;
text-align: left; text-align: left;
border: none; border: none;
background: transparent; background: transparent;
color: var(--ifm-color-emphasis-700); color: var(--ifm-color-emphasis-700);
border-radius: 8px; border-radius: 10px;
cursor: pointer; cursor: pointer;
transition: transition: all 0.2s ease;
background-color 0.2s ease,
color 0.2s ease;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@@ -59,151 +64,177 @@
color: white; color: white;
} }
.sidebarGroup {
display: flex;
flex-direction: column;
}
.sidebarLinkParent {
gap: 8px;
}
.sidebarLinkParent.hasChildren {
padding-right: 8px;
}
.chevron {
width: 18px;
height: 18px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
color: var(--ifm-color-emphasis-400);
font-size: 11px;
line-height: 1;
transition: color 0.2s ease;
}
.sidebarLinkParent:hover .chevron {
color: var(--ifm-color-emphasis-600);
}
.sidebarLinkParent.active .chevron {
color: white;
}
.sidebarSubLinks {
display: flex;
flex-direction: column;
gap: 3px;
padding-left: 8px;
margin: 4px 0 6px 16px;
}
.sidebarLinkChild {
padding: 9px 14px;
font-size: 14px;
padding-left: 26px;
color: var(--ifm-color-emphasis-600);
border-radius: 10px;
}
.sidebarLinkChild:hover {
background-color: rgba(0, 0, 0, 0.04);
color: var(--ifm-color-emphasis-800);
}
.sidebarLinkChild.active {
background-color: var(--ifm-color-primary);
color: white;
}
/* 网格布局 */ /* 网格布局 */
.grid { .grid {
display: grid; display: grid;
gap: 16px; gap: 16px;
margin-top: 16px; margin-top: 16px;
/* 默认桌面4列 */
grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-columns: repeat(4, minmax(0, 1fr));
} }
/* 平板 */
@media (max-width: 1200px) { @media (max-width: 1200px) {
.grid { .grid {
grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-columns: repeat(3, minmax(0, 1fr));
} }
} }
/* 小平板 */
@media (max-width: 996px) { @media (max-width: 996px) {
.grid { .grid {
grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: repeat(2, minmax(0, 1fr));
} }
} }
/* 手机 */
@media (max-width: 576px) { @media (max-width: 576px) {
.grid { .grid {
grid-template-columns: 1fr; grid-template-columns: 1fr;
} }
} }
/* 响应式:隐藏右侧导航 */ @media (max-width: 1280px) {
@media (max-width: 1200px) {
.sidebar { .sidebar {
display: none; display: none;
} }
} }
/* 卡片 */ /* 卡片 */
.card { .card {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 20px;
padding: 18px; border-radius: 16px;
border-radius: 14px;
border: 1px solid var(--ifm-color-emphasis-200); border: 1px solid var(--ifm-color-emphasis-200);
background: var(--ifm-card-background-color); background: var(--ifm-card-background-color);
color: inherit; color: inherit;
text-decoration: none; text-decoration: none;
transition: all 0.25s ease;
transition:
transform 0.2s ease,
border-color 0.2s ease,
box-shadow 0.2s ease;
} }
.card:hover { .card:hover {
color: inherit; color: inherit;
text-decoration: none; text-decoration: none;
transform: translateY(-4px);
transform: translateY(-3px);
border-color: var(--ifm-color-primary); border-color: var(--ifm-color-primary);
box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
} }
/* 标题区域 */ /* 标题区域 */
.header { .header {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 12px; gap: 14px;
} }
/* 图标 */ /* 图标 */
.icon { .icon {
width: 32px; width: 36px;
height: 32px; height: 36px;
object-fit: contain; object-fit: contain;
flex-shrink: 0; flex-shrink: 0;
} }
.placeholder { .placeholder {
width: 40px; width: 44px;
height: 40px; height: 44px;
border-radius: 12px;
border-radius: 10px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background: linear-gradient(135deg, var(--ifm-color-primary) 0%, var(--ifm-color-primary-dark) 100%);
background: var(--ifm-color-primary);
color: white; color: white;
font-size: 18px; font-size: 18px;
font-weight: 700; font-weight: 700;
flex-shrink: 0; flex-shrink: 0;
box-shadow: 0 4px 12px rgba(var(--ifm-color-primary-rgb), 0.2);
} }
/* 标题 */ /* 标题 */
.title { .title {
font-size: 17px; font-size: 16px;
font-weight: 600; font-weight: 600;
line-height: 1.4; line-height: 1.4;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
/* 描述 */ /* 描述 */
.description { .description {
margin-top: 14px; margin-top: 12px;
font-size: 14px; font-size: 14px;
line-height: 1.6; line-height: 1.6;
color: var(--ifm-color-emphasis-600);
color: var(--ifm-color-emphasis-700);
overflow: hidden; overflow: hidden;
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
/* 搜索容器 */ /* 搜索容器 */
.searchContainer { .searchContainer {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 16px; gap: 16px;
margin-bottom: 24px; margin-bottom: 28px;
width: 100%; width: 100%;
} }
@@ -213,11 +244,9 @@
align-items: center; align-items: center;
background: var(--ifm-card-background-color); background: var(--ifm-card-background-color);
border: 1px solid var(--ifm-color-emphasis-200); border: 1px solid var(--ifm-color-emphasis-200);
border-radius: 12px; border-radius: 14px;
padding: 2px 2px 2px 16px; padding: 4px 4px 4px 18px;
transition: transition: all 0.2s ease;
border-color 0.2s ease,
box-shadow 0.2s ease;
} }
.searchWrapper:focus-within { .searchWrapper:focus-within {
@@ -229,14 +258,16 @@
color: var(--ifm-color-emphasis-400); color: var(--ifm-color-emphasis-400);
margin-right: 12px; margin-right: 12px;
flex-shrink: 0; flex-shrink: 0;
width: 18px;
height: 18px;
} }
.searchInput { .searchInput {
flex: 1; flex: 1;
width: 100%; width: 100%;
padding: 12px 16px 12px 0; padding: 13px 16px 13px 0;
border: none; border: none;
border-radius: 0 10px 10px 0; border-radius: 0 12px 12px 0;
font-size: 15px; font-size: 15px;
background: transparent; background: transparent;
color: var(--ifm-font-color-base); color: var(--ifm-font-color-base);
@@ -254,16 +285,16 @@
font-size: 13px; font-size: 13px;
color: var(--ifm-color-emphasis-500); color: var(--ifm-color-emphasis-500);
white-space: nowrap; white-space: nowrap;
padding: 6px 12px; padding: 8px 14px;
background: var(--ifm-color-emphasis-100); background: var(--ifm-color-emphasis-100);
border-radius: 20px; border-radius: 20px;
font-weight: 500;
} }
/* 分组样式 */ /* 分组样式 */
.group { .group {
margin-bottom: 32px; margin-bottom: 36px;
scroll-margin-top: calc(var(--ifm-navbar-height, 64px) + 1rem); scroll-margin-top: calc(var(--ifm-navbar-height, 64px) + 1.5rem);
} }
.group:last-child { .group:last-child {
@@ -273,26 +304,53 @@
.groupTitle { .groupTitle {
font-size: 18px; font-size: 18px;
font-weight: 700; font-weight: 700;
color: var(--ifm-color-emphasis-800); color: var(--ifm-color-emphasis-900);
margin-bottom: 20px; margin-bottom: 20px;
padding-left: 14px; padding: 8px 0 8px 16px;
border-left: 4px solid var(--ifm-color-primary); border-left: 4px solid var(--ifm-color-primary);
background: linear-gradient(90deg, rgba(var(--ifm-color-primary-rgb), 0.05) 0%, transparent 100%);
}
/* 子分组样式 */
.subGroup {
margin-top: 24px;
scroll-margin-top: calc(var(--ifm-navbar-height, 64px) + 1rem);
}
.subGroup:first-child {
margin-top: 16px;
}
.subGroupTitle {
font-size: 16px;
font-weight: 600;
color: var(--ifm-color-emphasis-800);
margin-bottom: 14px;
padding: 6px 0 6px 24px;
position: relative;
}
.subGroupContent {
margin-left: 24px;
padding-left: 16px;
border-left: 2px solid var(--ifm-color-emphasis-100);
} }
/* 无结果状态 */ /* 无结果状态 */
.noResults { .noResults {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding: 60px 20px; padding: 80px 20px;
color: var(--ifm-color-emphasis-600); color: var(--ifm-color-emphasis-600);
} }
.noResultsIcon { .noResultsIcon {
color: var(--ifm-color-emphasis-400); color: var(--ifm-color-emphasis-400);
margin-bottom: 16px; margin-bottom: 20px;
width: 56px;
height: 56px;
} }
.noResults p { .noResults p {