/
spirzen
/
it-knowledge-base
Обзор
Документация
Войти
/
spirzen
/
it-knowledge-base
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
Mobile
src/components/TerminalEmulator.module.css
269 строк
4 KB
Spirzen
Big design rework
03 июн 2026, 00:53
03 июн 2026, 00:53
47730ce
Код
Авторство
О чём код?
.shell { width: 100%; max-width: min(920px, 98%); margin: clamp(0.5rem, 4vw, 1.5rem) auto; border-radius: 10px; overflow: hidden; font-family: var(--ifm-font-family-monospace); font-size: clamp(12px, 2.8vw, 15px); line-height: 1.55; background: #12141a; color: #cdd6f4; border: 1px solid #2a2f3a; box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.03) inset; } /* Внутри it-demo__card — без внешних отступов, на всю ширину карточки */ .shellEmbedded { margin: 0; max-width: none; } .header { display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.85rem; background: linear-gradient(180deg, #1e222b 0%, #181b22 100%); border-bottom: 1px solid #2a2f3a; } .buttons { display: flex; gap: 0.45rem; flex-shrink: 0; } .winBtn { width: 12px; height: 12px; border-radius: 50%; border: none; padding: 0; cursor: pointer; transition: transform 0.15s ease, filter 0.15s ease; } .winBtn:hover { transform: scale(1.12); filter: brightness(1.1); } .winBtnRed { background: #ff5f57; } .winBtnYellow { background: #febc2e; } .winBtnGreen { background: #28c840; } .title { flex: 1; min-width: 0; font-size: 0.82em; color: #8b93a7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .status { font-size: 0.72em; color: #6ee7b7; opacity: 0.9; flex-shrink: 0; } .body { position: relative; padding: 1rem 1rem 0.75rem; min-height: clamp(180px, 42vh, 240px); max-height: clamp(280px, 58vh, 480px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; } .body::after { content: ''; pointer-events: none; position: sticky; bottom: 0; left: 0; right: 0; display: block; height: 28px; margin-top: -28px; background: linear-gradient(transparent, #12141a); } .line { margin: 0 0 0.35rem; white-space: pre-wrap; word-break: break-word; } .banner { margin: 0 0 0.65rem; color: #7dd3fc; font-size: 0.72em; line-height: 1.35; white-space: pre; overflow-x: auto; } .system { color: #a5b4fc; } .muted { color: #64748b; } .success { color: #86efac; } .error { color: #fca5a5; } .output { color: #cbd5e1; } .commandLine { color: #e2e8f0; } .prompt { color: #4ade80; font-weight: 700; } .inputRow { display: flex; align-items: center; gap: 0.35rem; margin-top: 0.35rem; flex-wrap: wrap; } .input { flex: 1; min-width: 8rem; background: transparent; border: none; color: #f1f5f9; font: inherit; outline: none; caret-color: #4ade80; padding: 0.2rem 0; } .input::placeholder { color: #475569; } .inputWrap { display: inline-flex; align-items: center; flex: 1; min-width: 8rem; } .cursor { display: inline-block; width: 0.55em; height: 1.1em; margin-left: 1px; background: #4ade80; animation: blink 1s step-end infinite; vertical-align: text-bottom; } @keyframes blink { 50% { opacity: 0; } } .hints { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.65rem 0.85rem 0.85rem; border-top: 1px solid #232833; background: #0f1116; } .hintBtn { font-family: inherit; font-size: 0.72em; padding: 0.28rem 0.55rem; border-radius: 999px; border: 1px solid #2f3644; background: #171a22; color: #94a3b8; cursor: pointer; transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease; } .hintBtn:hover { border-color: #4ade80; color: #bbf7d0; background: rgba(74, 222, 128, 0.08); } .rebootOverlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(15, 17, 22, 0.92); color: #7dd3fc; font-size: 0.9em; animation: fadeIn 0.25s ease; } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } @media (max-width: 768px) { .body { padding: 0.75rem; } .hints { padding: 0.55rem 0.75rem 0.75rem; } } @media (pointer: coarse) { .input { font-size: 16px; padding: 0.35rem 0; } } @media (max-width: 768px) and (orientation: landscape) { .body { max-height: 70vh; } }