e5a586f903
Move business code under modules/, env template to config/, PM2 single qihuo process, and _legacy shims for old imports. Co-authored-by: Cursor <cursoragent@cursor.com>
554 lines
13 KiB
CSS
554 lines
13 KiB
CSS
/* Copyright (c) 2025-2026 马建军. All rights reserved.
|
|
* 手机端竖屏 UI
|
|
*/
|
|
|
|
html:is([data-mobile="1"], .layout-phone) {
|
|
-webkit-text-size-adjust: 100%;
|
|
text-size-adjust: 100%;
|
|
overflow-x: hidden;
|
|
width: 100%;
|
|
max-width: 100vw;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) body {
|
|
font-size: 15px;
|
|
overflow-x: hidden;
|
|
overflow-y: auto;
|
|
width: 100%;
|
|
max-width: 100vw;
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .page-wrap {
|
|
max-width: 100%;
|
|
width: 100%;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .tech-bg .tech-scanline {
|
|
display: none;
|
|
}
|
|
|
|
/* ── 顶栏:菜单 | 标题 | 主题 ── */
|
|
html:is([data-mobile="1"], .layout-phone) .site-header {
|
|
display: grid;
|
|
grid-template-columns: 40px minmax(0, 1fr) auto;
|
|
grid-template-areas: "toggle title tools";
|
|
align-items: center;
|
|
column-gap: .45rem;
|
|
padding: calc(var(--safe-top) + .4rem) .6rem .5rem;
|
|
text-align: left;
|
|
border-bottom: 1px solid var(--border-header);
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 80;
|
|
background: var(--card-bg);
|
|
backdrop-filter: blur(10px);
|
|
width: 100%;
|
|
max-width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .header-bar {
|
|
display: contents;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .nav-toggle {
|
|
display: inline-flex !important;
|
|
grid-area: toggle;
|
|
width: 40px;
|
|
height: 40px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .header-tools {
|
|
grid-area: tools;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
gap: .2rem;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .header-tools .pwa-install-btn {
|
|
display: none;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .theme-switch {
|
|
padding: 2px;
|
|
border-radius: 999px;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .theme-switch-btn {
|
|
padding: .28rem .42rem;
|
|
font-size: .66rem;
|
|
min-height: 28px;
|
|
line-height: 1.1;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .user-bar {
|
|
display: none;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .site-title {
|
|
grid-area: title;
|
|
font-size: .9rem;
|
|
font-weight: 700;
|
|
margin: 0;
|
|
text-align: left;
|
|
line-height: 1.2;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
min-width: 0;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .site-title-mobile {
|
|
display: inline;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .site-title-desktop {
|
|
display: none;
|
|
}
|
|
|
|
.site-title-mobile {
|
|
display: none;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .site-title-sub {
|
|
display: none !important;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .pwa-ios-hint {
|
|
display: none !important;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .site-nav {
|
|
position: fixed !important;
|
|
top: 0;
|
|
left: 0;
|
|
width: min(88vw, 300px);
|
|
height: 100dvh;
|
|
margin: 0;
|
|
padding: calc(var(--safe-top) + 3.25rem) .85rem 1.25rem;
|
|
flex-direction: column !important;
|
|
flex-wrap: nowrap !important;
|
|
justify-content: flex-start !important;
|
|
align-items: stretch !important;
|
|
gap: .3rem;
|
|
background: var(--card-bg);
|
|
border-right: 1px solid var(--card-border);
|
|
box-shadow: var(--shadow-card-hover);
|
|
z-index: 100;
|
|
transform: translateX(-105%);
|
|
transition: transform .25s ease;
|
|
overflow-y: auto;
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .site-nav.open {
|
|
transform: translateX(0);
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .site-nav a {
|
|
width: 100%;
|
|
text-align: left;
|
|
padding: .7rem .85rem;
|
|
font-size: .88rem;
|
|
min-height: 44px;
|
|
display: flex;
|
|
align-items: center;
|
|
border-radius: 10px;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .main {
|
|
padding: .65rem .6rem calc(1rem + var(--safe-bottom));
|
|
width: 100%;
|
|
max-width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .card {
|
|
padding: .85rem;
|
|
border-radius: 12px;
|
|
margin-bottom: .75rem;
|
|
overflow: visible;
|
|
max-width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .card h2 {
|
|
font-size: .95rem;
|
|
margin-bottom: .55rem;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .split-grid,
|
|
html:is([data-mobile="1"], .layout-phone) .trade-split,
|
|
html:is([data-mobile="1"], .layout-phone) .strategy-page .split-grid {
|
|
display: flex !important;
|
|
flex-direction: column !important;
|
|
gap: .75rem !important;
|
|
grid-template-columns: 1fr !important;
|
|
width: 100%;
|
|
max-width: 100%;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .split-grid .card,
|
|
html:is([data-mobile="1"], .layout-phone) .trade-split .card,
|
|
html:is([data-mobile="1"], .layout-phone) .strategy-page .split-grid .card {
|
|
min-height: auto !important;
|
|
height: auto !important;
|
|
width: 100%;
|
|
max-width: 100%;
|
|
}
|
|
|
|
/* ── 下单监控页 ── */
|
|
html:is([data-mobile="1"], .layout-phone) .trade-page {
|
|
width: 100%;
|
|
max-width: 100%;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .trade-top-bar {
|
|
flex-direction: column;
|
|
gap: .55rem;
|
|
padding: .65rem;
|
|
border-radius: 12px;
|
|
background: var(--card-inner);
|
|
border: 1px solid var(--card-border);
|
|
margin-bottom: .75rem;
|
|
max-width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .trade-top-bar-main {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: .35rem;
|
|
width: 100%;
|
|
min-width: 0;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .trade-top-bar-main .badge {
|
|
font-size: .68rem;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .trade-session-clock {
|
|
display: block;
|
|
font-size: .7rem;
|
|
line-height: 1.45;
|
|
word-break: break-word;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .trade-top-bar-actions {
|
|
width: 100%;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .trade-top-bar-actions .btn-ctp-sm {
|
|
width: 100%;
|
|
min-height: 44px;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .trade-top-hint {
|
|
font-size: .65rem;
|
|
line-height: 1.4;
|
|
white-space: normal;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .trade-form-rows {
|
|
width: 100%;
|
|
max-width: 100%;
|
|
min-width: 0;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .trade-form-line {
|
|
width: 100%;
|
|
max-width: 100%;
|
|
min-width: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* 品种独占一行;方向 + 手数并排 */
|
|
html:is([data-mobile="1"], .layout-phone) .trade-form-line.line-3 {
|
|
grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
|
|
gap: .45rem !important;
|
|
align-items: end;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .trade-form-line.line-3 .trade-field:first-child {
|
|
grid-column: 1 / -1 !important;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .trade-form-line.line-2 {
|
|
grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
|
|
gap: .45rem !important;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .trade-field,
|
|
html:is([data-mobile="1"], .layout-phone) .symbol-wrap {
|
|
min-width: 0;
|
|
max-width: 100%;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .trade-field label,
|
|
html:is([data-mobile="1"], .layout-phone) .text-label {
|
|
font-size: .68rem;
|
|
margin-bottom: .18rem;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .trade-field input,
|
|
html:is([data-mobile="1"], .layout-phone) .trade-field select {
|
|
padding: .42rem .5rem;
|
|
max-width: 100%;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .symbol-input {
|
|
font-size: 14px;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .price-type-tabs {
|
|
margin-bottom: .22rem;
|
|
gap: .25rem;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .price-tab {
|
|
padding: .2rem .3rem;
|
|
font-size: .66rem;
|
|
flex: 1;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .form-compact .line-trend-head {
|
|
grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.7fr) minmax(0, 0.75fr) !important;
|
|
gap: .4rem .45rem !important;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .form-compact .line-2 {
|
|
grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
|
|
gap: .4rem .45rem !important;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .form-compact .line-3 {
|
|
grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
|
|
gap: .4rem .45rem !important;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) #roll-form .form-line.line-2 {
|
|
grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) !important;
|
|
gap: .4rem .45rem !important;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .form-compact .form-line {
|
|
min-width: 0;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .form-compact input,
|
|
html:is([data-mobile="1"], .layout-phone) .form-compact select {
|
|
padding: .42rem .5rem;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .trade-action-row {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .trade-action-row .btn-open {
|
|
width: 100%;
|
|
min-height: 44px;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .pos-metrics {
|
|
grid-template-columns: repeat(2, 1fr) !important;
|
|
gap: .45rem;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .pos-card {
|
|
padding: .75rem;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .pos-card-head {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
gap: .45rem;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .pos-card-actions {
|
|
width: 100%;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .rec-sort-bar {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
gap: .45rem;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .rec-sort-bar select {
|
|
width: 100%;
|
|
min-width: 0;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) #recommend .trade-table-wrap,
|
|
html:is([data-mobile="1"], .layout-phone) .trade-table-wrap {
|
|
overflow-x: auto !important;
|
|
overflow-y: auto;
|
|
max-height: 55vh;
|
|
-webkit-overflow-scrolling: touch;
|
|
width: 100%;
|
|
max-width: 100%;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .trade-table {
|
|
font-size: .72rem;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .strategy-page .split-grid .card {
|
|
min-height: auto !important;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .strategy-preview-table {
|
|
font-size: .66rem;
|
|
min-width: 0;
|
|
width: 100%;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .table-responsive {
|
|
margin-bottom: .5rem;
|
|
max-width: 100%;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .module-rules summary {
|
|
font-size: .78rem;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) input,
|
|
html:is([data-mobile="1"], .layout-phone) select,
|
|
html:is([data-mobile="1"], .layout-phone) textarea,
|
|
html:is([data-mobile="1"], .layout-phone) button {
|
|
font-size: 16px;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .btn-primary {
|
|
min-height: 44px;
|
|
}
|
|
|
|
html:is([data-mobile="1"], .layout-phone) .site-nav::after {
|
|
content: attr(data-user-label);
|
|
display: block;
|
|
margin-top: auto;
|
|
padding: .85rem .5rem 0;
|
|
font-size: .72rem;
|
|
color: var(--text-muted);
|
|
border-top: 1px solid var(--table-border);
|
|
}
|
|
|
|
/* 桌面端:标题仍居中,工具栏绝对定位 */
|
|
html:not([data-mobile="1"]):not(.layout-phone) .header-bar {
|
|
display: block;
|
|
position: relative;
|
|
min-height: 2rem;
|
|
}
|
|
|
|
html:not([data-mobile="1"]):not(.layout-phone) .nav-toggle {
|
|
display: none;
|
|
}
|
|
|
|
html:not([data-mobile="1"]):not(.layout-phone) .site-title {
|
|
display: block;
|
|
text-align: center;
|
|
margin: 0 0 1.65rem;
|
|
font-size: 1.75rem;
|
|
width: 100%;
|
|
}
|
|
|
|
html:not([data-mobile="1"]):not(.layout-phone) .site-title-mobile {
|
|
display: none;
|
|
}
|
|
|
|
html:not([data-mobile="1"]):not(.layout-phone) .site-title-desktop {
|
|
display: inline;
|
|
}
|
|
|
|
html:not([data-mobile="1"]):not(.layout-phone) .header-tools {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
z-index: 20;
|
|
}
|
|
|
|
html:not([data-mobile="1"]):not(.layout-phone) .user-bar {
|
|
display: block;
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
}
|
|
|
|
/* 触控小屏兜底(JS 未执行时) */
|
|
@media (pointer: coarse) and (max-width: 600px) {
|
|
body {
|
|
overflow-x: hidden;
|
|
overflow-y: auto;
|
|
max-width: 100vw;
|
|
}
|
|
|
|
.site-header {
|
|
display: grid !important;
|
|
grid-template-columns: 40px minmax(0, 1fr) auto !important;
|
|
grid-template-areas: "toggle title tools" !important;
|
|
align-items: center;
|
|
column-gap: .45rem;
|
|
padding: calc(var(--safe-top) + .4rem) .6rem .5rem;
|
|
text-align: left;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.header-bar {
|
|
display: contents !important;
|
|
}
|
|
|
|
.nav-toggle {
|
|
display: inline-flex !important;
|
|
grid-area: toggle;
|
|
}
|
|
|
|
.header-tools {
|
|
grid-area: tools;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.user-bar {
|
|
display: none !important;
|
|
}
|
|
|
|
.site-title {
|
|
grid-area: title;
|
|
font-size: .9rem;
|
|
margin: 0;
|
|
text-align: left;
|
|
min-width: 0;
|
|
}
|
|
|
|
.site-title-mobile {
|
|
display: inline !important;
|
|
}
|
|
|
|
.site-title-desktop {
|
|
display: none !important;
|
|
}
|
|
|
|
.trade-form-line.line-3 {
|
|
grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
|
|
gap: .45rem !important;
|
|
}
|
|
|
|
.trade-form-line.line-3 .trade-field:first-child {
|
|
grid-column: 1 / -1 !important;
|
|
}
|
|
|
|
.card {
|
|
overflow: visible;
|
|
max-width: 100%;
|
|
}
|
|
}
|