codeformer / templates /result.html
sd
Upload 110 files
adf2fff verified
<!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>