feat(lightbox): 用户主页头像可预览,图箱支持缩放旋转反色
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4579,28 +4579,57 @@ html.dark .prose-content pre[data-theme] span {
|
||||
inset: 0;
|
||||
z-index: 1200;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 1.5rem;
|
||||
flex-direction: column;
|
||||
background: rgba(0, 0, 0, 0.82);
|
||||
backdrop-filter: blur(2px);
|
||||
}
|
||||
.md-lightbox-stage {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
touch-action: none;
|
||||
}
|
||||
.md-lightbox-stage.is-zoomed { cursor: grab; }
|
||||
.md-lightbox-stage.is-panning { cursor: grabbing; }
|
||||
.md-lightbox-figure {
|
||||
margin: 0;
|
||||
max-width: min(96vw, 1200px);
|
||||
max-height: 90vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
justify-content: center;
|
||||
}
|
||||
.md-lightbox-img {
|
||||
max-width: 100%;
|
||||
max-height: calc(90vh - 3rem);
|
||||
max-width: min(92vw, 1200px);
|
||||
max-height: calc(100vh - 8.5rem);
|
||||
object-fit: contain;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
|
||||
user-select: none;
|
||||
transform-origin: center center;
|
||||
transition: transform 0.15s ease, filter 0.15s ease;
|
||||
}
|
||||
.md-lightbox-img.is-odd-rot {
|
||||
max-width: calc(100vh - 8.5rem);
|
||||
max-height: min(92vw, 1200px);
|
||||
}
|
||||
.md-lightbox-stage.is-panning .md-lightbox-img,
|
||||
.md-lightbox-img.is-snap {
|
||||
transition: none;
|
||||
}
|
||||
.md-lightbox-footer {
|
||||
position: absolute;
|
||||
bottom: 1rem;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
z-index: 2;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
max-width: calc(100vw - 2rem);
|
||||
}
|
||||
.md-lightbox-caption {
|
||||
color: rgba(255, 255, 255, 0.85);
|
||||
@@ -4608,10 +4637,74 @@ html.dark .prose-content pre[data-theme] span {
|
||||
text-align: center;
|
||||
max-width: 40rem;
|
||||
line-height: 1.5;
|
||||
margin: 0;
|
||||
text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
.md-lightbox-toolbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
padding: 5px;
|
||||
border-radius: 999px;
|
||||
background: rgba(0, 0, 0, 0.48);
|
||||
backdrop-filter: blur(10px);
|
||||
max-width: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
.md-lightbox-tool,
|
||||
.md-lightbox-zoom-label {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: none;
|
||||
border-radius: 999px;
|
||||
background: transparent;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
transition: background 0.15s ease;
|
||||
}
|
||||
.md-lightbox-tool {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.md-lightbox-zoom-label {
|
||||
min-width: 3.25rem;
|
||||
height: 36px;
|
||||
padding: 0 0.35rem;
|
||||
font-size: 12px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
.md-lightbox-tool:hover,
|
||||
.md-lightbox-zoom-label:hover {
|
||||
background: rgba(255, 255, 255, 0.14);
|
||||
}
|
||||
.md-lightbox-tool.is-on {
|
||||
background: rgba(255, 255, 255, 0.22);
|
||||
}
|
||||
.md-lightbox-tool:disabled,
|
||||
.md-lightbox-zoom-label:disabled {
|
||||
opacity: 0.35;
|
||||
cursor: default;
|
||||
background: transparent;
|
||||
}
|
||||
.md-lightbox-tool:focus-visible,
|
||||
.md-lightbox-zoom-label:focus-visible {
|
||||
outline: 2px solid rgba(255, 255, 255, 0.7);
|
||||
outline-offset: 1px;
|
||||
}
|
||||
.md-lightbox-sep {
|
||||
width: 1px;
|
||||
height: 16px;
|
||||
margin: 0 4px;
|
||||
background: rgba(255, 255, 255, 0.22);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.md-lightbox-close,
|
||||
.md-lightbox-nav {
|
||||
position: absolute;
|
||||
z-index: 3;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -4641,14 +4734,12 @@ html.dark .prose-content pre[data-theme] span {
|
||||
.md-lightbox-prev { left: 1rem; }
|
||||
.md-lightbox-next { right: 1rem; }
|
||||
.md-lightbox-counter {
|
||||
position: absolute;
|
||||
bottom: 1.25rem;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
font-size: 13px;
|
||||
font-size: 12.5px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
letter-spacing: 0.04em;
|
||||
padding: 0 0.55rem;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* 评论区的 Markdown 紧凑排版:继承 prose-content 全部规则,仅收紧行距与间距 */
|
||||
|
||||
Reference in New Issue
Block a user