267 lines
7.8 KiB
HTML
267 lines
7.8 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="ru">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>Rabota.Today - Ярмарка вакансий</title>
|
||
<link rel="stylesheet" href="/static/css/styles.css">
|
||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
|
||
<style>
|
||
* {
|
||
margin: 0;
|
||
padding: 0;
|
||
box-sizing: border-box;
|
||
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||
}
|
||
|
||
body {
|
||
background: linear-gradient(145deg, #eef5fa 0%, #e0eaf5 100%);
|
||
min-height: 100vh;
|
||
}
|
||
|
||
.container {
|
||
max-width: 1200px;
|
||
margin: 0 auto;
|
||
padding: 20px;
|
||
}
|
||
|
||
.header {
|
||
background: #0b1c34;
|
||
color: white;
|
||
padding: 20px 40px;
|
||
border-radius: 40px;
|
||
margin-bottom: 40px;
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
box-shadow: 0 20px 40px rgba(0,20,40,0.2);
|
||
}
|
||
|
||
.logo {
|
||
font-size: 28px;
|
||
font-weight: 700;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 15px;
|
||
}
|
||
|
||
.logo i {
|
||
color: #3b82f6;
|
||
background: rgba(255,255,255,0.1);
|
||
padding: 12px;
|
||
border-radius: 20px;
|
||
}
|
||
|
||
.nav {
|
||
display: flex;
|
||
gap: 20px;
|
||
align-items: center;
|
||
}
|
||
|
||
.nav a {
|
||
color: white;
|
||
text-decoration: none;
|
||
padding: 10px 20px;
|
||
border-radius: 30px;
|
||
transition: 0.2s;
|
||
}
|
||
|
||
.nav a:hover {
|
||
background: rgba(255,255,255,0.1);
|
||
}
|
||
|
||
.nav .btn-login {
|
||
background: #3b82f6;
|
||
color: white;
|
||
}
|
||
|
||
.hero {
|
||
text-align: center;
|
||
padding: 60px 20px;
|
||
background: white;
|
||
border-radius: 60px;
|
||
margin-bottom: 40px;
|
||
box-shadow: 0 20px 40px rgba(0,20,40,0.1);
|
||
}
|
||
|
||
.hero h1 {
|
||
font-size: 48px;
|
||
color: #0b1c34;
|
||
margin-bottom: 20px;
|
||
}
|
||
|
||
.hero p {
|
||
font-size: 20px;
|
||
color: #4f7092;
|
||
margin-bottom: 40px;
|
||
}
|
||
|
||
.hero-buttons {
|
||
display: flex;
|
||
gap: 20px;
|
||
justify-content: center;
|
||
}
|
||
|
||
.btn {
|
||
padding: 16px 40px;
|
||
border-radius: 50px;
|
||
font-size: 18px;
|
||
font-weight: 600;
|
||
text-decoration: none;
|
||
transition: 0.2s;
|
||
}
|
||
|
||
.btn-primary {
|
||
background: #0b1c34;
|
||
color: white;
|
||
}
|
||
|
||
.btn-primary:hover {
|
||
background: #1b3f6b;
|
||
transform: scale(1.05);
|
||
}
|
||
|
||
.btn-secondary {
|
||
background: #e8f0fe;
|
||
color: #0b1c34;
|
||
border: 2px solid #3b82f6;
|
||
}
|
||
|
||
.btn-secondary:hover {
|
||
background: #d6e5ff;
|
||
}
|
||
|
||
.stats {
|
||
display: grid;
|
||
grid-template-columns: repeat(3, 1fr);
|
||
gap: 30px;
|
||
margin: 60px 0;
|
||
}
|
||
|
||
.stat-card {
|
||
background: white;
|
||
padding: 40px;
|
||
border-radius: 40px;
|
||
text-align: center;
|
||
box-shadow: 0 10px 30px rgba(0,0,0,0.05);
|
||
}
|
||
|
||
.stat-card i {
|
||
font-size: 48px;
|
||
color: #3b82f6;
|
||
margin-bottom: 20px;
|
||
}
|
||
|
||
.stat-card .number {
|
||
font-size: 36px;
|
||
font-weight: 700;
|
||
color: #0b1c34;
|
||
}
|
||
|
||
.footer {
|
||
text-align: center;
|
||
padding: 40px;
|
||
color: #4f7092;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="container">
|
||
<div class="header">
|
||
<div class="logo">
|
||
<i class="fas fa-briefcase"></i>
|
||
МП.Ярмарка
|
||
</div>
|
||
<div class="nav">
|
||
<a href="/">Главная</a>
|
||
<a href="/vacancies">Вакансии</a>
|
||
<a href="/resumes">Резюме</a>
|
||
<a href="/login" class="btn-login">Войти</a>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="hero">
|
||
<h1>Найди работу мечты</h1>
|
||
<p>Тысячи вакансий и резюме на одной платформе</p>
|
||
<div class="hero-buttons">
|
||
<a href="/register" class="btn btn-primary">Начать карьеру</a>
|
||
<a href="/vacancies" class="btn btn-secondary">Смотреть вакансии</a>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="stats">
|
||
<div class="stat-card">
|
||
<i class="fas fa-briefcase"></i>
|
||
<div class="number" id="vacanciesCount">1,234</div>
|
||
<div>активных вакансий</div>
|
||
</div>
|
||
<div class="stat-card">
|
||
<i class="fas fa-users"></i>
|
||
<div class="number" id="resumesCount">5,678</div>
|
||
<div>соискателей</div>
|
||
</div>
|
||
<div class="stat-card">
|
||
<i class="fas fa-building"></i>
|
||
<div class="number" id="companiesCount">456</div>
|
||
<div>компаний</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="footer">
|
||
© 2026 Rabota.Today - Ярмарка вакансий
|
||
</div>
|
||
|
||
<script>
|
||
// Загрузка статистики
|
||
async function loadStats() {
|
||
try {
|
||
// Здесь можно будет загружать реальную статистику с API
|
||
// Пока оставляем статичные данные
|
||
} catch (error) {
|
||
console.error('Error loading stats:', error);
|
||
}
|
||
}
|
||
loadStats();
|
||
// Проверка авторизации для главной страницы
|
||
async function checkAuthForIndex() {
|
||
const token = localStorage.getItem('accessToken');
|
||
const nav = document.querySelector('.nav');
|
||
|
||
if (token) {
|
||
try {
|
||
const response = await fetch('http://localhost:8000/api/user', {
|
||
headers: {
|
||
'Authorization': `Bearer ${token}`
|
||
}
|
||
});
|
||
|
||
if (response.ok) {
|
||
const user = await response.json();
|
||
// Обновляем навигацию
|
||
nav.innerHTML = `
|
||
<a href="/">Главная</a>
|
||
<a href="/vacancies">Вакансии</a>
|
||
<a href="/resumes">Резюме</a>
|
||
<a href="/favorites">Избранное</a>
|
||
<a href="/applications">Отклики</a>
|
||
<a href="/profile" style="background: #3b82f6;">
|
||
<i class="fas fa-user-circle"></i> ${user.full_name.split(' ')[0]}
|
||
</a>
|
||
`;
|
||
}
|
||
} catch (error) {
|
||
console.error('Error checking auth:', error);
|
||
}
|
||
}
|
||
}
|
||
|
||
// Запускаем проверку после загрузки страницы
|
||
document.addEventListener('DOMContentLoaded', checkAuthForIndex);
|
||
</script>
|
||
<!-- Добавьте этот скрипт в head или перед закрывающим body -->
|
||
<script>
|
||
|
||
</script>
|
||
</body>
|
||
</html> |