Spaces:
Running
Running
File size: 9,942 Bytes
adf2fff | 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 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 | <!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>نتيجة الاستعادة</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.rtl.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<link href="https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap" rel="stylesheet">
<!-- Image Comparison Slider CSS -->
<script defer src="https://cdn.jsdelivr.net/npm/img-comparison-slider@8/dist/index.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/img-comparison-slider@8/dist/styles.css"/>
<style>
:root {
--primary-color: #6366f1;
--accent-color: #14b8a6;
--success-color: #10b981;
--bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
--card-bg: rgba(255, 255, 255, 0.08);
--glass-border: rgba(255, 255, 255, 0.15);
--text-primary: #f1f5f9;
--text-secondary: #94a3b8;
}
* {
font-family: 'Cairo', sans-serif;
}
body {
background: var(--bg-gradient);
min-height: 100vh;
padding: 2rem 0;
position: relative;
overflow-x: hidden;
}
/* Animated background orbs */
body::before, body::after {
content: '';
position: fixed;
border-radius: 50%;
filter: blur(100px);
opacity: 0.4;
animation: float 8s ease-in-out infinite;
z-index: -1;
}
body::before {
width: 400px;
height: 400px;
background: var(--success-color);
top: -100px;
right: -100px;
}
body::after {
width: 300px;
height: 300px;
background: var(--primary-color);
bottom: -50px;
left: -50px;
animation-delay: -4s;
}
@keyframes float {
0%, 100% { transform: translateY(0) scale(1); }
50% { transform: translateY(-30px) scale(1.05); }
}
.container {
max-width: 1000px;
}
.main-card {
background: var(--card-bg);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border: 1px solid var(--glass-border);
border-radius: 24px;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
padding: 2.5rem;
text-align: center;
}
.result-header {
margin-bottom: 2rem;
}
.result-header h1 {
color: var(--success-color);
font-weight: 700;
font-size: 2rem;
display: flex;
align-items: center;
justify-content: center;
gap: 0.75rem;
}
.result-header h1 i {
animation: checkBounce 0.6s ease-out;
}
@keyframes checkBounce {
0% { transform: scale(0); opacity: 0; }
50% { transform: scale(1.2); }
100% { transform: scale(1); opacity: 1; }
}
.result-header p {
color: var(--text-secondary);
font-size: 1.1rem;
}
.comparison-container {
margin: 2rem auto;
border-radius: 16px;
overflow: hidden;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
max-width: 100%;
border: 1px solid var(--glass-border);
}
img-comparison-slider {
width: 100%;
outline: none;
--divider-width: 3px;
--divider-color: var(--accent-color);
--default-handle-opacity: 1;
}
img-comparison-slider img {
width: 100%;
height: auto;
object-fit: contain;
max-height: 70vh;
}
.custom-handle {
width: 50px;
height: 50px;
background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 15px rgba(99, 102, 241, 0.5);
cursor: col-resize;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.custom-handle:hover {
transform: scale(1.1);
box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}
.custom-handle i {
color: white;
font-size: 1.2rem;
}
.btn-download {
background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
color: white;
border: none;
padding: 0.875rem 2rem;
font-weight: 600;
font-size: 1rem;
border-radius: 12px;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.btn-download::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
transition: left 0.5s ease;
}
.btn-download:hover::before {
left: 100%;
}
.btn-download:hover {
transform: translateY(-3px);
box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
color: white;
}
.btn-secondary-custom {
background: rgba(255, 255, 255, 0.1);
color: var(--text-primary);
border: 1px solid var(--glass-border);
padding: 0.875rem 2rem;
font-weight: 600;
font-size: 1rem;
border-radius: 12px;
transition: all 0.3s ease;
}
.btn-secondary-custom:hover {
background: rgba(255, 255, 255, 0.15);
color: var(--text-primary);
transform: translateY(-3px);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.comparison-labels {
display: flex;
justify-content: space-between;
padding: 1rem 1.5rem;
background: rgba(0, 0, 0, 0.3);
color: var(--text-secondary);
font-size: 0.9rem;
font-weight: 600;
}
.comparison-labels span {
display: flex;
align-items: center;
gap: 0.5rem;
}
.label-original {
color: #f87171;
}
.label-restored {
color: var(--success-color);
}
</style>
</head>
<body>
<div class="container">
<div class="main-card">
<div class="result-header">
<h1 class="h2 text-success mb-3"><i class="fas fa-check-circle me-2"></i>Restoration Complete!</h1>
<p class="text-muted">Processed {{ results|length }} images successfully.</p>
</div>
<div class="row row-cols-1 row-cols-md-2 g-4">
{% for item in results %}
<div class="col">
<div class="card h-100 shadow-sm border-0" style="border-radius: 12px; overflow: hidden;">
<div class="card-body p-0">
<div class="comparison-container mb-0" style="box-shadow: none; border-radius: 0;">
<img-comparison-slider>
<img slot="first" src="{{ url_for('static', filename='uploads/' + item.original) }}" alt="Original" />
<img slot="second" src="{{ url_for('static', filename='results/' + item.preview) }}" alt="Restored" />
<div slot="handle" style="width: 30px; height: 30px; background: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,0.3); cursor: col-resize;">
<i class="fas fa-arrows-alt-h" style="color: #4f46e5; font-size: 0.8rem;"></i>
</div>
</img-comparison-slider>
</div>
</div>
<div class="card-footer bg-white border-top-0 d-flex justify-content-between align-items-center p-3">
<small class="text-muted text-truncate" style="max-width: 150px;">{{ item.original }}</small>
<a href="{{ url_for('static', filename='results/' + item.download) }}" download class="btn btn-sm btn-download">
<i class="fas fa-download me-1"></i> Download
</a>
</div>
</div>
</div>
{% endfor %}
</div>
<div class="d-flex justify-content-center mt-5 mb-4 gap-3">
{% if zip_filename %}
<a href="{{ url_for('static', filename='results/' + zip_filename) }}" class="btn btn-primary px-4 py-2" download>
<i class="fas fa-file-archive me-2"></i>Download All (ZIP)
</a>
{% endif %}
<a href="/" class="btn btn-secondary px-4 py-2">
<i class="fas fa-redo me-2"></i>Process More
</a>
</div>
</div>
</div>
</body>
</html> |