feat(viewer): refine visual details to match design reference

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-22 13:49:15 +08:00
parent 9dbdb0084e
commit 900ff2a74d
10 changed files with 162 additions and 132 deletions
+37 -17
View File
@@ -311,23 +311,26 @@ onBeforeUnmount(() => {
white-space: nowrap;
}
/* —— 新照片提示 pill:白底蓝字蓝icon,悬浮照片区顶部 —— */
/* —— 新照片提示 pill(参考稿):顶部 8px 居中悬浮、白底蓝字、34px 高、
* 22px 圆角、轻投影 0 3px 15px —— */
.new-photo-bar {
position: sticky;
top: 10px;
top: 8px;
z-index: 2;
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
width: fit-content;
min-height: 34px;
margin: 0 auto 12px;
border: none;
border-radius: var(--viewer-radius-pill, 20px);
border-radius: var(--viewer-radius-pill, 22px);
background: var(--viewer-surface, #fff);
box-shadow: 0 2px 10px rgba(23, 32, 51, 0.16);
box-shadow: 0 3px 15px rgba(23, 32, 51, 0.14);
color: var(--viewer-primary, #1a73e8);
padding: 8px 16px;
font-size: 0.8125rem;
padding: 0 17px;
font-size: 0.75rem;
font-weight: 600;
cursor: pointer;
}
@@ -357,6 +360,18 @@ onBeforeUnmount(() => {
background: var(--viewer-divider, #e5eaf1);
cursor: pointer;
}
/* 参考稿:底部 40% 高度的轻渐变(transparent → rgba(0,0,0,.25)),
* 承托右下角白色点赞角标;不拦截指针(点击仍开大图)。 */
.cell::after {
content: '';
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: 40%;
background: linear-gradient(transparent, rgba(0, 0, 0, 0.25));
pointer-events: none;
}
.cell-img {
display: block;
width: 100%;
@@ -364,32 +379,36 @@ onBeforeUnmount(() => {
object-fit: cover;
}
/* —— 点赞角标:右下角半透明暗底(明亮照片上可读),白心 + 白色计数 —— */
/* —— 点赞角标(参考稿):右下 3px 贴边、无底色胶囊——白心 19px + 白色计数,
* 仅靠 text-shadow 保证明亮照片上的可读性 —— */
.cell-like {
position: absolute;
right: 6px;
bottom: 6px;
right: 3px;
bottom: 3px;
z-index: 1;
display: inline-flex;
align-items: center;
gap: 4px;
border: none;
border-radius: var(--viewer-radius-pill, 20px);
background: linear-gradient(to right, rgba(14, 18, 24, 0.42), rgba(14, 18, 24, 0.62));
background: transparent;
color: #fff;
padding: 3px 8px;
padding: 2px 3px;
font-size: 0.75rem;
line-height: 1;
text-shadow: 0 1px 4px #222;
cursor: pointer;
}
.cell-like .heart {
width: 16px;
height: 16px;
width: 19px;
height: 19px;
fill: #fff;
filter: drop-shadow(0 1px 4px #222);
animation: heart-pop 400ms ease-out;
}
.cell-like .count {
color: #fff;
font-variant-numeric: tabular-nums;
text-shadow: 0 1px 4px #222;
}
@keyframes heart-pop {
0% {
@@ -459,11 +478,12 @@ onBeforeUnmount(() => {
text-align: center;
padding: 8px 0;
}
/* 参考稿:到底提示 #96a0b0、12px、24px 16px 收底 */
.end-note {
text-align: center;
color: var(--viewer-text-secondary, #647084);
font-size: 0.875rem;
padding: 12px 0;
color: #96a0b0;
font-size: 0.75rem;
padding: 24px 16px;
margin: 0;
}
.sentinel {