feat(calendar): Add image support for events
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Add image_url column to NordaEvent model with migration 066. Display event banner image above description in event detail page. Include converted WebP image for Lean breakfast event (2026-02-20). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
7b2c4ce739
commit
7bd34824ab
@ -2093,6 +2093,9 @@ class NordaEvent(Base):
|
||||
# Kontrola dostępu
|
||||
access_level = Column(String(50), default='members_only') # public, members_only, rada_only
|
||||
|
||||
# Media
|
||||
image_url = Column(String(1000)) # Banner/header image URL
|
||||
|
||||
# Relationships
|
||||
speaker_company = relationship('Company')
|
||||
creator = relationship('User', foreign_keys=[created_by])
|
||||
|
||||
4
database/migrations/066_event_image_url.sql
Normal file
4
database/migrations/066_event_image_url.sql
Normal file
@ -0,0 +1,4 @@
|
||||
-- Migration 066: Add image_url column to norda_events
|
||||
-- Allows events to have a banner/header image
|
||||
|
||||
ALTER TABLE norda_events ADD COLUMN IF NOT EXISTS image_url VARCHAR(1000);
|
||||
BIN
static/img/events/sniadanie-lean-2026-02-20.webp
Normal file
BIN
static/img/events/sniadanie-lean-2026-02-20.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 59 KiB |
@ -247,6 +247,12 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if event.image_url %}
|
||||
<div style="margin-bottom: var(--spacing-xl); border-radius: var(--radius-lg); overflow: hidden;">
|
||||
<img src="{{ event.image_url }}" alt="{{ event.title }}" style="width: 100%; height: auto; display: block;">
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if event.description %}
|
||||
<div class="event-description">
|
||||
{{ event.description|safe }}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user