优化样式文件格式
This commit is contained in:
209
h5/css/style.css
209
h5/css/style.css
@@ -79,44 +79,89 @@
|
||||
|
||||
/* ========================================
|
||||
统计卡片网格
|
||||
======================================== */
|
||||
/* ===== 统计卡片 ===== */
|
||||
.stat-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 12px;
|
||||
margin-bottom: 16px;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 10px;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.stat-card {
|
||||
background-color: var(--color-card);
|
||||
border-radius: 12px;
|
||||
background: var(--color-card);
|
||||
border-radius: 8px;
|
||||
padding: 16px;
|
||||
text-align: center;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.06);
|
||||
}
|
||||
|
||||
.stat-card--orange {
|
||||
border-left: 3px solid #f97316;
|
||||
}
|
||||
|
||||
.stat-card--yellow {
|
||||
border-left: 3px solid #eab308;
|
||||
}
|
||||
|
||||
.stat-icon {
|
||||
font-size: 24px;
|
||||
color: var(--color-primary);
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.stat-icon--orange {
|
||||
color: #f97316;
|
||||
}
|
||||
|
||||
.stat-icon--yellow {
|
||||
color: #eab308;
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
font-size: 12px;
|
||||
color: var(--color-text-secondary);
|
||||
margin-bottom: 6px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.stat-value {
|
||||
font-size: 28px;
|
||||
font-weight: 700;
|
||||
color: var(--color-primary);
|
||||
font-family: var(--font-mono);
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.stat-sub {
|
||||
font-size: 11px;
|
||||
color: var(--color-text-secondary);
|
||||
margin-top: 4px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
/* ===== Panel more link ===== */
|
||||
.panel-more {
|
||||
font-size: 13px;
|
||||
color: var(--color-text-secondary);
|
||||
text-decoration: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.panel-more:active {
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
/* ===== Alert list ===== */
|
||||
.alert-list {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.alert-list .alert-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.stat-icon {
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin: 0 auto 8px;
|
||||
@@ -996,3 +1041,143 @@ textarea.form-input {
|
||||
font-size: 12px;
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
/* ========================================
|
||||
预警列表项 (alerts.html)
|
||||
======================================== */
|
||||
.alert-item__icon {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 12px;
|
||||
flex-shrink: 0;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.alert-item__icon.danger {
|
||||
background-color: rgba(249, 115, 22, 0.12);
|
||||
color: #f97316;
|
||||
}
|
||||
|
||||
.alert-item__icon.warning {
|
||||
background-color: rgba(234, 179, 8, 0.12);
|
||||
color: #eab308;
|
||||
}
|
||||
|
||||
.alert-item__icon.handled {
|
||||
background-color: rgba(156, 163, 175, 0.12);
|
||||
color: #9ca3af;
|
||||
}
|
||||
|
||||
.alert-item__message {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: var(--color-text);
|
||||
margin-bottom: 4px;
|
||||
line-height: 1.4;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.alert-item__meta {
|
||||
font-size: 12px;
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
/* ========================================
|
||||
weui-tabs customization
|
||||
======================================== */
|
||||
.weui-tabs {
|
||||
background-color: var(--color-card);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.weui-tabs__nav {
|
||||
display: flex;
|
||||
padding: 0 12px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.weui-tabs__item {
|
||||
padding: 12px 16px;
|
||||
font-size: 14px;
|
||||
color: var(--color-text-secondary);
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
border-bottom: 2px solid transparent;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.weui-tabs__item.weui-tabs__item--active {
|
||||
color: var(--color-primary);
|
||||
border-bottom-color: var(--color-primary);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.weui-tabs__item:hover:not(.weui-tabs__item--active) {
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
/* ========================================
|
||||
page-hd customization
|
||||
======================================== */
|
||||
.page-hd {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
height: 44px;
|
||||
background-color: var(--color-primary);
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.page-hd__back {
|
||||
position: absolute;
|
||||
left: 16px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
font-size: 24px;
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.page-hd__title {
|
||||
font-size: 17px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.page-hd__empty {
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
.device-info-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
/* ========================================
|
||||
空状态在 weui-cells 中居中
|
||||
======================================== */
|
||||
.weui-cells .empty-state {
|
||||
padding: 60px 20px;
|
||||
}
|
||||
|
||||
.weui-cells .empty-state .empty-state-icon {
|
||||
font-size: 48px;
|
||||
color: var(--color-text-secondary);
|
||||
opacity: 0.5;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.weui-cells .empty-state .empty-state-text {
|
||||
font-size: 14px;
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user