feat: add deep links to starred release notes in homepage banner
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
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
306b4e3e0f
commit
4d0a91f97c
@ -959,6 +959,10 @@ def _get_releases():
|
||||
'version': 'v1.43.0',
|
||||
'date': '12 marca 2026',
|
||||
'badges': ['new', 'improve', 'fix'],
|
||||
'starred_links': {
|
||||
'Zdjęcie profilowe': '/konto',
|
||||
'Profile użytkowników': '/kalendarz',
|
||||
},
|
||||
'new': [
|
||||
'<strong>Nowości na stronie głównej</strong> - pod nagłówkiem katalogu firm wyświetla się informacja o najnowszych zmianach na platformie z linkiem do pełnej listy',
|
||||
'<strong>Polityka prywatności i Regulamin</strong> - platforma ma teraz własne dokumenty prawne dostępne w stopce strony',
|
||||
|
||||
@ -904,8 +904,8 @@
|
||||
|
||||
<!-- Co nowego na platformie -->
|
||||
{% if latest_release %}
|
||||
<a href="{{ url_for('release_notes') }}" style="display: flex; align-items: center; gap: var(--spacing-md); background: var(--surface); border: 1px solid var(--border-color, #e5e7eb); border-left: 4px solid var(--primary); border-radius: var(--radius-lg); padding: var(--spacing-md) var(--spacing-lg); margin-bottom: var(--spacing-lg); text-decoration: none; color: inherit; transition: var(--transition);" onmouseover="this.style.borderLeftColor='#22c55e'; this.style.boxShadow='var(--shadow-md)'" onmouseout="this.style.borderLeftColor='var(--primary)'; this.style.boxShadow='none'">
|
||||
<div style="font-size: 1.5rem; flex-shrink: 0;">✨</div>
|
||||
<div style="display: flex; align-items: flex-start; gap: var(--spacing-md); background: var(--surface); border: 1px solid var(--border-color, #e5e7eb); border-left: 4px solid var(--primary); border-radius: var(--radius-lg); padding: var(--spacing-md) var(--spacing-lg); margin-bottom: var(--spacing-lg);">
|
||||
<div style="font-size: 1.5rem; flex-shrink: 0; margin-top: 2px;">✨</div>
|
||||
<div style="flex: 1; min-width: 0;">
|
||||
<div style="display: flex; align-items: baseline; gap: var(--spacing-sm); flex-wrap: wrap;">
|
||||
<span style="font-weight: 600; color: var(--text-primary);">Co nowego na platformie?</span>
|
||||
@ -915,9 +915,18 @@
|
||||
{% set all_items = (latest_release.new or []) + (latest_release.improve or []) %}
|
||||
{% set starred = [] %}
|
||||
{% for item in all_items %}{% if item.startswith('★') %}{% if starred.append(item) %}{% endif %}{% endif %}{% endfor %}
|
||||
{% set starred_links = latest_release.get('starred_links', {}) if latest_release.get is defined else {} %}
|
||||
{% if starred %}
|
||||
{% for item in starred %}
|
||||
<div style="padding: 2px 0;">{{ item|safe }}</div>
|
||||
{% set item_title = item|striptags|replace('★ ', '') %}
|
||||
{% set item_title_short = item_title.split(' - ')[0]|trim %}
|
||||
{% set link = starred_links.get(item_title_short, '') if starred_links.get is defined else '' %}
|
||||
<div style="padding: 3px 0;">
|
||||
{{ item|safe }}
|
||||
{% if link %}
|
||||
<a href="{{ link }}" style="color: var(--primary); font-weight: 500; text-decoration: none; margin-left: 6px; font-size: var(--font-size-xs);" onmouseover="this.style.textDecoration='underline'" onmouseout="this.style.textDecoration='none'">Wypróbuj →</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% set highlight = (all_items[0] if all_items else '')|striptags %}
|
||||
@ -926,12 +935,14 @@
|
||||
{% set total_changes = (latest_release.new|length if latest_release.new else 0) + (latest_release.improve|length if latest_release.improve else 0) + (latest_release.fix|length if latest_release.fix else 0) %}
|
||||
{% set starred_count = starred|length %}
|
||||
{% if total_changes > starred_count and starred_count > 0 %}
|
||||
<div style="margin-top: 2px;"><span style="color: var(--primary); font-weight: 500;">+ {{ total_changes - starred_count }} {{ 'inna zmiana' if total_changes - starred_count == 1 else ('inne zmiany' if total_changes - starred_count < 5 else 'innych zmian') }}</span></div>
|
||||
<div style="margin-top: 4px;">
|
||||
<a href="{{ url_for('release_notes') }}" style="color: var(--primary); font-weight: 500; text-decoration: none; font-size: var(--font-size-sm);" onmouseover="this.style.textDecoration='underline'" onmouseout="this.style.textDecoration='none'">+ {{ total_changes - starred_count }} {{ 'inna zmiana' if total_changes - starred_count == 1 else ('inne zmiany' if total_changes - starred_count < 5 else 'innych zmian') }} →</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<span style="color: var(--primary); font-weight: 500; font-size: var(--font-size-sm); white-space: nowrap; flex-shrink: 0;">Zobacz wszystko →</span>
|
||||
</a>
|
||||
<a href="{{ url_for('release_notes') }}" style="color: var(--primary); font-weight: 500; font-size: var(--font-size-sm); white-space: nowrap; flex-shrink: 0; text-decoration: none; margin-top: 2px;" onmouseover="this.style.textDecoration='underline'" onmouseout="this.style.textDecoration='none'">Zobacz wszystko →</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Event Banners - Najbliższe wydarzenia -->
|
||||
|
||||
Loading…
Reference in New Issue
Block a user