feat(lightbox): 接入全站图片预览

This commit is contained in:
kate522 committed 2026-09-02 18:33:47 +08:00
1 parent 0985d0cb0a
commit ddf7c37556
29 files changed
+1212 -1805

No files matched your search

@@ -185,71 +185,6 @@ article.article.box-body,
text-align: center;
}
:is(.entry-content, .wp-posts-content) .aksrt-lightbox-target {
cursor: zoom-in;
}
/* ===== 图片灯箱 ===== */
.lightbox-overlay {
position: fixed;
inset: 0;
z-index: 9999;
display: none;
align-items: center;
justify-content: center;
flex-direction: column;
gap: 12px;
padding: 24px;
background: rgba(0, 0, 0, 0.85);
}
.lightbox-overlay.is-open {
display: flex;
}
.lightbox-img {
max-width: 90vw;
max-height: 85vh;
width: auto;
height: auto;
border-radius: 4px;
object-fit: contain;
}
.lightbox-caption {
max-width: min(96vw, 1200px);
color: #fff;
font-size: 14px;
line-height: 1.5;
text-align: center;
opacity: 0.92;
}
.lightbox-close {
position: absolute;
top: 14px;
right: 14px;
width: 40px;
height: 40px;
border: none;
border-radius: 999px;
display: inline-flex;
align-items: center;
justify-content: center;
background: rgba(255, 255, 255, 0.12);
color: #fff;
cursor: pointer;
transition: background-color 0.2s ease;
}
.lightbox-close:hover {
background: rgba(255, 255, 255, 0.22);
}
.lightbox-close i {
pointer-events: none;
}
:is(.entry-content, .wp-posts-content) iframe,
:is(.entry-content, .wp-posts-content) .wp-block-embed iframe,
:is(.entry-content, .wp-posts-content) video {