feat: add notifications and environment settings pages
This commit is contained in:
350
environment-settings.html
Normal file
350
environment-settings.html
Normal file
@ -0,0 +1,350 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>家庭环境信息设置 - 米家智能家居</title>
|
||||
<link rel="stylesheet" href="styles/common.css">
|
||||
<link rel="stylesheet" href="styles/environment-settings.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" id="environment-settings-page">
|
||||
<!-- 头部导航 -->
|
||||
<header class="page-header">
|
||||
<div class="header-content">
|
||||
<button class="back-btn" onclick="history.back()">
|
||||
<i class="fas fa-chevron-left"></i>
|
||||
</button>
|
||||
<h1 class="page-title">家庭环境信息设置</h1>
|
||||
<button class="settings-btn">
|
||||
<i class="fas fa-cog"></i>
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- 设置说明 -->
|
||||
<div class="settings-description">
|
||||
<p>设置家庭环境、温度、空气质量等信息的显示</p>
|
||||
</div>
|
||||
|
||||
<!-- 环境设置列表 -->
|
||||
<div class="settings-list">
|
||||
<!-- 卧室 -->
|
||||
<div class="room-section">
|
||||
<h3 class="room-title">卧室</h3>
|
||||
|
||||
<div class="device-item">
|
||||
<div class="device-info">
|
||||
<div class="device-icon">
|
||||
<i class="fas fa-thermometer-half"></i>
|
||||
</div>
|
||||
<div class="device-details">
|
||||
<h4>米家空气净化器 4 Lite</h4>
|
||||
<p class="device-location">卧室</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="device-value">
|
||||
<span class="value-number">25</span>
|
||||
<div class="toggle-switch">
|
||||
<input type="checkbox" id="bedroom-air-1" checked>
|
||||
<label for="bedroom-air-1"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="device-item">
|
||||
<div class="device-info">
|
||||
<div class="device-icon">
|
||||
<i class="fas fa-tint"></i>
|
||||
</div>
|
||||
<div class="device-details">
|
||||
<h4>湿度监测</h4>
|
||||
<p class="device-location">卧室</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="device-value">
|
||||
<div class="toggle-switch">
|
||||
<input type="checkbox" id="bedroom-humidity">
|
||||
<label for="bedroom-humidity"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="device-item">
|
||||
<div class="device-info">
|
||||
<div class="device-icon">
|
||||
<i class="fas fa-leaf"></i>
|
||||
</div>
|
||||
<div class="device-details">
|
||||
<h4>百度大温湿度计-卧室间</h4>
|
||||
<p class="device-location">卧室</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="device-value">
|
||||
<div class="toggle-switch">
|
||||
<input type="checkbox" id="bedroom-temp">
|
||||
<label for="bedroom-temp"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="device-item">
|
||||
<div class="device-info">
|
||||
<div class="device-icon">
|
||||
<i class="fas fa-leaf"></i>
|
||||
</div>
|
||||
<div class="device-details">
|
||||
<h4>百度大温湿度计-卧室</h4>
|
||||
<p class="device-location">卧室</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="device-value">
|
||||
<div class="toggle-switch">
|
||||
<input type="checkbox" id="bedroom-temp-2">
|
||||
<label for="bedroom-temp-2"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 客厅 -->
|
||||
<div class="room-section">
|
||||
<h3 class="room-title">客厅</h3>
|
||||
|
||||
<div class="device-item">
|
||||
<div class="device-info">
|
||||
<div class="device-icon">
|
||||
<i class="fas fa-thermometer-half"></i>
|
||||
</div>
|
||||
<div class="device-details">
|
||||
<h4>米家空气净化器 4 Lite</h4>
|
||||
<p class="device-location">客厅</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="device-value">
|
||||
<span class="value-number">25</span>
|
||||
<div class="toggle-switch">
|
||||
<input type="checkbox" id="living-air-1" checked>
|
||||
<label for="living-air-1"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="device-item">
|
||||
<div class="device-info">
|
||||
<div class="device-icon">
|
||||
<i class="fas fa-tint"></i>
|
||||
</div>
|
||||
<div class="device-details">
|
||||
<h4>湿度监测</h4>
|
||||
<p class="device-location">客厅</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="device-value">
|
||||
<div class="toggle-switch">
|
||||
<input type="checkbox" id="living-humidity">
|
||||
<label for="living-humidity"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="device-item">
|
||||
<div class="device-info">
|
||||
<div class="device-icon">
|
||||
<i class="fas fa-leaf"></i>
|
||||
</div>
|
||||
<div class="device-details">
|
||||
<h4>百度大温湿度计-卫生间</h4>
|
||||
<p class="device-location">客厅</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="device-value">
|
||||
<div class="toggle-switch">
|
||||
<input type="checkbox" id="living-temp">
|
||||
<label for="living-temp"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="device-item">
|
||||
<div class="device-info">
|
||||
<div class="device-icon">
|
||||
<i class="fas fa-leaf"></i>
|
||||
</div>
|
||||
<div class="device-details">
|
||||
<h4>百度大温湿度计-卧室</h4>
|
||||
<p class="device-location">客厅</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="device-value">
|
||||
<div class="toggle-switch">
|
||||
<input type="checkbox" id="living-temp-2">
|
||||
<label for="living-temp-2"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 厨房 -->
|
||||
<div class="room-section">
|
||||
<h3 class="room-title">厨房</h3>
|
||||
|
||||
<div class="device-item">
|
||||
<div class="device-info">
|
||||
<div class="device-icon">
|
||||
<i class="fas fa-thermometer-half"></i>
|
||||
</div>
|
||||
<div class="device-details">
|
||||
<h4>米家空气净化器 4 Lite</h4>
|
||||
<p class="device-location">厨房</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="device-value">
|
||||
<span class="value-number">64</span>
|
||||
<div class="toggle-switch">
|
||||
<input type="checkbox" id="kitchen-air-1" checked>
|
||||
<label for="kitchen-air-1"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="device-item">
|
||||
<div class="device-info">
|
||||
<div class="device-icon">
|
||||
<i class="fas fa-tint"></i>
|
||||
</div>
|
||||
<div class="device-details">
|
||||
<h4>湿度监测</h4>
|
||||
<p class="device-location">厨房</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="device-value">
|
||||
<div class="toggle-switch">
|
||||
<input type="checkbox" id="kitchen-humidity">
|
||||
<label for="kitchen-humidity"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="device-item">
|
||||
<div class="device-info">
|
||||
<div class="device-icon">
|
||||
<i class="fas fa-leaf"></i>
|
||||
</div>
|
||||
<div class="device-details">
|
||||
<h4>百度大温湿度计-卫生间</h4>
|
||||
<p class="device-location">厨房</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="device-value">
|
||||
<div class="toggle-switch">
|
||||
<input type="checkbox" id="kitchen-temp">
|
||||
<label for="kitchen-temp"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="device-item">
|
||||
<div class="device-info">
|
||||
<div class="device-icon">
|
||||
<i class="fas fa-leaf"></i>
|
||||
</div>
|
||||
<div class="device-details">
|
||||
<h4>百度大温湿度计-卧室</h4>
|
||||
<p class="device-location">厨房</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="device-value">
|
||||
<div class="toggle-switch">
|
||||
<input type="checkbox" id="kitchen-temp-2">
|
||||
<label for="kitchen-temp-2"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 空气质量 -->
|
||||
<div class="room-section">
|
||||
<h3 class="room-title">空气质量</h3>
|
||||
|
||||
<div class="device-item">
|
||||
<div class="device-info">
|
||||
<div class="device-icon">
|
||||
<i class="fas fa-thermometer-half"></i>
|
||||
</div>
|
||||
<div class="device-details">
|
||||
<h4>米家空气净化器 4 Lite</h4>
|
||||
<p class="device-location">空气质量</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="device-value">
|
||||
<span class="value-number">64</span>
|
||||
<div class="toggle-switch">
|
||||
<input type="checkbox" id="air-quality-1" checked>
|
||||
<label for="air-quality-1"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="device-item">
|
||||
<div class="device-info">
|
||||
<div class="device-icon">
|
||||
<i class="fas fa-tint"></i>
|
||||
</div>
|
||||
<div class="device-details">
|
||||
<h4>湿度监测</h4>
|
||||
<p class="device-location">空气质量</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="device-value">
|
||||
<div class="toggle-switch">
|
||||
<input type="checkbox" id="air-humidity">
|
||||
<label for="air-humidity"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="device-item">
|
||||
<div class="device-info">
|
||||
<div class="device-icon">
|
||||
<i class="fas fa-leaf"></i>
|
||||
</div>
|
||||
<div class="device-details">
|
||||
<h4>百度大温湿度计-卫生间</h4>
|
||||
<p class="device-location">空气质量</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="device-value">
|
||||
<div class="toggle-switch">
|
||||
<input type="checkbox" id="air-temp">
|
||||
<label for="air-temp"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="device-item">
|
||||
<div class="device-info">
|
||||
<div class="device-icon">
|
||||
<i class="fas fa-leaf"></i>
|
||||
</div>
|
||||
<div class="device-details">
|
||||
<h4>百度大温湿度计-卧室</h4>
|
||||
<p class="device-location">空气质量</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="device-value">
|
||||
<span class="value-number">14</span>
|
||||
<div class="toggle-switch">
|
||||
<input type="checkbox" id="air-temp-2" checked>
|
||||
<label for="air-temp-2"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="scripts/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@ -18,7 +18,7 @@
|
||||
<i class="fas fa-chevron-down"></i>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<i class="fas fa-comment-dots"></i>
|
||||
<i class="fas fa-comment-dots" onclick="location.href='notifications.html'" style="cursor: pointer;"></i>
|
||||
<i class="fas fa-plus-circle"></i>
|
||||
</div>
|
||||
</header>
|
||||
@ -36,8 +36,8 @@
|
||||
</nav>
|
||||
|
||||
<!-- 空气质量 -->
|
||||
<div class="air-quality">
|
||||
<span>空气质量 4</span>
|
||||
<div class="air-quality" onclick="location.href='environment-settings.html'" style="cursor: pointer;">
|
||||
<span>温度 25°C | 湿度 64% | 空气质量 14</span>
|
||||
<i class="fas fa-chevron-right"></i>
|
||||
</div>
|
||||
|
||||
|
||||
81
notifications.html
Normal file
81
notifications.html
Normal file
@ -0,0 +1,81 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>通知 - 米家智能家居</title>
|
||||
<link rel="stylesheet" href="styles/common.css">
|
||||
<link rel="stylesheet" href="styles/notifications.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" id="notifications-page">
|
||||
<!-- 头部导航 -->
|
||||
<header class="page-header">
|
||||
<div class="header-content">
|
||||
<button class="back-btn" onclick="history.back()">
|
||||
<i class="fas fa-chevron-left"></i>
|
||||
</button>
|
||||
<h1 class="page-title">通知</h1>
|
||||
<button class="settings-btn">
|
||||
<i class="fas fa-cog"></i>
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- 家庭选择器 -->
|
||||
<div class="family-selector">
|
||||
<div class="selector-content">
|
||||
<span class="family-name">全部家庭</span>
|
||||
<i class="fas fa-chevron-down"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 消息分类 -->
|
||||
<div class="message-categories">
|
||||
<div class="category-item active">
|
||||
<span>消息</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 消息状态 -->
|
||||
<div class="message-status">
|
||||
<div class="status-info">
|
||||
<span class="unread-count">0条未读</span>
|
||||
<button class="mark-all-read">全部已读</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 消息列表 -->
|
||||
<div class="message-list">
|
||||
<div class="message-item">
|
||||
<div class="message-icon">
|
||||
<div class="icon-wrapper scene">
|
||||
<i class="fas fa-heart"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="message-content">
|
||||
<div class="message-header">
|
||||
<span class="message-type">场景日志</span>
|
||||
<span class="message-time">昨天</span>
|
||||
</div>
|
||||
<div class="message-text">
|
||||
<h4>定时-打开 07:10 执行成功</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 空状态提示 -->
|
||||
<div class="empty-state" style="display: none;">
|
||||
<div class="empty-icon">
|
||||
<i class="fas fa-bell-slash"></i>
|
||||
</div>
|
||||
<p class="empty-text">暂无通知消息</p>
|
||||
<p class="empty-subtext">设备状态变化、场景执行等消息会在这里显示</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="scripts/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
286
styles/environment-settings.css
Normal file
286
styles/environment-settings.css
Normal file
@ -0,0 +1,286 @@
|
||||
#notifications-page {
|
||||
background-color: #f5f5f5;
|
||||
min-height: 100vh;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
/* 页面头部 */
|
||||
.page-header {
|
||||
background: #f6f6f6;
|
||||
color: rgb(43, 42, 42);
|
||||
padding: 15px 0;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.header-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 20px;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.back-btn, .settings-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
color: rgb(0, 0, 0);
|
||||
font-size: 18px;
|
||||
padding: 8px;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.back-btn:hover, .settings-btn:hover {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* 设置说明 */
|
||||
.settings-description {
|
||||
background: white;
|
||||
margin: 20px;
|
||||
border-radius: 12px;
|
||||
padding: 15px 20px;
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.settings-description p {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* 设置列表 */
|
||||
.settings-list {
|
||||
margin: 0 20px;
|
||||
}
|
||||
|
||||
.room-section {
|
||||
background: white;
|
||||
border-radius: 12px;
|
||||
margin-bottom: 20px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.room-title {
|
||||
background: #f8f9fa;
|
||||
margin: 0;
|
||||
padding: 15px 20px;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.device-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 16px 20px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.device-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.device-item:hover {
|
||||
background-color: #f8f9fa;
|
||||
}
|
||||
|
||||
.device-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 15px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.device-icon {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
background: linear-gradient(135deg, #ff6900, #ff8533);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: white;
|
||||
font-size: 16px;
|
||||
box-shadow: 0 2px 8px rgba(255, 105, 0, 0.3);
|
||||
}
|
||||
|
||||
.device-details h4 {
|
||||
margin: 0 0 4px 0;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.device-location {
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.device-value {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.value-number {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #ff6900;
|
||||
min-width: 30px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* 开关样式 */
|
||||
.toggle-switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 44px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.toggle-switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.toggle-switch label {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #ccc;
|
||||
border-radius: 24px;
|
||||
transition: 0.3s;
|
||||
}
|
||||
|
||||
.toggle-switch label:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
left: 3px;
|
||||
bottom: 3px;
|
||||
background-color: white;
|
||||
border-radius: 50%;
|
||||
transition: 0.3s;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.toggle-switch input:checked + label {
|
||||
background-color: #ff6900;
|
||||
}
|
||||
|
||||
.toggle-switch input:checked + label:before {
|
||||
transform: translateX(20px);
|
||||
}
|
||||
|
||||
.toggle-switch input:focus + label {
|
||||
box-shadow: 0 0 1px #ff6900;
|
||||
}
|
||||
|
||||
/* 响应式设计 */
|
||||
@media (max-width: 768px) {
|
||||
.header-content {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.settings-description,
|
||||
.settings-list {
|
||||
margin-left: 15px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.device-item {
|
||||
padding: 14px 16px;
|
||||
}
|
||||
|
||||
.device-icon {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.page-header {
|
||||
padding: 12px 0;
|
||||
}
|
||||
|
||||
.header-content {
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
.settings-description,
|
||||
.settings-list {
|
||||
margin-left: 12px;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
.device-item {
|
||||
padding: 12px 14px;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.room-title {
|
||||
padding: 12px 16px;
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
/* 动画效果 */
|
||||
@keyframes fadeInUp {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(20px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.settings-description,
|
||||
.room-section {
|
||||
animation: fadeInUp 0.6s ease-out;
|
||||
}
|
||||
|
||||
.room-section:nth-child(1) {
|
||||
animation-delay: 0.1s;
|
||||
}
|
||||
|
||||
.room-section:nth-child(2) {
|
||||
animation-delay: 0.2s;
|
||||
}
|
||||
|
||||
.room-section:nth-child(3) {
|
||||
animation-delay: 0.3s;
|
||||
}
|
||||
|
||||
.room-section:nth-child(4) {
|
||||
animation-delay: 0.4s;
|
||||
}
|
||||
|
||||
.room-section:nth-child(5) {
|
||||
animation-delay: 0.5s;
|
||||
}
|
||||
@ -75,6 +75,7 @@
|
||||
background-color: #fff;
|
||||
border-radius: 12px;
|
||||
padding: 20px;
|
||||
padding-right: 55px;
|
||||
position: relative;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.05);
|
||||
cursor: pointer;
|
||||
|
||||
349
styles/notifications.css
Normal file
349
styles/notifications.css
Normal file
@ -0,0 +1,349 @@
|
||||
/* 通知页面样式 */
|
||||
#notifications-page {
|
||||
background-color: #f5f5f5;
|
||||
min-height: 100vh;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
/* 页面头部 */
|
||||
.page-header {
|
||||
background: #f6f6f6;
|
||||
color: rgb(43, 42, 42);
|
||||
padding: 15px 0;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.header-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 20px;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.back-btn, .settings-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
color: rgb(0, 0, 0);
|
||||
font-size: 18px;
|
||||
padding: 8px;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.back-btn:hover, .settings-btn:hover {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* 家庭选择器 */
|
||||
.family-selector {
|
||||
background: white;
|
||||
margin: 20px;
|
||||
border-radius: 12px;
|
||||
padding: 15px 20px;
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.family-selector:hover {
|
||||
background-color: #f8f9fa;
|
||||
}
|
||||
|
||||
.selector-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.family-name {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.selector-content i {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* 消息分类 */
|
||||
.message-categories {
|
||||
display: flex;
|
||||
background: white;
|
||||
margin: 0 20px 20px;
|
||||
border-radius: 12px;
|
||||
padding: 5px;
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.category-item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
padding: 12px 20px;
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.category-item.active {
|
||||
background: linear-gradient(135deg, #ff6900 0%, #ff8533 100%);
|
||||
color: white;
|
||||
box-shadow: 0 2px 8px rgba(255, 105, 0, 0.3);
|
||||
}
|
||||
|
||||
/* 消息状态 */
|
||||
.message-status {
|
||||
margin: 0 20px 20px;
|
||||
}
|
||||
|
||||
.status-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.unread-count {
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.mark-all-read {
|
||||
background: none;
|
||||
border: none;
|
||||
color: #ff6900;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
padding: 5px 10px;
|
||||
border-radius: 6px;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.mark-all-read:hover {
|
||||
background-color: rgba(255, 105, 0, 0.1);
|
||||
}
|
||||
|
||||
/* 消息列表 */
|
||||
.message-list {
|
||||
margin: 0 20px;
|
||||
}
|
||||
|
||||
.message-item {
|
||||
background: white;
|
||||
border-radius: 12px;
|
||||
padding: 16px;
|
||||
margin-bottom: 12px;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 15px;
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.message-item:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
|
||||
.message-item:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.message-icon {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.icon-wrapper {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: white;
|
||||
font-size: 16px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
/* 消息图标配色方案 - 橙色系 */
|
||||
.icon-wrapper.scene {
|
||||
background: linear-gradient(135deg, #ff6900, #ff8533);
|
||||
}
|
||||
|
||||
.icon-wrapper.device {
|
||||
background: linear-gradient(135deg, #ff8533, #ffab66);
|
||||
}
|
||||
|
||||
.icon-wrapper.security {
|
||||
background: linear-gradient(135deg, #ff4500, #ff6900);
|
||||
}
|
||||
|
||||
.icon-wrapper.system {
|
||||
background: linear-gradient(135deg, #ffab66, #ffc299);
|
||||
}
|
||||
|
||||
.message-content {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.message-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.message-type {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
background: #f0f0f0;
|
||||
padding: 2px 8px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.message-time {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.message-text h4 {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
/* 空状态 */
|
||||
.empty-state {
|
||||
text-align: center;
|
||||
padding: 60px 20px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.empty-icon {
|
||||
font-size: 48px;
|
||||
margin-bottom: 20px;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
margin: 0 0 8px 0;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.empty-subtext {
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* 响应式设计 */
|
||||
@media (max-width: 768px) {
|
||||
.header-content {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.family-selector,
|
||||
.message-categories,
|
||||
.message-status,
|
||||
.message-list {
|
||||
margin-left: 15px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.message-item {
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.icon-wrapper {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.page-header {
|
||||
padding: 12px 0;
|
||||
}
|
||||
|
||||
.header-content {
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
.family-selector,
|
||||
.message-categories,
|
||||
.message-status,
|
||||
.message-list {
|
||||
margin-left: 12px;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
.message-item {
|
||||
padding: 12px;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
padding: 40px 15px;
|
||||
}
|
||||
}
|
||||
|
||||
/* 动画效果 */
|
||||
@keyframes fadeInUp {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(20px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.family-selector,
|
||||
.message-categories,
|
||||
.message-status,
|
||||
.message-item {
|
||||
animation: fadeInUp 0.6s ease-out;
|
||||
}
|
||||
|
||||
.message-categories {
|
||||
animation-delay: 0.1s;
|
||||
}
|
||||
|
||||
.message-status {
|
||||
animation-delay: 0.2s;
|
||||
}
|
||||
|
||||
.message-item:nth-child(1) {
|
||||
animation-delay: 0.3s;
|
||||
}
|
||||
|
||||
.message-item:nth-child(2) {
|
||||
animation-delay: 0.4s;
|
||||
}
|
||||
|
||||
.message-item:nth-child(3) {
|
||||
animation-delay: 0.5s;
|
||||
}
|
||||
Reference in New Issue
Block a user