Initial commit: Korea Tourism Agency website with AdminJS

- Full-stack Node.js/Express application with PostgreSQL
- Modern ES modules architecture
- AdminJS admin panel with Sequelize ORM
- Tourism routes, guides, articles, bookings management
- Responsive Bootstrap 5 frontend
- Docker containerization with docker-compose
- Complete database schema with migrations
- Authentication system for admin panel
- Dynamic placeholder images for tour categories
This commit is contained in:
2025-11-29 18:13:17 +09:00
commit 409e6c146b
53 changed files with 16195 additions and 0 deletions

131
views/routes/index.ejs Normal file
View File

@@ -0,0 +1,131 @@
<!-- Hero Section -->
<section class="hero-section bg-primary text-white text-center py-5">
<div class="container">
<div class="row align-items-center">
<div class="col-lg-8 mx-auto">
<h1 class="display-4 fw-bold mb-4">Туры по Корее</h1>
<p class="lead mb-4">Откройте для себя удивительную Корею с нашими профессиональными гидами</p>
<!-- Filter Buttons -->
<div class="btn-group mb-4" role="group">
<a href="/routes" class="btn <%= currentType === 'all' ? 'btn-light' : 'btn-outline-light' %>">
<i class="fas fa-list me-1"></i>Все туры
</a>
<a href="/routes?type=city" class="btn <%= currentType === 'city' ? 'btn-light' : 'btn-outline-light' %>">
<i class="fas fa-city me-1"></i>Городские туры
</a>
<a href="/routes?type=mountain" class="btn <%= currentType === 'mountain' ? 'btn-light' : 'btn-outline-light' %>">
<i class="fas fa-mountain me-1"></i>Горные походы
</a>
<a href="/routes?type=fishing" class="btn <%= currentType === 'fishing' ? 'btn-light' : 'btn-outline-light' %>">
<i class="fas fa-fish me-1"></i>Морская рыбалка
</a>
</div>
</div>
</div>
</div>
</section>
<!-- Routes Grid -->
<section class="py-5">
<div class="container">
<% if (routes.length === 0) { %>
<div class="text-center py-5">
<i class="fas fa-map text-muted" style="font-size: 4rem;"></i>
<h3 class="mt-3 text-muted">Туры не найдены</h3>
<p class="text-muted">В данной категории пока нет доступных туров.</p>
<a href="/routes" class="btn btn-primary">Посмотреть все туры</a>
</div>
<% } else { %>
<div class="row">
<% routes.forEach(route => { %>
<div class="col-lg-4 col-md-6 mb-4">
<div class="card h-100 shadow-sm">
<%
let placeholderImage = '/images/placeholder.jpg';
if (route.type === 'city') {
placeholderImage = '/images/city-tour-placeholder.webp';
} else if (route.type === 'mountain') {
placeholderImage = '/images/mountain-placeholder.jpg';
} else if (route.type === 'fishing') {
placeholderImage = '/images/fish-placeholder.jpg';
}
%>
<% if (route.image_url && route.image_url.trim()) { %>
<img src="<%= route.image_url %>" class="card-img-top" alt="<%= route.title %>" style="height: 250px; object-fit: cover;">
<% } else { %>
<img src="<%= placeholderImage %>" class="card-img-top" alt="<%= route.title %>" style="height: 250px; object-fit: cover;">
<% } %>
<!-- Featured Badge -->
<% if (route.is_featured) { %>
<span class="badge bg-warning text-dark position-absolute top-0 start-0 m-2">
<i class="fas fa-star me-1"></i>Рекомендуем
</span>
<% } %>
<div class="card-body d-flex flex-column">
<div class="mb-2">
<% if (route.type === 'city') { %>
<span class="badge bg-info text-dark">
<i class="fas fa-city me-1"></i>Городской тур
</span>
<% } else if (route.type === 'mountain') { %>
<span class="badge bg-success">
<i class="fas fa-mountain me-1"></i>Горный поход
</span>
<% } else if (route.type === 'fishing') { %>
<span class="badge bg-primary">
<i class="fas fa-fish me-1"></i>Рыбалка
</span>
<% } %>
<% if (route.difficulty_level) { %>
<span class="badge <%= route.difficulty_level === 'easy' ? 'bg-success' : route.difficulty_level === 'moderate' ? 'bg-warning' : 'bg-danger' %>">
<%= route.difficulty_level === 'easy' ? 'Легко' : route.difficulty_level === 'moderate' ? 'Средне' : 'Сложно' %>
</span>
<% } %>
</div>
<h5 class="card-title"><%= route.title %></h5>
<p class="card-text text-muted flex-grow-1"><%= route.description %></p>
<div class="mt-auto">
<div class="d-flex justify-content-between align-items-center mb-3">
<div>
<strong class="text-primary h5">₩<%= formatCurrency(route.price) %></strong>
</div>
<small class="text-muted">
<i class="fas fa-clock me-1"></i><%= route.duration %> дн.
</small>
</div>
<% if (route.guide_name) { %>
<p class="text-muted mb-2">
<i class="fas fa-user-tie me-1"></i>Гид: <%= route.guide_name %>
</p>
<% } %>
<a href="/routes/<%= route.id %>" class="btn btn-primary w-100">
<i class="fas fa-info-circle me-1"></i>Подробнее
</a>
</div>
</div>
</div>
</div>
<% }); %>
</div>
<% } %>
</div>
</section>
<!-- CTA Section -->
<section class="bg-light py-5">
<div class="container text-center">
<h2 class="mb-4">Не нашли подходящий тур?</h2>
<p class="lead text-muted mb-4">Мы можем организовать индивидуальный тур специально для вас!</p>
<a href="/contact" class="btn btn-primary btn-lg">
<i class="fas fa-envelope me-1"></i>Свяжитесь с нами
</a>
</div>
</section>