加入後台簡易切版

This commit is contained in:
larry2701 2025-05-09 13:25:31 +08:00
parent cdd3ea3ffd
commit 02056709bd
3 changed files with 313 additions and 0 deletions

37
Backstage/login.html Normal file
View File

@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="zh-Hant">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>登入畫面</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="min-h-screen flex items-center justify-center bg-gray-100">
<div class="flex w-full max-w-5xl h-[600px] bg-white rounded-2xl shadow-xl overflow-hidden">
<!-- 左側圖片區(約佔 35% -->
<div class="w-[35%] hidden md:flex items-center justify-center bg-gray-50">
<img src="https://i.postimg.cc/rFSSxXRX/41513123132132.png"
alt="美工圖"
class="max-h-[80%] max-w-[90%] object-contain" />
</div>
<!-- 右側登入表單區(約佔 65% -->
<div class="w-full md:w-[65%] p-12 flex flex-col justify-center">
<h2 class="text-4xl font-bold mb-8 text-gray-800">社區通 後台登入</h2>
<form class="space-y-6">
<div>
<label class="block mb-1 text-sm font-medium text-gray-700">帳號</label>
<input type="text" class="w-full px-4 py-3 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="請輸入帳號" />
</div>
<div>
<label class="block mb-1 text-sm font-medium text-gray-700">密碼</label>
<input type="password" class="w-full px-4 py-3 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="請輸入密碼" />
</div>
<button type="submit" class="w-full bg-blue-600 text-white py-3 rounded-lg hover:bg-blue-700 transition">登入</button>
</form>
</div>
</div>
</body>
</html>

218
Backstage/main.html Normal file
View File

@ -0,0 +1,218 @@
<!DOCTYPE html>
<html lang="zh-Hant">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>社區儀表板</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
background-color: #f5fafa;
display: flex;
}
.main {
flex: 1;
padding: 20px;
}
.top-banner {
background: url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=1470&q=80') no-repeat center/cover;
height: 100px;
border-radius: 10px;
margin-bottom: 20px;
position: relative;
}
.signin-btn {
position: absolute;
right: 20px;
top: 30px;
padding: 5px 15px;
background-color: #007bff;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
.content {
display: flex;
gap: 20px;
}
.left-panel {
flex: 2;
}
.card {
background-color: white;
border-radius: 10px;
padding: 15px;
margin-bottom: 20px;
box-shadow: 0 0 5px rgba(0,0,0,0.05);
}
.table {
width: 100%;
border-collapse: collapse;
}
.table th, .table td {
text-align: center;
padding: 8px;
border-bottom: 1px solid #eee;
}
.table tr:hover {
background-color: #f0f8ff;
}
.right-panel {
flex: 1;
display: flex;
flex-direction: column;
gap: 20px;
}
.weather, .chart {
background-color: white;
padding: 15px;
border-radius: 10px;
box-shadow: 0 0 5px rgba(0,0,0,0.05);
}
.weather {
display: flex;
align-items: center;
justify-content: space-between;
color: #fff;
background-color: #4ea8de;
}
.weather .temp {
font-size: 28px;
font-weight: bold;
}
.bottom-panel {
display: flex;
gap: 20px;
}
.announcement, .schedule {
flex: 1;
}
.title-row {
display: flex;
justify-content: space-between;
font-weight: bold;
margin-bottom: 10px;
}
.list-item {
display: flex;
justify-content: space-between;
padding: 6px 0;
border-bottom: 1px solid #eee;
font-size: 14px;
}
.chart {
position: relative;
height: 500px;
}
.chart canvas {
width: 100% !important;
height: 100% !important;
}
</style>
</head>
<body>
<div class="sidebar-container">
<iframe src="sidebar.html" style="width: 200px; height: 100vh; border: none;"></iframe>
</div>
<div class="main">
<div class="top-banner">
<button class="signin-btn">簽到</button>
</div>
<div class="content">
<div class="left-panel">
<div class="card">
<div style="font-weight: bold; color: #3b8eea; margin-bottom: 10px;">居民進出</div>
<table class="table">
<thead>
<tr>
<th></th>
<th>居民</th>
<th>出入棟</th>
<th>日期</th>
<th>進入時間</th>
<th>出去時間</th>
<th>本日進出次數</th>
<th></th>
</tr>
</thead>
<tbody>
<tr><td></td><td>張XX</td><td>A棟</td><td>2022-06-05</td><td>16:02:18</td><td>11:24:05</td><td>3</td><td><a href="#">查看</a></td></tr>
<tr><td></td><td>李XX</td><td>B棟</td><td>2022-05-30</td><td>11:05:32</td><td>06:17:23</td><td>3</td><td><a href="#">查看</a></td></tr>
<tr><td></td><td>黃XX</td><td>A棟</td><td>2022-05-27</td><td>00:58:52</td><td>16:15:54</td><td>3</td><td><a href="#">查看</a></td></tr>
<tr><td></td><td>張XX</td><td>A棟</td><td>2022-06-13</td><td>18:06:35</td><td>03:08:27</td><td>2</td><td><a href="#">查看</a></td></tr>
</tbody>
</table>
</div>
<div class="bottom-panel">
<div class="announcement card">
<div class="title-row">
<span>公告</span>
<span style="color:#007bff">更多</span>
</div>
<div class="list-item"><span>清潔日請勿倒垃圾</span><span>05/21</span></div>
<div class="list-item"><span>施工注意事項</span><span>05/19</span></div>
<div class="list-item"><span>社區防火演習</span><span>06/08</span></div>
<div class="list-item"><span>電梯保養公告</span><span>05/17</span></div>
</div>
<div class="schedule card">
<div class="title-row">
<span>活動日程</span>
<span style="color:#007bff">更多</span>
</div>
<div class="list-item"><span>社區健走活動</span><span>2022-06-08</span></div>
<div class="list-item"><span>二手市集</span><span>2022-05-20</span></div>
<div class="list-item"><span>兒童故事會</span><span>2022-05-23</span></div>
<div class="list-item"><span>防災講座</span><span>2022-06-09</span></div>
</div>
</div>
</div>
<div class="right-panel">
<div class="weather">
<div>
<div>2022年6月16日</div>
<div>天氣晴,適合外出散步</div>
</div>
<div class="temp">24°C</div>
</div>
<div class="chart">
<div style="font-weight: bold; color: #3b8eea; margin-bottom: 10px;">周進出統計</div>
<canvas id="myChart"></canvas>
</div>
</div>
</div>
</div>
<script>
const ctx = document.getElementById('myChart').getContext('2d');
const myChart = new Chart(ctx, {
type: 'bar',
data: {
labels: ['4/30', '5/1', '5/2', '5/3', '5/4', '5/5','5/6'],
datasets: [{
label: '進出人數',
data: [12, 19, 3, 5, 2, 8, 10],
backgroundColor: 'rgba(75, 192, 192, 0.5)',
borderColor: 'rgba(75, 192, 192, 1)',
borderWidth: 1
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
scales: {
y: {
beginAtZero: true
}
}
}
});
</script>
</body>
</html>

58
Backstage/sidebar.html Normal file
View File

@ -0,0 +1,58 @@
<!DOCTYPE html>
<html lang="zh-Hant">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>功能列</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.sidebar {
width: 200px;
background-color: white;
border-right: 1px solid #ddd;
padding-top: 20px;
height: 100vh;
}
.sidebar img {
display: block;
margin: 0 auto 20px;
width: 60px;
height: 60px;
border-radius: 50%;
}
.sidebar ul {
list-style: none;
padding-left: 0;
}
.sidebar ul li {
padding: 12px 20px;
color: #333;
cursor: pointer;
}
.sidebar ul li:hover, .sidebar ul li.active {
background-color: #e6f0f8;
color: #007bff;
}
</style>
</head>
<body>
<div class="sidebar">
<img src="https://via.placeholder.com/60" alt="Logo" />
<ul>
<li class="active">首頁</li>
<li>居民開通</li>
<li>出入管理</li>
<li>緊急通報</li>
<li>訊息通知</li>
<li>水電服務</li>
<li>佈告欄</li>
<li>報表匯出</li>
<li>設定</li>
</ul>
</div>
</body>
</html>