Files
tourrism_site/views/articles/index.ejs
Andrey K. Choi 409e6c146b 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
2025-11-29 18:13:17 +09:00

80 lines
4.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- Hero Section -->
<section class="hero-section bg-primary text-white text-center py-5">
<div class="container">
<div class="row">
<div class="col-lg-8 mx-auto">
<h1 class="display-4 fw-bold mb-4">Полезные статьи</h1>
<p class="lead">Советы путешественникам и интересная информация о Корее</p>
</div>
</div>
</div>
</section>
<!-- Articles Grid -->
<section class="py-5">
<div class="container">
<% if (articles.length === 0) { %>
<div class="text-center py-5">
<i class="fas fa-newspaper text-muted" style="font-size: 4rem;"></i>
<h3 class="mt-3 text-muted">Статьи не найдены</h3>
<p class="text-muted">В данный момент нет опубликованных статей.</p>
</div>
<% } else { %>
<div class="row">
<% articles.forEach(article => { %>
<div class="col-lg-4 col-md-6 mb-4">
<div class="card h-100 shadow-sm">
<% if (article.image_url && article.image_url.trim()) { %>
<img src="<%= article.image_url %>" class="card-img-top" alt="<%= article.title %>" style="height: 200px; object-fit: cover;">
<% } else { %>
<img src="/images/placeholder.jpg" class="card-img-top" alt="<%= article.title %>" style="height: 200px; object-fit: cover;">
<% } %>
<div class="card-body d-flex flex-column">
<div class="mb-2">
<span class="badge <%= article.category === 'travel-tips' ? 'bg-success' : article.category === 'food' ? 'bg-warning' : article.category === 'culture' ? 'bg-info' : article.category === 'nature' ? 'bg-success' : article.category === 'history' ? 'bg-secondary' : 'bg-primary' %>">
<%= getCategoryLabel(article.category) %>
</span>
</div>
<h5 class="card-title"><%= article.title %></h5>
<p class="card-text text-muted flex-grow-1"><%= article.excerpt || truncateText(article.content, 120) %></p>
<div class="mt-auto">
<div class="d-flex justify-content-between align-items-center mb-3">
<small class="text-muted">
<i class="fas fa-eye me-1"></i><%= article.views || 0 %> просмотров
</small>
<small class="text-muted">
<i class="fas fa-calendar me-1"></i><%= formatDate(article.created_at) %>
</small>
</div>
<a href="/articles/<%= article.id %>" class="btn btn-primary w-100">
<i class="fas fa-book-open me-1"></i>Читать
</a>
</div>
</div>
</div>
</div>
<% }); %>
</div>
<% } %>
</div>
</section>
<!-- Newsletter Signup -->
<section class="bg-light py-5">
<div class="container text-center">
<h2 class="mb-4">Не пропустите новые статьи!</h2>
<p class="lead text-muted mb-4">Подпишитесь на нашу рассылку и получайте самые интересные материалы о Корее</p>
<div class="row justify-content-center">
<div class="col-md-6">
<form class="d-flex">
<input type="email" class="form-control me-2" placeholder="Ваш email адрес">
<button class="btn btn-primary" type="submit">Подписаться</button>
</form>
</div>
</div>
</div>
</section>