515 lines
17 KiB
Twig
515 lines
17 KiB
Twig
<!DOCTYPE html>
|
|
<html lang="fa" dir="rtl">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{% block title %}سیستم احراز هویت - حسابیکس{% endblock %}</title>
|
|
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
|
|
|
|
<!-- Bootstrap CSS -->
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
|
|
|
|
<!-- Bootstrap Icons -->
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
|
|
|
|
<!-- Custom CSS -->
|
|
<style>
|
|
body {
|
|
font-family: 'Tahoma', 'Arial', sans-serif;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
min-height: 100vh;
|
|
margin: 0;
|
|
padding: 0;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
.auth-container {
|
|
min-height: 100vh;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 20px;
|
|
}
|
|
|
|
.auth-card {
|
|
background: rgba(255, 255, 255, 0.95);
|
|
backdrop-filter: blur(20px);
|
|
border-radius: 24px;
|
|
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
|
|
overflow: hidden;
|
|
width: 100%;
|
|
max-width: 500px;
|
|
animation: slideUp 0.6s ease-out;
|
|
}
|
|
|
|
.auth-header {
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
color: white;
|
|
text-align: center;
|
|
padding: 40px 30px 30px;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.auth-header::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: -50%;
|
|
left: -50%;
|
|
width: 200%;
|
|
height: 200%;
|
|
background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
|
|
animation: rotate 20s linear infinite;
|
|
}
|
|
|
|
.auth-header h1 {
|
|
font-size: 2.2rem;
|
|
font-weight: 700;
|
|
margin: 0;
|
|
position: relative;
|
|
z-index: 1;
|
|
text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
.auth-header p {
|
|
font-size: 1.1rem;
|
|
margin: 10px 0 0;
|
|
opacity: 0.9;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.auth-body {
|
|
padding: 40px 30px;
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 25px;
|
|
}
|
|
|
|
.form-label {
|
|
font-weight: 600;
|
|
color: #495057;
|
|
margin-bottom: 10px;
|
|
font-size: 0.95rem;
|
|
display: block;
|
|
}
|
|
|
|
.form-control {
|
|
border: 2px solid #e9ecef;
|
|
border-radius: 16px;
|
|
padding: 15px 20px;
|
|
font-size: 1rem;
|
|
transition: all 0.3s ease;
|
|
background-color: #f8f9fa;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.form-control:focus {
|
|
outline: none;
|
|
border-color: #667eea;
|
|
box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
|
|
background-color: white;
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.form-control.is-invalid {
|
|
border-color: #dc3545;
|
|
background-color: rgba(220, 53, 69, 0.05);
|
|
}
|
|
|
|
.form-control.is-valid {
|
|
border-color: #28a745;
|
|
background-color: rgba(40, 167, 69, 0.05);
|
|
}
|
|
|
|
.invalid-feedback {
|
|
color: #dc3545;
|
|
font-size: 0.875rem;
|
|
margin-top: 8px;
|
|
display: block;
|
|
}
|
|
|
|
.valid-feedback {
|
|
color: #28a745;
|
|
font-size: 0.875rem;
|
|
margin-top: 8px;
|
|
display: block;
|
|
}
|
|
|
|
.btn {
|
|
border-radius: 16px;
|
|
padding: 15px 30px;
|
|
font-weight: 600;
|
|
font-size: 1rem;
|
|
transition: all 0.3s ease;
|
|
border: none;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
width: 100%;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.btn::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;
|
|
}
|
|
|
|
.btn:hover::before {
|
|
left: 100%;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
transform: translateY(-3px);
|
|
box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
|
|
}
|
|
|
|
.btn-success {
|
|
background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
|
|
color: white;
|
|
}
|
|
|
|
.btn-success:hover {
|
|
transform: translateY(-3px);
|
|
box-shadow: 0 10px 30px rgba(40, 167, 69, 0.4);
|
|
}
|
|
|
|
.btn-danger {
|
|
background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
|
|
color: white;
|
|
}
|
|
|
|
.btn-danger:hover {
|
|
transform: translateY(-3px);
|
|
box-shadow: 0 10px 30px rgba(220, 53, 69, 0.4);
|
|
}
|
|
|
|
.alert {
|
|
border: none;
|
|
border-radius: 16px;
|
|
padding: 16px 20px;
|
|
font-weight: 500;
|
|
border-right: 4px solid;
|
|
margin-bottom: 20px;
|
|
animation: slideIn 0.5s ease-out;
|
|
}
|
|
|
|
.alert-success {
|
|
background-color: rgba(40, 167, 69, 0.1);
|
|
color: #155724;
|
|
border-right-color: #28a745;
|
|
}
|
|
|
|
.alert-danger {
|
|
background-color: rgba(220, 53, 69, 0.1);
|
|
color: #721c24;
|
|
border-right-color: #dc3545;
|
|
}
|
|
|
|
.alert-info {
|
|
background-color: rgba(23, 162, 184, 0.1);
|
|
color: #0c5460;
|
|
border-right-color: #17a2b8;
|
|
}
|
|
|
|
.alert-warning {
|
|
background-color: rgba(255, 193, 7, 0.1);
|
|
color: #856404;
|
|
border-right-color: #ffc107;
|
|
}
|
|
|
|
.auth-footer {
|
|
text-align: center;
|
|
padding: 20px 30px;
|
|
border-top: 1px solid #e9ecef;
|
|
background-color: #f8f9fa;
|
|
}
|
|
|
|
.auth-footer a {
|
|
color: #667eea;
|
|
text-decoration: none;
|
|
font-weight: 500;
|
|
transition: color 0.3s ease;
|
|
}
|
|
|
|
.auth-footer a:hover {
|
|
color: #5a6fd8;
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.auth-links {
|
|
margin-top: 20px;
|
|
text-align: center;
|
|
}
|
|
|
|
.auth-links a {
|
|
color: #6c757d;
|
|
text-decoration: none;
|
|
margin: 0 15px;
|
|
font-size: 0.9rem;
|
|
transition: color 0.3s ease;
|
|
}
|
|
|
|
.auth-links a:hover {
|
|
color: #667eea;
|
|
}
|
|
|
|
.divider {
|
|
text-align: center;
|
|
margin: 30px 0;
|
|
position: relative;
|
|
}
|
|
|
|
.divider::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 0;
|
|
right: 0;
|
|
height: 1px;
|
|
background: #e9ecef;
|
|
}
|
|
|
|
.divider span {
|
|
background: white;
|
|
padding: 0 20px;
|
|
color: #6c757d;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
/* Animations */
|
|
@keyframes slideUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(50px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
@keyframes slideIn {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateX(-20px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateX(0);
|
|
}
|
|
}
|
|
|
|
@keyframes rotate {
|
|
from { transform: rotate(0deg); }
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
/* Responsive */
|
|
@media (max-width: 576px) {
|
|
.auth-container {
|
|
padding: 15px;
|
|
}
|
|
|
|
.auth-card {
|
|
border-radius: 20px;
|
|
}
|
|
|
|
.auth-header {
|
|
padding: 30px 20px 25px;
|
|
}
|
|
|
|
.auth-header h1 {
|
|
font-size: 1.8rem;
|
|
}
|
|
|
|
.auth-body {
|
|
padding: 30px 20px;
|
|
}
|
|
|
|
.btn {
|
|
padding: 14px 25px;
|
|
}
|
|
}
|
|
|
|
/* Custom scrollbar */
|
|
::-webkit-scrollbar {
|
|
width: 8px;
|
|
}
|
|
|
|
::-webkit-scrollbar-track {
|
|
background: #f1f1f1;
|
|
border-radius: 10px;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
border-radius: 10px;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb:hover {
|
|
background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
|
|
}
|
|
|
|
/* Loading spinner */
|
|
.spinner-border-sm {
|
|
width: 1rem;
|
|
height: 1rem;
|
|
}
|
|
|
|
/* Form validation enhancement */
|
|
.was-validated .form-control:valid {
|
|
border-color: #28a745;
|
|
background-color: rgba(40, 167, 69, 0.05);
|
|
}
|
|
|
|
.was-validated .form-control:invalid {
|
|
border-color: #dc3545;
|
|
background-color: rgba(220, 53, 69, 0.05);
|
|
}
|
|
</style>
|
|
|
|
{% block stylesheets %}{% endblock %}
|
|
</head>
|
|
<body>
|
|
<div class="auth-container">
|
|
<div class="auth-card">
|
|
<!-- Header -->
|
|
<div class="auth-header">
|
|
<h1>
|
|
<i class="bi bi-shield-lock me-3"></i>
|
|
{% block auth_title %}احراز هویت{% endblock %}
|
|
</h1>
|
|
<p>{% block auth_subtitle %}به سیستم حسابیکس خوش آمدید{% endblock %}</p>
|
|
</div>
|
|
|
|
<!-- Body -->
|
|
<div class="auth-body">
|
|
<!-- Flash Messages -->
|
|
{% for message in app.flashes('success') %}
|
|
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
|
<i class="bi bi-check-circle me-2"></i>{{ message }}
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% for message in app.flashes('error') %}
|
|
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
|
<i class="bi bi-exclamation-triangle me-2"></i>{{ message }}
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% for message in app.flashes('info') %}
|
|
<div class="alert alert-info alert-dismissible fade show" role="alert">
|
|
<i class="bi bi-info-circle me-2"></i>{{ message }}
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% for message in app.flashes('warning') %}
|
|
<div class="alert alert-warning alert-dismissible fade show" role="alert">
|
|
<i class="bi bi-exclamation-circle me-2"></i>{{ message }}
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
<!-- Main Content -->
|
|
{% block auth_body %}{% endblock %}
|
|
</div>
|
|
|
|
<!-- Footer -->
|
|
<div class="auth-footer">
|
|
{% block auth_footer %}
|
|
<div class="auth-links">
|
|
<a href="{{ path('app_home') }}">
|
|
<i class="bi bi-house me-1"></i>بازگشت به صفحه اصلی
|
|
</a>
|
|
</div>
|
|
{% endblock %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Bootstrap JavaScript -->
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
|
|
|
|
<!-- Custom JavaScript -->
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
// Auto-hide alerts after 8 seconds
|
|
const alerts = document.querySelectorAll('.alert');
|
|
alerts.forEach(function(alert) {
|
|
setTimeout(function() {
|
|
const bsAlert = new bootstrap.Alert(alert);
|
|
bsAlert.close();
|
|
}, 8000);
|
|
});
|
|
|
|
// Enhanced form validation
|
|
const forms = document.querySelectorAll('form');
|
|
forms.forEach(function(form) {
|
|
form.addEventListener('submit', function(event) {
|
|
if (!form.checkValidity()) {
|
|
event.preventDefault();
|
|
event.stopPropagation();
|
|
}
|
|
form.classList.add('was-validated');
|
|
});
|
|
});
|
|
|
|
// Add loading state to submit buttons
|
|
const submitButtons = document.querySelectorAll('button[type="submit"]');
|
|
submitButtons.forEach(button => {
|
|
button.addEventListener('click', function() {
|
|
if (this.form && this.form.checkValidity()) {
|
|
this.innerHTML = '<span class="spinner-border spinner-border-sm me-2" role="status" aria-hidden="true"></span>در حال پردازش...';
|
|
this.disabled = true;
|
|
}
|
|
});
|
|
});
|
|
|
|
// Enhanced input focus effects
|
|
const inputs = document.querySelectorAll('.form-control');
|
|
inputs.forEach(input => {
|
|
input.addEventListener('focus', function() {
|
|
this.parentElement.classList.add('focused');
|
|
});
|
|
|
|
input.addEventListener('blur', function() {
|
|
this.parentElement.classList.remove('focused');
|
|
});
|
|
});
|
|
|
|
// Smooth animations for form elements
|
|
const formElements = document.querySelectorAll('.form-group');
|
|
formElements.forEach((element, index) => {
|
|
element.style.opacity = '0';
|
|
element.style.transform = 'translateY(20px)';
|
|
|
|
setTimeout(() => {
|
|
element.style.transition = 'all 0.5s ease';
|
|
element.style.opacity = '1';
|
|
element.style.transform = 'translateY(0)';
|
|
}, index * 100);
|
|
});
|
|
});
|
|
</script>
|
|
|
|
{% block javascripts %}{% endblock %}
|
|
</body>
|
|
</html>
|