Spaces:
Sleeping
Sleeping
| /* static/css/editor.css β Mobile-first */ | |
| .editor-wrap { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| overflow: hidden; | |
| } | |
| /* ββ File Explorer (collapsible on mobile) ββ */ | |
| .file-panel { | |
| background: var(--bg-elevated); | |
| border-bottom: 1px solid var(--border); | |
| display: flex; | |
| flex-direction: column; | |
| max-height: 0; | |
| overflow: hidden; | |
| transition: max-height 0.25s ease; | |
| } | |
| .file-panel.open { max-height: 250px; } | |
| .file-panel-header { | |
| padding: var(--sp-2) var(--sp-3); | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| border-bottom: 1px solid var(--divider); | |
| min-height: 40px; | |
| flex-shrink: 0; | |
| } | |
| .file-panel-title { | |
| font-size: 11px; | |
| font-weight: 600; | |
| color: var(--text-3); | |
| text-transform: uppercase; | |
| letter-spacing: 0.5px; | |
| display: flex; | |
| align-items: center; | |
| gap: var(--sp-2); | |
| } | |
| .file-actions { display: flex; gap: 2px; } | |
| .file-list { | |
| flex: 1; | |
| overflow-y: auto; | |
| padding: var(--sp-1); | |
| -webkit-overflow-scrolling: touch; | |
| } | |
| .file-item { | |
| display: flex; | |
| align-items: center; | |
| gap: var(--sp-2); | |
| padding: 0 var(--sp-2); | |
| height: 36px; | |
| border-radius: var(--r-sm); | |
| cursor: pointer; | |
| color: var(--text-2); | |
| font-size: 13px; | |
| font-family: var(--font-mono); | |
| transition: all 0.1s ease; | |
| position: relative; | |
| } | |
| .file-item:active { background: rgba(255,255,255,0.04); } | |
| .file-item.active { background: var(--accent-dim); color: var(--accent); } | |
| .file-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } | |
| .file-item-del { | |
| display: none; | |
| background: none; | |
| border: none; | |
| color: var(--error); | |
| cursor: pointer; | |
| padding: 4px; | |
| border-radius: 4px; | |
| font-size: 11px; | |
| min-width: 28px; | |
| min-height: 28px; | |
| align-items: center; | |
| justify-content: center; | |
| } | |
| .file-item:hover .file-item-del { display: flex; } | |
| /* ββ Editor Toolbar ββ */ | |
| .editor-bar { | |
| height: 48px; | |
| background: var(--bg-elevated); | |
| border-bottom: 1px solid var(--border); | |
| display: flex; | |
| align-items: center; | |
| padding: 0 var(--sp-2); | |
| gap: var(--sp-2); | |
| flex-shrink: 0; | |
| } | |
| .filename-input { | |
| flex: 1; | |
| background: rgba(255,255,255,0.04); | |
| border: 1px solid var(--border); | |
| color: var(--text-1); | |
| padding: 6px 10px; | |
| border-radius: var(--r-sm); | |
| font-family: var(--font-mono); | |
| font-size: 13px; | |
| min-width: 0; | |
| } | |
| .filename-input:focus { outline: none; border-color: var(--accent); } | |
| /* ββ Editor Buttons ββ */ | |
| .ed-btn { | |
| background: transparent; | |
| color: var(--text-2); | |
| border: 1px solid var(--border); | |
| padding: 6px 10px; | |
| border-radius: var(--r-sm); | |
| cursor: pointer; | |
| font-size: 12px; | |
| font-weight: 600; | |
| display: inline-flex; | |
| align-items: center; | |
| gap: 4px; | |
| white-space: nowrap; | |
| font-family: var(--font-ui); | |
| min-height: 36px; | |
| transition: all 0.15s ease; | |
| touch-action: manipulation; | |
| } | |
| .ed-btn:active { transform: scale(0.96); } | |
| .ed-btn.primary { background: var(--accent-dim); color: var(--accent); border-color: rgba(255,193,7,0.2); } | |
| .ed-btn.primary:active { background: var(--accent); color: var(--accent-text); } | |
| .ed-btn.success { background: var(--success-dim); color: var(--success); border-color: rgba(34,197,94,0.2); } | |
| .ed-btn.success:active { background: var(--success); color: #000; } | |
| .ed-btn.ai { background: var(--success-dim); color: var(--success); border-color: rgba(34,197,94,0.2); } | |
| .ed-btn.danger { color: var(--error); border-color: rgba(239,68,68,0.2); } | |
| .ed-btn.danger:active { background: var(--error-dim); } | |
| .ed-btn.icon-only { padding: 0; width: 36px; justify-content: center; } | |
| /* ββ Ace Editor ββ */ | |
| .editor-area { | |
| flex: 1; | |
| display: flex; | |
| overflow: hidden; | |
| } | |
| #ace-editor { flex: 1; height: 100% ; } | |
| /* ββ Preview ββ */ | |
| #preview-container { display: none; flex: 1; flex-direction: column; } | |
| #preview-container.visible { display: flex; } | |
| .preview-bar { | |
| height: 36px; | |
| background: var(--bg-elevated); | |
| border-bottom: 1px solid var(--border); | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| padding: 0 var(--sp-3); | |
| font-size: 12px; | |
| color: var(--text-2); | |
| flex-shrink: 0; | |
| } | |
| #live-preview-frame { flex: 1; border: none; background: #fff; } | |
| #preview-container.fullscreen { | |
| position: fixed; | |
| top: var(--topbar-h); | |
| left: 0; right: 0; bottom: 0; | |
| z-index: 9999; | |
| } | |
| /* ββ Desktop ββ */ | |
| @media (min-width: 769px) { | |
| .editor-wrap { | |
| flex-direction: row; | |
| padding: var(--sp-4); | |
| gap: var(--sp-4); | |
| } | |
| .file-panel { | |
| width: 240px; | |
| flex-shrink: 0; | |
| max-height: none; | |
| border-bottom: none; | |
| border: 1px solid var(--border); | |
| border-radius: var(--r-md); | |
| overflow: hidden; | |
| } | |
| .file-panel.open { max-height: none; } | |
| .editor-main { | |
| flex: 1; | |
| border: 1px solid var(--border); | |
| border-radius: var(--r-md); | |
| display: flex; | |
| flex-direction: column; | |
| overflow: hidden; | |
| } | |
| } | |
| /* ββ Light ββ */ | |
| :root.light .file-panel { background: var(--bg-surface); } | |
| :root.light .editor-bar { background: var(--bg-surface); } | |
| :root.light .filename-input { background: #fff; border-color: rgba(0,0,0,0.1); } | |
| :root.light .ed-btn { border-color: rgba(0,0,0,0.1); } | |