Fix public page layouts and avatar display
Some checks failed
continuous-integration/drone/push Build is failing

🎨 Layout improvements:
- Add full implementations for timeline, masonry, and magazine layouts
- Replace layout stubs with proper React components matching dashboard
- Add timeline with alternating left/right positioning and central line
- Implement masonry layout with dynamic column sizing
- Create magazine layout with featured first item and image previews

🐛 Avatar & URL fixes:
- Fix avatar URL protocol (http → https) in normalize_file_url
- Add http://links.shareon.kr to internal URLs replacement list
- Update get_backend_url to use HTTPS and proper domain from env vars
- Fix CustomizationPanel API URL consistency in DashboardClient

 Visual enhancements:
- Proper hover states and transitions for all layout types
- Timeline dots with theme color coordination
- Magazine layout with responsive image handling
- Masonry cards with dynamic content sizing
- Consistent group/link styling across all layouts

🔧 Technical:
- Environment-driven URL generation for production
- Consistent API endpoint usage across components
- Better responsive design for mobile devices
- Improved accessibility with proper alt text and ARIA labels
This commit is contained in:
2025-11-08 20:24:42 +09:00
parent 95d6137713
commit 9c1c5b4b62
3 changed files with 275 additions and 8 deletions

View File

@@ -7,12 +7,14 @@ from django.conf import settings
def get_backend_url():
"""Получить базовый URL backend из настроек"""
return getattr(settings, 'BACKEND_URL', 'http://localhost:8000')
protocol = os.getenv('DJANGO_BACKEND_PROTOCOL', 'https')
domain = os.getenv('DJANGO_BACKEND_DOMAIN', 'links.shareon.kr')
return f"{protocol}://{domain}"
def get_media_base_url():
"""Получить базовый URL для медиа файлов"""
return getattr(settings, 'MEDIA_BASE_URL', 'http://localhost:8000')
return get_backend_url() # Используем тот же базовый URL
def build_absolute_url(path):
@@ -48,7 +50,8 @@ def normalize_file_url(file_url):
'http://web:8000',
'http://links-web-1:8000',
'http://backend:8000',
'http://localhost:8000'
'http://localhost:8000',
'http://links.shareon.kr' # Заменяем HTTP на HTTPS
]
# Заменяем все внутренние URL на внешний