-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
267 lines (232 loc) Β· 7.44 KB
/
index.html
File metadata and controls
267 lines (232 loc) Β· 7.44 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
<!DOCTYPE html>
<html lang="ka">
<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;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
}
.container {
background: white;
border-radius: 20px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
max-width: 800px;
width: 100%;
padding: 40px;
}
h1 {
color: #333;
margin-bottom: 30px;
text-align: center;
}
.status {
padding: 15px;
border-radius: 10px;
margin-bottom: 20px;
text-align: center;
font-weight: 500;
}
.status.success {
background: #d4edda;
color: #155724;
border: 1px solid #c3e6cb;
}
.status.error {
background: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
}
.status.info {
background: #d1ecf1;
color: #0c5460;
border: 1px solid #bee5eb;
}
.hidden {
display: none;
}
.button-group {
display: flex;
gap: 15px;
margin-bottom: 30px;
}
button {
flex: 1;
padding: 15px 30px;
font-size: 16px;
font-weight: 600;
border: none;
border-radius: 10px;
cursor: pointer;
transition: all 0.3s ease;
}
.btn-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}
.btn-primary:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
}
.btn-success {
background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
color: white;
}
.btn-success:hover {
transform: translateY(-2px);
box-shadow: 0 10px 20px rgba(56, 239, 125, 0.4);
}
.btn-danger {
background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
color: white;
}
.btn-danger:hover {
transform: translateY(-2px);
box-shadow: 0 10px 20px rgba(235, 51, 73, 0.4);
}
.preview-container {
border: 2px dashed #ddd;
border-radius: 10px;
padding: 20px;
margin-bottom: 20px;
min-height: 400px;
display: flex;
justify-content: center;
align-items: center;
background: #f8f9fa;
}
.preview-container img {
max-width: 100%;
max-height: 600px;
border-radius: 5px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.preview-placeholder {
text-align: center;
color: #999;
}
.preview-placeholder svg {
width: 100px;
height: 100px;
margin-bottom: 20px;
opacity: 0.3;
}
.spinner {
border: 4px solid #f3f3f3;
border-top: 4px solid #667eea;
border-radius: 50%;
width: 50px;
height: 50px;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.upload-progress {
width: 100%;
height: 30px;
background: #f0f0f0;
border-radius: 15px;
overflow: hidden;
margin-top: 20px;
}
.upload-progress-bar {
height: 100%;
background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
width: 0%;
transition: width 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-weight: 600;
}
.btn-secondary {
background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
color: white;
}
.btn-secondary:hover {
transform: translateY(-2px);
box-shadow: 0 10px 20px rgba(255, 107, 107, 0.4);
}
.btn-secondary:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
}
.processing-overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.9);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border-radius: 10px;
z-index: 10;
}
.processing-text {
margin-top: 20px;
font-size: 16px;
color: #667eea;
font-weight: 600;
}
</style>
</head>
<body>
<div class="container">
<h1>π αααα£αααα’αα‘ α‘ααααα ααα</h1>
<div id="statusMessage" class="status hidden"></div>
<div class="button-group">
<button id="scanBtn" class="btn-primary" onclick="startScan()">
π¨οΈ α‘ααααα ααα
</button>
<button id="cropBtn" class="btn-secondary hidden" onclick="cropDocument()">
βοΈ αααα£αααα’αα‘ ααααα α
</button>
<button id="uploadBtn" class="btn-success hidden" onclick="uploadDocument()">
βοΈ αα’ααα ααα
</button>
<button id="cancelBtn" class="btn-danger hidden" onclick="cancelScan()">
β ααα£α₯αααα
</button>
</div>
<div id="previewContainer" class="preview-container" style="position: relative;">
<div class="preview-placeholder">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
</svg>
<p>αααα£αααα’αα‘ αα αααα£ ααααα©ααααα αα₯</p>
</div>
</div>
<div id="uploadProgress" class="upload-progress hidden">
<div id="uploadProgressBar" class="upload-progress-bar">0%</div>
</div>
</div>
<!-- Load scanner.js first -->
<script src="scanner.js"></script>
<!-- Then load OpenCV.js -->
<script async src="https://docs.opencv.org/4.8.0/opencv.js" type="text/javascript"></script>
</body>
</html>