feat(desktop-download): 优化下载页响应式布局与键盘导航
This commit is contained in:
@@ -4,14 +4,15 @@
|
||||
--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-accent: var(--brand-accent);
|
||||
--wd-accent-deep: var(--brand-selection-text);
|
||||
--wd-tint: var(--brand-selection-bg);
|
||||
--wd-tint-strong: color-mix(in srgb, var(--wd-accent) 16%, var(--wd-card));
|
||||
--wd-accent-line: color-mix(in srgb, var(--wd-accent) 26%, var(--wd-line));
|
||||
--wd-danger: var(--ui-color-danger);
|
||||
--wd-danger-tint: color-mix(in srgb, var(--ui-color-danger) 8%, transparent);
|
||||
--wd-focus: var(--brand-primary);
|
||||
--wd-focus: var(--brand-accent);
|
||||
--wd-meta: color-mix(in srgb, var(--wd-muted) 72%, var(--wd-ink));
|
||||
position: relative;
|
||||
min-width: 0;
|
||||
color: var(--wd-ink);
|
||||
@@ -26,22 +27,23 @@
|
||||
}
|
||||
|
||||
.weyai-download__inner {
|
||||
container-type: inline-size;
|
||||
position: relative;
|
||||
max-width: 1120px;
|
||||
max-width: clamp(1440px, 82vw, 1920px);
|
||||
margin: 0 auto;
|
||||
padding: 24px 30px;
|
||||
padding: clamp(16px, 2.4vw, 48px) clamp(16px, 3vw, 48px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 18px;
|
||||
gap: clamp(20px, 2vw, 32px);
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.weyai-download__inner {
|
||||
padding: 16px;
|
||||
}
|
||||
}
|
||||
/* 嵌入用户中心:跟随内容区宽度,不再居中收窄;内边距与面包屑对齐 .uc-page 统一边距 */
|
||||
.weyai-download--embedded .weyai-download__inner {
|
||||
max-width: none;
|
||||
gap: 18px;
|
||||
padding: var(--uc-page-pad-top, 30px) var(--uc-page-pad-x, 36px)
|
||||
var(--uc-page-pad-bottom, 36px);
|
||||
}
|
||||
@@ -53,21 +55,54 @@
|
||||
scroll-margin-top: 16px;
|
||||
}
|
||||
|
||||
/* ───── hero ───── */
|
||||
.wd-intro {
|
||||
display: contents;
|
||||
}
|
||||
.weyai-download--standalone .wd-intro {
|
||||
display: grid;
|
||||
align-items: stretch;
|
||||
gap: clamp(16px, 3cqw, 40px);
|
||||
padding: clamp(16px, 3cqw, 40px);
|
||||
border: 1px solid var(--wd-line);
|
||||
border-radius: 16px;
|
||||
background: var(--wd-card);
|
||||
}
|
||||
@container (min-width: 880px) {
|
||||
.weyai-download--standalone .wd-intro {
|
||||
grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
.wd-hero {
|
||||
min-width: 0;
|
||||
}
|
||||
.wd-hero > .wd-eyebrow {
|
||||
margin-bottom: 8px;
|
||||
.weyai-download--standalone .wd-hero > .wd-eyebrow {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.wd-hero .uc-page-header {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.weyai-download--standalone .wd-hero .uc-page-header-main {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 16px;
|
||||
}
|
||||
.weyai-download--standalone .wd-hero .uc-page-title {
|
||||
font-size: clamp(28px, 3.3cqw, 46px);
|
||||
line-height: 1.17;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.weyai-download--standalone .wd-hero .uc-page-subtitle {
|
||||
margin-top: 8px;
|
||||
font-size: 15px;
|
||||
line-height: 1.55;
|
||||
color: var(--wd-meta);
|
||||
}
|
||||
.wd-eyebrow {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
color: var(--wd-accent);
|
||||
color: var(--wd-accent-deep);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.08em;
|
||||
@@ -96,7 +131,7 @@
|
||||
.wd-chip--muted {
|
||||
border-color: var(--wd-line);
|
||||
background: transparent;
|
||||
color: var(--wd-muted);
|
||||
color: var(--wd-meta);
|
||||
font-weight: 500;
|
||||
}
|
||||
.wd-hero-actions {
|
||||
@@ -104,6 +139,14 @@
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
.wd-hero-actions .ant-btn,
|
||||
.wd-reco__actions .ant-btn {
|
||||
height: auto;
|
||||
min-height: 36px;
|
||||
max-width: 100%;
|
||||
white-space: normal;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* ───── 卡片基础 ───── */
|
||||
.wd-card {
|
||||
@@ -120,6 +163,16 @@
|
||||
border-color: var(--wd-accent-line);
|
||||
background: var(--wd-card);
|
||||
}
|
||||
.weyai-download--standalone .wd-reco {
|
||||
align-self: stretch;
|
||||
display: grid;
|
||||
align-content: center;
|
||||
padding: clamp(16px, 2.3cqw, 36px);
|
||||
background: color-mix(in srgb, var(--wd-tint) 66%, var(--wd-card));
|
||||
}
|
||||
.weyai-download--standalone .wd-reco::before {
|
||||
content: none;
|
||||
}
|
||||
.wd-reco::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
@@ -132,13 +185,19 @@
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
@container (min-width: 680px) {
|
||||
.wd-reco__row {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
@container (min-width: 880px) {
|
||||
.weyai-download--standalone .wd-reco__row {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
||||
.wd-reco__main {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
@@ -175,19 +234,19 @@
|
||||
flex-wrap: wrap;
|
||||
gap: 4px 12px;
|
||||
font-size: 12px;
|
||||
color: var(--wd-muted);
|
||||
color: var(--wd-meta);
|
||||
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;
|
||||
color: inherit;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.wd-reco__hint {
|
||||
margin-top: 8px;
|
||||
font-size: 12px;
|
||||
color: var(--wd-muted);
|
||||
color: var(--wd-meta);
|
||||
}
|
||||
.wd-reco__actions {
|
||||
display: flex;
|
||||
@@ -195,13 +254,21 @@
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.wd-reco__actions {
|
||||
@container (min-width: 680px) {
|
||||
.weyai-download--embedded .wd-reco__actions {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
.weyai-download--standalone .wd-reco__actions .ant-btn {
|
||||
min-height: 44px;
|
||||
}
|
||||
@container (max-width: 480px) {
|
||||
.weyai-download--standalone .wd-reco__actions {
|
||||
display: grid;
|
||||
}
|
||||
}
|
||||
|
||||
/* ───── 特性条 ───── */
|
||||
.wd-features {
|
||||
@@ -209,25 +276,15 @@
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
gap: 16px;
|
||||
}
|
||||
@media (min-width: 640px) {
|
||||
@container (min-width: 510px) {
|
||||
.wd-features {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
@media (min-width: 1024px) {
|
||||
@container (min-width: 940px) {
|
||||
.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;
|
||||
@@ -260,6 +317,11 @@
|
||||
}
|
||||
|
||||
/* ───── 分区标题 ───── */
|
||||
.wd-section {
|
||||
display: grid;
|
||||
min-width: 0;
|
||||
gap: 12px;
|
||||
}
|
||||
.wd-section-head {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@@ -269,7 +331,7 @@
|
||||
}
|
||||
.wd-section-head h2 {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
letter-spacing: -0.01em;
|
||||
color: var(--wd-ink);
|
||||
@@ -277,77 +339,107 @@
|
||||
.wd-section-head p {
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
color: var(--wd-muted);
|
||||
color: var(--wd-meta);
|
||||
}
|
||||
|
||||
/* ───── 全部安装包 ───── */
|
||||
.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;
|
||||
display: grid;
|
||||
min-width: 0;
|
||||
gap: 12px;
|
||||
padding: 12px;
|
||||
}
|
||||
/* 手机端卡片底部的用途说明 */
|
||||
.wd-platform__note {
|
||||
padding: 10px 16px 12px;
|
||||
padding-inline: 4px;
|
||||
font-size: 12px;
|
||||
color: var(--wd-muted);
|
||||
color: var(--wd-meta);
|
||||
}
|
||||
.wd-platform__head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
padding: 12px 16px;
|
||||
border-bottom: 1px solid var(--wd-line);
|
||||
padding: 4px;
|
||||
}
|
||||
.wd-platform__name {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
font-weight: 650;
|
||||
color: var(--wd-ink);
|
||||
}
|
||||
.wd-platform__name svg {
|
||||
flex: none;
|
||||
color: var(--wd-accent-deep);
|
||||
}
|
||||
.wd-platform__count {
|
||||
font-size: 12px;
|
||||
color: var(--wd-muted);
|
||||
color: var(--wd-meta);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
.wd-platform__files {
|
||||
display: grid;
|
||||
min-width: 0;
|
||||
gap: 8px;
|
||||
}
|
||||
@container (min-width: 620px) {
|
||||
.wd-platform__files:has(> :nth-child(2)) {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
@container (min-width: 900px) {
|
||||
.wd-platform {
|
||||
grid-template-columns: 148px minmax(0, 1fr);
|
||||
gap: 16px;
|
||||
padding: 16px;
|
||||
}
|
||||
.wd-platform__head {
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
gap: 3px;
|
||||
padding-inline: 8px;
|
||||
}
|
||||
.wd-platform__count {
|
||||
padding-inline-start: 26px;
|
||||
}
|
||||
.wd-platform__note {
|
||||
grid-column: 2;
|
||||
}
|
||||
}
|
||||
@container (min-width: 1230px) {
|
||||
.wd-platform__files:has(> :nth-child(4)) {
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
.wd-file {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 12px 16px;
|
||||
border-bottom: 1px solid var(--wd-line);
|
||||
min-width: 0;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid var(--wd-line);
|
||||
border-radius: 8px;
|
||||
}
|
||||
.wd-file > .ant-btn {
|
||||
flex-shrink: 0;
|
||||
min-height: 40px;
|
||||
max-width: 50%;
|
||||
}
|
||||
.wd-file:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
.wd-file:hover {
|
||||
.wd-file:hover,
|
||||
.wd-file:focus-within {
|
||||
background: var(--wd-tint);
|
||||
}
|
||||
.wd-file--reco {
|
||||
box-shadow: inset 3px 0 0 var(--wd-accent);
|
||||
border-color: var(--wd-accent-line);
|
||||
background: color-mix(in srgb, var(--wd-tint) 46%, var(--wd-card));
|
||||
}
|
||||
.wd-file__main {
|
||||
min-width: 0;
|
||||
@@ -360,25 +452,29 @@
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: var(--wd-ink);
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.wd-file__title .ant-tag {
|
||||
margin-inline-end: 0;
|
||||
}
|
||||
.wd-recommended-tag.ant-tag {
|
||||
color: var(--wd-accent);
|
||||
color: var(--wd-accent-deep);
|
||||
background: var(--wd-tint);
|
||||
border-color: var(--wd-accent-line);
|
||||
}
|
||||
.wd-file__meta {
|
||||
display: block;
|
||||
margin-top: 2px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 2px 8px;
|
||||
margin-top: 4px;
|
||||
font-size: 12px;
|
||||
color: var(--wd-muted);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: var(--wd-meta);
|
||||
overflow-wrap: anywhere;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
.wd-file__name {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
/* ───── 步骤 ───── */
|
||||
.wd-steps {
|
||||
@@ -386,7 +482,7 @@
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
gap: 12px;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
@container (min-width: 660px) {
|
||||
.wd-steps {
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
}
|
||||
@@ -406,7 +502,7 @@
|
||||
height: 28px;
|
||||
border-radius: 999px;
|
||||
background: var(--wd-tint-strong);
|
||||
color: var(--wd-accent);
|
||||
color: var(--wd-accent-deep);
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
font-variant-numeric: tabular-nums;
|
||||
@@ -484,7 +580,8 @@
|
||||
}
|
||||
|
||||
.weyai-download button:focus-visible,
|
||||
.weyai-download a:focus-visible {
|
||||
.weyai-download a:focus-visible,
|
||||
.weyai-download #weyai-download-all-title:focus-visible {
|
||||
outline: 2px solid var(--wd-focus);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user