Limit www badges to 15 services + 10 keywords with expand button
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
Companies with large websites (e.g. Waterm: 94 badges, Chopin TV: 172) now show max 25 badges by default with a "+ jeszcze N" button to expand. Data in database unchanged — only display limit in template. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c1523b840e
commit
5b0c2a4e2f
@ -1472,14 +1472,36 @@
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="tags-container">
|
||||
{% set max_svc = 15 %}
|
||||
{% set max_kw = 10 %}
|
||||
<div class="tags-container" id="wwwTagsVisible">
|
||||
{% for service in www_services[:max_svc] %}
|
||||
<span class="tag" style="background: #e2e8f0; color: #475569;">{{ service }}</span>
|
||||
{% endfor %}
|
||||
{% for keyword in www_keywords[:max_kw] %}
|
||||
<span class="tag" style="background: #f1f5f9; color: #64748b; border: 1px dashed #cbd5e1;">{{ keyword }}</span>
|
||||
{% endfor %}
|
||||
{% if www_services|length > max_svc or www_keywords|length > max_kw %}
|
||||
{% set extra_svc = www_services|length - max_svc if www_services|length > max_svc else 0 %}
|
||||
{% set extra_kw = www_keywords|length - max_kw if www_keywords|length > max_kw else 0 %}
|
||||
<button class="tag" style="background: #dbeafe; color: #1d4ed8; border: none; cursor: pointer; font-weight: 600;" onclick="document.getElementById('wwwTagsVisible').style.display='none';document.getElementById('wwwTagsAll').style.display='flex';">
|
||||
+ jeszcze {{ extra_svc + extra_kw }}
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if www_services|length > max_svc or www_keywords|length > max_kw %}
|
||||
<div class="tags-container" id="wwwTagsAll" style="display: none;">
|
||||
{% for service in www_services %}
|
||||
<span class="tag" style="background: #e2e8f0; color: #475569;">{{ service }}</span>
|
||||
{% endfor %}
|
||||
{% for keyword in www_keywords %}
|
||||
<span class="tag" style="background: #f1f5f9; color: #64748b; border: 1px dashed #cbd5e1;">{{ keyword }}</span>
|
||||
{% endfor %}
|
||||
<button class="tag" style="background: #dbeafe; color: #1d4ed8; border: none; cursor: pointer; font-weight: 600;" onclick="document.getElementById('wwwTagsAll').style.display='none';document.getElementById('wwwTagsVisible').style.display='flex';">
|
||||
zwiń
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user