auto / index.html
YURIY33's picture
БАЗА ДАННЫХ ДЛЯ АВТОСЕРВИСА, ВХОД ЧЕРЕЗ АДМИН МЕНЮ - Initial Deployment
1ff31b8 verified
Raw History Blame Contribute Delete
6.33 kB
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AutoService DB - Вход</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Roboto', sans-serif;
background-color: #f8fafc;
}
.login-card {
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.bg-auto-service {
background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('http://static.photos/automotive/1200x630/42');
background-size: cover;
background-position: center;
}
</style>
</head>
<body class="min-h-screen flex items-center justify-center p-4">
<div class="w-full max-w-4xl flex rounded-xl overflow-hidden login-card">
<div class="hidden md:flex md:w-1/2 bg-auto-service text-white p-10 flex-col justify-between">
<div>
<h1 class="text-3xl font-bold mb-2">AutoService DB</h1>
<p class="opacity-90">Комплексное решение для управления автосервисом</p>
</div>
<div class="mt-8">
<div class="flex items-center mb-4">
<i data-feather="tool" class="mr-3 text-blue-400"></i>
<span>Управление ремонтами</span>
</div>
<div class="flex items-center mb-4">
<i data-feather="users" class="mr-3 text-blue-400"></i>
<span>Клиентская база</span>
</div>
<div class="flex items-center">
<i data-feather="dollar-sign" class="mr-3 text-blue-400"></i>
<span>Финансовый учет</span>
</div>
</div>
<p class="text-sm opacity-70 mt-8">© 2023 AutoService DB</p>
</div>
<div class="w-full md:w-1/2 bg-white p-8 md:p-10">
<div class="text-center mb-8">
<i data-feather="lock" class="mx-auto w-10 h-10 text-blue-500 mb-4"></i>
<h2 class="text-2xl font-bold text-gray-800">Вход в систему</h2>
<p class="text-gray-600 mt-2">Введите учетные данные администратора</p>
</div>
<form id="loginForm" class="space-y-6">
<div>
<label for="username" class="block text-sm font-medium text-gray-700 mb-1">Логин</label>
<div class="relative">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<i data-feather="user" class="h-5 w-5 text-gray-400"></i>
</div>
<input type="text" id="username" name="username" required
class="pl-10 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 py-2 px-3 border"
placeholder="admin">
</div>
</div>
<div>
<label for="password" class="block text-sm font-medium text-gray-700 mb-1">Пароль</label>
<div class="relative">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<i data-feather="key" class="h-5 w-5 text-gray-400"></i>
</div>
<input type="password" id="password" name="password" required
class="pl-10 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 py-2 px-3 border"
placeholder="••••••••">
</div>
</div>
<div class="flex items-center justify-between">
<div class="flex items-center">
<input id="remember-me" name="remember-me" type="checkbox"
class="h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500">
<label for="remember-me" class="ml-2 block text-sm text-gray-700">Запомнить меня</label>
</div>
</div>
<div>
<button type="submit"
class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
Войти
</button>
</div>
</form>
<div class="mt-6 text-center">
<a href="#" class="text-sm text-blue-600 hover:text-blue-500">Забыли пароль?</a>
</div>
</div>
</div>
<script>
feather.replace();
document.getElementById('loginForm').addEventListener('submit', function(e) {
e.preventDefault();
// Здесь должна быть логика авторизации
const username = document.getElementById('username').value;
const password = document.getElementById('password').value;
// В реальном приложении здесь был бы запрос к серверу
if(username === 'admin' && password === 'admin123') {
// Успешный вход - перенаправление на dashboard
window.location.href = 'dashboard.html';
} else {
alert('Неверный логин или пароль');
}
});
</script>
</body>
</html>