Files
go-service/cmd/server/web/css/responsive.css

567 lines
11 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* ===== РЕСПОНСИВНЫЙ ДИЗАЙН ===== */
/* ============================================
ПЛАНШЕТЫ (768px - 1024px)
============================================ */
@media (max-width: 1024px) {
/* Уменьшаем отступы */
body {
padding: 10px;
}
/* Хедер */
.header-bar {
gap: 10px;
grid-template-columns: 1fr auto;
}
.header-bar h1 {
font-size: var(--font-size-xl);
}
.header-time {
font-size: var(--font-size-sm);
padding: 4px 10px;
}
.cam-btn {
font-size: var(--font-size-sm);
padding: 6px 12px;
}
/* Карточки */
.card {
padding: 12px 14px;
}
.card h3 {
font-size: var(--font-size-base);
}
#status {
font-size: var(--font-size-2xl);
}
/* Прогресс-бары */
.progress {
height: 28px;
padding: 4px;
}
.progress-label {
font-size: var(--font-size-sm);
}
/* Сигнальные иконки */
.signal-icon {
width: 28px;
height: 28px;
}
}
/* ============================================
МОБИЛЬНЫЕ УСТРОЙСТВА (до 768px)
============================================ */
@media (max-width: 768px) {
/* ===== ОБЩИЕ ===== */
body {
padding: 8px;
font-size: var(--font-size-base);
}
/* Увеличиваем область касания для всех интерактивных элементов */
button,
.cam-btn,
.tab-btn,
.pagination-btn,
.log-file-item {
min-height: 44px;
min-width: 44px;
}
/* ===== ХЕДЕР ===== */
.header-bar {
display: flex;
flex-direction: column;
align-items: stretch;
gap: 8px;
margin-bottom: 12px;
}
.header-bar h1 {
font-size: var(--font-size-lg);
text-align: center;
letter-spacing: 0.05em;
}
.header-bar > div {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 6px;
}
.header-time {
font-size: var(--font-size-sm);
padding: 4px 10px;
flex: 1;
min-width: 80px;
}
#audio-indicator {
font-size: var(--font-size-base);
padding: 4px 10px;
min-width: 40px;
}
.cam-btn {
font-size: var(--font-size-sm);
padding: 8px 14px;
justify-content: center;
flex: 1;
min-width: 80px;
}
/* Ссылка "Журнал" */
.header-bar a[href="/logs.html"] {
font-size: var(--font-size-sm);
padding: 6px 12px;
text-align: center;
flex: 1;
min-width: 60px;
}
/* ===== МАКЕТ ===== */
.layout {
flex-direction: column;
height: auto;
gap: 8px;
}
.panel {
height: auto;
overflow-y: visible;
}
.left {
flex: 1 1 auto !important;
min-width: 0 !important;
padding: 0;
width: 100% !important;
}
.right {
flex: 0 0 auto !important;
min-width: 100% !important;
width: 100% !important;
height: 40vh;
min-height: 300px;
opacity: 1 !important;
pointer-events: auto !important;
}
.right.hidden {
display: none !important;
flex: 0 0 0 !important;
height: 0 !important;
min-height: 0 !important;
}
.resizer {
display: none !important;
}
/* ===== СЕТКА ===== */
.grid {
grid-template-columns: 1fr;
gap: 8px;
}
.wide {
grid-column: span 1;
}
/* ===== КАРТОЧКИ ===== */
.card {
padding: 12px;
border-radius: 8px;
}
.card h3 {
font-size: var(--font-size-base);
margin-bottom: 8px;
}
#status {
font-size: var(--font-size-2xl);
}
#meta {
font-size: var(--font-size-sm);
}
/* ===== ПРОГРЕСС-БАРЫ ===== */
.progress-row {
margin-bottom: 12px;
}
.progress-label {
font-size: var(--font-size-sm);
margin-bottom: 4px;
}
.progress {
height: 30px;
padding: 4px;
border-width: 2px;
}
.progress-with-signal {
flex-wrap: nowrap;
}
.progress-90 {
flex: 1;
margin-right: 8px;
}
.signal-icon {
width: 30px;
height: 30px;
flex-shrink: 0;
}
.sig-bar {
min-width: 4px;
border-width: 1.5px;
}
/* ===== АККОРДЕОН ===== */
.accordion-header {
padding: 8px 0;
font-size: var(--font-size-base);
}
.accordion-body {
max-height: 400px;
}
#history {
font-size: var(--font-size-sm);
max-height: 300px;
line-height: 1.5;
}
/* ===== КАМЕРА ===== */
.cam-modal {
height: 100%;
min-height: 300px;
}
.cam-header {
padding: 6px 10px;
font-size: var(--font-size-sm);
}
.cam-frame {
object-fit: cover;
}
.crosshair-box {
width: 80px;
height: 80px;
border-width: 1.5px;
}
/* ===== ГОРЯЧИЕ КЛАВИШИ ===== */
.hotkey-hint {
font-size: var(--font-size-xs);
padding: 4px 0;
}
.hotkey-hint kbd {
padding: 2px 6px;
font-size: var(--font-size-xs);
}
}
/* ============================================
МАЛЕНЬКИЕ ТЕЛЕФОНЫ (до 480px)
============================================ */
@media (max-width: 480px) {
body {
padding: 6px;
}
/* Хедер */
.header-bar h1 {
font-size: var(--font-size-base);
}
.header-bar > div {
flex-wrap: wrap;
}
.header-time {
font-size: var(--font-size-xs);
padding: 4px 8px;
min-width: 60px;
}
#audio-indicator {
font-size: var(--font-size-sm);
padding: 4px 8px;
min-width: 35px;
}
.cam-btn {
font-size: var(--font-size-xs);
padding: 6px 10px;
min-width: 60px;
}
/* Карточки */
.card {
padding: 10px;
border-radius: 6px;
}
.card h3 {
font-size: var(--font-size-sm);
}
#status {
font-size: var(--font-size-xl);
}
#meta {
font-size: var(--font-size-xs);
}
/* Прогресс-бары */
.progress {
height: 24px;
padding: 3px;
border-width: 2px;
}
.progress-label {
font-size: var(--font-size-xs);
}
.signal-icon {
width: 24px;
height: 24px;
}
.sig-bar {
min-width: 3px;
border-width: 1px;
}
.sig-bar-1 { height: 30%; }
.sig-bar-2 { height: 60%; }
.sig-bar-3 { height: 90%; }
/* Камера */
.right {
height: 35vh;
min-height: 200px;
}
.cam-header {
padding: 4px 8px;
font-size: var(--font-size-xs);
}
.crosshair-box {
width: 60px;
height: 60px;
}
/* Аккордеон */
#history {
font-size: var(--font-size-xs);
max-height: 200px;
}
}
/* ============================================
ОРИЕНТАЦИЯ (ALBUM / PORTRAIT)
============================================ */
@media (max-width: 768px) and (orientation: landscape) {
.layout {
flex-direction: row;
height: calc(100vh - 80px);
}
.left {
flex: 1 1 60% !important;
min-width: 0 !important;
padding-right: 8px;
overflow-y: auto;
height: 100%;
}
.right {
flex: 0 0 40% !important;
min-width: 0 !important;
height: 100%;
min-height: 0;
}
.grid {
grid-template-columns: 1fr 1fr;
gap: 6px;
}
.wide {
grid-column: span 2;
}
#status {
font-size: var(--font-size-xl);
}
}
/* ============================================
УЛУЧШЕНИЯ ДЛЯ ТАЧ-ИНТЕРФЕЙСА
============================================ */
@media (hover: none) and (pointer: coarse) {
/* Увеличиваем область касания */
button,
.cam-btn,
.tab-btn,
.pagination-btn,
.log-file-item,
.accordion-header,
.pagination-goto-btn {
min-height: 44px;
min-width: 44px;
padding: 8px 16px;
}
/* Убираем hover-эффекты, оставляем active */
.cam-btn:hover,
.tab-btn:hover,
.pagination-btn:hover,
.log-file-item:hover {
transform: none;
}
.cam-btn:active,
.tab-btn:active,
.pagination-btn:active,
.log-file-item:active {
transform: scale(0.95);
background: rgba(0, 255, 136, 0.15);
}
/* Увеличиваем отступы для скролла */
.panel,
.logs-content,
.logs-sidebar {
-webkit-overflow-scrolling: touch;
scroll-behavior: smooth;
}
/* Увеличиваем размер полей ввода */
.pagination-input {
min-height: 44px;
font-size: var(--font-size-base);
padding: 8px 12px;
}
/* Увеличиваем чекбоксы и переключатели */
input[type="checkbox"],
input[type="radio"] {
width: 20px;
height: 20px;
}
}
/* ============================================
ТЁМНАЯ ТЕМА (опционально)
============================================ */
@media (prefers-color-scheme: dark) {
body {
background: #0a0f0a;
}
}
/* ============================================
ПЕЧАТЬ
============================================ */
@media print {
.header-bar,
.cam-btn,
.resizer,
.right,
.pagination-container,
.hotkey-hint {
display: none !important;
}
.layout {
display: block !important;
height: auto !important;
}
.panel {
height: auto !important;
overflow: visible !important;
}
.card {
break-inside: avoid;
border: 1px solid #00ff88;
}
}
/* ===== ДОПОЛНИТЕЛЬНЫЕ УЛУЧШЕНИЯ ДЛЯ ХЕДЕРА ===== */
@media (max-width: 768px) {
.header-bar {
display: flex !important;
flex-direction: column !important;
align-items: stretch !important;
gap: 8px !important;
}
.header-controls {
display: flex !important;
flex-wrap: wrap !important;
justify-content: center !important;
gap: 6px !important;
}
}
@media (max-width: 480px) {
.header-controls {
gap: 4px !important;
}
}
/* ===== УЛУЧШЕНИЯ ДЛЯ ТАЧ-ИНТЕРФЕЙСА ===== */
@media (hover: none) and (pointer: coarse) {
.header-link,
.cam-btn,
.cam-close-btn {
min-height: 44px !important;
min-width: 44px !important;
padding: 8px 14px !important;
}
.header-link:active,
.cam-btn:active {
transform: scale(0.95);
}
}
/* ===== КНОПКА ЗАКРЫТИЯ КАМЕРЫ НА МОБИЛЬНЫХ ===== */
@media (max-width: 768px) {
.cam-close-btn {
font-size: var(--font-size-lg);
padding: 6px 14px;
min-height: 44px;
min-width: 44px;
}
}