feat: add image project dashboard and canvas editor
Verify and deploy production / verify-and-deploy (push) Successful in 2m34s

This commit is contained in:
2026-10-05 15:20:43 +08:00
parent e961e3091b
commit 276a8ae473
12 changed files with 675 additions and 203 deletions
+164 -147
View File
@@ -1,151 +1,168 @@
:root {
color-scheme: light;
--red: #ff2442;
--ink: #1f1f1f;
--muted: #8b8b8b;
--sidebar: #f7f7f7;
--panel: #f8f8f8;
}
:root { color-scheme: light; --red: #ff2442; --red-deep: #e91436; --ink: #18181b; --muted: #85858d; --line: #e8e8eb; --soft: #f5f5f7; }
* { box-sizing: border-box; }
html, body { margin: 0; min-width: 1024px; min-height: 100%; background: #fff; color: var(--ink); font-family: Inter, "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button { border: 0; font: inherit; cursor: pointer; }
html, body { margin: 0; min-width: 1024px; min-height: 100%; background: #f6f6f7; color: var(--ink); font-family: Inter, "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea, select { font: inherit; }
button { border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.creator-shell { min-height: 100vh; background: var(--sidebar); }
/* Kling-inspired project home */
.kling-shell { min-height: 100vh; background: #f6f6f7; }
.kling-windowbar { position: fixed; z-index: 20; inset: 0 0 auto 0; height: 34px; display: flex; align-items: center; gap: 18px; padding: 0 7px; background: #fff; border-bottom: 1px solid #e5e5e7; }
.kling-windowbar strong { width: 142px; font-size: 13px; }
.kling-windowbar button { width: 30px; height: 30px; display: grid; place-items: center; background: transparent; color: #777; }
.kling-sidebar { position: fixed; z-index: 15; left: 0; top: 34px; bottom: 0; width: 76px; display: flex; flex-direction: column; align-items: center; padding: 15px 7px 10px; background: #fff; border-right: 1px solid #e8e8ea; }
.kling-logo { width: 32px; height: 32px; display: grid; place-items: center; margin-bottom: 18px; border: 2px solid var(--red); border-radius: 13px 13px 13px 5px; color: var(--red); font-size: 17px; font-weight: 900; transform: rotate(-8deg); }
.kling-sidebar nav, .side-footer { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.kling-sidebar nav > i { width: 36px; height: 1px; margin: 3px 0; background: #ececef; }
.side-item { width: 62px; min-height: 55px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 10px; background: transparent; color: #74747c; font-size: 10px; }
.side-item.active { background: #fff0f2; color: var(--red); }
.side-item:hover { background: #f4f4f6; }
.side-footer { margin-top: auto; }
.side-avatar { width: 30px; height: 30px; display: grid; place-items: center; margin-top: 7px; border-radius: 50%; background: #34343a; color: #fff; font-size: 10px; }
.creator-header {
position: fixed;
z-index: 10;
inset: 0 0 auto 0;
height: 64px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 19px 0 20px;
background: #fff;
}
.creator-brand { display: flex; align-items: center; gap: 13px; white-space: nowrap; }
.creator-brand strong { font-size: 20px; line-height: 1; font-weight: 600; letter-spacing: -.4px; }
.xiaohongshu-logo {
width: 73px;
height: 31px;
display: grid;
place-items: center;
border-radius: 17px;
background: var(--red);
color: #fff;
font-size: 15px;
font-weight: 800;
letter-spacing: -.5px;
}
.creator-account { height: 46px; display: flex; align-items: center; gap: 7px; padding: 0 2px 0 10px; background: transparent; color: #242424; font-size: 16px; }
.account-photo { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 65% 25%, #f6a45c 0 10%, transparent 11%), linear-gradient(135deg, #302722, #8b5b38 55%, #191919); color: #fff; font-size: 11px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.creator-account svg { color: #a0a0a0; margin-left: 2px; }
.creator-sidebar {
position: fixed;
z-index: 5;
left: 0;
top: 64px;
bottom: 0;
width: 220px;
padding: 16px 20px 24px;
background: var(--sidebar);
}
.publish-button {
width: 177px;
height: 44px;
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
border-radius: 24px;
background: var(--red);
color: #fff;
font-size: 15px;
font-weight: 600;
box-shadow: none;
}
.publish-button span { margin: 0 2px; }
.creator-nav { display: flex; flex-direction: column; gap: 1px; margin-top: 18px; }
.creator-nav-item {
width: 100%;
height: 47px;
display: grid;
grid-template-columns: 25px 1fr 18px;
align-items: center;
padding: 0 13px;
border-radius: 9px;
background: transparent;
color: #898989;
text-align: left;
font-size: 14px;
}
.creator-nav-item span { padding-left: 6px; }
.creator-nav-item > svg:last-child { grid-column: 3; }
.creator-nav-item:hover { background: #ededed; color: #555; }
.creator-main {
position: fixed;
left: 220px;
right: 0;
top: 64px;
bottom: 0;
overflow-y: auto;
background: #fff;
border-top-left-radius: 20px;
}
.creator-toolbar {
height: 73px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 39px 0 49px;
}
.creator-tabs { height: 100%; display: flex; align-items: center; gap: 17px; }
.creator-tabs button { min-width: 94px; height: 42px; padding: 0 16px; border-radius: 23px; background: transparent; color: #929292; font-size: 16px; font-weight: 600; }
.creator-tabs button.active { background: #f7f7f7; color: #202020; }
.draft-button { height: 40px; display: flex; align-items: center; gap: 7px; padding: 0 18px; border-radius: 22px; background: #f8f8f8; color: #262626; font-size: 14px; }
.upload-panel {
min-height: 606px;
height: calc(100vh - 199px);
margin: 0 39px 0 34px;
display: grid;
place-items: center;
border-radius: 15px;
background: var(--panel);
}
.upload-center { display: flex; flex-direction: column; align-items: center; transform: translateY(-4px); }
.cloud-upload { height: 103px; display: flex; align-items: center; color: #dfdfdf; }
.cloud-upload svg { fill: #dfdfdf; stroke: #f8f8f8; }
.upload-center p { margin: 10px 0 14px; color: #242424; font-size: 14px; }
.upload-action { min-width: 120px; height: 41px; padding: 0 23px; border-radius: 22px; background: var(--red); color: #fff; font-size: 14px; }
.upload-action:hover, .publish-button:hover { background: #f20f35; }
.upload-guides {
min-height: 134px;
display: grid;
grid-template-columns: repeat(3, 1fr);
margin: 56px 39px 0 203px;
}
.upload-guides > div { min-height: 112px; padding: 16px 42px; border-left: 1px solid #efefef; }
.upload-guides > div:first-child { border-left: 0; }
.upload-guides strong { display: block; margin-bottom: 10px; font-size: 14px; font-weight: 500; }
.upload-guides p { margin: 0; color: #a0a0a0; font-size: 12px; line-height: 1.8; }
@media (max-width: 1300px) {
.creator-tabs { gap: 2px; }
.creator-tabs button { min-width: 82px; padding: 0 11px; }
.upload-guides { margin-left: 70px; }
}
@media (max-height: 800px) {
.upload-panel { min-height: 480px; height: calc(100vh - 185px); }
.upload-guides { margin-top: 34px; }
.kling-main { min-height: 100vh; margin-left: 76px; padding: 17px 24px 48px; background: #f6f6f7; }
.tool-heroes { display: grid; grid-template-columns: 1.22fr .85fr .85fr; gap: 14px; max-width: 1500px; margin: 0 auto; }
.hero-card { position: relative; height: 158px; overflow: hidden; border: 1px solid #e7e7ea; border-radius: 15px; background: #fff; color: var(--ink); text-align: left; box-shadow: 0 1px 1px rgba(0,0,0,.02); }
.hero-card > div:first-child { position: relative; z-index: 2; padding: 40px 20px; }
.hero-card h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 21px; font-weight: 700; letter-spacing: -.5px; }
.hero-card h2 > svg:last-child { margin-left: 2px; }
.hero-card p { margin: 0; color: #777780; font-size: 13px; }
.primary-hero { background: linear-gradient(115deg, #fff 0 44%, #fff3f5 66%, #ffd7de); }
.primary-hero h2 b { color: var(--red); font-size: 25px; }
.new-badge { position: absolute; top: 0; right: 0; padding: 4px 11px; border-radius: 0 0 0 10px; background: var(--red); color: white; font-size: 10px; font-weight: 700; }
.hero-wave { position: absolute; inset: 0 0 0 42%; transform: rotate(-8deg); }
.hero-wave i { position: absolute; left: -10%; width: 130%; height: 32px; border-radius: 50%; filter: blur(3px); }
.hero-wave i:nth-child(1) { top: 34px; background: linear-gradient(90deg, transparent, #ffbbc6, #ff2442); transform: rotate(-8deg); }
.hero-wave i:nth-child(2) { top: 76px; background: linear-gradient(90deg, transparent, #ffd4da, #ff7b91); transform: rotate(8deg); }
.hero-wave i:nth-child(3) { top: 116px; background: linear-gradient(90deg, transparent, #ffe8ec, #ffb5c1); transform: rotate(-5deg); }
.image-hero { background: linear-gradient(145deg, #fff, #fafafa 58%, #f1f1f3); }
.batch-hero { background: linear-gradient(135deg, #fff, #f7f7f8 70%, #ffe9ed); }
.stacked-pictures { position: absolute; right: 18px; bottom: -22px; width: 114px; height: 92px; }
.stacked-pictures i { position: absolute; width: 60px; height: 74px; border: 4px solid #fff; border-radius: 5px; background: linear-gradient(150deg, #ff8ca0, #f0d2b8 55%, #777); box-shadow: 0 5px 18px rgba(0,0,0,.12); }
.stacked-pictures i:nth-child(1) { left: 0; top: 12px; transform: rotate(-13deg); }
.stacked-pictures i:nth-child(2) { left: 30px; top: 3px; transform: rotate(4deg); background: linear-gradient(140deg, #ddd, #ff647e); }
.stacked-pictures i:nth-child(3) { right: 0; top: 16px; transform: rotate(13deg); background: linear-gradient(150deg, #333, #ffbd70); }
.batch-art i { position: absolute; right: 22px; bottom: -15px; width: 78px; height: 104px; border-radius: 8px; background: linear-gradient(160deg, #2b2b2f, #f1f1f1); transform: rotate(8deg); }
.batch-art i:last-child { right: -8px; bottom: -3px; background: linear-gradient(150deg, #ff2442, #ff9aaa); transform: rotate(-8deg); }
.quick-tools { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; max-width: 1500px; margin: 12px auto 0; }
.quick-tool { height: 79px; display: grid; grid-template-columns: 32px 1fr 20px; align-items: center; gap: 8px; padding: 0 18px; border: 1px solid #e7e7ea; border-radius: 13px; background: #fff; color: #34343a; text-align: left; }
.quick-tool > svg:first-child { color: var(--red); }
.quick-tool div { display: flex; flex-direction: column; gap: 5px; }
.quick-tool strong { font-size: 14px; }
.quick-tool small { color: #96969d; font-size: 11px; white-space: nowrap; }
.quick-tool > svg:last-child { color: #999; transition: transform .2s; }
.quick-tool:hover { border-color: #ffc6cf; box-shadow: 0 8px 24px rgba(255,36,66,.08); }
.quick-tool:hover > svg:last-child { transform: translateX(3px); }
.project-feed { max-width: 1500px; margin: 57px auto 0; }
.project-toolbar { display: flex; align-items: center; gap: 14px; }
.feed-tabs { display: flex; padding: 3px; border: 1px solid #e0e0e3; border-radius: 9px; background: #fff; }
.feed-tabs button { height: 30px; padding: 0 17px; border-radius: 6px; background: transparent; color: #77777f; font-size: 13px; }
.feed-tabs button.active { background: #efeff1; color: #202024; font-weight: 600; }
.project-toolbar > i { width: 1px; height: 27px; background: #dedee2; }
.project-search { width: 380px; height: 37px; display: flex; align-items: center; margin-left: 8px; border: 1px solid #dcdce0; border-radius: 9px; background: #fff; }
.project-search input { flex: 1; min-width: 0; height: 100%; padding: 0 13px; border: 0; outline: 0; background: transparent; color: #333; }
.project-search svg { margin: 0 12px; color: #999; }
.create-project-button { height: 38px; margin-left: auto; padding: 0 18px; border-radius: 9px; background: var(--red); color: #fff; font-size: 13px; font-weight: 600; }
.project-categories { display: flex; gap: 29px; margin: 13px 0 18px; }
.project-categories button { padding: 0; background: transparent; color: #696971; font-size: 13px; }
.project-categories button.active { color: var(--red); font-weight: 700; }
.project-masonry { columns: 5 210px; column-gap: 8px; }
.project-tile { display: inline-block; width: 100%; break-inside: avoid; margin-bottom: 15px; overflow: hidden; border-radius: 9px; background: #fff; box-shadow: 0 0 0 1px #e9e9ec; transition: transform .18s, box-shadow .18s; }
.project-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,.09); }
.project-cover { position: relative; min-height: 160px; max-height: 345px; overflow: hidden; background: linear-gradient(140deg, #ececef, #dddde1); }
.project-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.project-cover span { position: absolute; right: 8px; bottom: 8px; padding: 3px 7px; border-radius: 10px; background: rgba(20,20,22,.68); color: #fff; font-size: 10px; }
.project-caption { display: flex; flex-direction: column; gap: 4px; padding: 10px 11px 12px; }
.project-caption strong { overflow: hidden; color: #2d2d32; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.project-caption small { color: #9b9ba2; font-size: 10px; }
.project-empty { min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #dddde1; border-radius: 15px; background: #fff; }
.empty-art { position: relative; width: 130px; height: 90px; margin-bottom: 19px; }
.empty-art span { position: absolute; width: 64px; height: 78px; border: 4px solid #fff; border-radius: 7px; background: linear-gradient(145deg, #ffe0e5, #ff657e); box-shadow: 0 8px 25px rgba(0,0,0,.1); }
.empty-art span:nth-child(1) { left: 8px; top: 8px; transform: rotate(-12deg); }
.empty-art span:nth-child(2) { left: 34px; top: 0; background: linear-gradient(145deg, #f1f1f3, #b8b8bf); }
.empty-art span:nth-child(3) { right: 4px; top: 10px; transform: rotate(12deg); background: linear-gradient(145deg, #ff97a8, #ff2442); }
.project-empty h3 { margin: 0 0 7px; font-size: 16px; }
.project-empty p { margin: 0 0 17px; color: #929299; font-size: 12px; }
.project-empty button { height: 37px; padding: 0 18px; border-radius: 9px; background: var(--red); color: #fff; font-size: 12px; }
.upload-overlay { position: fixed; z-index: 100; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(255,255,255,.9); backdrop-filter: blur(5px); }
.upload-spinner, .editor-spinner { width: 35px; height: 35px; border: 3px solid #ffd2d9; border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; }
.upload-overlay strong { font-size: 15px; }
.upload-overlay small { color: #999; }
.dashboard-toast { position: fixed; z-index: 90; right: 22px; bottom: 22px; display: flex; align-items: center; gap: 16px; padding: 12px 14px; border: 1px solid #e3e3e6; border-radius: 10px; background: #fff; box-shadow: 0 12px 35px rgba(0,0,0,.12); font-size: 12px; }
.dashboard-toast button { background: transparent; color: #999; }
/* Image project editor */
.image-editor-shell { height: 100vh; min-width: 1100px; overflow: hidden; display: grid; grid-template: 56px 1fr / 164px minmax(520px, 1fr) 304px; background: #ededf0; }
.editor-topbar { grid-column: 1 / 4; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 15px; padding: 0 14px; border-bottom: 1px solid #e1e1e4; background: #fff; }
.editor-brand { display: flex; align-items: center; min-width: 0; gap: 9px; }
.editor-back { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; color: #555; }
.editor-back:hover { background: #f0f0f2; }
.editor-logo { padding: 5px 9px; border-radius: 13px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; }
.editor-brand i { width: 1px; height: 20px; background: #ddd; }
.editor-brand input { width: min(330px, 36vw); border: 0; outline: 0; color: #222; font-weight: 600; }
.editor-status { display: flex; align-items: center; gap: 7px; color: #8a8a91; font-size: 11px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #55b36a; }
.editor-actions { display: flex; justify-content: flex-end; gap: 9px; }
.ghost-control, .save-control { height: 34px; padding: 0 14px; border-radius: 8px; font-size: 12px; }
.ghost-control { border: 1px solid #dddde1; background: #fff; color: #45454a; }
.save-control { background: var(--red); color: #fff; font-weight: 600; }
.save-control:disabled { opacity: .55; }
.editor-filmstrip { grid-row: 2; padding: 13px 11px; overflow-y: auto; border-right: 1px solid #dedee2; background: #f8f8f9; }
.filmstrip-title { display: flex; justify-content: space-between; padding: 0 3px 10px; font-size: 12px; font-weight: 600; }
.filmstrip-title small { color: #999; font-weight: 400; }
.filmstrip-list { display: flex; flex-direction: column; gap: 10px; }
.filmstrip-item { position: relative; width: 100%; height: 118px; padding: 5px; overflow: hidden; border: 2px solid transparent; border-radius: 9px; background: #eeeef0; }
.filmstrip-item.active { border-color: var(--red); background: #fff; }
.filmstrip-item > span { position: absolute; z-index: 2; left: 7px; top: 7px; width: 19px; height: 19px; display: grid; place-items: center; border-radius: 6px; background: rgba(20,20,22,.7); color: #fff; font-size: 9px; }
.filmstrip-item img { width: 100%; height: 100%; display: block; border-radius: 5px; object-fit: cover; }
.filmstrip-add { width: 100%; height: 35px; margin-top: 10px; border: 1px dashed #ccc; border-radius: 8px; background: transparent; color: #888; }
.editor-workspace { position: relative; grid-row: 2; min-width: 0; display: grid; grid-template-rows: 43px 1fr 48px; overflow: hidden; background: #e9e9ec; }
.canvas-toolbar { display: flex; align-items: center; justify-content: center; gap: 6px; border-bottom: 1px solid #dddde1; background: #f8f8f9; }
.canvas-toolbar button { height: 29px; padding: 0 10px; border-radius: 7px; background: transparent; color: #66666d; font-size: 11px; }
.canvas-toolbar button:hover { background: #ececef; }
.canvas-toolbar i { width: 1px; height: 18px; margin: 0 5px; background: #ddd; }
.canvas-toolbar span { margin-right: 5px; color: #86868e; font-size: 10px; }
.canvas-viewport { min-height: 0; display: grid; place-items: center; overflow: hidden; padding: 28px; background-image: radial-gradient(#d0d0d4 .7px, transparent .7px); background-size: 16px 16px; }
.canvas-page { position: relative; height: min(66vh, 680px); max-width: 82%; aspect-ratio: var(--canvas-ratio); overflow: hidden; box-shadow: 0 12px 42px rgba(20,20,24,.18); touch-action: none; user-select: none; }
.canvas-page > img { width: 100%; height: 100%; display: block; transform-origin: center; pointer-events: none; }
.canvas-selection { position: absolute; inset: 0; border: 1px solid rgba(255,36,66,.75); pointer-events: none; }
.handle { position: absolute; width: 7px; height: 7px; border: 1px solid var(--red); background: #fff; }
.handle.nw { left: -4px; top: -4px; }.handle.ne { right: -4px; top: -4px; }.handle.sw { left: -4px; bottom: -4px; }.handle.se { right: -4px; bottom: -4px; }
.editor-pagination { display: flex; align-items: center; justify-content: center; gap: 13px; border-top: 1px solid #dddde1; background: #f7f7f8; }
.editor-pagination button { width: 28px; height: 28px; border-radius: 7px; background: #fff; color: #555; }
.editor-pagination button:disabled { color: #c5c5c8; }
.editor-pagination span { color: #6f6f76; font-size: 11px; }
.editor-inspector { grid-row: 2; overflow-y: auto; border-left: 1px solid #dddde1; background: #fff; }
.inspector-tabs { height: 44px; display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid #e5e5e8; }
.inspector-tabs button { position: relative; background: transparent; color: #929298; font-size: 12px; }
.inspector-tabs button.active { color: #26262a; font-weight: 600; }
.inspector-tabs button.active::after { content: ""; position: absolute; left: 24px; right: 24px; bottom: 0; height: 2px; background: var(--red); }
.inspector-section { padding: 15px 16px 18px; border-bottom: 1px solid #ececef; }
.inspector-section h3 { display: flex; justify-content: space-between; margin: 0 0 14px; font-size: 12px; }
.inspector-section h3 button { background: transparent; color: #aaa; }
.ratio-buttons, .segmented-control { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ratio-buttons button, .segmented-control button { height: 31px; border: 1px solid #dedee2; border-radius: 7px; background: #fafafa; color: #666; font-size: 11px; }
.ratio-buttons button.active, .segmented-control button.active { border-color: #ff9bab; background: #fff3f5; color: var(--red); }
.segmented-control { grid-template-columns: 1fr 1fr; margin-bottom: 14px; }
.color-field { display: grid; grid-template-columns: 1fr 27px 68px; align-items: center; gap: 8px; margin-top: 13px; color: #64646b; font-size: 11px; }
.color-field input { width: 27px; height: 27px; padding: 0; border: 0; background: none; }
.color-field code { padding: 5px; border: 1px solid #e0e0e3; border-radius: 5px; color: #777; font-size: 10px; text-align: center; }
.range-field { display: block; margin-top: 12px; }
.range-field > div { display: flex; justify-content: space-between; margin-bottom: 7px; color: #66666d; font-size: 11px; }
.range-field code { color: #999; font-size: 10px; }
.range-field input { width: 100%; accent-color: var(--red); }
.editor-loading { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: #f6f6f7; color: #777; }
.editor-loading a { color: var(--red); font-size: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 1200px) {
.tool-heroes { grid-template-columns: 1.15fr 1fr; }
.batch-hero { display: none; }
.quick-tools { grid-template-columns: repeat(4, 1fr); }
.quick-tool:last-child { display: none; }
.project-search { width: 270px; }
.image-editor-shell { grid-template-columns: 140px minmax(480px, 1fr) 280px; }
}