Files
monkey-ai-web/src/pages/WeyAiDownload/weyai-download.css
T

502 lines
11 KiB
CSS

/* The standalone and embedded download views share the system theme. */
.weyai-download {
--wd-ink: var(--text-primary);
--wd-muted: var(--text-secondary);
--wd-line: var(--border-subtle);
--wd-card: var(--surface-card);
--wd-accent: var(--brand-primary);
--wd-accent-deep: var(--brand-primary);
--wd-tint: color-mix(in srgb, var(--brand-primary) 8%, transparent);
--wd-tint-strong: color-mix(in srgb, var(--brand-primary) 14%, transparent);
--wd-accent-line: color-mix(in srgb, var(--brand-primary) 28%, transparent);
--wd-danger: var(--ui-color-danger);
--wd-danger-tint: color-mix(in srgb, var(--ui-color-danger) 8%, transparent);
--wd-focus: var(--brand-primary);
position: relative;
min-width: 0;
color: var(--wd-ink);
}
.weyai-download--standalone {
margin-top: calc(
var(--console-header-offset, 72px) - var(--content-top-offset, 0px)
);
min-height: calc(100dvh - var(--console-header-offset, 72px));
background: var(--surface-bg-base);
}
.weyai-download__inner {
position: relative;
max-width: 1120px;
margin: 0 auto;
padding: 24px 30px;
display: flex;
flex-direction: column;
gap: 18px;
}
@media (max-width: 768px) {
.weyai-download__inner {
padding: 16px;
}
}
/* 嵌入用户中心:跟随内容区宽度,不再居中收窄;内边距与面包屑对齐 .uc-page 统一边距 */
.weyai-download--embedded .weyai-download__inner {
max-width: none;
padding: var(--uc-page-pad-top, 30px) var(--uc-page-pad-x, 36px)
var(--uc-page-pad-bottom, 36px);
}
/* Keep package headings visible below the fixed header and announcement. */
.weyai-download--standalone #weyai-download-all {
scroll-margin-top: calc(var(--console-header-offset, 72px) + 16px);
}
.weyai-download--embedded #weyai-download-all {
scroll-margin-top: 16px;
}
/* ───── hero ───── */
.wd-hero {
min-width: 0;
}
.wd-hero > .wd-eyebrow {
margin-bottom: 8px;
}
.wd-hero .uc-page-header {
margin-bottom: 0;
}
.wd-eyebrow {
display: inline-flex;
align-items: center;
gap: 8px;
color: var(--wd-accent);
font-size: 12px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.wd-hero-meta {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px;
margin-top: 12px;
}
.wd-chip {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 3px 10px;
border: 1px solid var(--wd-accent-line);
border-radius: 8px;
background: var(--wd-tint);
font-size: 12px;
font-weight: 600;
color: var(--wd-accent-deep);
font-variant-numeric: tabular-nums;
}
.wd-chip--muted {
border-color: var(--wd-line);
background: transparent;
color: var(--wd-muted);
font-weight: 500;
}
.wd-hero-actions {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
/* ───── 卡片基础 ───── */
.wd-card {
border: 1px solid var(--wd-line);
border-radius: 12px;
background: var(--wd-card);
}
/* ───── 推荐安装包 ───── */
.wd-reco {
position: relative;
overflow: hidden;
padding: 24px;
border-color: var(--wd-accent-line);
background: var(--wd-card);
}
.wd-reco::before {
content: '';
position: absolute;
inset: 0 auto 0 0;
width: 4px;
background: var(--wd-accent);
}
.wd-reco__row {
display: flex;
flex-direction: column;
gap: 16px;
}
@media (min-width: 768px) {
.wd-reco__row {
flex-direction: row;
align-items: center;
justify-content: space-between;
}
}
.wd-reco__main {
display: flex;
align-items: flex-start;
gap: 16px;
min-width: 0;
}
.wd-os-badge {
flex-shrink: 0;
display: inline-flex;
align-items: center;
justify-content: center;
width: 52px;
height: 52px;
border-radius: 10px;
border: 1px solid var(--wd-accent-line);
background: var(--wd-tint-strong);
color: var(--wd-accent-deep);
}
/* 推荐卡的眉标带插值的平台名(macOS),不能全大写 */
.wd-reco .wd-eyebrow {
text-transform: none;
letter-spacing: 0.04em;
}
.wd-reco__title {
margin: 2px 0 4px;
font-size: 20px;
font-weight: 700;
letter-spacing: -0.01em;
line-height: 1.3;
color: var(--wd-ink);
}
.wd-reco__meta {
display: flex;
flex-wrap: wrap;
gap: 4px 12px;
font-size: 12px;
color: var(--wd-muted);
font-variant-numeric: tabular-nums;
}
.wd-reco__meta code {
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-size: 12px;
color: var(--wd-muted);
word-break: break-all;
}
.wd-reco__hint {
margin-top: 8px;
font-size: 12px;
color: var(--wd-muted);
}
.wd-reco__actions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px;
}
@media (min-width: 768px) {
.wd-reco__actions {
flex-direction: column;
align-items: stretch;
flex-shrink: 0;
}
}
/* ───── 特性条 ───── */
.wd-features {
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 16px;
}
@media (min-width: 640px) {
.wd-features {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (min-width: 1024px) {
.wd-features {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
/* 嵌入用户中心时内容区少了 240px 侧栏,1024–1279 之间四列每列不足 200px,
英文描述会折五六行;这一档保持两列,到 1280 再放四列 */
.weyai-download--embedded .wd-features {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (min-width: 1280px) {
.weyai-download--embedded .wd-features {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
}
.wd-feature {
display: flex;
gap: 12px;
padding: 14px 16px;
}
.wd-feature__icon {
flex-shrink: 0;
display: inline-flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border-radius: 10px;
background: var(--wd-tint);
color: var(--wd-accent-deep);
}
.wd-feature__title {
display: block;
font-size: 13px;
font-weight: 600;
color: var(--wd-ink);
}
.wd-feature__desc {
display: block;
margin-top: 2px;
font-size: 12px;
line-height: 18px;
color: var(--wd-muted);
}
/* ───── 分区标题 ───── */
.wd-section-head {
display: flex;
flex-wrap: wrap;
align-items: baseline;
justify-content: space-between;
gap: 8px;
}
.wd-section-head h2 {
margin: 0;
font-size: 15px;
font-weight: 600;
letter-spacing: -0.01em;
color: var(--wd-ink);
}
.wd-section-head p {
margin: 0;
font-size: 12px;
color: var(--wd-muted);
}
/* ───── 全部安装包 ───── */
.wd-platforms {
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 12px;
}
@media (min-width: 768px) {
.wd-platforms {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (min-width: 1024px) {
.wd-platforms {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
}
.wd-platform {
overflow: hidden;
}
/* 手机端卡片底部的用途说明 */
.wd-platform__note {
padding: 10px 16px 12px;
font-size: 12px;
color: var(--wd-muted);
}
.wd-platform__head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 12px 16px;
border-bottom: 1px solid var(--wd-line);
}
.wd-platform__name {
display: inline-flex;
align-items: center;
gap: 8px;
font-size: 14px;
font-weight: 600;
color: var(--wd-ink);
}
.wd-platform__name svg {
color: var(--wd-accent-deep);
}
.wd-platform__count {
font-size: 12px;
color: var(--wd-muted);
font-variant-numeric: tabular-nums;
}
.wd-file {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 12px 16px;
border-bottom: 1px solid var(--wd-line);
}
.wd-file > .ant-btn {
flex-shrink: 0;
}
.wd-file:last-child {
border-bottom: 0;
}
.wd-file:hover {
background: var(--wd-tint);
}
.wd-file--reco {
box-shadow: inset 3px 0 0 var(--wd-accent);
}
.wd-file__main {
min-width: 0;
}
.wd-file__title {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 6px;
font-size: 14px;
font-weight: 600;
color: var(--wd-ink);
}
.wd-file__title .ant-tag {
margin-inline-end: 0;
}
.wd-recommended-tag.ant-tag {
color: var(--wd-accent);
background: var(--wd-tint);
border-color: var(--wd-accent-line);
}
.wd-file__meta {
display: block;
margin-top: 2px;
font-size: 12px;
color: var(--wd-muted);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-variant-numeric: tabular-nums;
}
/* ───── 步骤 ───── */
.wd-steps {
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 12px;
}
@media (min-width: 768px) {
.wd-steps {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
}
.wd-step {
position: relative;
padding: 16px 16px 16px 56px;
}
.wd-step__num {
position: absolute;
left: 16px;
top: 16px;
display: inline-flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
border-radius: 999px;
background: var(--wd-tint-strong);
color: var(--wd-accent);
font-size: 13px;
font-weight: 700;
font-variant-numeric: tabular-nums;
}
.wd-step__title {
display: block;
font-size: 13px;
font-weight: 600;
color: var(--wd-ink);
}
.wd-step__desc {
display: block;
margin-top: 2px;
font-size: 12px;
line-height: 18px;
color: var(--wd-muted);
}
/* ───── 状态卡(加载失败 / 未开放 / 暂无安装包) ───── */
.wd-state {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
gap: 8px;
padding: 36px 20px;
}
.wd-state__icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 56px;
height: 56px;
border-radius: 12px;
background: var(--wd-tint);
color: var(--wd-accent-deep);
margin-bottom: 4px;
}
.wd-state--danger .wd-state__icon {
background: var(--wd-danger-tint);
color: var(--wd-danger);
}
.wd-state__title {
font-size: 15px;
font-weight: 600;
color: var(--wd-ink);
}
.wd-state__desc {
max-width: 520px;
font-size: 13px;
line-height: 20px;
color: var(--wd-muted);
overflow-wrap: anywhere;
}
.wd-state__actions {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 8px;
margin-top: 8px;
}
/* ───── 骨架 ───── */
.wd-skeleton {
padding: 24px;
display: flex;
flex-direction: column;
gap: 12px;
}
.wd-footnote {
font-size: 12px;
color: var(--wd-muted);
text-align: center;
}
.weyai-download button:focus-visible,
.weyai-download a:focus-visible {
outline: 2px solid var(--wd-focus);
outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
.weyai-download .ant-btn,
.weyai-download .wd-skeleton .ant-skeleton.ant-skeleton-active *,
.weyai-download *,
.weyai-download *::before,
.weyai-download *::after {
animation: none;
transition: none;
scroll-behavior: auto;
}
}