- Render pending orders (max 5, >=3 min left) in a top-right float button with hover list and countdown, gated by pay_wait_float_s - Fix order countdown parsing expires_at as UTC - Drop unused .paid-modal-lists-box thumb rule Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
237 lines
5.0 KiB
CSS
237 lines
5.0 KiB
CSS
/* ============================================================
|
||
* 右侧悬浮按钮(结构/样式对齐参考主题 .float-right)
|
||
* 依赖 main.css 基础规则:.hover-show / .dropdown-menu(::before) /
|
||
* .drop-newadd / .fa-toggle-theme / badge
|
||
* ============================================================ */
|
||
.float-right {
|
||
position: fixed;
|
||
bottom: 60px;
|
||
right: 20px;
|
||
z-index: 1030;
|
||
text-align: center;
|
||
padding-bottom: constant(safe-area-inset-bottom);
|
||
padding-bottom: env(safe-area-inset-bottom);
|
||
transition: 0.3s;
|
||
}
|
||
|
||
/* 前台页面编辑齿轮的提示横条:参考主题共用 .abs-right(top:50% + right:.7em +
|
||
* translateY(-50%) 的垂直居中定位)。本站 legacy-utilities 的 .abs-right 是
|
||
* top:0/right:0,横条会贴到按钮顶角,故在此恢复参考几何。 */
|
||
.float-right .admin-set-page .admin-set-info {
|
||
position: absolute;
|
||
top: 50%;
|
||
right: 0.7em;
|
||
transform: translateY(-50%);
|
||
white-space: nowrap;
|
||
line-height: 1.5;
|
||
margin: 0;
|
||
box-shadow: none;
|
||
text-align: center;
|
||
z-index: 1;
|
||
}
|
||
|
||
body:has(.modal.in) .float-right,
|
||
.modal-open .float-right,
|
||
.imgbox-show .float-right,
|
||
.scroll-down .scroll-down-hide.float-right,
|
||
.scroll-ing .scrolling-hide.float-right {
|
||
transform: translateX(200%);
|
||
}
|
||
|
||
body:has(.modal.in) .float-right.position-center,
|
||
.modal-open .float-right.position-center,
|
||
.imgbox-show .float-right.position-center,
|
||
.scroll-down .scroll-down-hide.float-right.position-center,
|
||
.scroll-ing .scrolling-hide.float-right.position-center {
|
||
transform: translate(200%, -50%);
|
||
}
|
||
|
||
.float-right.position-center {
|
||
bottom: auto;
|
||
top: 50%;
|
||
transform: translateY(-50%);
|
||
}
|
||
|
||
.float-right .float-btn {
|
||
width: 40px;
|
||
min-height: 40px;
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
flex-direction: column;
|
||
padding: 7px 0px;
|
||
font-size: 1.4em;
|
||
--this-color: var(--muted-2-color);
|
||
--this-bg: var(--float-btn-bg);
|
||
background: var(--this-bg);
|
||
position: relative;
|
||
color: var(--this-color) !important;
|
||
}
|
||
|
||
.float-right .float-btn text {
|
||
font-size: 12px;
|
||
line-height: 1;
|
||
margin-top: 5px;
|
||
}
|
||
|
||
.float-right badge {
|
||
transform: translate(-11px, -5px) scale(0.85);
|
||
margin-right: -50px;
|
||
right: auto;
|
||
left: 35px;
|
||
font-size: 12px;
|
||
position: absolute;
|
||
}
|
||
|
||
.filter .float-btn {
|
||
-webkit-backdrop-filter: saturate(2) blur(10px);
|
||
backdrop-filter: saturate(2) blur(10px);
|
||
}
|
||
|
||
.float-right.square .float-btn + .float-btn {
|
||
border-top: 1px solid var(--main-shadow);
|
||
}
|
||
|
||
.float-right.round .float-btn {
|
||
margin-top: 6px;
|
||
border-radius: 8px;
|
||
}
|
||
|
||
.float-btn.ontop {
|
||
opacity: 0;
|
||
transition: 0.5s;
|
||
transform: translateY(10px);
|
||
visibility: hidden;
|
||
}
|
||
|
||
.ontop.show {
|
||
opacity: 1;
|
||
transform: translateY(0);
|
||
visibility: unset;
|
||
display: flex !important;
|
||
}
|
||
|
||
.float-btn .hover-show-con {
|
||
right: 35px;
|
||
left: auto;
|
||
width: 200px;
|
||
margin-right: 15px;
|
||
top: 0;
|
||
font-size: 14px;
|
||
line-height: 1.4;
|
||
color: var(--main-color);
|
||
padding: 10px;
|
||
margin-top: 0;
|
||
border-radius: var(--main-radius);
|
||
cursor: auto;
|
||
}
|
||
|
||
.float-btn .dropdown-menu::before {
|
||
left: auto;
|
||
top: 15px;
|
||
right: -5px;
|
||
}
|
||
|
||
.float-btn.service-wechat .hover-show-con {
|
||
width: 120px;
|
||
top: -40px;
|
||
padding: 0;
|
||
}
|
||
|
||
.float-btn.service-wechat .dropdown-menu::before {
|
||
top: 53px;
|
||
}
|
||
|
||
.float-btn.qrcode-btn .hover-show-con {
|
||
width: 150px;
|
||
top: -60px;
|
||
padding: 16px 5px 12px;
|
||
text-align: center;
|
||
}
|
||
|
||
.float-btn.qrcode-btn .qrcode {
|
||
background: #fff;
|
||
display: inline-flex;
|
||
padding: 5px;
|
||
}
|
||
|
||
.float-btn.qrcode-btn .dropdown-menu::before {
|
||
top: 73px;
|
||
}
|
||
|
||
.float-btn.newadd-btns .drop-newadd {
|
||
width: 137px;
|
||
top: -74px;
|
||
}
|
||
|
||
.float-btn.newadd-btns .drop-newadd::before {
|
||
left: auto;
|
||
top: 88px;
|
||
right: -5px;
|
||
}
|
||
|
||
@media (max-width: 767px) {
|
||
.float-btn .hover-show-con {
|
||
max-width: 240px;
|
||
}
|
||
}
|
||
|
||
/* 待支付订单浮窗(对齐参考主题 .float-right-wait-pay) */
|
||
.float-right.position-top {
|
||
bottom: auto;
|
||
top: 80px;
|
||
}
|
||
|
||
.float-btn.wait-pay-btn .hover-show-con {
|
||
animation: float-wait-pay 2s;
|
||
animation-delay: 0.3s;
|
||
}
|
||
|
||
body.modal-open .float-btn.wait-pay-btn .hover-show-con {
|
||
opacity: 0 !important;
|
||
}
|
||
|
||
.float-btn .order-thumb {
|
||
width: 48px;
|
||
height: 48px;
|
||
}
|
||
|
||
.float-btn .order-item {
|
||
color: inherit;
|
||
}
|
||
|
||
@keyframes float-wait-pay {
|
||
0% {
|
||
opacity: 0;
|
||
visibility: unset;
|
||
box-shadow: 0 0 10px 0 rgba(255, 73, 121, 0.1);
|
||
}
|
||
10% {
|
||
opacity: 1;
|
||
box-shadow: 0 0 10px 0 rgba(255, 73, 121, 0.95);
|
||
}
|
||
30% {
|
||
box-shadow: 0 0 10px 0 rgba(255, 73, 121, 0.1);
|
||
}
|
||
50% {
|
||
box-shadow: 0 0 10px 0 rgba(255, 73, 121, 0.95);
|
||
}
|
||
70% {
|
||
box-shadow: 0 0 10px 0 rgba(255, 73, 121, 0.1);
|
||
}
|
||
80% {
|
||
visibility: unset;
|
||
opacity: 1;
|
||
}
|
||
}
|
||
|
||
@media (max-width: 640px) {
|
||
.float-right {
|
||
right: 10px;
|
||
}
|
||
|
||
.float-right.position-top {
|
||
top: 56px;
|
||
}
|
||
}
|