Files
vision-record/web/static/style.css

473 lines
7.0 KiB
CSS

/* 视觉记录系统样式 */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: #f5f5f5;
color: #333;
line-height: 1.6;
}
.container {
max-width: 1400px;
margin: 0 auto;
padding: 20px;
}
/* 头部 */
.header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 20px 30px;
border-radius: 10px;
margin-bottom: 20px;
}
.header h1 {
font-size: 24px;
margin-bottom: 10px;
}
.status-bar {
display: flex;
gap: 20px;
font-size: 14px;
}
.status-bar span {
background: rgba(255,255,255,0.2);
padding: 5px 15px;
border-radius: 20px;
}
/* 控制面板 */
.control-panel {
background: white;
padding: 20px;
border-radius: 10px;
margin-bottom: 20px;
display: flex;
gap: 30px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.panel-section {
flex: 1;
}
.panel-section h3 {
margin-bottom: 15px;
color: #555;
font-size: 16px;
}
.control-buttons {
display: flex;
gap: 10px;
}
/* 按钮 */
button {
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 14px;
transition: all 0.2s;
}
.btn-primary {
background: #4CAF50;
color: white;
}
.btn-primary:hover {
background: #45a049;
}
.btn-danger {
background: #f44336;
color: white;
}
.btn-danger:hover {
background: #da190b;
}
.btn-secondary {
background: #2196F3;
color: white;
}
.btn-secondary:hover {
background: #0b7dda;
}
.btn-small {
padding: 5px 15px;
font-size: 12px;
background: #9e9e9e;
color: white;
}
.btn-small:hover {
background: #757575;
}
.btn-settings {
background: #ff9800;
color: white;
}
.btn-settings:hover {
background: #f57c00;
}
/* 统计网格 */
.stats-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 15px;
}
.stat-item {
background: #f9f9f9;
padding: 15px;
border-radius: 8px;
text-align: center;
}
.stat-label {
display: block;
color: #888;
font-size: 12px;
margin-bottom: 5px;
}
.stat-value {
display: block;
font-size: 24px;
font-weight: bold;
color: #333;
}
/* 主内容区 */
.main-content {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
}
/* 图片区域 */
.images-section, .events-section {
background: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.images-section h2, .events-section h2 {
margin-bottom: 15px;
color: #555;
}
.filter-bar {
display: flex;
gap: 10px;
margin-bottom: 15px;
align-items: center;
}
.filter-bar select {
padding: 8px 15px;
border: 1px solid #ddd;
border-radius: 5px;
}
/* 图片列表 - 序号+分析信息 */
.images-list {
max-height: 500px;
overflow-y: auto;
}
.image-item {
background: #f9f9f9;
padding: 12px 15px;
margin-bottom: 8px;
border-radius: 8px;
cursor: pointer;
display: flex;
align-items: center;
gap: 15px;
border-left: 4px solid #667eea;
}
.image-item:hover {
background: #f0f0f0;
}
.image-item.analyzed {
border-left-color: #4CAF50;
}
.image-item.unanalyzed {
border-left-color: #f44336;
}
.image-item:hover {
background: #f0f0f0;
}
.image-number {
font-size: 18px;
font-weight: bold;
color: #667eea;
min-width: 60px;
}
.image-time {
color: #888;
font-size: 13px;
min-width: 140px;
}
.image-status {
font-size: 13px;
min-width: 80px;
}
.image-status.analyzed {
color: #4CAF50;
}
.image-status.unanalyzed {
color: #f44336;
}
.image-events-summary {
color: #555;
font-size: 13px;
flex: 1;
}
/* 事件列表 */
.events-list {
max-height: 500px;
overflow-y: auto;
}
.event-card {
background: #f9f9f9;
padding: 12px;
margin-bottom: 10px;
border-radius: 8px;
border-left: 4px solid #667eea;
cursor: pointer;
}
.event-card:hover {
background: #f0f0f0;
}
.event-card.type-人物活动 {
border-left-color: #e91e63;
}
.event-card.type-物体变化 {
border-left-color: #ff9800;
}
.event-card.type-环境变化 {
border-left-color: #4caf50;
}
.event-card.type-异常情况 {
border-left-color: #f44336;
}
.event-card.type-无事件 {
border-left-color: #9e9e9e;
opacity: 0.7;
}
.event-header {
display: flex;
justify-content: space-between;
margin-bottom: 5px;
}
.event-type {
font-weight: bold;
color: #333;
}
.event-time {
font-size: 12px;
color: #888;
}
.event-desc {
font-size: 14px;
color: #555;
}
.event-confidence {
display: inline-block;
font-size: 11px;
padding: 2px 8px;
border-radius: 10px;
background: #e0e0e0;
}
/* 模态框 */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.8);
z-index: 1000;
align-items: center;
justify-content: center;
}
.modal.active {
display: flex;
}
.modal-content {
background: white;
padding: 20px;
border-radius: 10px;
max-width: 800px;
max-height: 90vh;
overflow-y: auto;
position: relative;
}
.settings-modal-content {
max-width: 600px;
}
.modal-close {
position: absolute;
top: 10px;
right: 15px;
font-size: 24px;
cursor: pointer;
color: #888;
}
.modal-close:hover {
color: #333;
}
.modal-content img {
width: 100%;
max-height: 400px;
object-fit: contain;
border-radius: 8px;
margin-bottom: 15px;
}
.modal-info h3 {
margin-bottom: 10px;
}
.modal-events {
margin-top: 15px;
}
.modal-event {
background: #f5f5f5;
padding: 10px;
margin-bottom: 8px;
border-radius: 5px;
}
.modal-actions {
margin-top: 15px;
display: flex;
gap: 10px;
}
/* 设置模态框 */
.settings-section {
margin-bottom: 20px;
padding-bottom: 15px;
border-bottom: 1px solid #eee;
}
.settings-section:last-of-type {
border-bottom: none;
}
.settings-section h4 {
margin-bottom: 15px;
color: #667eea;
}
.setting-item {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 10px;
}
.setting-item label {
min-width: 140px;
color: #555;
}
.setting-item input[type="text"],
.setting-item input[type="number"],
.setting-item input[type="password"] {
flex: 1;
padding: 8px 12px;
border: 1px solid #ddd;
border-radius: 5px;
}
.setting-item input[type="checkbox"] {
width: 20px;
height: 20px;
}
.setting-note {
color: #888;
font-size: 12px;
margin-top: 5px;
}
.settings-actions {
margin-top: 20px;
display: flex;
gap: 10px;
justify-content: center;
}
/* 响应式 */
@media (max-width: 768px) {
.control-panel {
flex-direction: column;
}
.main-content {
grid-template-columns: 1fr;
}
.stats-grid {
grid-template-columns: 1fr;
}
.image-item {
flex-wrap: wrap;
}
}