重构:模块化项目结构,分离配置、路由、摄像头管理器,添加健康检查,更新Dockerfile和启动脚本
This commit is contained in:
214
static/css/style.css
Normal file
214
static/css/style.css
Normal file
@@ -0,0 +1,214 @@
|
||||
/* 多摄像头监控系统样式 */
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
background: #1a1a1a;
|
||||
color: white;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
.controls {
|
||||
background: #3a3a3a;
|
||||
padding: 8px 12px;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
border-bottom: 1px solid #555;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
}
|
||||
.btn {
|
||||
padding: 10px 15px;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
background: #4CAF50;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
font-weight: bold;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.btn:hover {
|
||||
background: #45a049;
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
.btn-refresh {
|
||||
background: #2196F3;
|
||||
}
|
||||
.btn-refresh:hover {
|
||||
background: #1976D2;
|
||||
}
|
||||
.camera-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 0;
|
||||
padding: 0;
|
||||
max-width: 100%;
|
||||
height: calc(100vh - 80px);
|
||||
}
|
||||
.camera-item {
|
||||
background: #2d2d2d;
|
||||
border-radius: 0;
|
||||
overflow: hidden;
|
||||
box-shadow: none;
|
||||
transition: all 0.3s ease;
|
||||
border: 1px solid #444;
|
||||
position: relative;
|
||||
}
|
||||
.camera-item:hover {
|
||||
transform: none;
|
||||
box-shadow: inset 0 0 0 3px #4CAF50;
|
||||
border-color: #4CAF50;
|
||||
z-index: 10;
|
||||
}
|
||||
.camera-header {
|
||||
background: #3a3a3a;
|
||||
padding: 8px 12px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #555;
|
||||
}
|
||||
.camera-title {
|
||||
font-weight: bold;
|
||||
color: #4CAF50;
|
||||
}
|
||||
.camera-status {
|
||||
font-size: 12px;
|
||||
padding: 3px 8px;
|
||||
border-radius: 10px;
|
||||
background: #4CAF50;
|
||||
}
|
||||
.camera-frame-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: calc(100% - 80px);
|
||||
background: #000;
|
||||
}
|
||||
.camera-frame {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
background: #000;
|
||||
object-fit: contain;
|
||||
}
|
||||
.camera-controls {
|
||||
display: none;
|
||||
}
|
||||
.cam-btn {
|
||||
padding: 5px 10px;
|
||||
border: none;
|
||||
border-radius: 3px;
|
||||
background: #555;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
transition: all 0.3s;
|
||||
min-width: 30px;
|
||||
}
|
||||
.cam-btn:hover {
|
||||
background: #666;
|
||||
transform: scale(1.1);
|
||||
}
|
||||
.cam-btn.active {
|
||||
background: #4CAF50;
|
||||
transform: scale(1.1);
|
||||
box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
|
||||
}
|
||||
.cam-btn-fullscreen {
|
||||
background: #FF9800;
|
||||
}
|
||||
.cam-btn-fullscreen:hover {
|
||||
background: #F57C00;
|
||||
}
|
||||
.camera-controls-combined {
|
||||
background: #3a3a3a;
|
||||
padding: 6px;
|
||||
display: flex;
|
||||
gap: 3px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
border-top: 1px solid #555;
|
||||
}
|
||||
.selector-btn {
|
||||
padding: 4px 8px;
|
||||
border: none;
|
||||
border-radius: 2px;
|
||||
background: #666;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
font-size: 11px;
|
||||
transition: all 0.2s;
|
||||
min-width: 25px;
|
||||
}
|
||||
.selector-btn:hover {
|
||||
background: #777;
|
||||
transform: scale(1.05);
|
||||
}
|
||||
.selector-btn.active {
|
||||
background: #2196F3;
|
||||
transform: scale(1.1);
|
||||
box-shadow: 0 0 3px rgba(33, 150, 243, 0.5);
|
||||
}
|
||||
.info-panel {
|
||||
position: fixed;
|
||||
top: 5px;
|
||||
left: 5px;
|
||||
background: rgba(45, 45, 45, 0.9);
|
||||
padding: 5px 8px;
|
||||
border-radius: 4px;
|
||||
font-size: 9px;
|
||||
max-width: 180px;
|
||||
backdrop-filter: blur(5px);
|
||||
z-index: 999;
|
||||
border: 1px solid #555;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.3);
|
||||
line-height: 1.2;
|
||||
}
|
||||
.status-info {
|
||||
display: flex;
|
||||
gap: 15px;
|
||||
align-items: center;
|
||||
margin-left: auto;
|
||||
font-size: 12px;
|
||||
color: #ccc;
|
||||
}
|
||||
.status-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
}
|
||||
.status-item strong {
|
||||
color: #4CAF50;
|
||||
}
|
||||
.info-item {
|
||||
margin: 5px 0;
|
||||
}
|
||||
.info-item strong {
|
||||
color: #4CAF50;
|
||||
}
|
||||
@media (max-width: 1200px) {
|
||||
.camera-grid {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.camera-grid {
|
||||
grid-template-columns: 1fr;
|
||||
padding: 10px;
|
||||
}
|
||||
.controls {
|
||||
flex-direction: column;
|
||||
}
|
||||
.info-panel {
|
||||
position: relative;
|
||||
top: auto;
|
||||
left: auto;
|
||||
max-width: 100%;
|
||||
margin: 10px;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user