feat(web): 分类展示公开 API 文档
将通用开放接口与兼容接口分层展示,补充完整接口目录、分类路由、搜索能力和接入约定。\n\n验证:pnpm nx run web:test;pnpm nx run web:build
This commit is contained in:
@@ -47,6 +47,46 @@
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.docsSurface {
|
||||
display: grid;
|
||||
gap: 0;
|
||||
margin-top: 26px;
|
||||
padding-top: 18px;
|
||||
border-top: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.docsSurfaceHeader {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.docsSurfaceHeader strong {
|
||||
color: var(--text-strong);
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.docsSurfaceHeader span {
|
||||
color: var(--muted-foreground);
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.docsSurface .docsGroup {
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
.docsSearchEmpty,
|
||||
.docsCatalogEmpty {
|
||||
margin-top: 18px;
|
||||
padding: 14px;
|
||||
border: 1px dashed var(--border);
|
||||
border-radius: 8px;
|
||||
color: var(--text-soft);
|
||||
font-size: 0.8125rem;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.docsGroup {
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
@@ -120,6 +160,116 @@
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.docsCatalogSummary {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr) minmax(100px, 0.45fr);
|
||||
gap: 12px;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.docsCatalogSummary article {
|
||||
display: grid;
|
||||
align-content: start;
|
||||
gap: 10px;
|
||||
min-width: 0;
|
||||
padding: 15px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.docsCatalogSummary span {
|
||||
color: var(--text-soft);
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.docsCatalogSummary code {
|
||||
overflow-wrap: anywhere;
|
||||
color: var(--text-normal);
|
||||
font-size: 0.75rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.docsCatalogSummary strong {
|
||||
color: var(--text-strong);
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.docsCatalogNotice {
|
||||
padding: 16px;
|
||||
border: 1px solid #bfdbfe;
|
||||
border-radius: 10px;
|
||||
background: #eff6ff;
|
||||
}
|
||||
|
||||
.docsCatalogNotice[data-surface='compatibility'] {
|
||||
border-color: #ddd6fe;
|
||||
background: #f5f3ff;
|
||||
}
|
||||
|
||||
.docsCatalogNotice p {
|
||||
margin: 8px 0 0;
|
||||
color: var(--text-soft);
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.65;
|
||||
}
|
||||
|
||||
.docsCatalogSearchResult {
|
||||
margin: 18px 0 0;
|
||||
color: var(--text-soft);
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
.docsCatalogGroup > header {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.docsCatalogGroup > header > div:first-child {
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.docsCatalogGroup header p {
|
||||
margin: 0;
|
||||
color: var(--text-soft);
|
||||
font-size: 0.8125rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.docsCatalogEndpoints {
|
||||
display: grid;
|
||||
}
|
||||
|
||||
.docsCatalogEndpoint {
|
||||
display: grid;
|
||||
grid-template-columns: 68px minmax(250px, 1.3fr) minmax(150px, 1fr);
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 12px 16px;
|
||||
border-bottom: 1px solid #f0f2f5;
|
||||
}
|
||||
|
||||
.docsCatalogEndpoint:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.docsCatalogEndpoint .shBadge {
|
||||
justify-self: start;
|
||||
}
|
||||
|
||||
.docsCatalogEndpoint code {
|
||||
overflow-wrap: anywhere;
|
||||
color: var(--text-normal);
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.docsCatalogEndpoint span {
|
||||
color: var(--text-soft);
|
||||
font-size: 0.8125rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.agentResourceCard {
|
||||
display: grid;
|
||||
grid-template-columns: auto minmax(0, 1fr);
|
||||
@@ -476,6 +626,11 @@
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.docsCatalogSummary,
|
||||
.docsCatalogEndpoint {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.agentResourceCard {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user