feat(*): 创作工作台 - 完善画布生成、模型定价与创建流程
This commit is contained in:
1 parent
508cad2b4e
commit
611949d6cc
39 files changed
+735
-242
No files matched your search
@@ -8,35 +8,19 @@
|
||||
|
||||
滚轮或左右按钮切换,切换靠 transform / opacity 的 transition 平滑过渡。 */
|
||||
|
||||
/* 内容层压住画廊,但指针事件要能穿过空白处,否则整条画廊都点不到;
|
||||
真正的交互元素由下面一条规则恢复命中。 */
|
||||
/* 标题、画廊和输入区共用文档流;短窗口通过 main 滚动,不再相互覆盖。 */
|
||||
.creation-home .creation-empty-workspace {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.creation-home .creation-empty-workspace > * {
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
/* 画廊占中上部、输入框沉到下方:
|
||||
先把 main 的居中改掉,否则 justify-content: center 会吃掉 margin-top: auto。 */
|
||||
.creation-home .creation-empty-workspace {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.creation-home .creation-home-heading {
|
||||
margin-top: clamp(16px, 5vh, 52px);
|
||||
.creation-home .creation-empty-workspace > * {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.creation-home .creation-empty-workspace > .creation-launchpad {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: clamp(16px, 5vh, 52px);
|
||||
width: min(960px, calc(100% - 32px));
|
||||
width: min(960px, 100%);
|
||||
margin: 0;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
/* ── 让画廊从内容区背后穿过 ──
|
||||
@@ -71,35 +55,28 @@
|
||||
text-shadow: 0 1px 14px var(--creation-bg, var(--workspace-page));
|
||||
}
|
||||
|
||||
/* ── 画廊本体 ──
|
||||
上下边界同时定义在这里,两侧切换按钮靠它们算出纵向居中位置。 */
|
||||
/* 卡片尺寸取当前内容宽度和窗口高度的较小值,含悬停位移的空间一起占位。 */
|
||||
.creation-inspiration-tunnel {
|
||||
/* 上边让开标题,下边让开输入框——前卡刚好停在输入框上沿之上。 */
|
||||
--gallery-top: clamp(120px, 14vh, 184px);
|
||||
--gallery-bottom: clamp(430px, 48vh, 550px);
|
||||
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: 0;
|
||||
--gallery-card-width: min(440px, 64cqw, 40dvh);
|
||||
--gallery-step: clamp(64px, 16cqw, 185px);
|
||||
position: relative;
|
||||
isolation: isolate;
|
||||
container-type: inline-size;
|
||||
width: 100%;
|
||||
flex: 1 0 auto;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.creation-gallery-stage {
|
||||
position: absolute;
|
||||
top: var(--gallery-top);
|
||||
right: 0;
|
||||
bottom: var(--gallery-bottom);
|
||||
left: 0;
|
||||
/* 只有舞台能收到滚轮,避免整页滚动被劫持。 */
|
||||
pointer-events: auto;
|
||||
position: relative;
|
||||
height: calc(var(--gallery-card-width) * 9 / 16 + 48px);
|
||||
}
|
||||
|
||||
.creation-tunnel-card {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: min(440px, 40vw);
|
||||
width: var(--gallery-card-width);
|
||||
aspect-ratio: 16 / 9;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
@@ -128,8 +105,8 @@
|
||||
/* 只动 transform 和 opacity,两者都能交给合成层,不触发重排重绘。
|
||||
缓动先缓后快再长尾软着陆,观感是镜头平稳推拉而不是"弹"过去。 */
|
||||
transition:
|
||||
transform 660ms cubic-bezier(0.32, 0.72, 0, 1),
|
||||
opacity 520ms cubic-bezier(0.4, 0, 0.2, 1);
|
||||
transform 460ms cubic-bezier(0.32, 0.72, 0, 1),
|
||||
opacity 380ms cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
/* 封面已就绪:放行这张卡。 */
|
||||
@@ -224,28 +201,33 @@
|
||||
/* ── 左右切换按钮 ── */
|
||||
.creation-gallery-arrow {
|
||||
position: absolute;
|
||||
/* 对齐画廊那条带子的纵向中线,而不是整屏中线——输入框在下面,整屏中线偏低。 */
|
||||
top: calc((100% - var(--gallery-top) - var(--gallery-bottom)) / 2 + var(--gallery-top));
|
||||
top: calc((var(--gallery-card-width) * 9 / 16 + 48px) / 2);
|
||||
z-index: 180;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
padding: 0;
|
||||
color: var(--user-ink, #fff);
|
||||
background: color-mix(in srgb, var(--user-surface) 62%, transparent);
|
||||
border: 1px solid color-mix(in srgb, var(--user-ink) 14%, transparent);
|
||||
color: var(--creation-bg, #fff);
|
||||
background: var(--creation-text, #1d2024);
|
||||
border: 1px solid color-mix(in srgb, var(--creation-bg, #fff) 58%, var(--creation-text, #1d2024));
|
||||
border-radius: var(--r-full, 999px);
|
||||
box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.55);
|
||||
box-shadow:
|
||||
0 0 0 4px color-mix(in srgb, var(--creation-text, #1d2024) 10%, transparent),
|
||||
0 16px 30px -14px color-mix(in srgb, #000 64%, transparent);
|
||||
-webkit-backdrop-filter: blur(18px) saturate(1.3);
|
||||
backdrop-filter: blur(18px) saturate(1.3);
|
||||
cursor: pointer;
|
||||
pointer-events: auto;
|
||||
/* 用整条 transform 表达"居中 + 悬停放大":
|
||||
touch-action: manipulation;
|
||||
opacity: 0.96;
|
||||
/* 用整条 transform 表达“居中 + 悬停放大”:
|
||||
换成 scale 独立属性会插在 transform 之前合成,按钮会跟着往下掉。 */
|
||||
transform: translateY(-50%);
|
||||
transition:
|
||||
transform var(--user-motion, 180ms) ease,
|
||||
background-color var(--user-motion, 180ms) ease,
|
||||
box-shadow var(--user-motion, 180ms) ease,
|
||||
color var(--user-motion, 180ms) ease;
|
||||
}
|
||||
|
||||
@@ -258,7 +240,15 @@
|
||||
}
|
||||
|
||||
.creation-gallery-arrow:hover {
|
||||
background: color-mix(in srgb, var(--creation-text, #1d2024) 88%, var(--creation-accent, var(--creation-text, #1d2024)));
|
||||
transform: translateY(-50%) scale(1.08);
|
||||
box-shadow:
|
||||
0 0 0 5px color-mix(in srgb, var(--creation-text, #1d2024) 14%, transparent),
|
||||
0 18px 34px -12px color-mix(in srgb, #000 70%, transparent);
|
||||
}
|
||||
|
||||
.creation-gallery-arrow:active {
|
||||
transform: translateY(-50%) scale(0.96);
|
||||
}
|
||||
|
||||
.creation-gallery-arrow:focus-visible {
|
||||
@@ -290,12 +280,16 @@
|
||||
|
||||
/* 素材来源署名:CC BY 4.0 要求可追溯,画廊形态下不再有灵感分区页脚。 */
|
||||
.creation-inspiration-credit {
|
||||
position: absolute;
|
||||
right: 22px;
|
||||
bottom: 14px;
|
||||
z-index: 2;
|
||||
max-width: 62ch;
|
||||
color: var(--creation-faint, var(--user-ink-soft));
|
||||
align-self: flex-end;
|
||||
margin-top: var(--space-4);
|
||||
max-width: min(62ch, 100%);
|
||||
padding: 7px 10px;
|
||||
border: 1px solid color-mix(in srgb, var(--user-ink, #fff) 16%, transparent);
|
||||
border-radius: var(--r-md, 10px);
|
||||
background: color-mix(in srgb, var(--user-surface, #101214) 86%, transparent);
|
||||
box-shadow: 0 8px 24px color-mix(in srgb, #000 16%, transparent);
|
||||
backdrop-filter: blur(10px);
|
||||
color: var(--user-ink, #fff);
|
||||
font-size: var(--fs-caption, 12px);
|
||||
line-height: 1.6;
|
||||
}
|
||||
@@ -347,30 +341,13 @@
|
||||
|
||||
/* 窄屏:横向偏移收小一点,免得侧翼卡片被裁掉。 */
|
||||
@media (max-width: 1100px) {
|
||||
.creation-inspiration-tunnel {
|
||||
--gallery-top: clamp(72px, 11vh, 132px);
|
||||
--gallery-bottom: clamp(210px, 33vh, 320px);
|
||||
}
|
||||
|
||||
.creation-tunnel-card {
|
||||
width: min(400px, 48vw);
|
||||
}
|
||||
|
||||
.creation-gallery-arrow {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.creation-inspiration-credit {
|
||||
right: 14px;
|
||||
}
|
||||
|
||||
.creation-tunnel-card {
|
||||
width: 68vw;
|
||||
}
|
||||
|
||||
.creation-tunnel-card-desc {
|
||||
-webkit-line-clamp: 1;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user