✨ Новые функции: - Поле image_url в модели туров для изменения изображений через админ-панель - Расширенная модель настроек сайта с категориями: colors, typography, images, effects, layout - Динамический CSS генератор на основе настроек (/dynamic-styles.css) - API для управления настройками сайта (/api/site-settings) 🎯 Редактор стилей: - Управление цветами (основные, акцентные, текст, фон) - Настройка типографики (шрифты, размеры, межстрочный интервал) - Управление изображениями (фоны, логотипы, фавикон) - Эффекты (прозрачность, тени, размытие, скругления) - Макет (высота секций, размеры контейнеров) - Пользовательский CSS код 🛠️ Техническая реализация: - SiteSettingsHelper с кешированием для производительности - CSS переменные для динамического изменения стилей - Автоматическая миграция базы данных - Интеграция с AdminJS для удобного управления - Загрузка настроек в шаблоны для доступности 📊 База данных: - Расширена таблица site_settings (добавлено поле category) - Новые типы настроек: color, file - 27 предустановленных настроек для полного контроля над дизайном - Автоматическое применение миграций при старте приложения
555 lines
10 KiB
CSS
555 lines
10 KiB
CSS
/* Korea Tourism Agency - Main Styles */
|
|
|
|
/* CSS Variables - могут быть переопределены через настройки сайта */
|
|
:root {
|
|
/* Основные цвета */
|
|
--primary-color: #2563eb;
|
|
--primary-light: #3b82f6;
|
|
--primary-dark: #1d4ed8;
|
|
--secondary-color: #dc2626;
|
|
--accent-color: #059669;
|
|
--success-color: #059669;
|
|
--warning-color: #d97706;
|
|
--info-color: #0891b2;
|
|
--light-color: #f8fafc;
|
|
--dark-color: #0f172a;
|
|
--text-color: #334155;
|
|
--background-color: #ffffff;
|
|
--card-background: #f8fafc;
|
|
|
|
/* Серые тона */
|
|
--gray-100: #f1f5f9;
|
|
--gray-200: #e2e8f0;
|
|
--gray-300: #cbd5e1;
|
|
--gray-400: #94a3b8;
|
|
--gray-500: #64748b;
|
|
--gray-600: #475569;
|
|
--gray-700: #334155;
|
|
--gray-800: #1e293b;
|
|
--gray-900: #0f172a;
|
|
|
|
/* Корейские цвета */
|
|
--korean-red: #c41e3a;
|
|
--korean-blue: #003478;
|
|
|
|
/* Типографика */
|
|
--font-family-primary: 'Noto Sans KR', 'Malgun Gothic', '맑은 고딕', sans-serif;
|
|
--font-family-display: 'Playfair Display', serif;
|
|
--font-size-base: 16px;
|
|
--line-height-base: 1.7;
|
|
|
|
/* Эффекты */
|
|
--hero-overlay-opacity: 0.8;
|
|
--hero-overlay-color: #2563eb;
|
|
--card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
--border-radius: 8px;
|
|
--blur-effect: 10px;
|
|
--animation-duration: 0.3s;
|
|
|
|
/* Тени */
|
|
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
--shadow: var(--card-shadow);
|
|
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
|
--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
|
|
|
/* Макет */
|
|
--hero-height-desktop: 70vh;
|
|
--hero-height-mobile: 50vh;
|
|
--compact-hero-height: 25vh;
|
|
--container-max-width: 1200px;
|
|
--navbar-height: 76px;
|
|
}
|
|
|
|
/* Base Styles */
|
|
body {
|
|
font-family: var(--font-family-primary);
|
|
font-size: var(--font-size-base);
|
|
line-height: var(--line-height-base);
|
|
color: var(--text-color);
|
|
background-color: var(--background-color);
|
|
padding-top: var(--navbar-height);
|
|
}
|
|
|
|
.font-korean {
|
|
font-family: var(--font-family-primary);
|
|
}
|
|
|
|
.font-display {
|
|
font-family: var(--font-family-display);
|
|
}
|
|
|
|
/* Custom Bootstrap Overrides */
|
|
.btn-primary {
|
|
background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
|
|
border: none;
|
|
box-shadow: var(--shadow-md);
|
|
transition: all var(--animation-duration) ease;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
|
|
transform: translateY(-2px);
|
|
box-shadow: var(--shadow-lg);
|
|
}
|
|
|
|
.text-gradient {
|
|
background: linear-gradient(135deg, var(--korean-red) 0%, var(--korean-blue) 100%);
|
|
-webkit-background-clip: text;
|
|
background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
}
|
|
|
|
.bg-gradient-primary {
|
|
background: linear-gradient(135deg, var(--primary-color) 0%, var(--korean-blue) 100%);
|
|
}
|
|
|
|
/* Navigation Styles */
|
|
.navbar {
|
|
background: rgba(37, 99, 235, var(--hero-overlay-opacity)) !important;
|
|
-webkit-backdrop-filter: blur(var(--blur-effect));
|
|
backdrop-filter: blur(var(--blur-effect));
|
|
box-shadow: var(--shadow-md);
|
|
transition: all var(--animation-duration) ease;
|
|
}
|
|
|
|
.navbar-brand {
|
|
font-family: var(--font-family-display);
|
|
font-weight: 700;
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.nav-link {
|
|
font-weight: 500;
|
|
position: relative;
|
|
transition: all var(--animation-duration) ease;
|
|
}
|
|
|
|
.nav-link:hover {
|
|
color: #ffffff !important;
|
|
}
|
|
|
|
.nav-link.active::after {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: -5px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
width: 80%;
|
|
height: 2px;
|
|
background: var(--korean-red);
|
|
border-radius: 2px;
|
|
}
|
|
|
|
/* Hero Section */
|
|
.hero-section {
|
|
background: linear-gradient(135deg, var(--primary-color) 0%, var(--korean-blue) 100%);
|
|
min-height: var(--hero-height-desktop);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Compact Hero Section for other pages */
|
|
.hero-section.compact {
|
|
min-height: var(--compact-hero-height);
|
|
padding: 3rem 0;
|
|
}
|
|
|
|
/* Mobile optimization for hero sections */
|
|
@media (max-width: 768px) {
|
|
.hero-section {
|
|
min-height: var(--hero-height-mobile);
|
|
padding: 2rem 0;
|
|
}
|
|
|
|
.hero-section.compact {
|
|
min-height: 20vh;
|
|
padding: 2rem 0;
|
|
}
|
|
}
|
|
|
|
.hero-background {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-image: url('/images/korea-bg.jpg');
|
|
background-size: cover;
|
|
background-position: center;
|
|
opacity: 0.1;
|
|
z-index: 1;
|
|
}
|
|
|
|
.hero-overlay {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: linear-gradient(135deg, rgba(37, 99, 235, var(--hero-overlay-opacity)) 0%, rgba(0, 52, 120, 0.9) 100%);
|
|
z-index: 2;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.hero-section .container {
|
|
z-index: 3; /* Контент поверх overlay */
|
|
position: relative;
|
|
}
|
|
|
|
.hero-title {
|
|
font-family: var(--font-display);
|
|
font-size: clamp(2.5rem, 5vw, 4rem);
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.hero-subtitle {
|
|
font-size: clamp(1.1rem, 2vw, 1.3rem);
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.hero-image-container {
|
|
position: relative;
|
|
}
|
|
|
|
.floating-card {
|
|
bottom: 20px;
|
|
right: 20px;
|
|
animation: float 3s ease-in-out infinite;
|
|
}
|
|
|
|
@keyframes float {
|
|
0%, 100% { transform: translateY(0px); }
|
|
50% { transform: translateY(-10px); }
|
|
}
|
|
|
|
.icon-circle {
|
|
width: 50px;
|
|
height: 50px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
/* Search Section */
|
|
.search-section {
|
|
margin-top: -100px;
|
|
position: relative;
|
|
z-index: 3;
|
|
}
|
|
|
|
.search-form .form-control,
|
|
.search-form .form-select {
|
|
border: 2px solid transparent;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.search-form .form-control:focus,
|
|
.search-form .form-select:focus {
|
|
border-color: var(--primary-color);
|
|
box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
|
|
}
|
|
|
|
/* Section Titles */
|
|
.section-title {
|
|
font-family: var(--font-display);
|
|
color: var(--dark-color);
|
|
position: relative;
|
|
}
|
|
|
|
.section-subtitle {
|
|
max-width: 600px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
/* Tour Cards */
|
|
.tour-card {
|
|
transition: all 0.3s ease;
|
|
border-radius: 20px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.tour-card:hover {
|
|
transform: translateY(-10px);
|
|
box-shadow: var(--shadow-xl);
|
|
}
|
|
|
|
.tour-image {
|
|
height: 250px;
|
|
object-fit: cover;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.tour-card:hover .tour-image {
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.tour-overlay {
|
|
background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
|
|
opacity: 0;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.tour-card:hover .tour-overlay {
|
|
opacity: 1;
|
|
}
|
|
|
|
.tour-price .badge {
|
|
font-size: 1rem;
|
|
border-radius: 20px;
|
|
}
|
|
|
|
.tour-type {
|
|
top: 15px;
|
|
right: 15px;
|
|
}
|
|
|
|
.tour-meta {
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
/* Article Cards */
|
|
.article-card {
|
|
transition: all 0.3s ease;
|
|
border-radius: 15px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.article-card:hover {
|
|
transform: translateY(-5px);
|
|
box-shadow: var(--shadow-lg);
|
|
}
|
|
|
|
.article-image {
|
|
height: 200px;
|
|
object-fit: cover;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.article-card:hover .article-image {
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
/* Stats Section */
|
|
.stats-section {
|
|
background: linear-gradient(135deg, var(--primary-color) 0%, var(--korean-blue) 100%);
|
|
}
|
|
|
|
.stat-item {
|
|
text-align: center;
|
|
}
|
|
|
|
.stat-number {
|
|
font-family: var(--font-display);
|
|
}
|
|
|
|
.stat-icon {
|
|
opacity: 0.8;
|
|
}
|
|
|
|
/* Guide Cards */
|
|
.guide-card {
|
|
transition: all 0.3s ease;
|
|
border-radius: 20px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.guide-card:hover {
|
|
transform: translateY(-10px);
|
|
box-shadow: var(--shadow-xl);
|
|
}
|
|
|
|
.guide-avatar {
|
|
width: 100px;
|
|
height: 100px;
|
|
object-fit: cover;
|
|
border-radius: 50%;
|
|
border: 4px solid white;
|
|
box-shadow: var(--shadow-md);
|
|
}
|
|
|
|
.guide-specialization {
|
|
display: inline-block;
|
|
padding: 0.25rem 0.75rem;
|
|
background: var(--primary-color);
|
|
color: white;
|
|
border-radius: 20px;
|
|
font-size: 0.8rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.rating-stars {
|
|
color: #fbbf24;
|
|
}
|
|
|
|
/* Footer */
|
|
footer {
|
|
background: linear-gradient(135deg, var(--gray-900) 0%, var(--dark-color) 100%);
|
|
}
|
|
|
|
footer a {
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
footer a:hover {
|
|
color: var(--primary-light) !important;
|
|
}
|
|
|
|
.social-links a {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 40px;
|
|
height: 40px;
|
|
background: rgba(255, 255, 255, 0.1);
|
|
border-radius: 50%;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.social-links a:hover {
|
|
background: var(--primary-color);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
/* Utility Classes */
|
|
.rounded-4 {
|
|
border-radius: 1.5rem !important;
|
|
}
|
|
|
|
.rounded-pill {
|
|
border-radius: 50rem !important;
|
|
}
|
|
|
|
.shadow-soft {
|
|
box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
|
|
}
|
|
|
|
/* Loading States */
|
|
.loading {
|
|
position: relative;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.loading::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
width: 20px;
|
|
height: 20px;
|
|
border: 2px solid transparent;
|
|
border-top: 2px solid var(--primary-color);
|
|
border-radius: 50%;
|
|
animation: spin 1s linear infinite;
|
|
transform: translate(-50%, -50%);
|
|
}
|
|
|
|
@keyframes spin {
|
|
0% { transform: translate(-50%, -50%) rotate(0deg); }
|
|
100% { transform: translate(-50%, -50%) rotate(360deg); }
|
|
}
|
|
|
|
/* Responsive Design */
|
|
@media (max-width: 768px) {
|
|
body {
|
|
padding-top: 66px;
|
|
}
|
|
|
|
.hero-title {
|
|
font-size: 2.5rem;
|
|
}
|
|
|
|
.hero-subtitle {
|
|
font-size: 1.1rem;
|
|
}
|
|
|
|
.floating-card {
|
|
display: none;
|
|
}
|
|
|
|
.search-section {
|
|
margin-top: -50px;
|
|
}
|
|
|
|
.tour-card,
|
|
.article-card,
|
|
.guide-card {
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.stats-section .stat-number {
|
|
font-size: 2rem;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 576px) {
|
|
.hero-buttons .btn {
|
|
width: 100%;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.search-form .col-md-4 {
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.search-form .btn {
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
/* Print Styles */
|
|
@media print {
|
|
.navbar,
|
|
footer,
|
|
.btn,
|
|
.floating-card {
|
|
display: none !important;
|
|
}
|
|
|
|
body {
|
|
padding-top: 0;
|
|
}
|
|
|
|
.hero-section {
|
|
background: white;
|
|
color: black;
|
|
min-height: 20vh;
|
|
padding: 2rem 0;
|
|
}
|
|
|
|
.hero-section.compact {
|
|
min-height: 15vh;
|
|
padding: 1.5rem 0;
|
|
}
|
|
}
|
|
|
|
/* High Contrast Mode */
|
|
@media (prefers-contrast: high) {
|
|
.tour-overlay,
|
|
.hero-overlay {
|
|
background: rgba(0, 0, 0, 0.9);
|
|
}
|
|
|
|
.text-gradient {
|
|
background: none;
|
|
color: var(--dark-color);
|
|
-webkit-text-fill-color: initial;
|
|
}
|
|
}
|
|
|
|
/* Reduced Motion */
|
|
@media (prefers-reduced-motion: reduce) {
|
|
*,
|
|
*::before,
|
|
*::after {
|
|
animation-duration: 0.01ms !important;
|
|
animation-iteration-count: 1 !important;
|
|
transition-duration: 0.01ms !important;
|
|
}
|
|
|
|
.floating-card {
|
|
animation: none;
|
|
}
|
|
} |