594 lines
12 KiB
CSS
594 lines
12 KiB
CSS
/*
|
|
* 站点预览工作室 —— 独立视觉体系(与主应用风格完全区隔)。
|
|
* 深空底 + 靛蓝/青渐变强调 + 玻璃拟态面板;全部类名 site-studio- 前缀,
|
|
* 仅由 SiteStudioPage 引入,不触碰全局样式与主题变量。
|
|
*/
|
|
|
|
.site-studio-root {
|
|
--ss-bg: #0b0d13;
|
|
--ss-bg-2: #0f1118;
|
|
--ss-panel: rgba(255, 255, 255, 0.04);
|
|
--ss-panel-strong: rgba(255, 255, 255, 0.07);
|
|
--ss-border: rgba(255, 255, 255, 0.09);
|
|
--ss-border-strong: rgba(255, 255, 255, 0.16);
|
|
--ss-text: #eef1f7;
|
|
--ss-text-2: #9aa3b8;
|
|
--ss-text-3: #667085;
|
|
--ss-accent: #5b7cfa;
|
|
--ss-accent-2: #35d4c5;
|
|
--ss-danger: #f26d7d;
|
|
--ss-success: #3ecf8e;
|
|
--ss-warn: #f5b95f;
|
|
--ss-font:
|
|
"Inter", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
|
|
--ss-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
|
|
--ss-radius: 14px;
|
|
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 60;
|
|
display: flex;
|
|
flex-direction: column;
|
|
background:
|
|
radial-gradient(1100px 500px at 85% -10%, rgba(91, 124, 250, 0.16), transparent 60%),
|
|
radial-gradient(900px 460px at -10% 110%, rgba(53, 212, 197, 0.1), transparent 55%),
|
|
var(--ss-bg);
|
|
color: var(--ss-text);
|
|
font-family: var(--ss-font);
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* ───────── 顶部工具栏 ───────── */
|
|
|
|
.site-studio-topbar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 14px;
|
|
padding: 12px 20px;
|
|
border-bottom: 1px solid var(--ss-border);
|
|
background: rgba(11, 13, 19, 0.72);
|
|
backdrop-filter: blur(14px);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.site-studio-back {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 7px;
|
|
color: var(--ss-text-2);
|
|
font-size: 13px;
|
|
text-decoration: none;
|
|
padding: 7px 12px;
|
|
border-radius: 10px;
|
|
border: 1px solid var(--ss-border);
|
|
background: var(--ss-panel);
|
|
transition: all 0.16s ease;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.site-studio-back:hover {
|
|
color: var(--ss-text);
|
|
border-color: var(--ss-border-strong);
|
|
background: var(--ss-panel-strong);
|
|
}
|
|
|
|
.site-studio-title-wrap {
|
|
min-width: 0;
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: baseline;
|
|
gap: 10px;
|
|
}
|
|
|
|
.site-studio-title {
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
letter-spacing: 0.2px;
|
|
margin: 0;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.site-studio-subtitle {
|
|
font-size: 12px;
|
|
color: var(--ss-text-3);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.site-studio-pill {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 7px;
|
|
font-size: 12px;
|
|
padding: 4px 12px;
|
|
border-radius: 999px;
|
|
border: 1px solid var(--ss-border);
|
|
background: var(--ss-panel);
|
|
color: var(--ss-text-2);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.site-studio-pill .site-studio-dot {
|
|
width: 7px;
|
|
height: 7px;
|
|
border-radius: 50%;
|
|
background: var(--ss-text-3);
|
|
}
|
|
|
|
.site-studio-pill--success {
|
|
color: var(--ss-success);
|
|
border-color: rgba(62, 207, 142, 0.35);
|
|
}
|
|
|
|
.site-studio-pill--success .site-studio-dot {
|
|
background: var(--ss-success);
|
|
}
|
|
|
|
.site-studio-pill--running {
|
|
color: var(--ss-accent-2);
|
|
border-color: rgba(53, 212, 197, 0.35);
|
|
}
|
|
|
|
.site-studio-pill--running .site-studio-dot {
|
|
background: var(--ss-accent-2);
|
|
animation: site-studio-breathe 1.6s ease-in-out infinite;
|
|
}
|
|
|
|
.site-studio-pill--failed {
|
|
color: var(--ss-danger);
|
|
border-color: rgba(242, 109, 125, 0.4);
|
|
}
|
|
|
|
.site-studio-pill--failed .site-studio-dot {
|
|
background: var(--ss-danger);
|
|
}
|
|
|
|
.site-studio-pill--none {
|
|
color: var(--ss-warn);
|
|
border-color: rgba(245, 185, 95, 0.35);
|
|
}
|
|
|
|
.site-studio-pill--none .site-studio-dot {
|
|
background: var(--ss-warn);
|
|
}
|
|
|
|
@keyframes site-studio-breathe {
|
|
0%,
|
|
100% {
|
|
opacity: 1;
|
|
transform: scale(1);
|
|
}
|
|
50% {
|
|
opacity: 0.45;
|
|
transform: scale(0.82);
|
|
}
|
|
}
|
|
|
|
/* 设备切换分段控件 */
|
|
.site-studio-seg {
|
|
display: inline-flex;
|
|
padding: 3px;
|
|
gap: 2px;
|
|
border-radius: 11px;
|
|
border: 1px solid var(--ss-border);
|
|
background: var(--ss-panel);
|
|
}
|
|
|
|
.site-studio-seg-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 34px;
|
|
height: 30px;
|
|
border: none;
|
|
border-radius: 8px;
|
|
background: transparent;
|
|
color: var(--ss-text-3);
|
|
cursor: pointer;
|
|
transition: all 0.15s ease;
|
|
}
|
|
|
|
.site-studio-seg-btn:hover {
|
|
color: var(--ss-text);
|
|
}
|
|
|
|
.site-studio-seg-btn--active {
|
|
background: linear-gradient(135deg, rgba(91, 124, 250, 0.85), rgba(72, 96, 220, 0.85));
|
|
color: #fff;
|
|
box-shadow: 0 2px 10px rgba(91, 124, 250, 0.35);
|
|
}
|
|
|
|
/* 主按钮 */
|
|
.site-studio-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 7px;
|
|
font-size: 13px;
|
|
font-family: inherit;
|
|
padding: 7px 14px;
|
|
border-radius: 10px;
|
|
border: 1px solid var(--ss-border);
|
|
background: var(--ss-panel);
|
|
color: var(--ss-text-2);
|
|
cursor: pointer;
|
|
transition: all 0.16s ease;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.site-studio-btn:hover:not(:disabled) {
|
|
color: var(--ss-text);
|
|
border-color: var(--ss-border-strong);
|
|
background: var(--ss-panel-strong);
|
|
}
|
|
|
|
.site-studio-btn:disabled {
|
|
opacity: 0.45;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.site-studio-btn--primary {
|
|
background: linear-gradient(135deg, #5b7cfa, #465edc);
|
|
border-color: transparent;
|
|
color: #fff;
|
|
box-shadow: 0 4px 18px rgba(91, 124, 250, 0.35);
|
|
}
|
|
|
|
.site-studio-btn--primary:hover:not(:disabled) {
|
|
background: linear-gradient(135deg, #6d8bff, #5570ea);
|
|
color: #fff;
|
|
}
|
|
|
|
/* ───────── 主体三栏 ───────── */
|
|
|
|
.site-studio-body {
|
|
flex: 1;
|
|
display: flex;
|
|
min-height: 0;
|
|
}
|
|
|
|
/* 左侧页面导航 */
|
|
.site-studio-sidenav {
|
|
width: 208px;
|
|
flex-shrink: 0;
|
|
border-right: 1px solid var(--ss-border);
|
|
padding: 16px 12px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 14px;
|
|
overflow-y: auto;
|
|
background: rgba(15, 17, 24, 0.5);
|
|
}
|
|
|
|
.site-studio-sidenav-label {
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
letter-spacing: 1.4px;
|
|
text-transform: uppercase;
|
|
color: var(--ss-text-3);
|
|
padding: 0 8px;
|
|
}
|
|
|
|
.site-studio-navlist {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 3px;
|
|
}
|
|
|
|
.site-studio-navitem {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 9px;
|
|
width: 100%;
|
|
text-align: left;
|
|
font-family: inherit;
|
|
font-size: 13px;
|
|
color: var(--ss-text-2);
|
|
background: transparent;
|
|
border: 1px solid transparent;
|
|
border-radius: 10px;
|
|
padding: 9px 10px;
|
|
cursor: pointer;
|
|
transition: all 0.15s ease;
|
|
}
|
|
|
|
.site-studio-navitem:hover {
|
|
color: var(--ss-text);
|
|
background: var(--ss-panel);
|
|
}
|
|
|
|
.site-studio-navitem--active {
|
|
color: var(--ss-text);
|
|
background: linear-gradient(135deg, rgba(91, 124, 250, 0.2), rgba(53, 212, 197, 0.08));
|
|
border-color: rgba(91, 124, 250, 0.35);
|
|
}
|
|
|
|
.site-studio-navitem .site-studio-navindex {
|
|
font-size: 11px;
|
|
font-family: var(--ss-mono);
|
|
color: var(--ss-text-3);
|
|
width: 18px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.site-studio-navitem--active .site-studio-navindex {
|
|
color: var(--ss-accent);
|
|
}
|
|
|
|
.site-studio-sidenav-files {
|
|
font-size: 12px;
|
|
color: var(--ss-text-3);
|
|
padding: 0 8px;
|
|
line-height: 2;
|
|
}
|
|
|
|
.site-studio-sidenav-files code {
|
|
font-family: var(--ss-mono);
|
|
font-size: 11px;
|
|
color: var(--ss-text-2);
|
|
}
|
|
|
|
/* 中央预览区 */
|
|
.site-studio-stage {
|
|
flex: 1;
|
|
min-width: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: 22px 26px 26px;
|
|
overflow: auto;
|
|
}
|
|
|
|
.site-studio-frame-shell {
|
|
display: flex;
|
|
flex-direction: column;
|
|
width: var(--ss-frame-w, 100%);
|
|
max-width: 100%;
|
|
height: 100%;
|
|
min-height: 420px;
|
|
border-radius: var(--ss-radius);
|
|
border: 1px solid var(--ss-border-strong);
|
|
background: #171a23;
|
|
box-shadow:
|
|
0 24px 70px rgba(0, 0, 0, 0.5),
|
|
0 0 0 1px rgba(255, 255, 255, 0.03) inset;
|
|
overflow: hidden;
|
|
transition: width 0.35s cubic-bezier(0.25, 0.8, 0.3, 1);
|
|
}
|
|
|
|
.site-studio-frame-bar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 9px 14px;
|
|
background: rgba(255, 255, 255, 0.045);
|
|
border-bottom: 1px solid var(--ss-border);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.site-studio-traffic {
|
|
display: inline-flex;
|
|
gap: 6px;
|
|
}
|
|
|
|
.site-studio-traffic span {
|
|
width: 10px;
|
|
height: 10px;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.site-studio-traffic span:nth-child(1) {
|
|
background: #ff5f57;
|
|
}
|
|
|
|
.site-studio-traffic span:nth-child(2) {
|
|
background: #febc2e;
|
|
}
|
|
|
|
.site-studio-traffic span:nth-child(3) {
|
|
background: #28c840;
|
|
}
|
|
|
|
.site-studio-urlbox {
|
|
flex: 1;
|
|
min-width: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
background: rgba(0, 0, 0, 0.32);
|
|
border: 1px solid var(--ss-border);
|
|
border-radius: 8px;
|
|
padding: 5px 12px;
|
|
font-family: var(--ss-mono);
|
|
font-size: 11px;
|
|
color: var(--ss-text-3);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.site-studio-urlbox svg {
|
|
flex-shrink: 0;
|
|
color: var(--ss-accent-2);
|
|
}
|
|
|
|
.site-studio-urlbox span {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.site-studio-frame-holder {
|
|
flex: 1;
|
|
min-height: 0;
|
|
background: #fff;
|
|
position: relative;
|
|
}
|
|
|
|
.site-studio-iframe {
|
|
position: absolute;
|
|
inset: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
border: 0;
|
|
display: block;
|
|
background: #fff;
|
|
}
|
|
|
|
/* ───────── 底部构建控制台 ───────── */
|
|
|
|
.site-studio-console {
|
|
flex-shrink: 0;
|
|
border-top: 1px solid var(--ss-border);
|
|
background: rgba(9, 10, 16, 0.85);
|
|
max-height: 34vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.site-studio-console-head {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 9px 20px;
|
|
cursor: pointer;
|
|
user-select: none;
|
|
font-size: 12px;
|
|
color: var(--ss-text-2);
|
|
}
|
|
|
|
.site-studio-console-head:hover {
|
|
color: var(--ss-text);
|
|
}
|
|
|
|
.site-studio-console-title {
|
|
font-weight: 600;
|
|
letter-spacing: 0.4px;
|
|
}
|
|
|
|
.site-studio-console-meta {
|
|
color: var(--ss-text-3);
|
|
font-family: var(--ss-mono);
|
|
font-size: 11px;
|
|
}
|
|
|
|
.site-studio-console-body {
|
|
overflow: auto;
|
|
padding: 4px 20px 16px;
|
|
font-family: var(--ss-mono);
|
|
font-size: 11.5px;
|
|
line-height: 1.75;
|
|
color: var(--ss-text-2);
|
|
white-space: pre-wrap;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.site-studio-console-body .site-studio-log-error {
|
|
color: var(--ss-danger);
|
|
}
|
|
|
|
.site-studio-console-body .site-studio-log-success {
|
|
color: var(--ss-success);
|
|
}
|
|
|
|
.site-studio-console-empty {
|
|
color: var(--ss-text-3);
|
|
font-family: var(--ss-font);
|
|
font-size: 12px;
|
|
padding: 8px 0 14px;
|
|
}
|
|
|
|
/* ───────── 状态视图 ───────── */
|
|
|
|
.site-studio-state {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 40px;
|
|
}
|
|
|
|
.site-studio-state-card {
|
|
max-width: 520px;
|
|
text-align: center;
|
|
padding: 44px 40px;
|
|
border-radius: 20px;
|
|
border: 1px solid var(--ss-border);
|
|
background: var(--ss-panel);
|
|
backdrop-filter: blur(10px);
|
|
}
|
|
|
|
.site-studio-state-art {
|
|
width: 76px;
|
|
height: 76px;
|
|
margin: 0 auto 22px;
|
|
border-radius: 22px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: linear-gradient(135deg, rgba(91, 124, 250, 0.25), rgba(53, 212, 197, 0.18));
|
|
border: 1px solid rgba(91, 124, 250, 0.35);
|
|
color: var(--ss-accent);
|
|
}
|
|
|
|
.site-studio-state-title {
|
|
font-size: 17px;
|
|
font-weight: 700;
|
|
margin: 0 0 10px;
|
|
}
|
|
|
|
.site-studio-state-desc {
|
|
font-size: 13px;
|
|
color: var(--ss-text-2);
|
|
line-height: 1.7;
|
|
margin: 0 0 18px;
|
|
}
|
|
|
|
.site-studio-state-reasons {
|
|
text-align: left;
|
|
margin: 0 auto 20px;
|
|
padding: 12px 16px;
|
|
max-width: 420px;
|
|
border-radius: 10px;
|
|
background: rgba(0, 0, 0, 0.28);
|
|
border: 1px solid var(--ss-border);
|
|
font-size: 12px;
|
|
color: var(--ss-text-3);
|
|
font-family: var(--ss-mono);
|
|
line-height: 1.8;
|
|
}
|
|
|
|
.site-studio-spinner {
|
|
width: 30px;
|
|
height: 30px;
|
|
border-radius: 50%;
|
|
border: 3px solid var(--ss-border-strong);
|
|
border-top-color: var(--ss-accent);
|
|
animation: site-studio-spin 0.9s linear infinite;
|
|
margin: 0 auto 18px;
|
|
}
|
|
|
|
@keyframes site-studio-spin {
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
.site-studio-error-text {
|
|
color: var(--ss-danger);
|
|
font-size: 12px;
|
|
font-family: var(--ss-mono);
|
|
word-break: break-all;
|
|
}
|
|
|
|
/* 响应式:窄屏收起左栏 */
|
|
@media (max-width: 860px) {
|
|
.site-studio-sidenav {
|
|
display: none;
|
|
}
|
|
|
|
.site-studio-subtitle {
|
|
display: none;
|
|
}
|
|
}
|