From 87fd7285c17a09bc3ec38f2a02aa180d8c5d53e0 Mon Sep 17 00:00:00 2001 From: Cea <61349137+ceastld@users.noreply.github.com> Date: Thu, 1 Oct 2026 07:18:12 -0700 Subject: [PATCH 1/2] =?UTF-8?q?feat(docs):=20=E4=BC=98=E5=8C=96=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E5=85=A5=E5=8F=A3=E4=B8=8E=E7=9B=AE=E5=BD=95=E5=8D=A1?= =?UTF-8?q?=E7=89=87=E9=98=85=E8=AF=BB=E4=BD=93=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/index.md | 94 +++--- docs/v2/_category_.json | 1 + docs/v2/features/_category_.json | 6 +- docs/v2/features/index.md | 48 +++ docs/v2/index.md | 76 ++--- docs/v2/xaction/index.md | 10 +- docusaurus.config.ts | 9 +- src/components/RelatedDocs/styles.module.css | 176 +++-------- .../XActionLanding/styles.module.css | 16 +- src/css/custom.css | 291 +++++++----------- src/theme/DocCard/index.tsx | 193 +++--------- 11 files changed, 341 insertions(+), 579 deletions(-) create mode 100644 docs/v2/features/index.md diff --git a/docs/index.md b/docs/index.md index 90de855..8fcc0cd 100644 --- a/docs/index.md +++ b/docs/index.md @@ -6,63 +6,55 @@ description: Quicker V2 使用说明:安装、面板、组合动作教程、 sidebar_position: 1 quickerDocKey: docs/home comments: false +hide_title: true +hide_table_of_contents: true --- +
+ # Quicker 文档 -:::caution[Preview · 仅专业版] -当前 V2 是 **Preview 体验版**,仅面向专业版用户。免费版数据迁移仍在开发,免费账号目前无法登录 2.0。不建议用它替换无法中断的 1.x 关键环境。体验前请先读 [体验前必读](./important-notice.md)。 -::: +

从第一次运行动作,到把重复操作变成自己的工具。

+ +Quicker 是 Windows 上的效率工具。你可以从面板运行动作,也可以用快捷键、鼠标手势等方式随时调用。 + +
-Quicker 是 Windows 上的效率工具:把重复操作做成**动作**,用面板、快捷键或触发规则随时运行。 +**V2 目前为 Preview 体验版,仅面向专业版用户。** 免费版数据迁移仍在开发,免费账号目前无法登录 2.0。体验前请阅读 [使用限制与回退说明](./important-notice.md),不建议替换无法中断的 1.x 关键环境。 -V2 把动作内容和它出现的位置分开,组合动作用模块拼步骤,参数、变量和调试都按当前程序定义来写。 +
## 从这里开始 -| 你想… | 去这篇 | -| --- | --- | -| 体验前先看限制 | [体验前必读](./important-notice.md) | -| 第一次打开 Quicker | [开始使用](./v2/getting-started.md) | -| 安装或确认系统要求 | [安装 Quicker V2](./v2/install/windows.md) | -| 自己写一个动作 | [怎样学会组合动作](./v2/xaction/guides/how-to-learn.md) | -| 从 1.x 升级 | [从 V1 迁移](./v2/migration/from-v1.md) | -| 截图、标注、贴图 | [截图 Pro](./v2/features/screenshot/capture-pro.md) | -| 面板、场景、分组 | [动作面板(新面板)](./v2/features/action-panel/index.md) | -| 查某个步骤的参数 | [组合动作模块参考](./v2/xaction/modules) | -| 现在能用哪些 AI | [AI 与 Agent 现状](./v2/features/ai-and-agent.md) | -| 连接设计、建模或办公软件 | [软件连接与 Bridge](./v2/features/software-connections/index.md) | -| 运行出问题 | [常见问题](./v2/troubleshooting.md) | - -## 组合动作三条动手课 - -跟着做一遍,就能理解步骤、变量和分支: - -1. [弹出一条提示](./v2/xaction/guides/helloworld.md) -2. [把选中文字变成大写](./v2/xaction/guides/selected-text.md) -3. [选中文字就搜索](./v2/xaction/guides/search-selected.md) - - + + +## 常用内容 + + + +
+ +[浏览全部功能](/v2/features) · [安装与系统要求](./v2/install/windows.md) · [常见问题](./v2/troubleshooting.md) · [更新记录](/release-notes) + +
+ +## 跟着做一个组合动作 + +
    +
  1. 弹出一条提示认识动作编辑器和步骤
  2. +
  3. 把选中文字变成大写用变量传递和处理文本
  4. +
  5. 选中文字就搜索加入条件,打开搜索网址
  6. +
+ +
diff --git a/docs/v2/_category_.json b/docs/v2/_category_.json index 6630ee4..a59a96d 100644 --- a/docs/v2/_category_.json +++ b/docs/v2/_category_.json @@ -1,6 +1,7 @@ { "label": "Quicker V2", "position": 30, + "collapsed": false, "link": { "type": "doc", "id": "v2/index" diff --git a/docs/v2/features/_category_.json b/docs/v2/features/_category_.json index c555e66..93c1d66 100644 --- a/docs/v2/features/_category_.json +++ b/docs/v2/features/_category_.json @@ -2,9 +2,7 @@ "label": "功能使用", "position": 40, "link": { - "type": "generated-index", - "slug": "/v2/features", - "title": "功能使用", - "description": "Quicker V2 各项功能的使用说明。" + "type": "doc", + "id": "v2/features/index" } } diff --git a/docs/v2/features/index.md b/docs/v2/features/index.md new file mode 100644 index 0000000..59cc226 --- /dev/null +++ b/docs/v2/features/index.md @@ -0,0 +1,48 @@ +--- +title: 功能使用 +description: 按使用场景查找 Quicker V2 的面板、触发、截图、账号和软件连接说明。 +slug: /v2/features +quickerDocKey: v2/features +comments: false +hide_title: true +hide_table_of_contents: true +--- + +
+ +# 功能使用 + +

按你想做的事情,找到对应的使用说明。

+ +第一次使用,建议先看 [开始使用 Quicker V2](../getting-started.md)。 + +## 运行动作与整理面板 + + + +## 截图与日常工具 + + + +## 账号、文件与软件连接 + + + +
diff --git a/docs/v2/index.md b/docs/v2/index.md index 66ef4b3..4effa47 100644 --- a/docs/v2/index.md +++ b/docs/v2/index.md @@ -5,50 +5,40 @@ slug: /v2 sidebar_position: 1 quickerDocKey: v2/index comments: false +hide_title: true +hide_table_of_contents: true --- +
+ # Quicker V2 -:::caution[Preview · 仅专业版] -当前 V2 是 **Preview 体验版**,仅面向专业版用户。免费版数据迁移仍在开发,免费账号目前无法登录 2.0。不建议用它替换无法中断的 1.x 关键环境。体验前请先读 [体验前必读](/important-notice)。 -::: - -V2 重做了数据存储、同步、动作模型和主面板。动作内容和它出现的位置分开,组合动作用模块拼步骤。 - -| 你想… | 去这篇 | -| --- | --- | -| 第一次打开 | [开始使用](./getting-started.md) | -| 下载安装 | [安装 Quicker V2](./install/windows.md) | -| 从 1.x 过来 | [从 V1 迁移](./migration/from-v1.md) | -| 相对 1.x 改了什么 | [V2 重要变化](./what's-new/index.md) | -| 面板、触发、截图、账号 | [功能使用](/v2/features) | -| 自己写组合动作 | [组合动作](/v2/xaction) | -| 连接设计、建模或办公软件 | [软件连接与 Bridge](./features/software-connections/index.md) | -| 运行出问题 | [常见问题](./troubleshooting.md) | - -安装包只从 [https://getquicker.net/V2](https://getquicker.net/V2) 下载。`https://getquicker.net/Download` 目前提供的是 1.x,不要从那里装 V2。 - - +

安装、使用和编写动作,都从这里开始。

+ +
+ +**V2 目前为 Preview 体验版,仅面向专业版用户。** 免费版数据迁移仍在开发,免费账号目前无法登录 2.0。体验前请阅读 [使用限制与回退说明](/important-notice),不建议替换无法中断的 1.x 关键环境。 + +
+ +## 安装与入门 + + + +安装包请从 [Quicker V2 官网](https://getquicker.net/V2) 下载;官网 `/Download` 页面目前提供的是 1.x。 + +## 继续探索 + + + +
diff --git a/docs/v2/xaction/index.md b/docs/v2/xaction/index.md index 424a438..399db2e 100644 --- a/docs/v2/xaction/index.md +++ b/docs/v2/xaction/index.md @@ -12,10 +12,6 @@ hide_table_of_contents: true 组合动作把多个步骤按顺序执行,用来完成打开网页、处理文本、操作窗口这类自动化。Quicker 2.0 沿用 1.x 的主要模块,并补充了参数、执行和调试能力。 -2.2.18 起,客户端新增[远程文件](/v2/xaction/modules/remotefile)步骤,可通过 WebDAV 上传、下载、列出、查询、删除或移动网盘及 NAS 文件,并创建目录;2.2.19 起进一步支持 S3、文本与图片内容、复制文件和批量传输。账号在 **设置 → 软件连接 → 远程文件账号** 中配置,只保存在本机;换电脑或分享动作时,需要在目标电脑配置相同的账号引用名。 - -2.2.20 起,客户端新增 [显示器](/v2/xaction/modules/monitor) 与 [虚拟桌面](/v2/xaction/modules/virtualdesktop) 步骤。显示器步骤可获取屏幕列表、坐标和工作区,并对鼠标所在屏、主屏、指定屏或全部屏读取、设置或增减亮度,也可显示可交互亮度 OSD;复制显示导致无法唯一对应物理显示器时,请明确指定目标。虚拟桌面步骤可查询、切换、创建、删除、重命名、排序桌面,查询窗口所在桌面并移动窗口,也可读取或设置窗口是否固定到所有桌面;能力取决于 Windows 完整版本,删除桌面时需要指定窗口迁移目标,且不能删除最后一个桌面。更多操作说明见[显示器与虚拟桌面](/v2/features/displays-and-desktops)。 - + +## 近期新增步骤 + +2.2.18 起,客户端新增[远程文件](/v2/xaction/modules/remotefile)步骤,可通过 WebDAV 上传、下载、列出、查询、删除或移动网盘及 NAS 文件,并创建目录;2.2.19 起进一步支持 S3、文本与图片内容、复制文件和批量传输。账号在 **设置 → 软件连接 → 远程文件账号** 中配置,只保存在本机;换电脑或分享动作时,需要在目标电脑配置相同的账号引用名。 + +2.2.20 起,客户端新增 [显示器](/v2/xaction/modules/monitor) 与 [虚拟桌面](/v2/xaction/modules/virtualdesktop) 步骤。显示器步骤可获取屏幕列表、坐标和工作区,并对鼠标所在屏、主屏、指定屏或全部屏读取、设置或增减亮度,也可显示可交互亮度 OSD;复制显示导致无法唯一对应物理显示器时,请明确指定目标。虚拟桌面步骤可查询、切换、创建、删除、重命名、排序桌面,查询窗口所在桌面并移动窗口,也可读取或设置窗口是否固定到所有桌面;能力取决于 Windows 完整版本,删除桌面时需要指定窗口迁移目标,且不能删除最后一个桌面。更多操作说明见[显示器与虚拟桌面](/v2/features/displays-and-desktops)。 diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 6ac0447..8c66b8e 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -185,13 +185,14 @@ const config: Config = { }, items: [ { - type: 'docSidebar', - sidebarId: 'docsSidebar', + to: '/v2/getting-started', position: 'left', - label: '文档', + label: '开始使用', }, + {to: '/v2/features', label: '功能使用', position: 'left'}, + {to: '/v2/xaction', label: '组合动作', position: 'left'}, {to: '/release-notes', label: '更新记录', position: 'left'}, - {type: 'search', position: 'left'}, + {type: 'search', position: 'right'}, ...(!isProd ? [ { diff --git a/src/components/RelatedDocs/styles.module.css b/src/components/RelatedDocs/styles.module.css index a64a04e..516ed13 100644 --- a/src/components/RelatedDocs/styles.module.css +++ b/src/components/RelatedDocs/styles.module.css @@ -1,157 +1,61 @@ -/* Markdown `## 相关链接` stays in the TOC; visually shrink it for chips only. */ +/* Related links and landing directories share one title-first visual style. */ :global(.markdown h2:has(+ .qk-related-docs[data-layout='chips'])), :global(.markdown h3:has(+ .qk-related-docs[data-layout='chips'])) { - margin: 1.15rem 0 8px; - padding-bottom: 0; - border-bottom: none; - color: var(--quicker-text-muted, #5f6b7a); - font-size: 12px; - font-weight: 500; - line-height: 1.3; -} - -.wrap { - margin: 0 0 1.25rem; -} - -.caption { - margin: 0 0 8px; - color: var(--quicker-text-muted, #5f6b7a); - font-size: 12px; - font-weight: 500; - line-height: 1.3; -} - -.row { - display: flex; - flex-wrap: wrap; - gap: 8px; - margin: 0; -} - + margin: 1.15rem 0 0.55rem; + padding: 0; + border: 0; + color: var(--quicker-text-muted); + font-size: 0.86rem; +} +.wrap { margin: 0 0 1.25rem; } +.caption { margin: 0 0 0.55rem; color: var(--quicker-text-muted); font-size: 0.86rem; } +.row { display: flex; flex-wrap: wrap; gap: 8px; } .chip { display: flex; - flex: 1 1 0; + flex: 1 1 11rem; flex-direction: column; - justify-content: center; - gap: 2px; - min-width: 8.5rem; - max-width: 100%; - padding: 7px 12px; - border: 1px solid var(--quicker-border-subtle, #e4e9f0); + gap: 4px; + min-width: 0; + padding: 0.65rem 0.85rem; + border: 1px solid var(--quicker-border-subtle); border-radius: 6px; - background: var(--quicker-surface-subtle, #f7f9fb); - color: inherit; + background: var(--ifm-background-color); + color: var(--ifm-font-color-base); text-decoration: none !important; - transition: - border-color 0.15s ease, - background 0.15s ease; } - -.chip:hover { +.chip:hover, .card:hover { border-color: var(--ifm-color-primary); - background: color-mix(in srgb, var(--ifm-color-primary) 8%, var(--quicker-surface-subtle)); - color: inherit; -} - -.title { - font-size: 13px; - font-weight: 600; - line-height: 1.35; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.description { - color: var(--quicker-text-muted, #5f6b7a); - font-size: 11px; - line-height: 1.35; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - overflow: hidden; + background: var(--quicker-surface-subtle); + color: var(--ifm-font-color-base); } - +.title { font-size: 0.88rem; font-weight: 600; line-height: 1.5; } +.description { color: var(--quicker-text-muted); font-size: 0.8rem; line-height: 1.55; } .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 10px; - margin: 0.15rem 0 0.35rem; + gap: 12px; } - .card { display: flex; - align-items: center; - gap: 12px; + align-items: flex-start; + gap: 1rem; min-width: 0; - padding: 14px 16px; - border: 1px solid var(--quicker-border-subtle, #e4e9f0); + padding: 1.2rem; + border: 1px solid var(--quicker-border-subtle); border-radius: 10px; - background: var(--ifm-background-surface-color, #fff); - box-shadow: 0 1px 2px rgb(0 0 0 / 4%); - color: inherit; + background: var(--ifm-background-color); + color: var(--ifm-font-color-base); text-decoration: none !important; - transition: - border-color 0.15s ease, - box-shadow 0.15s ease, - transform 0.15s ease, - background 0.15s ease; -} - -.card[data-featured='true'] { - grid-column: 1 / -1; - padding: 16px 18px; -} - -.card:hover { - border-color: color-mix(in srgb, var(--ifm-color-primary) 50%, var(--quicker-border-subtle)); - box-shadow: 0 8px 20px rgb(0 0 0 / 8%); - transform: translateY(-1px); - color: inherit; -} - -.cardBody { - display: grid; - gap: 4px; - min-width: 0; - flex: 1 1 auto; -} - -.cardTitle { - font-size: 15px; - font-weight: 650; - line-height: 1.35; -} - -.card[data-featured='true'] .cardTitle { - font-size: 16px; -} - -.cardDescription { - color: var(--quicker-text-muted, #5f6b7a); - font-size: 13px; - line-height: 1.45; -} - -.cardArrow { - flex: 0 0 auto; - color: var(--ifm-color-emphasis-600, #6b7280); - font-size: 16px; - line-height: 1; -} - -.card:hover .cardArrow { - color: var(--ifm-color-primary); -} - + transition: border-color 0.15s ease, background 0.15s ease; +} +.card[data-featured='true'] { grid-column: 1 / -1; } +.cardBody { display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; flex: 1; } +.cardTitle { font-size: 1rem; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; } +.cardDescription { color: var(--quicker-text-muted); font-size: 0.88rem; line-height: 1.65; } +.cardArrow { flex: 0 0 auto; color: var(--quicker-text-muted); line-height: 1.5; } +.card:hover .cardArrow { color: var(--ifm-color-primary); } +.card:focus-visible, .chip:focus-visible { outline: 2px solid var(--ifm-color-primary); outline-offset: 3px; } +:global(.docs-start-paths) .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } @media (max-width: 640px) { - .grid { - grid-template-columns: 1fr; - } -} - -html[data-theme='dark'] .card { - background: var(--ifm-background-surface-color, #1b1f24); - box-shadow: none; + .grid, :global(.docs-start-paths) .grid { grid-template-columns: 1fr; } } diff --git a/src/components/XActionLanding/styles.module.css b/src/components/XActionLanding/styles.module.css index bb41db4..99142a9 100644 --- a/src/components/XActionLanding/styles.module.css +++ b/src/components/XActionLanding/styles.module.css @@ -57,7 +57,7 @@ @media (min-width: 900px) { .categories { - grid-template-columns: repeat(3, minmax(0, 1fr)); + grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); } } @@ -66,10 +66,10 @@ flex-direction: column; gap: 4px; min-width: 0; - padding: 0.7rem 0.8rem 0.75rem; + padding: 1.1rem; border: 1px solid var(--quicker-border-subtle); border-radius: 8px; - background: var(--quicker-surface-subtle); + background: var(--ifm-background-color); color: inherit; text-decoration: none !important; transition: @@ -79,7 +79,7 @@ .card:hover { border-color: var(--ifm-color-primary); - background: color-mix(in srgb, var(--ifm-color-primary) 7%, var(--quicker-surface-subtle)); + background: var(--quicker-surface-subtle); } .pathCard { @@ -102,7 +102,7 @@ } .title { - font-size: 0.92rem; + font-size: 1rem; font-weight: 650; line-height: 1.35; } @@ -126,7 +126,7 @@ .description { color: var(--quicker-text-muted); - font-size: 0.78rem; + font-size: 0.88rem; line-height: 1.45; } @@ -145,7 +145,7 @@ border-radius: 999px; background: var(--ifm-background-surface-color, #fff); color: inherit; - font-size: 0.78rem; + font-size: 0.88rem; line-height: 1.4; text-decoration: none !important; transition: @@ -185,7 +185,7 @@ .migrateLabel { flex: 0 0 auto; color: var(--quicker-text-muted); - font-size: 0.78rem; + font-size: 0.88rem; } .migrateTitle { diff --git a/src/css/custom.css b/src/css/custom.css index 5dfe878..e956e72 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -4,13 +4,13 @@ /* You can override the default Infima variables here. */ :root { - --ifm-color-primary: #2b7abf; - --ifm-color-primary-dark: #2469a4; - --ifm-color-primary-darker: #22639b; - --ifm-color-primary-darkest: #1c527f; - --ifm-color-primary-light: #3d88c6; - --ifm-color-primary-lighter: #488ec9; - --ifm-color-primary-lightest: #6aa4d4; + --ifm-color-primary: #326ab7; + --ifm-color-primary-dark: #2d60a5; + --ifm-color-primary-darker: #2a5a9c; + --ifm-color-primary-darkest: #234a80; + --ifm-color-primary-light: #447bc8; + --ifm-color-primary-lighter: #4e83cc; + --ifm-color-primary-lightest: #6c98d6; --ifm-font-family-base: "Microsoft YaHei UI", "PingFang SC", @@ -40,9 +40,9 @@ --ifm-list-margin: 0.7rem; --ifm-spacing-horizontal: 1rem; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); - --quicker-text-muted: #5f6b7a; - --quicker-surface-subtle: #f7f9fb; - --quicker-border-subtle: #e4e9f0; + --quicker-text-muted: #606874; + --quicker-surface-subtle: #f6f7f9; + --quicker-border-subtle: #e1e4e8; --qk-scrollbar-thumb: rgba(0, 0, 0, 0.08); --qk-scrollbar-thumb-hover: rgba(0, 0, 0, 0.16); /* Match prism-react-renderer github / vsDark plain colors. */ @@ -66,23 +66,25 @@ } [data-theme='dark'] { - --ifm-color-primary: #4d9fff; - --ifm-color-primary-dark: #2f8fff; - --ifm-color-primary-darker: #2287ff; - --ifm-color-primary-darkest: #006ee5; - --ifm-color-primary-light: #6aafff; - --ifm-color-primary-lighter: #79b6ff; - --ifm-color-primary-lightest: #a5ceff; + --ifm-color-primary: #8ab4f8; + --ifm-color-primary-dark: #73a5f6; + --ifm-color-primary-darker: #679df6; + --ifm-color-primary-darkest: #4587f3; + --ifm-color-primary-light: #a1c3fa; + --ifm-color-primary-lighter: #adcafa; + --ifm-color-primary-lightest: #cfe0fc; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); - --quicker-text-muted: #a7b2c0; - --quicker-surface-subtle: #18212b; - --quicker-border-subtle: #2a3644; + --quicker-text-muted: #a6adb8; + --ifm-background-color: #181a1e; + --ifm-background-surface-color: #202226; + --quicker-surface-subtle: #202226; + --quicker-border-subtle: #34383f; --qk-scrollbar-thumb: rgba(255, 255, 255, 0.1); --qk-scrollbar-thumb-hover: rgba(255, 255, 255, 0.18); --qk-code-bg: #1e1e1e; --qk-code-fg: #9cdcfe; --ifm-navbar-search-input-background-color: var(--quicker-surface-subtle); - --search-local-modal-background: #1b2430; + --search-local-modal-background: #202226; --search-local-modal-shadow: 0 12px 32px rgba(0, 0, 0, 0.38); } @@ -281,16 +283,12 @@ } .theme-doc-card-container.card.padding--lg { - padding: 0.5rem 0.75rem !important; - } - - .theme-doc-card--gallery.card.padding--lg { - padding: 0 !important; + padding: 1.2rem !important; } [class*="generatedIndexPage"] section.row { display: grid !important; - grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important; + grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)) !important; gap: 0.75rem !important; margin-left: 0 !important; margin-right: 0 !important; @@ -595,182 +593,127 @@ html[data-theme='dark'] .theme-code-block .token.parameter { font-size: 0.75rem; } -/* Generated-index / DocCard: compact title rows, no emoji tiles. */ -[class*="generatedIndexPage"] { - max-width: 100% !important; -} - +/* Directory pages use the same quiet title-first links as the landing pages. */ +[class*="generatedIndexPage"] { max-width: 100% !important; } [class*="generatedIndexPage"] > header h1, [class*="generatedIndexPage"] h1[class*="title"] { - --ifm-h1-font-size: 1.5rem; - font-size: 1.5rem; - margin-bottom: 0.45rem; + font-size: 1.8rem; + margin-bottom: 0.6rem; } - [class*="generatedIndexPage"] > header p { color: var(--quicker-text-muted); - font-size: 0.88rem; - line-height: 1.55; - margin-bottom: 0.85rem; + line-height: 1.65; + margin-bottom: 1.4rem; } - -.theme-doc-card-container.card, -.theme-doc-card--gallery.card { - box-shadow: none; - border: 1px solid var(--quicker-border-subtle); - background: var(--quicker-surface-subtle); - border-radius: 8px; - overflow: hidden; +.theme-doc-card-container.card { height: 100%; + padding: 1.2rem !important; + border: 1px solid var(--quicker-border-subtle); + border-radius: 10px; + background: var(--ifm-background-color); + box-shadow: none; + color: var(--ifm-font-color-base); text-decoration: none !important; - color: inherit; transition: border-color 0.15s ease, background 0.15s ease; } - -.theme-doc-card-container:hover, -.theme-doc-card--gallery:hover { - box-shadow: none; +.theme-doc-card-container.card:hover { border-color: var(--ifm-color-primary); - background: color-mix(in srgb, var(--ifm-color-primary) 7%, var(--quicker-surface-subtle)); + background: var(--quicker-surface-subtle); + color: var(--ifm-font-color-base); } - -.theme-doc-card__cover { - position: relative; - display: block; - aspect-ratio: 16 / 10; - min-height: 148px; - max-height: 148px; - background: color-mix(in srgb, var(--ifm-color-primary) 8%, var(--quicker-surface-subtle)); - overflow: hidden; +.theme-doc-card-container:focus-visible, +.docs-landing a:focus-visible { + outline: 2px solid var(--ifm-color-primary); + outline-offset: 3px; } - -.theme-doc-card__cover img { - position: absolute; - inset: 0; - display: block; - width: 100%; - height: 100%; - object-fit: cover; - object-position: top left; +.theme-doc-card__heading-row { + display: flex; + align-items: baseline; + justify-content: space-between; + gap: 1rem; } - -.theme-doc-card__cover--mosaic { - display: grid; - grid-template-columns: 1fr 1fr; - grid-template-rows: 1fr 1fr; - gap: 1px; - background: var(--quicker-border-subtle); +.theme-doc-card-heading { + margin: 0; + font-size: 1rem; + font-weight: 600; + line-height: 1.5; } - -.theme-doc-card__cover--two { - grid-template-rows: 1fr; +.theme-doc-card-title { white-space: normal; overflow-wrap: anywhere; } +.theme-doc-card__arrow { color: var(--quicker-text-muted); } +.theme-doc-card-description { + margin: 0.5rem 0 0; + color: var(--quicker-text-muted); + font-size: 0.88rem; + line-height: 1.65; + white-space: normal; } - -.theme-doc-card__cover--mosaic img { - position: static; - min-width: 0; - min-height: 0; +.theme-doc-card__count { + display: block; + margin-top: 0.6rem; + color: var(--quicker-text-muted); + font-size: 0.8rem; } - -.theme-doc-card__cover--text { - display: flex; - flex-direction: column; - justify-content: center; - gap: 10px; - padding: 16px 14px; - background: - linear-gradient( - 165deg, - color-mix(in srgb, var(--ifm-color-primary) 16%, var(--quicker-surface-subtle)) 0%, - var(--quicker-surface-subtle) 72% - ); +.theme-doc-markdown h1 { font-size: 1.9rem; } +.docs-landing { padding: 0.5rem 0 0.75rem; } +.markdown .docs-landing > h1 { + font-size: clamp(1.9rem, 3vw, 2.35rem); + margin: 0 0 0.65rem; + line-height: 1.3; } - -.theme-doc-card__excerpt { - margin: 0; - color: var(--ifm-font-color-base); - font-size: 0.8rem; - line-height: 1.55; - opacity: 0.82; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 4; - overflow: hidden; +.markdown .docs-landing__lead { + color: var(--quicker-text-muted); + font-size: 1.08rem; + line-height: 1.7; + margin-bottom: 1.1rem; } - -.theme-doc-card__chips { - display: flex; - flex-wrap: wrap; - gap: 6px; - margin: 0; +.markdown .docs-landing h2 { + margin-top: 2rem; + margin-bottom: 0.85rem; + border: 0; padding: 0; - list-style: none; + font-size: 1.16rem; } - -.theme-doc-card__chips li { - max-width: 100%; - padding: 2px 8px; +.docs-landing__notice { + margin: 1.2rem 0 1.6rem; + padding: 0.85rem 1rem; border: 1px solid var(--quicker-border-subtle); - border-radius: 999px; - background: color-mix(in srgb, var(--ifm-background-color) 78%, transparent); + border-left: 3px solid var(--ifm-color-primary); + border-radius: 6px; + background: var(--quicker-surface-subtle); color: var(--quicker-text-muted); - font-size: 0.68rem; - line-height: 1.4; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + font-size: 0.85rem; } - -.theme-doc-card__cover-fallback { +.markdown .docs-landing__notice p { margin: 0; } +.docs-landing__notice strong { color: var(--ifm-font-color-base); } +.docs-landing__more { margin-top: -0.25rem; font-size: 0.88rem; } +.docs-landing__lessons { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 1rem; + padding: 0; + margin: 0; + list-style: none; +} +.docs-landing__lessons li { margin: 0; } +.docs-landing__lessons a { display: flex; - align-items: center; - justify-content: center; + flex-direction: column; + gap: 0.4rem; height: 100%; - color: var(--ifm-color-primary); - font-size: 1.4rem; - font-weight: 650; - background: - linear-gradient( - 165deg, - color-mix(in srgb, var(--ifm-color-primary) 16%, var(--quicker-surface-subtle)) 0%, - var(--quicker-surface-subtle) 72% - ); -} - -.theme-doc-card__body { - padding: 0.55rem 0.7rem 0.7rem; + padding: 1rem 0; + border-top: 1px solid var(--quicker-border-subtle); + color: var(--ifm-font-color-base); + text-decoration: none; } - -.theme-doc-card-heading { - display: flex; - align-items: center; - gap: 0.35rem; - margin: 0; - font-size: 0.9rem; +.docs-landing__lesson-number { + color: var(--ifm-color-primary); + font-size: 0.8rem; font-weight: 600; - line-height: 1.35; -} - -.theme-doc-card-icon { - display: none; -} - -.theme-doc-card-title { - font-size: 0.9rem; - white-space: normal; - overflow: visible; - text-overflow: unset; } - -.theme-doc-card--gallery .theme-doc-card-description { - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - overflow: hidden; - margin: 0.28rem 0 0; - color: var(--quicker-text-muted); - font-size: 0.76rem; - line-height: 1.45; +.docs-landing__lessons a:hover strong { color: var(--ifm-color-primary); } +.docs-landing__lessons span { color: var(--quicker-text-muted); font-size: 0.85rem; } +@media (max-width: 640px) { + .docs-landing__lessons { grid-template-columns: 1fr; gap: 0; } } .table-of-contents__link--active { diff --git a/src/theme/DocCard/index.tsx b/src/theme/DocCard/index.tsx index fefd85c..73ab1a4 100644 --- a/src/theme/DocCard/index.tsx +++ b/src/theme/DocCard/index.tsx @@ -1,166 +1,49 @@ -import React, {type ReactNode} from "react"; -import clsx from "clsx"; -import Link from "@docusaurus/Link"; -import {findFirstSidebarItemLink} from "@docusaurus/plugin-content-docs/client"; -import {useDocCardDescriptionCategoryItemsPlural} from "@docusaurus/theme-common/internal"; -import {ThemeClassNames} from "@docusaurus/theme-common"; -import type {Props} from "@theme/DocCard"; -import type { - PropSidebarItemCategory, - PropSidebarItemLink, -} from "@docusaurus/plugin-content-docs"; -import {lookupDocGallery, useDocGallery} from "@site/src/data/docGallery"; - -function isBoilerplateDescription(text: string | undefined, title: string): boolean { - const value = (text ?? "").trim(); - if (!value) return true; - if (value === title) return true; - if (/的 Quicker 2\.0 使用说明\.?$/.test(value)) return true; - if (/模块参考/.test(value) && /参数表由/.test(value)) return true; - return false; -} - -function resolveHref( - item: PropSidebarItemLink | PropSidebarItemCategory, -): string | undefined { - if (item.type === "link") return item.href; - return item.href ?? findFirstSidebarItemLink(item) ?? undefined; -} - -function Cover({ - covers, - title, - excerpt, - hints, -}: { - covers: string[]; - title: string; - excerpt?: string; - hints?: string[]; -}): ReactNode { - const shown = covers.slice(0, 4); - if (shown.length > 0) { - return ( -
1 && "theme-doc-card__cover--mosaic", - shown.length === 2 && "theme-doc-card__cover--two", - )} - > - {shown.map((src) => ( - - ))} -
- ); - } - - const chips = (hints ?? []).slice(0, 4); - const blurb = (excerpt ?? "").trim(); - if (blurb || chips.length > 0) { - return ( -
- {blurb ?

{blurb}

: null} - {chips.length > 0 ? ( - - ) : null} -
- ); - } - - return ( -
- - {title.slice(0, 1)} - -
- ); +import React, {type ReactNode} from 'react'; +import clsx from 'clsx'; +import Link from '@docusaurus/Link'; +import {findFirstSidebarItemLink} from '@docusaurus/plugin-content-docs/client'; +import {useDocCardDescriptionCategoryItemsPlural} from '@docusaurus/theme-common/internal'; +import {ThemeClassNames} from '@docusaurus/theme-common'; +import type {Props} from '@theme/DocCard'; +import type {PropSidebarItemCategory, PropSidebarItemLink} from '@docusaurus/plugin-content-docs'; +import {lookupDocGallery, useDocGallery} from '@site/src/data/docGallery'; + +function isUsefulDescription(text: string | undefined, title: string): boolean { + const value = (text ?? '').trim(); + return Boolean(value && value !== title && + !/的 Quicker 2\.0 使用说明\.?$/.test(value) && + !(/模块参考/.test(value) && /参数表由/.test(value))); } -function GalleryCard({ - href, - title, - description, - className, -}: { - href: string; - title: string; - description?: string; - className?: string; -}): ReactNode { - const gallery = lookupDocGallery(useDocGallery(), href); - const covers = gallery?.covers ?? []; - const text = gallery?.description - ? gallery.description - : description && !isBoilerplateDescription(description, title) - ? description - : undefined; +function DirectoryCard({item}: {item: PropSidebarItemLink | PropSidebarItemCategory}): ReactNode { + const gallery = useDocGallery(); + const categoryItemsPlural = useDocCardDescriptionCategoryItemsPlural(); + const href = item.type === 'link' ? item.href : item.href ?? findFirstSidebarItemLink(item); + if (!href) return null; + const description = lookupDocGallery(gallery, href)?.description ?? item.description; return ( - - -
-

- {title} + +
+

+ {item.label}

- {text ? ( -

- {text} -

- ) : null} + →
+ {isUsefulDescription(description, item.label) ? ( +

+ {description} +

+ ) : null} + {item.type === 'category' ? ( + {categoryItemsPlural(item.items.length)} + ) : null} ); } -function CardCategory({item}: {item: PropSidebarItemCategory}): ReactNode { - const href = resolveHref(item); - const categoryItemsPlural = useDocCardDescriptionCategoryItemsPlural(); - if (!href) return null; - return ( - - ); -} - -function CardLink({item}: {item: PropSidebarItemLink}): ReactNode { - return ( - - ); -} - +/** 目录只显示标题和说明,避免把正文、章节标签或截图拼成封面。 */ export default function DocCard({item}: Props): ReactNode { - switch (item.type) { - case "link": - return ; - case "category": - return ; - default: - throw new Error(`unknown item type ${JSON.stringify(item)}`); - } + if (item.type !== 'link' && item.type !== 'category') return null; + return ; } From f0365ba0d8880e5fa25f753874c068b46b454da5 Mon Sep 17 00:00:00 2001 From: Cea <61349137+ceastld@users.noreply.github.com> Date: Thu, 1 Oct 2026 07:26:43 -0700 Subject: [PATCH 2/2] =?UTF-8?q?fix(docs):=20=E8=AF=86=E5=88=AB=E5=AF=BC?= =?UTF-8?q?=E8=88=AA=E5=8D=A1=E7=89=87=E7=9A=84=E8=BD=AF=E4=BB=B6=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/bridge-docs/check.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/bridge-docs/check.mjs b/tools/bridge-docs/check.mjs index 82cd96c..ad71633 100644 --- a/tools/bridge-docs/check.mjs +++ b/tools/bridge-docs/check.mjs @@ -84,7 +84,10 @@ export function check() { } else assert.equal(bridge.componentId, `quicker.bridge.${bridge.connectionId}`); } assert.ok(!catalog.modules.some((module) => module.key === 'sys:test')); - for (const home of ['docs/index.md', 'docs/v2/index.md']) assert.ok(read(home).includes('software-connections/index.md')); + // 首页也可通过 RelatedDocs 卡片使用稳定的站内路由。 + for (const home of ['docs/index.md', 'docs/v2/index.md']) { + assert.match(read(home), /software-connections\/index\.md|\/v2\/features\/software-connections\/?(?=['")])/, `${home} 缺少软件连接入口`); + } for (const name of ['index', 'install-and-manage', 'command-tool', 'troubleshooting']) read(`docs/v2/features/software-connections/${name}.md`); return bridges.length; }