feat(share): align social sharing runtime

This commit is contained in:
2026-09-27 13:49:32 +08:00
parent 26ac8167f3
commit cf6c11852e
33 changed files with 802 additions and 1919 deletions
@@ -157,185 +157,6 @@
.action-btn i { font-size: 1.2em; }
/* ===== 分享下拉面板 ===== */
/* 确保父容器作为定位参考 */
.share-dropdown {
position: absolute;
left: 50%;
bottom: calc(100% + 8px);
transform: translateX(-50%);
z-index: 100;
/* 默认隐藏 — 最高优先级确保不被覆盖 */
display: none !important;
}
.share-dropdown[aria-hidden="false"] {
display: block !important;
animation: shareDropdownIn 0.2s ease-out forwards;
}
@keyframes shareDropdownIn {
from {
opacity: 0;
transform: translateX(-50%) translateY(8px);
}
to {
opacity: 1;
transform: translateX(-50%) translateY(0);
}
}
.share-dropdown__grid {
display: flex;
align-items: center;
gap: 8px;
padding: 12px 16px;
background: var(--surface-page);
border: 1px solid var(--color-line);
border-radius: var(--radius-lg, 8px);
box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,0.1));
}
.share-item {
display: inline-flex;
flex-direction: column;
align-items: center;
gap: 4px;
padding: 8px 12px;
border: none;
border-radius: var(--radius-btn, 6px);
background: transparent;
color: var(--color-ink-2, var(--color-ink-3));
cursor: pointer;
font-size: 11px;
transition: background 0.15s, color 0.15s, transform 0.15s;
white-space: nowrap;
}
.share-item:hover {
transform: none;
}
.share-item i {
font-size: 18px;
}
.share-item[data-platform="qq"]:hover { background: #e8f4fd; color: #12b7f5; }
.share-item[data-platform="weibo"]:hover { background: #fceae9; color: #ff6a00; }
.share-item[data-platform="twitter"]:hover { background: #f0f0f0; color: #000; }
.share-item[data-platform="wechat"]:hover { background: #e6f7ec; color: #07c160; }
.share-item[data-platform="copy"]:hover { background: #f0f2f5; color: #555; }
.share-item[data-platform="poster"]:hover { background: #fff4e8; color: #f59e0b; }
/* 微信二维码浮层 */
#share-qrcode-box {
position: absolute;
bottom: calc(100% + 10px);
left: 50%;
transform: translateX(-50%);
padding: 14px;
background: var(--surface-page);
border: 1px solid var(--color-line);
border-radius: var(--radius-lg, 8px);
box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,0.12));
text-align: center;
z-index: 101;
pointer-events: none;
opacity: 0;
transition: opacity 0.2s ease, transform 0.2s ease;
}
#share-qrcode-box.is-visible {
pointer-events: auto;
opacity: 1;
}
#share-qrcode-image {
width: 140px;
height: 140px;
display: block;
}
/* 暗色模式 */
.theme-dark .share-dropdown__grid,
html.dark .share-dropdown__grid {
background: var(--surface-1);
border-color: var(--color-line);
box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}
.theme-dark #share-qrcode-box,
html.dark #share-qrcode-box {
background: var(--surface-1);
border-color: var(--color-line);
}
.theme-dark .share-item,
html.dark .share-item {
color: var(--color-ink-2, #aaa);
}
.theme-dark .share-item[data-platform="qq"]:hover { background: rgba(18,183,245,0.12); color: #12b7f5; }
.theme-dark .share-item[data-platform="weibo"]:hover { background: rgba(255,106,0,0.12); color: #ff6a00; }
.theme-dark .share-item[data-platform="twitter"]:hover { background: rgba(255,255,255,0.08); color: #fff; }
.theme-dark .share-item[data-platform="wechat"]:hover { background: rgba(7,193,96,0.12); color: #07c160; }
.theme-dark .share-item[data-platform="copy"]:hover { background: rgba(255,255,255,0.06); color: #ccc; }
.theme-dark .share-item[data-platform="poster"]:hover { background: rgba(245,158,11,0.12); color: #f59e0b; }
/* Narrow screens: bottom sheet so dropdown never clips off-screen */
@media (max-width: 767px) {
.share-dropdown {
position: fixed;
left: 0;
right: 0;
bottom: 0;
top: auto;
transform: none;
width: 100%;
max-width: none;
z-index: 1200;
padding: 0 0 calc(12px + env(safe-area-inset-bottom, 0px));
background: transparent;
}
.share-dropdown[aria-hidden="false"] {
animation: shareSheetIn 0.22s ease-out forwards;
}
@keyframes shareSheetIn {
from { opacity: 0; transform: translateY(16px); }
to { opacity: 1; transform: translateY(0); }
}
.share-dropdown__grid {
justify-content: space-around;
flex-wrap: wrap;
gap: 6px;
margin: 0 10px;
padding: 14px 12px 16px;
border-radius: 14px 14px 10px 10px;
box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.16);
}
.share-item {
min-width: 64px;
flex: 1 1 28%;
max-width: 33%;
}
#share-qrcode-box {
position: static;
margin: 10px auto 0;
transform: none;
}
body.aksrt-share-sheet-open {
overflow: hidden;
}
body.aksrt-share-sheet-open::before {
content: '';
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.35);
z-index: 1190;
}
}
.theme-dark .post-drop-meta__menu,
html.dark .post-drop-meta__menu {
background: var(--surface-1, #323335);