Add instance phone shell with bottom tabbar and more sheet.

This commit is contained in:
dekun
2026-07-27 07:13:04 +08:00
parent 4ef3b40353
commit b5a061e758
6 changed files with 523 additions and 11 deletions
+256
View File
@@ -5526,3 +5526,259 @@ html[data-theme="light"] .options-review-wrap .or-reviewed-table tbody tr:hover
color: #ff8b8b;
}
/* —— 实例手机壳:底栏四件套(仅 ≤720px + body.inst-phone) —— */
.inst-mobile-tabbar,
.inst-mobile-more,
.instance-phone-only {
display: none;
}
@media (max-width: 720px) {
:root {
--inst-m-tabbar-h: 56px;
}
body.inst-phone .embed-top-nav.top-nav {
display: none !important;
}
body.inst-phone .header {
margin-bottom: 4px;
}
body.inst-phone .header h1 {
font-size: 0.85rem !important;
line-height: 1.3;
margin: 0;
}
body.inst-phone .container {
padding-bottom: calc(var(--inst-m-tabbar-h) + max(10px, env(safe-area-inset-bottom))) !important;
}
body.inst-phone .instance-phone-only {
display: flex;
}
body.inst-phone .instance-header-phone-strip {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin-top: 8px;
padding-top: 8px;
border-top: 1px solid rgba(255, 255, 255, 0.06);
}
html[data-theme="light"] body.inst-phone .instance-header-phone-strip {
border-top-color: rgba(0, 0, 0, 0.08);
}
body.inst-phone .inst-phone-chip {
display: inline-flex;
align-items: baseline;
gap: 4px;
min-height: 28px;
padding: 4px 8px;
border-radius: 8px;
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.06);
font-size: 12px;
color: var(--inst-text);
}
html[data-theme="light"] body.inst-phone .inst-phone-chip {
background: rgba(0, 0, 0, 0.03);
border-color: rgba(0, 0, 0, 0.08);
}
body.inst-phone .inst-phone-chip em {
font-style: normal;
color: var(--inst-muted);
font-size: 11px;
}
body.inst-phone .inst-phone-chip b {
font-weight: 600;
}
body.inst-phone .inst-phone-chip--pnl b {
color: var(--inst-nav-idle);
}
body.inst-phone .inst-mobile-tabbar {
display: flex;
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 80;
height: calc(var(--inst-m-tabbar-h) + env(safe-area-inset-bottom));
padding: 0 max(8px, env(safe-area-inset-right)) env(safe-area-inset-bottom)
max(8px, env(safe-area-inset-left));
align-items: stretch;
justify-content: space-around;
gap: 2px;
background: color-mix(in srgb, #12161f 92%, transparent);
border-top: 1px solid rgba(255, 255, 255, 0.08);
backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);
box-sizing: border-box;
}
html[data-theme="light"] body.inst-phone .inst-mobile-tabbar {
background: color-mix(in srgb, #f4f7fb 94%, transparent);
border-top-color: rgba(0, 0, 0, 0.1);
}
body.inst-phone .inst-mobile-tabbar .inst-m-tab.nav-hidden {
display: none !important;
}
body.inst-phone .inst-m-tab {
flex: 1 1 0;
min-width: 0;
display: inline-flex;
align-items: center;
justify-content: center;
margin: 6px 2px;
padding: 0 4px;
border: none;
border-radius: 10px;
background: transparent;
color: var(--inst-muted);
font: inherit;
font-size: 12px;
font-weight: 600;
letter-spacing: 0.04em;
text-decoration: none;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
}
body.inst-phone .inst-m-tab:hover,
body.inst-phone .inst-m-tab:focus-visible {
color: var(--inst-text);
background: rgba(255, 255, 255, 0.04);
outline: none;
}
body.inst-phone .inst-m-tab.active {
color: var(--inst-nav-idle);
background: rgba(143, 200, 255, 0.12);
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inst-nav-idle) 35%, transparent);
}
body.inst-phone.inst-mobile-more-open .inst-mobile-more {
display: block;
}
body.inst-phone .inst-mobile-more {
position: fixed;
inset: 0;
z-index: 90;
}
body.inst-phone .inst-mobile-more-backdrop {
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.45);
}
body.inst-phone .inst-mobile-more-sheet {
position: absolute;
left: 0;
right: 0;
bottom: 0;
max-height: min(78vh, 560px);
overflow: auto;
padding: 10px 16px calc(16px + env(safe-area-inset-bottom));
border-radius: 16px 16px 0 0;
background: #12161f;
border: 1px solid rgba(255, 255, 255, 0.1);
border-bottom: none;
box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
}
html[data-theme="light"] body.inst-phone .inst-mobile-more-sheet {
background: #f4f7fb;
border-color: rgba(0, 0, 0, 0.1);
}
body.inst-phone .inst-mobile-more-handle {
width: 36px;
height: 4px;
margin: 2px auto 12px;
border-radius: 999px;
background: rgba(255, 255, 255, 0.2);
}
html[data-theme="light"] body.inst-phone .inst-mobile-more-handle {
background: rgba(0, 0, 0, 0.15);
}
body.inst-phone .inst-mobile-more-title {
margin: 0 0 4px;
font-size: 1rem;
color: var(--inst-text);
}
body.inst-phone .inst-mobile-more-hint {
margin: 0 0 14px;
font-size: 11px;
color: var(--inst-muted);
}
body.inst-phone .inst-mobile-more-nav {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
}
body.inst-phone .inst-mobile-more-nav a {
display: flex;
align-items: center;
justify-content: center;
min-height: 44px;
padding: 10px 8px;
border-radius: 10px;
border: 1px solid rgba(255, 255, 255, 0.1);
background: rgba(255, 255, 255, 0.03);
color: var(--inst-text);
text-decoration: none;
font-size: 13px;
font-weight: 500;
}
html[data-theme="light"] body.inst-phone .inst-mobile-more-nav a {
border-color: rgba(0, 0, 0, 0.1);
background: rgba(0, 0, 0, 0.03);
}
body.inst-phone .inst-mobile-more-nav a.nav-hidden {
display: none !important;
}
body.inst-phone .inst-mobile-more-nav a.active {
border-color: color-mix(in srgb, var(--inst-nav-idle) 45%, transparent);
background: rgba(143, 200, 255, 0.12);
color: var(--inst-nav-idle);
}
body.inst-phone .inst-mobile-more-close {
width: 100%;
margin-top: 14px;
min-height: 44px;
border-radius: 10px;
border: 1px solid rgba(255, 255, 255, 0.12);
background: transparent;
color: var(--inst-text);
font: inherit;
font-size: 14px;
cursor: pointer;
}
html[data-theme="light"] body.inst-phone .inst-mobile-more-close {
border-color: rgba(0, 0, 0, 0.12);
}
}