Reorganize project structure and cleanup root directory
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
✨ Major improvements: - Created organized folder structure with utils/, scripts/, backups/, temp/ - Moved Python scripts to scripts/ folder for better organization - Moved utility files (start, stop, update, cli, logs, drone) to utils/ folder - Moved backup files to backups/ folder for cleaner root directory - Added comprehensive README.md files for each new folder - Updated main README.md with new project structure documentation - Enhanced .gitignore with rules for new folders - Added real-time career vacancy counter on homepage - Improved homepage career stats styling with better visibility 🗂️ New folder structure: - utils/ - Project management utilities and tools - scripts/ - Python helper scripts for banners and data - backups/ - Configuration and file backups - temp/ - Temporary files and development data 🎨 UI improvements: - Fixed white text visibility issues on homepage career section - Added dynamic vacancy count from database - Implemented glassmorphism design for career stats card - Better color contrast and hover effects This reorganization makes the project more maintainable and professional.
This commit is contained in:
23
scripts/README.md
Normal file
23
scripts/README.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# 🐍 Scripts
|
||||
|
||||
Папка содержит вспомогательные скрипты для проекта SmartSolTech.
|
||||
|
||||
## Файлы:
|
||||
|
||||
- `create_hero_banner.py` - Скрипт для создания героических баннеров
|
||||
- `hero_script.py` - Дополнительный скрипт для работы с баннерами
|
||||
|
||||
## Использование:
|
||||
|
||||
Запуск скриптов должен производиться из корневой директории проекта:
|
||||
|
||||
```bash
|
||||
cd smartsoltech/
|
||||
python ../scripts/create_hero_banner.py
|
||||
```
|
||||
|
||||
или через Django management команды из папки smartsoltech/:
|
||||
|
||||
```bash
|
||||
python manage.py shell < ../scripts/script_name.py
|
||||
```
|
||||
58
scripts/create_hero_banner.py
Normal file
58
scripts/create_hero_banner.py
Normal file
@@ -0,0 +1,58 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Создание тестового Hero баннера с видео
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Добавляем путь к Django проекту
|
||||
sys.path.append('/home/data/smartsoltech.kr/smartsoltech')
|
||||
|
||||
# Настройка Django
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'smartsoltech.settings')
|
||||
|
||||
import django
|
||||
django.setup()
|
||||
|
||||
from web.models import HeroBanner
|
||||
|
||||
def create_hero_banner():
|
||||
"""Создает тестовый Hero баннер с видео"""
|
||||
|
||||
# Создаем баннер с видео
|
||||
hero_video = HeroBanner.objects.create(
|
||||
title="Smart Solutions для вашего бизнеса",
|
||||
subtitle="Профессиональная разработка и внедрение IT-решений",
|
||||
description="Мы создаем инновативные технологические решения, которые помогут вашему бизнесу достичь новых высот эффективности и успеха.",
|
||||
button_text="Получить консультацию",
|
||||
button_link="/contact/",
|
||||
video="static/video/hero/hero-demo.mp4",
|
||||
is_active=True,
|
||||
order=1
|
||||
)
|
||||
|
||||
# Создаем баннер с изображением (fallback)
|
||||
hero_image = HeroBanner.objects.create(
|
||||
title="Цифровые решения нового поколения",
|
||||
subtitle="Автоматизация, интеграция, оптимизация",
|
||||
description="Трансформируйте свой бизнес с помощью наших передовых IT-решений и экспертного подхода к каждому проекту.",
|
||||
button_text="Наши услуги",
|
||||
button_link="/services/",
|
||||
image="static/img/about/about-1.jpg",
|
||||
is_active=True,
|
||||
order=2
|
||||
)
|
||||
|
||||
print(f"✅ Создан Hero баннер с видео: {hero_video.title}")
|
||||
print(f"✅ Создан Hero баннер с изображением: {hero_image.title}")
|
||||
|
||||
# Показываем все активные баннеры
|
||||
active_banners = HeroBanner.objects.filter(is_active=True).order_by('order')
|
||||
print(f"\n📋 Всего активных баннеров: {active_banners.count()}")
|
||||
for banner in active_banners:
|
||||
media_type = "🎬 Видео" if banner.video else "🖼️ Изображение"
|
||||
print(f" {banner.order}. {banner.title} ({media_type})")
|
||||
|
||||
if __name__ == "__main__":
|
||||
create_hero_banner()
|
||||
35
scripts/hero_script.py
Normal file
35
scripts/hero_script.py
Normal file
@@ -0,0 +1,35 @@
|
||||
from web.models import HeroBanner
|
||||
|
||||
# Создаем баннер с видео
|
||||
hero_video = HeroBanner.objects.create(
|
||||
title="Smart Solutions для вашего бизнеса",
|
||||
subtitle="Профессиональная разработка и внедрение IT-решений",
|
||||
description="Мы создаем инновативные технологические решения, которые помогут вашему бизнесу достичь новых высот эффективности и успеха.",
|
||||
button_text="Получить консультацию",
|
||||
button_link="/contact/",
|
||||
video="static/video/hero/hero-demo.mp4",
|
||||
is_active=True,
|
||||
order=1
|
||||
)
|
||||
|
||||
# Создаем баннер с изображением (fallback)
|
||||
hero_image = HeroBanner.objects.create(
|
||||
title="Цифровые решения нового поколения",
|
||||
subtitle="Автоматизация, интеграция, оптимизация",
|
||||
description="Трансформируйте свой бизнес с помощью наших передовых IT-решений и экспертного подхода к каждому проекту.",
|
||||
button_text="Наши услуги",
|
||||
button_link="/services/",
|
||||
image="static/img/about/about-1.jpg",
|
||||
is_active=True,
|
||||
order=2
|
||||
)
|
||||
|
||||
print(f"✅ Создан Hero баннер с видео: {hero_video.title}")
|
||||
print(f"✅ Создан Hero баннер с изображением: {hero_image.title}")
|
||||
|
||||
# Показываем все активные баннеры
|
||||
active_banners = HeroBanner.objects.filter(is_active=True).order_by('order')
|
||||
print(f"\n📋 Всего активных баннеров: {active_banners.count()}")
|
||||
for banner in active_banners:
|
||||
media_type = "🎬 Видео" if banner.video else "🖼️ Изображение"
|
||||
print(f" {banner.order}. {banner.title} ({media_type})")
|
||||
Reference in New Issue
Block a user