nordabiz/templates/zopk/news_list.html
Maciej Pienczyn 110d971dca
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
feat: migrate prod docs to OVH VPS + UTC→Warsaw timezone in all templates
Production moved from on-prem VM 249 (10.22.68.249) to OVH VPS
(57.128.200.27, inpi-vps-waw01). Updated ALL documentation, slash
commands, memory files, architecture docs, and deploy procedures.

Added |local_time Jinja filter (UTC→Europe/Warsaw) and converted
155 .strftime() calls across 71 templates so timestamps display
in Polish timezone regardless of server timezone.

Also includes: created_by_id tracking, abort import fix, ICS
calendar fix for missing end times, Pros Poland data cleanup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 13:41:53 +02:00

242 lines
6.8 KiB
HTML

{% extends "base.html" %}
{% block title %}Aktualności ZOP Kaszubia - Norda Biznes Partner{% endblock %}
{% block extra_css %}
<style>
.page-header {
margin-bottom: var(--spacing-xl);
}
.page-header h1 {
font-size: var(--font-size-2xl);
margin-bottom: var(--spacing-sm);
}
.filters {
display: flex;
gap: var(--spacing-sm);
margin-bottom: var(--spacing-xl);
flex-wrap: wrap;
}
.filter-btn {
padding: var(--spacing-sm) var(--spacing-md);
border-radius: var(--radius);
border: 1px solid var(--border);
background: var(--surface);
text-decoration: none;
color: var(--text-secondary);
font-size: var(--font-size-sm);
transition: var(--transition);
}
.filter-btn:hover {
background: var(--background);
}
.filter-btn.active {
background: var(--primary);
border-color: var(--primary);
color: white;
}
.news-grid {
display: grid;
gap: var(--spacing-lg);
}
.news-card {
display: grid;
grid-template-columns: 100px 1fr;
gap: var(--spacing-lg);
background: var(--surface);
padding: var(--spacing-lg);
border-radius: var(--radius-lg);
box-shadow: var(--shadow);
text-decoration: none;
color: inherit;
transition: var(--transition);
}
.news-card:hover {
box-shadow: var(--shadow-md);
transform: translateY(-2px);
}
.news-image {
width: 100px;
height: 80px;
border-radius: var(--radius);
object-fit: cover;
background: var(--background);
}
.news-placeholder {
width: 100px;
height: 80px;
border-radius: var(--radius);
background: linear-gradient(135deg, #059669, #047857);
display: flex;
align-items: center;
justify-content: center;
color: white;
}
.news-source-initial {
font-size: 28px;
font-weight: 700;
opacity: 0.8;
text-transform: uppercase;
}
.news-content h3 {
font-size: var(--font-size-lg);
margin-bottom: var(--spacing-sm);
line-height: 1.4;
}
.news-content p {
font-size: var(--font-size-sm);
color: var(--text-secondary);
line-height: 1.6;
margin-bottom: var(--spacing-sm);
}
.news-meta {
display: flex;
gap: var(--spacing-md);
font-size: var(--font-size-xs);
color: var(--text-muted);
}
.pagination {
display: flex;
justify-content: center;
gap: var(--spacing-sm);
margin-top: var(--spacing-xl);
}
.pagination a,
.pagination span {
padding: var(--spacing-sm) var(--spacing-md);
border-radius: var(--radius);
text-decoration: none;
font-weight: 500;
}
.pagination a {
background: var(--surface);
color: var(--text-primary);
border: 1px solid var(--border);
}
.pagination a:hover {
background: var(--background);
}
.pagination span.current {
background: var(--primary);
color: white;
}
.empty-state {
text-align: center;
padding: var(--spacing-2xl);
color: var(--text-secondary);
background: var(--surface);
border-radius: var(--radius-lg);
}
@media (max-width: 768px) {
.news-card {
grid-template-columns: 1fr;
}
.news-image,
.news-placeholder {
width: 100%;
height: 150px;
}
}
</style>
{% endblock %}
{% block content %}
<div class="page-header">
<a href="{{ url_for('zopk_index') }}" class="text-muted" style="text-decoration: none; display: inline-flex; align-items: center; gap: var(--spacing-xs); margin-bottom: var(--spacing-sm);">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>
Powrót do ZOP Kaszubia
</a>
<h1>Aktualności</h1>
<p class="text-muted">{{ total }} artykułów o Zielonym Okręgu Przemysłowym Kaszubia</p>
</div>
{% if projects %}
<div class="filters">
<a href="{{ url_for('zopk_news_list') }}" class="filter-btn {% if not current_project %}active{% endif %}">Wszystkie</a>
{% for project in projects %}
<a href="{{ url_for('zopk_news_list', projekt=project.slug) }}" class="filter-btn {% if current_project == project.slug %}active{% endif %}">{{ project.name }}</a>
{% endfor %}
</div>
{% endif %}
{% if news_items %}
<div class="news-grid">
{% for news in news_items %}
<a href="{{ news.url }}" target="_blank" rel="noopener" class="news-card">
{% if news.image_url %}
<img src="{{ news.image_url }}" alt="" class="news-image" referrerpolicy="no-referrer"
onerror="this.onerror=null; this.style.display='none'; this.nextElementSibling.style.display='flex';">
<div class="news-placeholder" style="display:none;">
<span class="news-source-initial">{{ (news.source_domain or 'N')[0]|upper }}</span>
</div>
{% else %}
<div class="news-placeholder">
<span class="news-source-initial">{{ (news.source_domain or 'N')[0]|upper }}</span>
</div>
{% endif %}
<div class="news-content">
<h3>{{ news.title }}</h3>
{% if news.description %}
{% set clean_desc = news.description|striptags %}
<p>{{ clean_desc[:250] }}{% if clean_desc|length > 250 %}...{% endif %}</p>
{% endif %}
<div class="news-meta">
<span>{{ news.source_name or news.source_domain }}</span>
<span>{{ news.published_at|local_time('%d.%m.%Y') if news.published_at else '-' }}</span>
</div>
</div>
</a>
{% endfor %}
</div>
{% if total_pages > 1 %}
<nav class="pagination">
{% if page > 1 %}
<a href="{{ url_for('zopk_news_list', page=page-1, projekt=current_project) }}">&laquo; Poprzednia</a>
{% endif %}
{% for p in range(1, total_pages + 1) %}
{% if p == page %}
<span class="current">{{ p }}</span>
{% elif p <= 3 or p > total_pages - 3 or (p >= page - 1 and p <= page + 1) %}
<a href="{{ url_for('zopk_news_list', page=p, projekt=current_project) }}">{{ p }}</a>
{% elif p == 4 or p == total_pages - 3 %}
<span>...</span>
{% endif %}
{% endfor %}
{% if page < total_pages %}
<a href="{{ url_for('zopk_news_list', page=page+1, projekt=current_project) }}">Następna &raquo;</a>
{% endif %}
</nav>
{% endif %}
{% else %}
<div class="empty-state">
<p>Brak artykułów w wybranej kategorii.</p>
</div>
{% endif %}
{% endblock %}