feat: 工具盒视觉重设计 + 个人中心详情弹窗
本次提交对全部工具入口页(MorePage)进行了全面的信息架构和视觉升级,并为个人中心新增卡片点击详情弹窗。 ## 工具盒(MorePage)重设计 - 工具卡片增加 useCase 使用场景说明和 tags 标签行,帮助用户快速理解每个工具的适用场景 - 核心工具(Featured)卡片新增 kicker 标题、steps 操作步骤、outcome 产出说明,强化工作流引导 - 新增 ToolComparePanel 组件,为每个工具展示 Before/After 对比示意舞台 - 分类筛选按钮新增计数徽章,展示每个分类下的工具数量 - 页面头部新增 eyebrow(AI Tool Hub)+ 工具概览统计信息 - 最近使用区域增加分类标签副标题 - 空分类场景新增引导式空状态面板 - 全面补充 aria-label 和无障碍键盘支持 ## 个人中心详情弹窗 - 新增 ProfileDetailSelection 类型和 openDetailSelection/closeDetailSelection 流程 - 使用 createPortal 渲染详情弹窗,支持代表作和资产两种详情视图 - 弹窗内支持媒体预览(图片/视频)、元数据展示、下载和删除操作 - 列表卡片(代表作/项目/资产)改为 interactive-card,支持键盘 Enter/Space 激活 - 删除项目按钮增加 event.stopPropagation 防止冒泡触发卡片点击 - 弹窗打开时锁定 body 滚动,Esc 键关闭 ## App.tsx 适配 - 传递 setTasks 给 ProfilePage,支持代表作移除操作 - 传递 onOpenProject 回调,支持从个人中心打开项目 ## CSS 样式升级 - more.css: 全面重设页头布局(grid 三栏)、筛选胶囊、核心卡片 Before/After 舞台、步骤条、响应式适配 - profile.css: 新增详情弹窗 overlay/panel/preview 布局、交互卡片 hover/focus 状态 - dark-green.css: 工具盒与详情弹窗的深绿主题样式约 780 行
This commit is contained in:
@@ -22,3 +22,431 @@
|
||||
overflow: visible;
|
||||
scrollbar-width: auto;
|
||||
}
|
||||
|
||||
.profile-page__interactive-card {
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.profile-page__interactive-card:focus-visible {
|
||||
outline: 2px solid color-mix(in srgb, var(--accent) 72%, transparent);
|
||||
outline-offset: 3px;
|
||||
}
|
||||
|
||||
.profile-page__detail-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 120;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
padding: clamp(18px, 3vw, 32px);
|
||||
isolation: isolate;
|
||||
overscroll-behavior: contain;
|
||||
}
|
||||
|
||||
.profile-page__detail-backdrop {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
border: 0;
|
||||
background: rgba(0, 0, 0, 0.62);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.profile-page__detail-panel {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: grid;
|
||||
grid-template-rows: auto minmax(0, 1fr) auto;
|
||||
gap: 16px;
|
||||
width: min(1080px, calc(100vw - 48px));
|
||||
max-height: min(820px, calc(100dvh - 48px));
|
||||
overflow: hidden;
|
||||
padding: clamp(16px, 2vw, 22px);
|
||||
border: 1px solid rgba(255, 255, 255, 0.12);
|
||||
border-radius: 18px;
|
||||
background:
|
||||
linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
|
||||
color-mix(in srgb, var(--bg-panel) 94%, #000);
|
||||
box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
|
||||
}
|
||||
|
||||
.profile-page__detail-head {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 18px;
|
||||
min-width: 0;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
.profile-page__detail-head h2 {
|
||||
max-width: 760px;
|
||||
margin: 5px 0 0;
|
||||
color: var(--text);
|
||||
font-size: clamp(18px, 2vw, 25px);
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.profile-page__detail-eyebrow {
|
||||
color: var(--accent);
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.profile-page__detail-close {
|
||||
display: inline-grid;
|
||||
flex: 0 0 38px;
|
||||
place-items: center;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.12);
|
||||
border-radius: 12px;
|
||||
background: rgba(255, 255, 255, 0.04);
|
||||
color: var(--text-muted);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.profile-page__detail-close:hover,
|
||||
.profile-page__detail-close:focus-visible {
|
||||
border-color: rgba(255, 255, 255, 0.22);
|
||||
background: rgba(255, 255, 255, 0.075);
|
||||
color: var(--text);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.profile-page__detail-body {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1.42fr) minmax(300px, 0.78fr);
|
||||
gap: 18px;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.profile-page__detail-preview {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
align-self: stretch;
|
||||
min-height: min(500px, 54dvh);
|
||||
overflow: hidden;
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: 16px;
|
||||
background:
|
||||
linear-gradient(135deg, rgba(var(--accent-rgb), 0.055), transparent 58%),
|
||||
rgba(255, 255, 255, 0.024);
|
||||
}
|
||||
|
||||
.profile-page__detail-media {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-height: min(640px, 56dvh);
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
video.profile-page__detail-media {
|
||||
height: 100%;
|
||||
min-height: 320px;
|
||||
background: #050607;
|
||||
}
|
||||
|
||||
.profile-page__detail-placeholder {
|
||||
display: grid;
|
||||
justify-items: center;
|
||||
gap: 10px;
|
||||
color: var(--text-muted);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.profile-page__detail-placeholder .anticon {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border: 1px solid rgba(var(--accent-rgb), 0.2);
|
||||
border-radius: 16px;
|
||||
background: rgba(var(--accent-rgb), 0.08);
|
||||
color: var(--accent);
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.profile-page__detail-info {
|
||||
display: grid;
|
||||
align-content: start;
|
||||
gap: 14px;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
padding-right: 4px;
|
||||
scrollbar-gutter: stable;
|
||||
}
|
||||
|
||||
.profile-page__detail-info p {
|
||||
margin: 0;
|
||||
max-height: min(230px, 28dvh);
|
||||
overflow: auto;
|
||||
padding: 13px 14px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border-radius: 13px;
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
color: var(--text-muted);
|
||||
font-size: 14px;
|
||||
line-height: 1.7;
|
||||
word-break: break-word;
|
||||
scrollbar-gutter: stable;
|
||||
}
|
||||
|
||||
.profile-page__detail-info dl {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.profile-page__detail-info dl div {
|
||||
display: grid;
|
||||
gap: 4px;
|
||||
min-width: 0;
|
||||
padding: 12px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border-radius: 13px;
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
}
|
||||
|
||||
.profile-page__detail-info dt {
|
||||
color: var(--text-soft);
|
||||
font-size: 11px;
|
||||
font-weight: 760;
|
||||
}
|
||||
|
||||
.profile-page__detail-info dd {
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
color: var(--text);
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.profile-page__detail-notice {
|
||||
display: inline-flex;
|
||||
width: fit-content;
|
||||
max-width: 100%;
|
||||
padding: 7px 10px;
|
||||
border: 1px solid rgba(243, 170, 38, 0.28);
|
||||
border-radius: 999px;
|
||||
background: rgba(243, 170, 38, 0.08);
|
||||
color: var(--warning);
|
||||
font-size: 12px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.profile-page__detail-actions {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto auto;
|
||||
align-items: center;
|
||||
justify-content: stretch;
|
||||
gap: 10px;
|
||||
min-width: 0;
|
||||
padding-top: 14px;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.08);
|
||||
}
|
||||
|
||||
.profile-page__detail-action {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 7px;
|
||||
min-height: 40px;
|
||||
padding: 0 16px;
|
||||
border: 1px solid rgba(var(--accent-rgb), 0.36);
|
||||
border-radius: 12px;
|
||||
background: rgba(var(--accent-rgb), 0.11);
|
||||
color: var(--accent);
|
||||
font-size: 13px;
|
||||
font-weight: 750;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.profile-page__detail-action--primary {
|
||||
justify-self: start;
|
||||
min-width: 132px;
|
||||
}
|
||||
|
||||
.profile-page__detail-action--secondary,
|
||||
.profile-page__detail-action--danger {
|
||||
min-width: 118px;
|
||||
}
|
||||
|
||||
.profile-page__detail-action:hover,
|
||||
.profile-page__detail-action:focus-visible {
|
||||
border-color: rgba(var(--accent-rgb), 0.54);
|
||||
background: rgba(var(--accent-rgb), 0.16);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.profile-page__detail-action--danger {
|
||||
border-color: rgba(255, 90, 95, 0.24);
|
||||
background: rgba(255, 90, 95, 0.08);
|
||||
color: #ffadb0;
|
||||
}
|
||||
|
||||
.profile-page__detail-action--danger:hover,
|
||||
.profile-page__detail-action--danger:focus-visible {
|
||||
border-color: rgba(255, 90, 95, 0.42);
|
||||
background: rgba(255, 90, 95, 0.13);
|
||||
}
|
||||
|
||||
.profile-page__detail-action:disabled {
|
||||
cursor: wait;
|
||||
opacity: 0.62;
|
||||
}
|
||||
|
||||
@media (max-width: 760px) {
|
||||
.profile-page__detail-overlay {
|
||||
align-items: end;
|
||||
padding: 10px 10px 0;
|
||||
}
|
||||
|
||||
.profile-page__detail-panel {
|
||||
width: 100%;
|
||||
max-height: calc(100dvh - 10px);
|
||||
padding: 16px;
|
||||
border-radius: 18px 18px 0 0;
|
||||
}
|
||||
|
||||
.profile-page__detail-body {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 14px;
|
||||
overflow: auto;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.profile-page__detail-preview {
|
||||
align-items: start;
|
||||
min-height: 260px;
|
||||
max-height: 42dvh;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.profile-page__detail-media {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
max-height: none;
|
||||
}
|
||||
|
||||
video.profile-page__detail-media {
|
||||
align-self: center;
|
||||
height: auto;
|
||||
min-height: 220px;
|
||||
max-height: 42dvh;
|
||||
}
|
||||
|
||||
.profile-page__detail-info {
|
||||
overflow: auto;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.profile-page__detail-info p {
|
||||
min-height: 96px;
|
||||
max-height: 30dvh;
|
||||
}
|
||||
|
||||
.profile-page__detail-info dl {
|
||||
grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.profile-page__detail-info dl div {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 7px;
|
||||
min-height: 40px;
|
||||
padding: 8px 10px;
|
||||
}
|
||||
|
||||
.profile-page__detail-info dt {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.profile-page__detail-info dd {
|
||||
min-width: 0;
|
||||
color: var(--text);
|
||||
font-weight: 800;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.profile-page__detail-actions {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.profile-page__detail-action--primary {
|
||||
grid-column: 1 / -1;
|
||||
justify-self: stretch;
|
||||
}
|
||||
|
||||
.profile-page__detail-action--secondary,
|
||||
.profile-page__detail-action--danger {
|
||||
min-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 420px) {
|
||||
.profile-page__detail-overlay {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.profile-page__detail-panel {
|
||||
max-height: 94dvh;
|
||||
padding: 14px;
|
||||
border-right: 0;
|
||||
border-bottom: 0;
|
||||
border-left: 0;
|
||||
border-radius: 18px 18px 0 0;
|
||||
}
|
||||
|
||||
.profile-page__detail-head {
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.profile-page__detail-head h2 {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.profile-page__detail-close {
|
||||
flex-basis: 36px;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
.profile-page__detail-info dl {
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.profile-page__detail-info p {
|
||||
min-height: 108px;
|
||||
}
|
||||
|
||||
.profile-page__detail-preview {
|
||||
min-height: 240px;
|
||||
max-height: 40dvh;
|
||||
}
|
||||
|
||||
.profile-page__detail-info dl {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.profile-page__detail-actions {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.profile-page__detail-action--primary {
|
||||
grid-column: auto;
|
||||
}
|
||||
|
||||
.profile-page__detail-action {
|
||||
min-height: 42px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user