diff --git a/environment-settings.html b/environment-settings.html new file mode 100644 index 0000000..d1f7f22 --- /dev/null +++ b/environment-settings.html @@ -0,0 +1,350 @@ + + + + + + 家庭环境信息设置 - 米家智能家居 + + + + + +
+ + + + +
+

设置家庭环境、温度、空气质量等信息的显示

+
+ + +
+ +
+

卧室

+ +
+
+
+ +
+
+

米家空气净化器 4 Lite

+

卧室

+
+
+
+ 25 +
+ + +
+
+
+ +
+
+
+ +
+
+

湿度监测

+

卧室

+
+
+
+
+ + +
+
+
+ +
+
+
+ +
+
+

百度大温湿度计-卧室间

+

卧室

+
+
+
+
+ + +
+
+
+ +
+
+
+ +
+
+

百度大温湿度计-卧室

+

卧室

+
+
+
+
+ + +
+
+
+
+ + +
+

客厅

+ +
+
+
+ +
+
+

米家空气净化器 4 Lite

+

客厅

+
+
+
+ 25 +
+ + +
+
+
+ +
+
+
+ +
+
+

湿度监测

+

客厅

+
+
+
+
+ + +
+
+
+ +
+
+
+ +
+
+

百度大温湿度计-卫生间

+

客厅

+
+
+
+
+ + +
+
+
+ +
+
+
+ +
+
+

百度大温湿度计-卧室

+

客厅

+
+
+
+
+ + +
+
+
+
+ + +
+

厨房

+ +
+
+
+ +
+
+

米家空气净化器 4 Lite

+

厨房

+
+
+
+ 64 +
+ + +
+
+
+ +
+
+
+ +
+
+

湿度监测

+

厨房

+
+
+
+
+ + +
+
+
+ +
+
+
+ +
+
+

百度大温湿度计-卫生间

+

厨房

+
+
+
+
+ + +
+
+
+ +
+
+
+ +
+
+

百度大温湿度计-卧室

+

厨房

+
+
+
+
+ + +
+
+
+
+ + +
+

空气质量

+ +
+
+
+ +
+
+

米家空气净化器 4 Lite

+

空气质量

+
+
+
+ 64 +
+ + +
+
+
+ +
+
+
+ +
+
+

湿度监测

+

空气质量

+
+
+
+
+ + +
+
+
+ +
+
+
+ +
+
+

百度大温湿度计-卫生间

+

空气质量

+
+
+
+
+ + +
+
+
+ +
+
+
+ +
+
+

百度大温湿度计-卧室

+

空气质量

+
+
+
+ 14 +
+ + +
+
+
+
+
+
+ + + + \ No newline at end of file diff --git a/index.html b/index.html index ed6169b..17627f6 100644 --- a/index.html +++ b/index.html @@ -18,7 +18,7 @@
- +
@@ -36,8 +36,8 @@ -
- 空气质量 4 +
+ 温度 25°C | 湿度 64% | 空气质量 14
diff --git a/notifications.html b/notifications.html new file mode 100644 index 0000000..a7c3922 --- /dev/null +++ b/notifications.html @@ -0,0 +1,81 @@ + + + + + + 通知 - 米家智能家居 + + + + + +
+ + + + +
+
+ 全部家庭 + +
+
+ + +
+
+ 消息 +
+
+ + +
+
+ 0条未读 + +
+
+ + +
+
+
+
+ +
+
+
+
+ 场景日志 + 昨天 +
+
+

定时-打开 07:10 执行成功

+
+
+
+
+ + + +
+ + + + \ No newline at end of file diff --git a/styles/environment-settings.css b/styles/environment-settings.css new file mode 100644 index 0000000..c72823d --- /dev/null +++ b/styles/environment-settings.css @@ -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; +} \ No newline at end of file diff --git a/styles/home.css b/styles/home.css index af2177c..f86db1c 100644 --- a/styles/home.css +++ b/styles/home.css @@ -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; diff --git a/styles/notifications.css b/styles/notifications.css new file mode 100644 index 0000000..af4236d --- /dev/null +++ b/styles/notifications.css @@ -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; +} \ No newline at end of file