-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
119 lines (103 loc) · 4 KB
/
Copy pathindex.html
File metadata and controls
119 lines (103 loc) · 4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<!DOCTYPE html>
<html lang="vi">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>FloraLens</title>
<link rel="stylesheet" href="style.css">
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<style>
#demo-header {
position: absolute;
top: 60px; /* Margin ở trên để tránh bị sát mép màn hình */
left: 50%;
transform: translateX(-50%); /* Canh giữa theo chiều ngang */
text-align: center;
z-index: 1000; /* Đảm bảo nằm trên video */
width: 100%;
pointer-events: none; /* Cho phép bấm xuyên qua vùng trống nếu cần */
}
#demo-header p {
color: white;
font-weight: bold;
margin: 0 0 5px 0;
text-shadow: 0 2px 4px rgba(0,0,0,0.8); /* Tạo bóng để dễ đọc trên nền camera */
font-family: sans-serif;
font-size: 1rem;
}
#demo-header a {
color: #87CEFA; /* Màu xanh nhạt (Light Sky Blue) */
text-decoration: none; /* Không gạch chân */
font-family: sans-serif;
font-size: 0.9rem;
margin: 0 5px;
pointer-events: auto; /* Kích hoạt lại khả năng click cho link */
text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
#demo-header span {
color: white;
opacity: 0.7;
}
</style>
</head>
<body>
<div id="demo-header">
<p>ĐÂY CHỈ LÀ PHIÊN BẢN DEMO!</p>
<a href="https://github.com/lnminh1411" target="_blank">Github: lnminh1411</a>
<span>|</span>
<a href="https://github.com/lnminh1411/FloraLens" target="_blank">Source code</a>
</div>
<div id="camera-container">
<video id="video" autoplay playsinline></video>
<canvas id="canvas" style="display:none;"></canvas>
<div class="overlay-text"><br>Hướng camera về phía cây</div>
<button id="flash-btn" class="icon-btn hidden">
<i class="fas fa-bolt"></i>
</button>
<button id="capture-btn"></button>
<button id="reopen-chat-btn" class="hidden">
<i class="fas fa-comment-dots"></i> Chat
</button>
</div>
<div id="loading" class="hidden">
<div class="spinner"></div>
<p>AI đang phân tích...</p>
</div>
<div id="bottom-sheet" class="hidden">
<button id="close-sheet-btn">
<i class="fas fa-times"></i>
</button>
<div class="drag-handle-area">
<div class="drag-handle-bar"></div>
</div>
<div class="sheet-content">
<div id="summary-section">
<h2 id="plant-status">Đang tải...</h2>
<div class="stats-grid">
<div class="stat-item">
<i class="fas fa-water"></i>
<span id="soil-val">--%</span>
</div>
<div class="stat-item">
<i class="fas fa-battery-half"></i>
<span id="bat-val">--V</span>
</div>
</div>
<p id="ai-diagnosis" class="ai-text">...</p>
<div id="action-badge" class="badge">...</div>
</div>
<hr>
<div id="chat-section">
<div id="chat-history">
</div>
<div class="chat-input-area">
<input type="text" id="user-input" placeholder="Hỏi FloraLens...">
<button id="send-btn"><i class="fas fa-paper-plane"></i></button>
</div>
</div>
</div>
</div>
<script src="main.js"></script>
</body>
</html>