feat: show starred release highlights 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
e25d121240
commit
306b4e3e0f
@ -911,12 +911,22 @@
|
||||
<span style="font-weight: 600; color: var(--text-primary);">Co nowego na platformie?</span>
|
||||
<span style="font-size: var(--font-size-xs); color: var(--text-secondary);">{{ latest_release.version }} · {{ latest_release.date }}</span>
|
||||
</div>
|
||||
<div style="font-size: var(--font-size-sm); color: var(--text-secondary); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
|
||||
{% set highlight = (latest_release.new[0] if latest_release.new else (latest_release.improve[0] if latest_release.improve else ''))|striptags %}
|
||||
{{ highlight }}
|
||||
<div style="font-size: var(--font-size-sm); color: var(--text-secondary); margin-top: 4px;">
|
||||
{% 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 %}
|
||||
{% if starred %}
|
||||
{% for item in starred %}
|
||||
<div style="padding: 2px 0;">{{ item|safe }}</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% set highlight = (all_items[0] if all_items else '')|striptags %}
|
||||
<div style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">{{ highlight }}</div>
|
||||
{% endif %}
|
||||
{% 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) %}
|
||||
{% if total_changes > 1 %}
|
||||
<span style="color: var(--primary); font-weight: 500;"> · i {{ total_changes - 1 }} {{ 'inna zmiana' if total_changes - 1 == 1 else ('inne zmiany' if total_changes - 1 < 5 else 'innych zmian') }}</span>
|
||||
{% 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>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user