fix(i18n): Fix Polish diacritics in audit templates and scraper encoding
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

- Fix ~190 hardcoded Polish strings missing diacritical characters
  across seo_audit.html, gbp_audit.html, social_audit.html
- Fix encoding issue in SEO scraper: requests defaults to ISO-8859-1
  when server omits charset, causing mojibake for UTF-8 pages.
  Now uses apparent_encoding detection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Maciej Pienczyn 2026-02-09 09:44:59 +01:00
parent 97e6c73c3f
commit 7802dcd5e1
4 changed files with 265 additions and 260 deletions

View File

@ -591,6 +591,9 @@ class SEOAuditor:
final_url = response.url final_url = response.url
if response.status_code == 200: if response.status_code == 200:
# Fix encoding: requests defaults to ISO-8859-1 when charset missing
if response.encoding and response.encoding.lower() == 'iso-8859-1':
response.encoding = response.apparent_encoding
html_content = response.text html_content = response.text
logger.info(f" Page fetched successfully ({load_time_ms}ms)") logger.info(f" Page fetched successfully ({load_time_ms}ms)")
else: else:
@ -607,6 +610,8 @@ class SEOAuditor:
http_status = response.status_code http_status = response.status_code
final_url = response.url final_url = response.url
if response.status_code == 200: if response.status_code == 200:
if response.encoding and response.encoding.lower() == 'iso-8859-1':
response.encoding = response.apparent_encoding
html_content = response.text html_content = response.text
except Exception as e2: except Exception as e2:
result['errors'].append(f'HTTP fallback failed: {str(e2)[:50]}') result['errors'].append(f'HTTP fallback failed: {str(e2)[:50]}')

View File

@ -913,7 +913,7 @@
<svg width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg> </svg>
<span>Analiza kompletnosci wizytowki Google dla lokalnego SEO</span> <span>Analiza kompletności wizytówki Google dla lokalnego SEO</span>
</div> </div>
</div> </div>
<div class="header-actions"> <div class="header-actions">
@ -929,7 +929,7 @@
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"> <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
<path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/> <path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/>
</svg> </svg>
Zobacz wizytowke Google Zobacz wizytówkę Google
</a> </a>
{% endif %} {% endif %}
{% if places_data and places_data.maps_links %} {% if places_data and places_data.maps_links %}
@ -938,7 +938,7 @@
<svg width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"/>
</svg> </svg>
Popros o opinie Poproś o opinię
</a> </a>
{% endif %} {% endif %}
{% if places_data.maps_links.directionsUri %} {% if places_data.maps_links.directionsUri %}
@ -946,7 +946,7 @@
<svg width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7"/>
</svg> </svg>
Pokaz trase Pokaż trasę
</a> </a>
{% endif %} {% endif %}
{% endif %} {% endif %}
@ -974,32 +974,32 @@
{% if places_data and places_data.open_now is not none %} {% if places_data and places_data.open_now is not none %}
<div style="display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; margin-bottom: 8px; {% if places_data.open_now %}background: #d1fae5; color: #065f46;{% else %}background: #fee2e2; color: #991b1b;{% endif %}"> <div style="display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; margin-bottom: 8px; {% if places_data.open_now %}background: #d1fae5; color: #065f46;{% else %}background: #fee2e2; color: #991b1b;{% endif %}">
<span style="width: 8px; height: 8px; border-radius: 50%; {% if places_data.open_now %}background: #10b981;{% else %}background: #ef4444;{% endif %}"></span> <span style="width: 8px; height: 8px; border-radius: 50%; {% if places_data.open_now %}background: #10b981;{% else %}background: #ef4444;{% endif %}"></span>
{% if places_data.open_now %}Otwarte{% else %}Zamkniete{% endif %} {% if places_data.open_now %}Otwarte{% else %}Zamknięte{% endif %}
<span style="font-weight: 400; font-size: 11px; opacity: 0.7;">(na moment audytu)</span> <span style="font-weight: 400; font-size: 11px; opacity: 0.7;">(na moment audytu)</span>
</div> </div>
{% endif %} {% endif %}
<div class="score-category" style="color: {% if score >= 90 %}#10b981{% elif score >= 70 %}#84cc16{% elif score >= 50 %}#f59e0b{% elif score >= 30 %}#f97316{% else %}#ef4444{% endif %};"> <div class="score-category" style="color: {% if score >= 90 %}#10b981{% elif score >= 70 %}#84cc16{% elif score >= 50 %}#f59e0b{% elif score >= 30 %}#f97316{% else %}#ef4444{% endif %};">
{% if score >= 90 %} {% if score >= 90 %}
Doskonaly profil GBP Doskonały profil GBP
{% elif score >= 70 %} {% elif score >= 70 %}
Dobry profil GBP Dobry profil GBP
{% elif score >= 50 %} {% elif score >= 50 %}
Przecietny profil GBP Przeciętny profil GBP
{% elif score >= 30 %} {% elif score >= 30 %}
Profil wymaga uzupelnienia Profil wymaga uzupełnienia
{% else %} {% else %}
Slaby profil GBP Słaby profil GBP
{% endif %} {% endif %}
</div> </div>
<p class="score-description"> <p class="score-description">
{% if audit.completeness_score >= 90 %} {% if audit.completeness_score >= 90 %}
Twoja wizytowka Google jest bardzo dobrze zoptymalizowana. Utrzymaj wysoki standard i monitoruj opinie klientow. Twoja wizytówka Google jest bardzo dobrze zoptymalizowana. Utrzymaj wysoki standard i monitoruj opinie klientów.
{% elif audit.completeness_score >= 70 %} {% elif audit.completeness_score >= 70 %}
Profil jest w dobrym stanie, ale sa obszary do poprawy. Skupienie sie na rekomendacjach zwiekszy widocznosc. Profil jest w dobrym stanie, ale są obszary do poprawy. Skupienie się na rekomendacjach zwiększy widoczność.
{% elif audit.completeness_score >= 50 %} {% elif audit.completeness_score >= 50 %}
Wizytowka wymaga uzupelnienia. Wdrozenie ponizszych rekomendacji znaczaco poprawi lokalne SEO. Wizytówka wymaga uzupełnienia. Wdrożenie poniższych rekomendacji znacząco poprawi lokalne SEO.
{% else %} {% else %}
Wizytowka jest niekompletna i traci potencjalnych klientow. Priorytetowo uzupelnij brakujace informacje. Wizytówka jest niekompletna i traci potencjalnych klientów. Priorytetowo uzupełnij brakujące informacje.
{% endif %} {% endif %}
</p> </p>
<div class="audit-meta"> <div class="audit-meta">
@ -1046,7 +1046,7 @@
<div style="font-size: var(--font-size-sm);"> <div style="font-size: var(--font-size-sm);">
<span style="color: var(--text-tertiary);">Poziom cen:</span> <span style="color: var(--text-tertiary);">Poziom cen:</span>
<span style="color: var(--text-primary);"> <span style="color: var(--text-primary);">
{% if places_data.price_level == 'PRICE_LEVEL_FREE' %}Bezplatne {% if places_data.price_level == 'PRICE_LEVEL_FREE' %}Bezpłatne
{% elif places_data.price_level == 'PRICE_LEVEL_INEXPENSIVE' %}$ Niedrogi {% elif places_data.price_level == 'PRICE_LEVEL_INEXPENSIVE' %}$ Niedrogi
{% elif places_data.price_level == 'PRICE_LEVEL_MODERATE' %}$$ Umiarkowany {% elif places_data.price_level == 'PRICE_LEVEL_MODERATE' %}$$ Umiarkowany
{% elif places_data.price_level == 'PRICE_LEVEL_EXPENSIVE' %}$$$ Drogi {% elif places_data.price_level == 'PRICE_LEVEL_EXPENSIVE' %}$$$ Drogi
@ -1066,9 +1066,9 @@
<svg width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"/>
</svg> </svg>
Porownanie NAP (Name, Address, Phone) Porównanie NAP (Name, Address, Phone)
</h3> </h3>
<p style="font-size: 12px; color: var(--text-tertiary); margin: 0 0 var(--spacing-sm) 0;">Spojnosc danych NAP wplywa na lokalne SEO. Roznice moga obnizac widocznosc w Google.</p> <p style="font-size: 12px; color: var(--text-tertiary); margin: 0 0 var(--spacing-sm) 0;">Spójność danych NAP wpływa na lokalne SEO. Różnice mogą obniżać widoczność w Google.</p>
<table style="width: 100%; border-collapse: collapse; font-size: var(--font-size-sm);"> <table style="width: 100%; border-collapse: collapse; font-size: var(--font-size-sm);">
<thead> <thead>
<tr style="border-bottom: 2px solid var(--border);"> <tr style="border-bottom: 2px solid var(--border);">
@ -1129,7 +1129,7 @@
<svg width="24" height="24" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg width="24" height="24" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"/>
</svg> </svg>
Status pol wizytowki Status pól wizytówki
</h2> </h2>
<div class="legend"> <div class="legend">
@ -1139,11 +1139,11 @@
</div> </div>
<div class="legend-item"> <div class="legend-item">
<div class="legend-dot partial"></div> <div class="legend-dot partial"></div>
<span>Czesciowe</span> <span>Częściowe</span>
</div> </div>
<div class="legend-item"> <div class="legend-item">
<div class="legend-dot missing"></div> <div class="legend-dot missing"></div>
<span>Brakujace</span> <span>Brakujące</span>
</div> </div>
</div> </div>
@ -1167,14 +1167,14 @@
'website': 'Strona WWW', 'website': 'Strona WWW',
'hours': 'Godziny otwarcia', 'hours': 'Godziny otwarcia',
'categories': 'Kategorie', 'categories': 'Kategorie',
'photos': 'Zdjecia', 'photos': 'Zdjęcia',
'description': 'Opis', 'description': 'Opis',
'services': 'Uslugi', 'services': 'Usługi',
'reviews': 'Opinie' 'reviews': 'Opinie'
} %} } %}
{% set status_names = { {% set status_names = {
'complete': 'Kompletne', 'complete': 'Kompletne',
'partial': 'Czesciowe', 'partial': 'Częściowe',
'missing': 'Brakuje' 'missing': 'Brakuje'
} %} } %}
@ -1212,11 +1212,11 @@
{% if field_name == 'reviews' %} {% if field_name == 'reviews' %}
<div class="field-scoring-info reviews-scoring"> <div class="field-scoring-info reviews-scoring">
{% if field_data.score == field_data.max_score %} {% if field_data.score == field_data.max_score %}
<span class="scoring-message success">🏆 Doskonale! Masz maksymalna punktacje za opinie</span> <span class="scoring-message success">🏆 Doskonale! Masz maksymalną punktację za opinie</span>
{% elif field_data.score == 0 %} {% elif field_data.score == 0 %}
<span class="scoring-message hint">💡 Popros zadowolonych klientow o opinie w Google</span> <span class="scoring-message hint">💡 Poproś zadowolonych klientów o opinie w Google</span>
{% else %} {% else %}
<span class="scoring-message progress">👍 Dobry poczatek! Zbierz wiecej opinii - cel to minimum 5</span> <span class="scoring-message progress">👍 Dobry początek! Zbierz więcej opinii - cel to minimum 5</span>
{% endif %} {% endif %}
{% if field_data.details and field_data.details.breakdown %} {% if field_data.details and field_data.details.breakdown %}
<div class="scoring-breakdown-line">{{ field_data.details.breakdown }}</div> <div class="scoring-breakdown-line">{{ field_data.details.breakdown }}</div>
@ -1254,7 +1254,7 @@
</span> </span>
</div> </div>
<div class="field-value"> <div class="field-value">
{{ audit.reviews_with_response or 0 }} z {{ (audit.reviews_with_response or 0) + (audit.reviews_without_response or 0) }} opinii z odpowiedzia {{ audit.reviews_with_response or 0 }} z {{ (audit.reviews_with_response or 0) + (audit.reviews_without_response or 0) }} opinii z odpowiedzią
</div> </div>
<div class="field-score"> <div class="field-score">
<div class="field-score-bar"> <div class="field-score-bar">
@ -1297,7 +1297,7 @@
{% if audit.review_keywords %} {% if audit.review_keywords %}
<div class="field-card complete"> <div class="field-card complete">
<div class="field-header"> <div class="field-header">
<span class="field-name">Slowa kluczowe z opinii</span> <span class="field-name">Słowa kluczowe z opinii</span>
</div> </div>
<div class="field-value"> <div class="field-value">
{% for keyword in audit.review_keywords[:8] %} {% for keyword in audit.review_keywords[:8] %}
@ -1342,7 +1342,7 @@
{% endif %} {% endif %}
{% if review.has_owner_response and review.owner_response_text %} {% if review.has_owner_response and review.owner_response_text %}
<div style="margin-top: var(--spacing-xs); padding: var(--spacing-xs) var(--spacing-sm); background: var(--bg-tertiary); border-left: 3px solid var(--primary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;"> <div style="margin-top: var(--spacing-xs); padding: var(--spacing-xs) var(--spacing-sm); background: var(--bg-tertiary); border-left: 3px solid var(--primary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;">
<div style="font-size: var(--font-size-xs); font-weight: 600; color: var(--text-primary); margin-bottom: 2px;">Odpowiedz wlasciciela:</div> <div style="font-size: var(--font-size-xs); font-weight: 600; color: var(--text-primary); margin-bottom: 2px;">Odpowiedź właściciela:</div>
<p style="font-size: var(--font-size-xs); color: var(--text-secondary); margin: 0; line-height: 1.4;">{{ review.owner_response_text[:200] }}{% if review.owner_response_text|length > 200 %}...{% endif %}</p> <p style="font-size: var(--font-size-xs); color: var(--text-secondary); margin: 0; line-height: 1.4;">{{ review.owner_response_text[:200] }}{% if review.owner_response_text|length > 200 %}...{% endif %}</p>
</div> </div>
{% endif %} {% endif %}
@ -1370,7 +1370,7 @@
<svg class="field-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg class="field-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg> </svg>
Sredni czas odpowiedzi Średni czas odpowiedzi
</span> </span>
<span class="field-status-badge {{ 'complete' if resp_days <= 2 else ('partial' if resp_days <= 7 else 'missing') }}"> <span class="field-status-badge {{ 'complete' if resp_days <= 2 else ('partial' if resp_days <= 7 else 'missing') }}">
{{ '%.1f'|format(resp_days) }} dni {{ '%.1f'|format(resp_days) }} dni
@ -1378,11 +1378,11 @@
</div> </div>
<div class="field-value"> <div class="field-value">
{% if resp_days <= 2 %} {% if resp_days <= 2 %}
Doskonaly czas reakcji na opinie klientow Doskonały czas reakcji na opinie klientów
{% elif resp_days <= 7 %} {% elif resp_days <= 7 %}
Dobry czas reakcji — postaraj sie odpowiadac w ciagu 1-2 dni Dobry czas reakcji — postaraj się odpowiadać w ciągu 1-2 dni
{% else %} {% else %}
Dlugi czas odpowiedzi — klienci oczekuja szybszej reakcji Długi czas odpowiedzi — klienci oczekują szybszej reakcji
{% endif %} {% endif %}
</div> </div>
</div> </div>
@ -1395,7 +1395,7 @@
<svg class="field-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg class="field-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z"/>
</svg> </svg>
Slowa kluczowe w opisie Słowa kluczowe w opisie
</span> </span>
</div> </div>
<div class="field-value"> <div class="field-value">
@ -1406,7 +1406,7 @@
{% if audit.keyword_density_score is not none %} {% if audit.keyword_density_score is not none %}
<div style="margin-top: var(--spacing-sm);"> <div style="margin-top: var(--spacing-sm);">
<div style="display: flex; justify-content: space-between; font-size: var(--font-size-xs); color: var(--text-tertiary); margin-bottom: 4px;"> <div style="display: flex; justify-content: space-between; font-size: var(--font-size-xs); color: var(--text-tertiary); margin-bottom: 4px;">
<span>Gestosc slow kluczowych</span> <span>Gęstość słów kluczowych</span>
<span>{{ audit.keyword_density_score }}/10</span> <span>{{ audit.keyword_density_score }}/10</span>
</div> </div>
<div style="height: 6px; background: var(--border); border-radius: 3px; overflow: hidden;"> <div style="height: 6px; background: var(--border); border-radius: 3px; overflow: hidden;">
@ -1427,15 +1427,15 @@
<svg width="24" height="24" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg width="24" height="24" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg> </svg>
Spojnosc NAP (Nazwa / Adres / Telefon) Spójność NAP (Nazwa / Adres / Telefon)
</h2> </h2>
{% if audit.nap_consistent %} {% if audit.nap_consistent %}
<div style="padding: var(--spacing-md); background: #dcfce7; border-radius: var(--radius); border-left: 4px solid #10b981; color: #166534;"> <div style="padding: var(--spacing-md); background: #dcfce7; border-radius: var(--radius); border-left: 4px solid #10b981; color: #166534;">
Dane NAP na wizytowce Google sa spojne z danymi na stronie WWW firmy. Dane NAP na wizytówce Google są spójne z danymi na stronie WWW firmy.
</div> </div>
{% else %} {% else %}
<div style="padding: var(--spacing-md); background: #fef3c7; border-radius: var(--radius); border-left: 4px solid #f59e0b; color: #92400e; margin-bottom: var(--spacing-md);"> <div style="padding: var(--spacing-md); background: #fef3c7; border-radius: var(--radius); border-left: 4px solid #f59e0b; color: #92400e; margin-bottom: var(--spacing-md);">
Wykryto roznice miedzy wizytowka Google a strona WWW firmy. Wykryto różnice między wizytówką Google a stroną WWW firmy.
</div> </div>
{% if audit.nap_issues %} {% if audit.nap_issues %}
<div class="fields-grid"> <div class="fields-grid">
@ -1443,7 +1443,7 @@
<div class="field-card missing"> <div class="field-card missing">
<div class="field-header"> <div class="field-header">
<span class="field-name">{{ issue.field|capitalize }}</span> <span class="field-name">{{ issue.field|capitalize }}</span>
<span class="field-status-badge missing">Rozbieznosc</span> <span class="field-status-badge missing">Rozbieżność</span>
</div> </div>
<div class="field-value"> <div class="field-value">
<div><strong>Google:</strong> {{ issue.gbp or 'Brak' }}</div> <div><strong>Google:</strong> {{ issue.gbp or 'Brak' }}</div>
@ -1464,7 +1464,7 @@
<svg width="24" height="24" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg width="24" height="24" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/>
</svg> </svg>
Aktywnosc i atrybuty Aktywność i atrybuty
</h2> </h2>
<div class="fields-grid"> <div class="fields-grid">
{% if audit.has_posts is not none %} {% if audit.has_posts is not none %}
@ -1474,7 +1474,7 @@
<span class="field-status-badge {{ 'complete' if audit.has_posts else 'missing' }}">{{ 'Aktywne' if audit.has_posts else 'Brak' }}</span> <span class="field-status-badge {{ 'complete' if audit.has_posts else 'missing' }}">{{ 'Aktywne' if audit.has_posts else 'Brak' }}</span>
</div> </div>
{% if audit.posts_count_30d %} {% if audit.posts_count_30d %}
<div class="field-value">{{ audit.posts_count_30d }} postow w ostatnich 30 dniach</div> <div class="field-value">{{ audit.posts_count_30d }} postów w ostatnich 30 dniach</div>
{% endif %} {% endif %}
</div> </div>
{% endif %} {% endif %}
@ -1506,7 +1506,7 @@
{% if audit.special_hours %} {% if audit.special_hours %}
<div style="margin-top: var(--spacing-xs); padding: var(--spacing-xs) var(--spacing-sm); background: var(--bg-tertiary); border-radius: var(--radius-sm); font-size: var(--font-size-xs); color: var(--text-secondary);"> <div style="margin-top: var(--spacing-xs); padding: var(--spacing-xs) var(--spacing-sm); background: var(--bg-tertiary); border-radius: var(--radius-sm); font-size: var(--font-size-xs); color: var(--text-secondary);">
{% for entry in audit.special_hours %} {% for entry in audit.special_hours %}
<div>{{ entry.get('date', '') }}: {% if entry.get('closed') %}Zamkniete{% else %}{{ entry.get('open', '') }} - {{ entry.get('close', '') }}{% endif %}</div> <div>{{ entry.get('date', '') }}: {% if entry.get('closed') %}Zamknięte{% else %}{{ entry.get('open', '') }} - {{ entry.get('close', '') }}{% endif %}</div>
{% endfor %} {% endfor %}
</div> </div>
{% endif %} {% endif %}
@ -1525,14 +1525,14 @@
{% if audit.cover_photo_present is not none %} {% if audit.cover_photo_present is not none %}
<div style="display: flex; align-items: center; gap: var(--spacing-xs); padding: var(--spacing-xs) var(--spacing-sm); border-radius: var(--radius); background: {{ '#dcfce7' if audit.cover_photo_present else '#fee2e2' }};"> <div style="display: flex; align-items: center; gap: var(--spacing-xs); padding: var(--spacing-xs) var(--spacing-sm); border-radius: var(--radius); background: {{ '#dcfce7' if audit.cover_photo_present else '#fee2e2' }};">
<span style="color: {{ '#10b981' if audit.cover_photo_present else '#ef4444' }};">{{ '&#10003;' if audit.cover_photo_present else '&#10007;' }}</span> <span style="color: {{ '#10b981' if audit.cover_photo_present else '#ef4444' }};">{{ '&#10003;' if audit.cover_photo_present else '&#10007;' }}</span>
<span style="font-size: var(--font-size-sm);">Zdjecie w tle</span> <span style="font-size: var(--font-size-sm);">Zdjęcie w tle</span>
</div> </div>
{% endif %} {% endif %}
</div> </div>
{% endif %} {% endif %}
{% if audit.photo_categories %} {% if audit.photo_categories %}
<h3 style="font-size: var(--font-size-base); font-weight: 600; margin-top: var(--spacing-lg); margin-bottom: var(--spacing-sm);">Kategorie zdjec</h3> <h3 style="font-size: var(--font-size-base); font-weight: 600; margin-top: var(--spacing-lg); margin-bottom: var(--spacing-sm);">Kategorie zdjęć</h3>
<div style="display: flex; flex-wrap: wrap; gap: var(--spacing-sm);"> <div style="display: flex; flex-wrap: wrap; gap: var(--spacing-sm);">
{% for category, count in audit.photo_categories.items() %} {% for category, count in audit.photo_categories.items() %}
<span style="padding: var(--spacing-xs) var(--spacing-sm); background: var(--bg-tertiary); border-radius: var(--radius); font-size: var(--font-size-sm); color: var(--text-secondary);"> <span style="padding: var(--spacing-xs) var(--spacing-sm); background: var(--bg-tertiary); border-radius: var(--radius); font-size: var(--font-size-sm); color: var(--text-secondary);">
@ -1611,7 +1611,7 @@
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg> </svg>
<h3>Jak dziala wizytowka Google?</h3> <h3>Jak działa wizytówka Google?</h3>
</div> </div>
<div class="info-cards"> <div class="info-cards">
@ -1622,12 +1622,12 @@
</svg> </svg>
</div> </div>
<h4>Wyszukiwarka Google</h4> <h4>Wyszukiwarka Google</h4>
<p>Gdy ktos szuka Twojej firmy w Google, po prawej stronie wynikow pojawia sie <strong>Panel Wiedzy</strong> (Knowledge Panel).</p> <p>Gdy ktoś szuka Twojej firmy w Google, po prawej stronie wyników pojawia się <strong>Panel Wiedzy</strong> (Knowledge Panel).</p>
<ul> <ul>
<li>Nazwa i logo firmy</li> <li>Nazwa i logo firmy</li>
<li>Adres i godziny otwarcia</li> <li>Adres i godziny otwarcia</li>
<li>Ocena i opinie</li> <li>Ocena i opinie</li>
<li>Przycisk "Zadzwon" i "Trasa"</li> <li>Przycisk "Zadzwoń" i "Trasa"</li>
</ul> </ul>
</div> </div>
@ -1639,12 +1639,12 @@
</svg> </svg>
</div> </div>
<h4>Mapy Google</h4> <h4>Mapy Google</h4>
<p>W aplikacji Google Maps Twoja firma ma <strong>pelna wizytowke</strong> z dodatkowymi funkcjami.</p> <p>W aplikacji Google Maps Twoja firma ma <strong>pełną wizytówkę</strong> z dodatkowymi funkcjami.</p>
<ul> <ul>
<li>Zdjecia i wirtualny spacer</li> <li>Zdjęcia i wirtualny spacer</li>
<li>Wszystkie opinie klientow</li> <li>Wszystkie opinie klientów</li>
<li>Pytania i odpowiedzi (Q&A)</li> <li>Pytania i odpowiedzi (Q&A)</li>
<li>Posty i aktualnosci firmy</li> <li>Posty i aktualności firmy</li>
</ul> </ul>
</div> </div>
@ -1655,13 +1655,13 @@
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/>
</svg> </svg>
</div> </div>
<h4>Jak zarzadzac?</h4> <h4>Jak zarządzać?</h4>
<p>Wszystkie dane edytujesz w <strong>jednym miejscu</strong> - panelu Google Business Profile.</p> <p>Wszystkie dane edytujesz w <strong>jednym miejscu</strong> panelu Google Business Profile.</p>
<ul> <ul>
<li>Wejdz na <a href="https://business.google.com" target="_blank" rel="noopener">business.google.com</a></li> <li>Wejdz na <a href="https://business.google.com" target="_blank" rel="noopener">business.google.com</a></li>
<li>Zaloguj sie kontem Google</li> <li>Zaloguj się kontem Google</li>
<li>Edytuj dane - zaktualizuja sie wszedzie</li> <li>Edytuj dane — zaktualizują się wszędzie</li>
<li>Odpowiadaj na opinie klientow</li> <li>Odpowiadaj na opinie klientów</li>
</ul> </ul>
</div> </div>
</div> </div>
@ -1671,10 +1671,10 @@
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg> </svg>
<p> <p>
<strong>Jedno zrodlo, wiele widokow.</strong> <strong>Jedno źródło, wiele widoków.</strong>
Panel Wiedzy w wyszukiwarce i wizytowka w Mapach Google to <strong>te same dane</strong> wyswietlane w roznych miejscach. Panel Wiedzy w wyszukiwarce i wizytówka w Mapach Google to <strong>te same dane</strong> wyświetlane w różnych miejscach.
Wystarczy, ze zarzadzasz profilem w <a href="https://business.google.com" target="_blank" rel="noopener">Google Business Profile</a> - Wystarczy, że zarządzasz profilem w <a href="https://business.google.com" target="_blank" rel="noopener">Google Business Profile</a>
zmiany automatycznie pojawia sie wszedzie: w wyszukiwarce, Mapach, Asystencie Google i wynikach lokalnych. zmiany automatycznie pojawią się wszędzie: w wyszukiwarce, Mapach, Asystencie Google i wynikach lokalnych.
</p> </p>
</div> </div>
</div> </div>
@ -1698,7 +1698,7 @@
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"/>
</svg> </svg>
<h2>Brak danych audytu</h2> <h2>Brak danych audytu</h2>
<p>Nie przeprowadzono jeszcze audytu wizytowki Google dla tej firmy. Uruchom audyt, aby sprawdzic kompletnosc profilu.</p> <p>Nie przeprowadzono jeszcze audytu wizytówki Google dla tej firmy. Uruchom audyt, aby sprawdzić kompletność profilu.</p>
{% if can_audit %} {% if can_audit %}
<button class="btn btn-primary" onclick="runAudit()"> <button class="btn btn-primary" onclick="runAudit()">
<svg width="20" height="20" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg width="20" height="20" fill="none" stroke="currentColor" viewBox="0 0 24 24">
@ -1715,7 +1715,7 @@
<div class="loading-content"> <div class="loading-content">
<div class="loading-header"> <div class="loading-header">
<h3>Audyt Google Business Profile</h3> <h3>Audyt Google Business Profile</h3>
<p>Pobieram dane z Google i analizuje wizytowke...</p> <p>Pobieram dane z Google i analizuję wizytówkę...</p>
</div> </div>
<div class="loading-steps" id="loadingSteps"> <div class="loading-steps" id="loadingSteps">
<!-- Phase 1: Find Place --> <!-- Phase 1: Find Place -->
@ -1749,7 +1749,7 @@
<circle cx="12" cy="12" r="10" stroke-width="2"/> <circle cx="12" cy="12" r="10" stroke-width="2"/>
</svg> </svg>
</div> </div>
<span class="step-text pending">Zdjecia <span class="source-tag google">Google</span></span> <span class="step-text pending">Zdjęcia <span class="source-tag google">Google</span></span>
</div> </div>
<div class="loading-step step-detail" id="step-hours"> <div class="loading-step step-detail" id="step-hours">
<div class="step-icon pending"> <div class="step-icon pending">
@ -1801,7 +1801,7 @@
<circle cx="12" cy="12" r="10" stroke-width="2"/> <circle cx="12" cy="12" r="10" stroke-width="2"/>
</svg> </svg>
</div> </div>
<span class="step-text pending">Analizuje kompletnosc profilu</span> <span class="step-text pending">Analizuję kompletność profilu</span>
</div> </div>
</div> </div>
</div> </div>
@ -1819,7 +1819,7 @@
<div class="modal-title" id="modalTitle">Informacja</div> <div class="modal-title" id="modalTitle">Informacja</div>
</div> </div>
<div class="modal-body" id="modalBody"> <div class="modal-body" id="modalBody">
Tresc informacji. Treść informacji.
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button class="btn btn-primary" onclick="closeInfoModal()">OK</button> <button class="btn btn-primary" onclick="closeInfoModal()">OK</button>
@ -1844,7 +1844,7 @@ const allSteps = [
const detailLabels = { const detailLabels = {
'step-rating': 'Ocena <span class="source-tag google">Google</span>', 'step-rating': 'Ocena <span class="source-tag google">Google</span>',
'step-reviews': 'Liczba opinii <span class="source-tag google">Google</span>', 'step-reviews': 'Liczba opinii <span class="source-tag google">Google</span>',
'step-photos': 'Zdjecia <span class="source-tag google">Google</span>', 'step-photos': 'Zdjęcia <span class="source-tag google">Google</span>',
'step-hours': 'Godziny otwarcia <span class="source-tag google">Google</span>', 'step-hours': 'Godziny otwarcia <span class="source-tag google">Google</span>',
'step-phone': 'Numer telefonu <span class="source-tag google">Google</span>', 'step-phone': 'Numer telefonu <span class="source-tag google">Google</span>',
'step-website': 'Strona WWW <span class="source-tag google">Google</span>', 'step-website': 'Strona WWW <span class="source-tag google">Google</span>',
@ -1933,7 +1933,7 @@ async function updateDetailSteps(googleData) {
const delay = 150; // ms between each step animation const delay = 150; // ms between each step animation
// Rating // Rating
updateStep('step-rating', 'in_progress', 'Pobieram ocene...'); updateStep('step-rating', 'in_progress', 'Pobieram ocenę...');
await new Promise(r => setTimeout(r, delay)); await new Promise(r => setTimeout(r, delay));
if (googleData.google_rating) { if (googleData.google_rating) {
updateStep('step-rating', 'complete', `Ocena: ${googleData.google_rating}/5`); updateStep('step-rating', 'complete', `Ocena: ${googleData.google_rating}/5`);
@ -1951,12 +1951,12 @@ async function updateDetailSteps(googleData) {
} }
// Photos // Photos
updateStep('step-photos', 'in_progress', 'Pobieram zdjecia...'); updateStep('step-photos', 'in_progress', 'Pobieram zdjęcia...');
await new Promise(r => setTimeout(r, delay)); await new Promise(r => setTimeout(r, delay));
if (googleData.google_photos_count) { if (googleData.google_photos_count) {
updateStep('step-photos', 'complete', `Zdjecia: ${googleData.google_photos_count}`); updateStep('step-photos', 'complete', `Zdjęcia: ${googleData.google_photos_count}`);
} else { } else {
updateStep('step-photos', 'missing', 'Brak zdjec'); updateStep('step-photos', 'missing', 'Brak zdjęć');
} }
// Opening hours // Opening hours
@ -1978,7 +1978,7 @@ async function updateDetailSteps(googleData) {
} }
// Website // Website
updateStep('step-website', 'in_progress', 'Pobieram strone WWW...'); updateStep('step-website', 'in_progress', 'Pobieram stronę WWW...');
await new Promise(r => setTimeout(r, delay)); await new Promise(r => setTimeout(r, delay));
if (googleData.google_website) { if (googleData.google_website) {
// Truncate long URLs // Truncate long URLs
@ -1994,8 +1994,8 @@ async function updateDetailSteps(googleData) {
if (googleData.google_business_status) { if (googleData.google_business_status) {
const statusMap = { const statusMap = {
'OPERATIONAL': 'Czynna', 'OPERATIONAL': 'Czynna',
'CLOSED_TEMPORARILY': 'Tymczasowo zamknieta', 'CLOSED_TEMPORARILY': 'Tymczasowo zamknięta',
'CLOSED_PERMANENTLY': 'Zamknieta na stale' 'CLOSED_PERMANENTLY': 'Zamknięta na stałe'
}; };
const statusText = statusMap[googleData.google_business_status] || googleData.google_business_status; const statusText = statusMap[googleData.google_business_status] || googleData.google_business_status;
updateStep('step-status', 'complete', `Status: ${statusText}`); updateStep('step-status', 'complete', `Status: ${statusText}`);
@ -2047,30 +2047,30 @@ async function runAudit() {
// Mark detail steps as skipped if no Google data // Mark detail steps as skipped if no Google data
const detailStepIds = ['step-rating', 'step-reviews', 'step-photos', 'step-hours', 'step-phone', 'step-website', 'step-status']; const detailStepIds = ['step-rating', 'step-reviews', 'step-photos', 'step-hours', 'step-phone', 'step-website', 'step-status'];
for (const stepId of detailStepIds) { for (const stepId of detailStepIds) {
updateStep(stepId, 'skipped', detailLabels[stepId] + ' (pominiety)'); updateStep(stepId, 'skipped', detailLabels[stepId] + ' (pominięty)');
} }
} }
// Update audit step // Update audit step
if (response.ok && data.success) { if (response.ok && data.success) {
updateStep('step-save', 'complete', 'Dane zapisane'); updateStep('step-save', 'complete', 'Dane zapisane');
updateStep('step-audit', 'complete', `Analiza zakonczona: ${data.audit?.total_score || 0}/100`); updateStep('step-audit', 'complete', `Analiza zakończona: ${data.audit?.total_score || 0}/100`);
// Wait 5 seconds so user can read the progress steps // Wait 5 seconds so user can read the progress steps
await new Promise(r => setTimeout(r, 5000)); await new Promise(r => setTimeout(r, 5000));
hideLoading(); hideLoading();
showInfoModal('Audyt zakonczony', 'Audyt wizytowki Google zostal zakonczony pomyslnie. Strona zostanie odswiezona.', true); showInfoModal('Audyt zakończony', 'Audyt wizytówki Google został zakończony pomyślnie. Strona zostanie odświeżona.', true);
setTimeout(() => location.reload(), 1500); setTimeout(() => location.reload(), 1500);
} else { } else {
updateStep('step-audit', 'error', 'Blad audytu'); updateStep('step-audit', 'error', 'Błąd audytu');
// Wait 5 seconds so user can see what failed // Wait 5 seconds so user can see what failed
await new Promise(r => setTimeout(r, 5000)); await new Promise(r => setTimeout(r, 5000));
hideLoading(); hideLoading();
showInfoModal('Blad', data.error || 'Wystapil nieznany blad podczas audytu.', false); showInfoModal('Błąd', data.error || 'Wystąpił nieznany błąd podczas audytu.', false);
if (btn) btn.disabled = false; if (btn) btn.disabled = false;
} }
} catch (error) { } catch (error) {
hideLoading(); hideLoading();
showInfoModal('Blad polaczenia', 'Nie udalo sie polaczyc z serwerem: ' + error.message, false); showInfoModal('Błąd połączenia', 'Nie udało się połączyć z serwerem: ' + error.message, false);
if (btn) btn.disabled = false; if (btn) btn.disabled = false;
} }
} }
@ -2137,9 +2137,9 @@ async function runAIAnalysis(force) {
const results = document.getElementById('aiResults'); const results = document.getElementById('aiResults');
results.innerHTML = ` results.innerHTML = `
<div style="background: #fef2f2; border: 1px solid #fecaca; padding: var(--spacing-lg); border-radius: var(--radius-lg); text-align: center;"> <div style="background: #fef2f2; border: 1px solid #fecaca; padding: var(--spacing-lg); border-radius: var(--radius-lg); text-align: center;">
<p style="color: #dc2626; font-weight: 600; margin-bottom: var(--spacing-sm);">Blad analizy AI</p> <p style="color: #dc2626; font-weight: 600; margin-bottom: var(--spacing-sm);">Błąd analizy AI</p>
<p style="color: #991b1b; font-size: var(--font-size-sm);">${escapeHtml(data.error || 'Nieznany blad')}</p> <p style="color: #991b1b; font-size: var(--font-size-sm);">${escapeHtml(data.error || 'Nieznany błąd')}</p>
<button class="btn btn-outline btn-sm" onclick="runAIAnalysis()" style="margin-top: var(--spacing-md);">Sprobuj ponownie</button> <button class="btn btn-outline btn-sm" onclick="runAIAnalysis()" style="margin-top: var(--spacing-md);">Spróbuj ponownie</button>
</div>`; </div>`;
results.style.display = 'block'; results.style.display = 'block';
} }
@ -2151,9 +2151,9 @@ async function runAIAnalysis(force) {
const results = document.getElementById('aiResults'); const results = document.getElementById('aiResults');
results.innerHTML = ` results.innerHTML = `
<div style="background: #fef2f2; border: 1px solid #fecaca; padding: var(--spacing-lg); border-radius: var(--radius-lg); text-align: center;"> <div style="background: #fef2f2; border: 1px solid #fecaca; padding: var(--spacing-lg); border-radius: var(--radius-lg); text-align: center;">
<p style="color: #dc2626; font-weight: 600; margin-bottom: var(--spacing-sm);">Blad polaczenia</p> <p style="color: #dc2626; font-weight: 600; margin-bottom: var(--spacing-sm);">Błąd połączenia</p>
<p style="color: #991b1b; font-size: var(--font-size-sm);">${escapeHtml(error.message)}</p> <p style="color: #991b1b; font-size: var(--font-size-sm);">${escapeHtml(error.message)}</p>
<button class="btn btn-outline btn-sm" onclick="runAIAnalysis()" style="margin-top: var(--spacing-md);">Sprobuj ponownie</button> <button class="btn btn-outline btn-sm" onclick="runAIAnalysis()" style="margin-top: var(--spacing-md);">Spróbuj ponownie</button>
</div>`; </div>`;
results.style.display = 'block'; results.style.display = 'block';
} }
@ -2177,7 +2177,7 @@ function renderAIResults(data) {
actionsList.innerHTML = ''; actionsList.innerHTML = '';
const actions = data.actions || []; const actions = data.actions || [];
const priorityLabels = {critical: 'KRYTYCZNE', high: 'WYSOKI', medium: 'SREDNI', low: 'NISKI'}; const priorityLabels = {critical: 'KRYTYCZNE', high: 'WYSOKI', medium: 'ŚREDNI', low: 'NISKI'};
actions.forEach((action, idx) => { actions.forEach((action, idx) => {
const impact = action.impact_score || 5; const impact = action.impact_score || 5;
@ -2188,25 +2188,25 @@ function renderAIResults(data) {
card.innerHTML = ` card.innerHTML = `
<div style="display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--spacing-sm); flex-wrap: wrap; gap: var(--spacing-xs);"> <div style="display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--spacing-sm); flex-wrap: wrap; gap: var(--spacing-xs);">
<div style="display: flex; align-items: center; gap: var(--spacing-sm);"> <div style="display: flex; align-items: center; gap: var(--spacing-sm);">
<span class="ai-priority-badge ${action.priority || 'medium'}">${priorityLabels[action.priority] || 'SREDNI'}</span> <span class="ai-priority-badge ${action.priority || 'medium'}">${priorityLabels[action.priority] || 'ŚREDNI'}</span>
<span class="ai-action-title" style="font-weight: 600; color: var(--text-primary);">${escapeHtml(action.title || '')}</span> <span class="ai-action-title" style="font-weight: 600; color: var(--text-primary);">${escapeHtml(action.title || '')}</span>
</div> </div>
</div> </div>
<p style="color: var(--text-secondary); font-size: var(--font-size-sm); margin-bottom: var(--spacing-sm);">${escapeHtml(action.description || '')}</p> <p style="color: var(--text-secondary); font-size: var(--font-size-sm); margin-bottom: var(--spacing-sm);">${escapeHtml(action.description || '')}</p>
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-md); margin-bottom: var(--spacing-sm);"> <div style="display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-md); margin-bottom: var(--spacing-sm);">
<div> <div>
<div style="font-size: var(--font-size-xs); color: var(--text-tertiary); margin-bottom: 2px;">Wplyw: ${impact}/10</div> <div style="font-size: var(--font-size-xs); color: var(--text-tertiary); margin-bottom: 2px;">Wpływ: ${impact}/10</div>
<div class="ai-score-bar"><div class="ai-score-bar-fill impact" style="width: ${impact * 10}%;"></div></div> <div class="ai-score-bar"><div class="ai-score-bar-fill impact" style="width: ${impact * 10}%;"></div></div>
</div> </div>
<div> <div>
<div style="font-size: var(--font-size-xs); color: var(--text-tertiary); margin-bottom: 2px;">Wysilek: ${effort}/10</div> <div style="font-size: var(--font-size-xs); color: var(--text-tertiary); margin-bottom: 2px;">Wysiłek: ${effort}/10</div>
<div class="ai-score-bar"><div class="ai-score-bar-fill effort" style="width: ${effort * 10}%;"></div></div> <div class="ai-score-bar"><div class="ai-score-bar-fill effort" style="width: ${effort * 10}%;"></div></div>
</div> </div>
</div> </div>
<div class="ai-action-buttons"> <div class="ai-action-buttons">
<button class="btn btn-outline btn-sm" onclick="generateContent('${action.action_type}', ${idx})"> <button class="btn btn-outline btn-sm" onclick="generateContent('${action.action_type}', ${idx})">
<svg width="14" height="14" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"/></svg> <svg width="14" height="14" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"/></svg>
Wygeneruj tresc Wygeneruj treść
</button> </button>
<button class="btn btn-outline btn-sm" onclick="markAction(${idx}, 'implemented')" style="color: #10b981; border-color: #10b981;"> <button class="btn btn-outline btn-sm" onclick="markAction(${idx}, 'implemented')" style="color: #10b981; border-color: #10b981;">
<svg width="14" height="14" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/></svg> <svg width="14" height="14" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/></svg>
@ -2234,7 +2234,7 @@ async function generateContent(actionType, idx) {
container.style.display = container.style.display === 'none' ? 'block' : 'none'; container.style.display = container.style.display === 'none' ? 'block' : 'none';
return; return;
} }
container.innerHTML = '<div style="padding: var(--spacing-md); color: var(--text-secondary); font-size: var(--font-size-sm);">Generowanie tresci...</div>'; container.innerHTML = '<div style="padding: var(--spacing-md); color: var(--text-secondary); font-size: var(--font-size-sm);">Generowanie treści...</div>';
container.style.display = 'block'; container.style.display = 'block';
try { try {
const response = await fetch('/api/audit/generate-content', { const response = await fetch('/api/audit/generate-content', {
@ -2259,7 +2259,7 @@ async function generateContent(actionType, idx) {
} else { } else {
container.innerHTML = ` container.innerHTML = `
<div style="padding: var(--spacing-sm); background: #fef2f2; border-radius: var(--radius-sm); margin-top: var(--spacing-sm);"> <div style="padding: var(--spacing-sm); background: #fef2f2; border-radius: var(--radius-sm); margin-top: var(--spacing-sm);">
<span style="color: #dc2626;">${escapeHtml(data.error || 'Blad generowania')}</span> <span style="color: #dc2626;">${escapeHtml(data.error || 'Błąd generowania')}</span>
<button class="btn btn-outline btn-sm" onclick="generateContent('${actionType}', ${idx})" style="margin-left: var(--spacing-sm);">Ponow</button> <button class="btn btn-outline btn-sm" onclick="generateContent('${actionType}', ${idx})" style="margin-left: var(--spacing-sm);">Ponow</button>
</div>`; </div>`;
} }

View File

@ -611,7 +611,7 @@
<svg width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/>
</svg> </svg>
<span>Analiza SEO i wydajnosci strony WWW (Google PageSpeed Insights)</span> <span>Analiza SEO i wydajności strony WWW (Google PageSpeed Insights)</span>
</div> </div>
{% if company.website %} {% if company.website %}
<div class="website-url"> <div class="website-url">
@ -652,31 +652,31 @@
<div class="score-details"> <div class="score-details">
<div class="score-category" style="color: {% if score >= 90 %}#10b981{% elif score >= 70 %}#84cc16{% elif score >= 50 %}#f59e0b{% elif score >= 30 %}#f97316{% else %}#ef4444{% endif %};"> <div class="score-category" style="color: {% if score >= 90 %}#10b981{% elif score >= 70 %}#84cc16{% elif score >= 50 %}#f59e0b{% elif score >= 30 %}#f97316{% else %}#ef4444{% endif %};">
{% if score >= 90 %} {% if score >= 90 %}
Doskonaly wynik SEO (Google Lighthouse) Doskonały wynik SEO (Google Lighthouse)
{% elif score >= 70 %} {% elif score >= 70 %}
Dobry wynik SEO (Google Lighthouse) Dobry wynik SEO (Google Lighthouse)
{% elif score >= 50 %} {% elif score >= 50 %}
Przecietny wynik SEO (Google Lighthouse) Przeciętny wynik SEO (Google Lighthouse)
{% elif score >= 30 %} {% elif score >= 30 %}
Wynik SEO wymaga poprawy (Google Lighthouse) Wynik SEO wymaga poprawy (Google Lighthouse)
{% else %} {% else %}
Slaby wynik SEO (Google Lighthouse) Słaby wynik SEO (Google Lighthouse)
{% endif %} {% endif %}
</div> </div>
<p class="score-description"> <p class="score-description">
{% if score >= 90 %} {% if score >= 90 %}
Strona jest bardzo dobrze zoptymalizowana pod katem SEO. Utrzymuj wysoki standard i monitoruj zmiany. Strona jest bardzo dobrze zoptymalizowana pod kątem SEO. Utrzymuj wysoki standard i monitoruj zmiany.
{% elif score >= 70 %} {% elif score >= 70 %}
Strona ma dobra optymalizacje SEO, ale sa obszary do poprawy. Skup sie na wydajnosci i dostepnosci. Strona ma dobrą optymalizację SEO, ale są obszary do poprawy. Skup się na wydajności i dostępności.
{% elif score >= 50 %} {% elif score >= 50 %}
Strona wymaga pracy nad optymalizacja SEO. Warto poprawic wydajnosc i dostepnosc. Strona wymaga pracy nad optymalizacją SEO. Warto poprawić wydajność i dostępność.
{% else %} {% else %}
Strona ma powazne problemy z SEO. Priorytetowo popraw wydajnosc i optymalizacje. Strona ma poważne problemy z SEO. Priorytetowo popraw wydajność i optymalizację.
{% endif %} {% endif %}
</p> </p>
<p style="font-size: var(--font-size-xs); color: var(--text-tertiary); margin-top: var(--spacing-xs);"> <p style="font-size: var(--font-size-xs); color: var(--text-tertiary); margin-top: var(--spacing-xs);">
Wynik pochodzi z Google PageSpeed Insights i ocenia techniczne aspekty SEO (meta tagi, robots.txt, indeksowalnosc). Wynik pochodzi z Google PageSpeed Insights i ocenia techniczne aspekty SEO (meta tagi, robots.txt, indeksowalność).
Pelna ocena SEO, wlaczajac lokalne SEO i widocznosc, jest dostepna w analizie AI ponizej. Pełna ocena SEO, włączając lokalne SEO i widoczność, jest dostępna w analizie AI poniżej.
</p> </p>
<div class="audit-meta"> <div class="audit-meta">
<div class="audit-meta-item"> <div class="audit-meta-item">
@ -702,7 +702,7 @@
<svg width="24" height="24" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg width="24" height="24" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"/>
</svg> </svg>
Szczegolowe metryki Szczegółowe metryki
</h2> </h2>
<div class="metrics-grid"> <div class="metrics-grid">
@ -728,7 +728,7 @@
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/>
</svg> </svg>
</div> </div>
<div class="metric-name">Wydajnosc</div> <div class="metric-name">Wydajność</div>
<div class="metric-value {{ perf_class }}">{{ perf if perf else '-' }}</div> <div class="metric-value {{ perf_class }}">{{ perf if perf else '-' }}</div>
</div> </div>
@ -742,7 +742,7 @@
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"/>
</svg> </svg>
</div> </div>
<div class="metric-name">Dostepnosc</div> <div class="metric-name">Dostępność</div>
<div class="metric-value {{ acc_class }}">{{ acc if acc else '-' }}</div> <div class="metric-value {{ acc_class }}">{{ acc if acc else '-' }}</div>
</div> </div>
@ -767,60 +767,60 @@
{# --- KRYTYCZNE --- #} {# --- KRYTYCZNE --- #}
{% if seo_data.has_ssl == false %} {% if seo_data.has_ssl == false %}
{% set _ = findings_critical.append({'title': 'Brak certyfikatu SSL', 'desc': 'Strona nie jest zabezpieczona protokolem HTTPS. Zainstaluj certyfikat SSL.'}) %} {% set _ = findings_critical.append({'title': 'Brak certyfikatu SSL', 'desc': 'Strona nie jest zabezpieczona protokołem HTTPS. Zainstaluj certyfikat SSL.'}) %}
{% endif %} {% endif %}
{% if seo_data.seo_score is not none and seo_data.seo_score < 30 %} {% if seo_data.seo_score is not none and seo_data.seo_score < 30 %}
{% set _ = findings_critical.append({'title': 'Bardzo niski wynik SEO (' ~ seo_data.seo_score ~ '/100)', 'desc': 'Wynik SEO ponizej 30/100 wymaga pilnej interwencji.'}) %} {% set _ = findings_critical.append({'title': 'Bardzo niski wynik SEO (' ~ seo_data.seo_score ~ '/100)', 'desc': 'Wynik SEO poniżej 30/100 wymaga pilnej interwencji.'}) %}
{% endif %} {% endif %}
{% if seo_data.is_indexable == false %} {% if seo_data.is_indexable == false %}
{% set _ = findings_critical.append({'title': 'Strona zablokowana przed indeksowaniem', 'desc': 'Wyszukiwarki nie moga indeksowac strony. Sprawdz meta robots i robots.txt.'}) %} {% set _ = findings_critical.append({'title': 'Strona zablokowana przed indeksowaniem', 'desc': 'Wyszukiwarki nie mogą indeksować strony. Sprawdź meta robots i robots.txt.'}) %}
{% endif %} {% endif %}
{% if seo_data.performance_score is not none and seo_data.performance_score < 30 %} {% if seo_data.performance_score is not none and seo_data.performance_score < 30 %}
{% set _ = findings_critical.append({'title': 'Krytycznie niska wydajnosc (' ~ seo_data.performance_score ~ '/100)', 'desc': 'Strona laduje sie bardzo wolno. Zoptymalizuj obrazy i kod.'}) %} {% set _ = findings_critical.append({'title': 'Krytycznie niska wydajność (' ~ seo_data.performance_score ~ '/100)', 'desc': 'Strona ładuje się bardzo wolno. Zoptymalizuj obrazy i kod.'}) %}
{% endif %} {% endif %}
{# --- WAZNE --- #} {# --- WAŻNE --- #}
{% if not seo_data.meta_title %} {% if not seo_data.meta_title %}
{% set _ = findings_important.append({'title': 'Brak meta title', 'desc': 'Strona nie ma ustawionego tytulu. Dodaj meta title (50-60 znakow).'}) %} {% set _ = findings_important.append({'title': 'Brak meta title', 'desc': 'Strona nie ma ustawionego tytułu. Dodaj meta title (50-60 znaków).'}) %}
{% elif seo_data.meta_title|length < 30 %} {% elif seo_data.meta_title|length < 30 %}
{% set _ = findings_important.append({'title': 'Meta title za krotki (' ~ seo_data.meta_title|length ~ ' zn.)', 'desc': 'Optymalnie 50-60 znakow. Aktualny tytul jest zbyt krotki.'}) %} {% set _ = findings_important.append({'title': 'Meta title za krótki (' ~ seo_data.meta_title|length ~ ' zn.)', 'desc': 'Optymalnie 50-60 znaków. Aktualny tytuł jest zbyt krótki.'}) %}
{% elif seo_data.meta_title|length > 70 %} {% elif seo_data.meta_title|length > 70 %}
{% set _ = findings_important.append({'title': 'Meta title za dlugi (' ~ seo_data.meta_title|length ~ ' zn.)', 'desc': 'Optymalnie 50-60 znakow. Aktualny tytul jest zbyt dlugi i zostanie obciety w wynikach.'}) %} {% set _ = findings_important.append({'title': 'Meta title za długi (' ~ seo_data.meta_title|length ~ ' zn.)', 'desc': 'Optymalnie 50-60 znaków. Aktualny tytuł jest zbyt długi i zostanie obcięty w wynikach.'}) %}
{% endif %} {% endif %}
{% if not seo_data.meta_description %} {% if not seo_data.meta_description %}
{% set _ = findings_important.append({'title': 'Brak meta description', 'desc': 'Strona nie ma opisu. Dodaj meta description (150-160 znakow).'}) %} {% set _ = findings_important.append({'title': 'Brak meta description', 'desc': 'Strona nie ma opisu. Dodaj meta description (150-160 znaków).'}) %}
{% elif seo_data.meta_description|length < 120 %} {% elif seo_data.meta_description|length < 120 %}
{% set _ = findings_important.append({'title': 'Meta description za krotki (' ~ seo_data.meta_description|length ~ ' zn.)', 'desc': 'Optymalnie 150-160 znakow. Aktualny opis jest zbyt krotki.'}) %} {% set _ = findings_important.append({'title': 'Meta description za krótki (' ~ seo_data.meta_description|length ~ ' zn.)', 'desc': 'Optymalnie 150-160 znaków. Aktualny opis jest zbyt krótki.'}) %}
{% elif seo_data.meta_description|length > 180 %} {% elif seo_data.meta_description|length > 180 %}
{% set _ = findings_important.append({'title': 'Meta description za dlugi (' ~ seo_data.meta_description|length ~ ' zn.)', 'desc': 'Optymalnie 150-160 znakow. Opis zostanie obciety w wynikach wyszukiwania.'}) %} {% set _ = findings_important.append({'title': 'Meta description za długi (' ~ seo_data.meta_description|length ~ ' zn.)', 'desc': 'Optymalnie 150-160 znaków. Opis zostanie obcięty w wynikach wyszukiwania.'}) %}
{% endif %} {% endif %}
{% if seo_data.has_sitemap == false %} {% if seo_data.has_sitemap == false %}
{% set _ = findings_important.append({'title': 'Brak sitemap.xml', 'desc': 'Dodaj mape witryny, aby ulatwic wyszukiwarkom indeksowanie strony.'}) %} {% set _ = findings_important.append({'title': 'Brak sitemap.xml', 'desc': 'Dodaj mapę witryny, aby ułatwić wyszukiwarkom indeksowanie strony.'}) %}
{% endif %} {% endif %}
{% if seo_data.has_robots_txt == false %} {% if seo_data.has_robots_txt == false %}
{% set _ = findings_important.append({'title': 'Brak robots.txt', 'desc': 'Dodaj plik robots.txt z instrukcjami dla robotow wyszukiwarek.'}) %} {% set _ = findings_important.append({'title': 'Brak robots.txt', 'desc': 'Dodaj plik robots.txt z instrukcjami dla robotów wyszukiwarek.'}) %}
{% endif %} {% endif %}
{% if seo_data.h1_count is not none and seo_data.h1_count == 0 %} {% if seo_data.h1_count is not none and seo_data.h1_count == 0 %}
{% set _ = findings_important.append({'title': 'Brak naglowka H1', 'desc': 'Kazda strona powinna miec dokladnie jeden naglowek H1.'}) %} {% set _ = findings_important.append({'title': 'Brak nagłówka H1', 'desc': 'Każda strona powinna mieć dokładnie jeden nagłówek H1.'}) %}
{% elif seo_data.h1_count is not none and seo_data.h1_count > 1 %} {% elif seo_data.h1_count is not none and seo_data.h1_count > 1 %}
{% set _ = findings_important.append({'title': 'Wiele naglowkow H1 (' ~ seo_data.h1_count ~ ')', 'desc': 'Strona ma ' ~ seo_data.h1_count ~ ' naglowkow H1, powinien byc jeden.'}) %} {% set _ = findings_important.append({'title': 'Wiele nagłówków H1 (' ~ seo_data.h1_count ~ ')', 'desc': 'Strona ma ' ~ seo_data.h1_count ~ ' nagłówków H1, powinien być jeden.'}) %}
{% endif %} {% endif %}
{% if seo_data.images_without_alt is not none and seo_data.images_without_alt > 0 %} {% if seo_data.images_without_alt is not none and seo_data.images_without_alt > 0 %}
{% set _ = findings_important.append({'title': 'Obrazy bez atrybutu alt (' ~ seo_data.images_without_alt ~ ')', 'desc': '' ~ seo_data.images_without_alt ~ ' obrazow nie ma opisu alternatywnego. Dodaj atrybuty alt.'}) %} {% set _ = findings_important.append({'title': 'Obrazy bez atrybutu alt (' ~ seo_data.images_without_alt ~ ')', 'desc': '' ~ seo_data.images_without_alt ~ ' obrazów nie ma opisu alternatywnego. Dodaj atrybuty alt.'}) %}
{% endif %} {% endif %}
{% if seo_data.lcp_ms is not none and seo_data.lcp_ms > 4000 %} {% if seo_data.lcp_ms is not none and seo_data.lcp_ms > 4000 %}
{% set _ = findings_important.append({'title': 'Wolne ladowanie (LCP ' ~ '%.1f'|format(seo_data.lcp_ms / 1000) ~ 's)', 'desc': 'Largest Contentful Paint przekracza 4 sekundy. Cel: ponizej 2.5s.'}) %} {% set _ = findings_important.append({'title': 'Wolne ładowanie (LCP ' ~ '%.1f'|format(seo_data.lcp_ms / 1000) ~ 's)', 'desc': 'Largest Contentful Paint przekracza 4 sekundy. Cel: poniżej 2.5s.'}) %}
{% endif %} {% endif %}
{% if seo_data.inp_ms is not none and seo_data.inp_ms > 500 %} {% if seo_data.inp_ms is not none and seo_data.inp_ms > 500 %}
{% set _ = findings_important.append({'title': 'Niska interaktywnosc (INP ' ~ seo_data.inp_ms ~ 'ms)', 'desc': 'Interaction to Next Paint powinien byc ponizej 200ms.'}) %} {% set _ = findings_important.append({'title': 'Niska interaktywność (INP ' ~ seo_data.inp_ms ~ 'ms)', 'desc': 'Interaction to Next Paint powinien być poniżej 200ms.'}) %}
{% endif %} {% endif %}
{% if seo_data.has_local_business_schema == false %} {% if seo_data.has_local_business_schema == false %}
{% set _ = findings_important.append({'title': 'Brak schematu LocalBusiness', 'desc': 'Dodaj dane strukturalne Schema.org dla firmy lokalnej.'}) %} {% set _ = findings_important.append({'title': 'Brak schematu LocalBusiness', 'desc': 'Dodaj dane strukturalne Schema.org dla firmy lokalnej.'}) %}
{% endif %} {% endif %}
{% if seo_data.security_headers_count is not none and seo_data.security_headers_count < 2 %} {% if seo_data.security_headers_count is not none and seo_data.security_headers_count < 2 %}
{% set _ = findings_important.append({'title': 'Brak naglowkow bezpieczenstwa (' ~ seo_data.security_headers_count ~ '/4)', 'desc': 'Dodaj HSTS, CSP, X-Frame-Options, X-Content-Type-Options.'}) %} {% set _ = findings_important.append({'title': 'Brak nagłówków bezpieczeństwa (' ~ seo_data.security_headers_count ~ '/4)', 'desc': 'Dodaj HSTS, CSP, X-Frame-Options, X-Content-Type-Options.'}) %}
{% endif %} {% endif %}
{# --- DO POPRAWY --- #} {# --- DO POPRAWY --- #}
@ -828,28 +828,28 @@
{% set _ = findings_improvement.append({'title': 'Brak Google Analytics', 'desc': 'Nie monitorujesz ruchu na stronie. Zainstaluj GA4.'}) %} {% set _ = findings_improvement.append({'title': 'Brak Google Analytics', 'desc': 'Nie monitorujesz ruchu na stronie. Zainstaluj GA4.'}) %}
{% endif %} {% endif %}
{% if seo_data.has_og_tags == false %} {% if seo_data.has_og_tags == false %}
{% set _ = findings_improvement.append({'title': 'Brak tagow Open Graph', 'desc': 'Linki do strony nie beda ladnie wygladac w mediach spolecznosciowych.'}) %} {% set _ = findings_improvement.append({'title': 'Brak tagów Open Graph', 'desc': 'Linki do strony nie będą ładnie wyglądać w mediach społecznościowych.'}) %}
{% endif %} {% endif %}
{% if seo_data.has_twitter_cards == false %} {% if seo_data.has_twitter_cards == false %}
{% set _ = findings_improvement.append({'title': 'Brak Twitter Cards', 'desc': 'Brak tagow Twitter Card dla lepszego wygladu linkow na X.'}) %} {% set _ = findings_improvement.append({'title': 'Brak Twitter Cards', 'desc': 'Brak tagów Twitter Card dla lepszego wyglądu linków na X.'}) %}
{% endif %} {% endif %}
{% if seo_data.has_canonical == false %} {% if seo_data.has_canonical == false %}
{% set _ = findings_improvement.append({'title': 'Brak tagu canonical', 'desc': 'Ustaw canonical URL, aby uniknac duplikatow w indeksie.'}) %} {% set _ = findings_improvement.append({'title': 'Brak tagu canonical', 'desc': 'Ustaw canonical URL, aby uniknąć duplikatów w indeksie.'}) %}
{% endif %} {% endif %}
{% if seo_data.has_google_maps_embed == false %} {% if seo_data.has_google_maps_embed == false %}
{% set _ = findings_improvement.append({'title': 'Brak mapy Google na stronie', 'desc': 'Osadzenie mapy Google Maps pomaga w lokalnym SEO.'}) %} {% set _ = findings_improvement.append({'title': 'Brak mapy Google na stronie', 'desc': 'Osadzenie mapy Google Maps pomaga w lokalnym SEO.'}) %}
{% endif %} {% endif %}
{% if seo_data.nap_on_website == false %} {% if seo_data.nap_on_website == false %}
{% set _ = findings_improvement.append({'title': 'Brak danych NAP na stronie', 'desc': 'Dodaj nazwe firmy, adres i telefon (NAP) na stronie.'}) %} {% set _ = findings_improvement.append({'title': 'Brak danych NAP na stronie', 'desc': 'Dodaj nazwę firmy, adres i telefon (NAP) na stronie.'}) %}
{% endif %} {% endif %}
{% if seo_data.content_freshness_score is not none and seo_data.content_freshness_score < 40 %} {% if seo_data.content_freshness_score is not none and seo_data.content_freshness_score < 40 %}
{% set _ = findings_improvement.append({'title': 'Nieaktualna tresc (wynik: ' ~ seo_data.content_freshness_score ~ ')', 'desc': 'Tresc strony nie byla aktualizowana od dluzszego czasu.'}) %} {% set _ = findings_improvement.append({'title': 'Nieaktualna treść (wynik: ' ~ seo_data.content_freshness_score ~ ')', 'desc': 'Treść strony nie była aktualizowana od dłuższego czasu.'}) %}
{% endif %} {% endif %}
{% if seo_data.modern_image_ratio is not none and seo_data.modern_image_ratio < 40 %} {% if seo_data.modern_image_ratio is not none and seo_data.modern_image_ratio < 40 %}
{% set _ = findings_improvement.append({'title': 'Stare formaty obrazow (' ~ '%.0f'|format(seo_data.modern_image_ratio) ~ '% nowoczesnych)', 'desc': 'Konwertuj obrazy do formatow WebP lub AVIF dla lepszej wydajnosci.'}) %} {% set _ = findings_improvement.append({'title': 'Stare formaty obrazów (' ~ '%.0f'|format(seo_data.modern_image_ratio) ~ '% nowoczesnych)', 'desc': 'Konwertuj obrazy do formatów WebP lub AVIF dla lepszej wydajności.'}) %}
{% endif %} {% endif %}
{% if seo_data.word_count_homepage is not none and seo_data.word_count_homepage < 300 %} {% if seo_data.word_count_homepage is not none and seo_data.word_count_homepage < 300 %}
{% set _ = findings_improvement.append({'title': 'Malo tresci na stronie (' ~ seo_data.word_count_homepage ~ ' slow)', 'desc': 'Strona ma malo tresci. Zalecane minimum to 300 slow.'}) %} {% set _ = findings_improvement.append({'title': 'Mało treści na stronie (' ~ seo_data.word_count_homepage ~ ' słów)', 'desc': 'Strona ma mało treści. Zalecane minimum to 300 słów.'}) %}
{% endif %} {% endif %}
{% set total_findings = findings_critical|length + findings_important|length + findings_improvement|length %} {% set total_findings = findings_critical|length + findings_important|length + findings_improvement|length %}
@ -864,14 +864,14 @@
</h2> </h2>
<span class="findings-count {{ 'zero' if total_findings == 0 }}">{{ total_findings }}</span> <span class="findings-count {{ 'zero' if total_findings == 0 }}">{{ total_findings }}</span>
</div> </div>
<p class="findings-subtitle">Na podstawie audytu SEO — najwazniejsze do naprawienia</p> <p class="findings-subtitle">Na podstawie audytu SEO — najważniejsze do naprawienia</p>
{% if total_findings == 0 %} {% if total_findings == 0 %}
<div class="findings-ok"> <div class="findings-ok">
<svg width="20" height="20" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg width="20" height="20" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg> </svg>
Nie znaleziono krytycznych problemow. Twoja strona jest dobrze zoptymalizowana. Nie znaleziono krytycznych problemów. Twoja strona jest dobrze zoptymalizowana.
</div> </div>
{% else %} {% else %}
@ -892,7 +892,7 @@
{% if findings_important|length > 0 %} {% if findings_important|length > 0 %}
<div class="findings-group important"> <div class="findings-group important">
<div class="findings-group-title">Wazne ({{ findings_important|length }})</div> <div class="findings-group-title">Ważne ({{ findings_important|length }})</div>
{% for f in findings_important %} {% for f in findings_important %}
<div class="finding-item"> <div class="finding-item">
<div class="finding-icon important">!</div> <div class="finding-icon important">!</div>
@ -986,11 +986,11 @@
<svg width="24" height="24" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg width="24" height="24" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"/>
</svg> </svg>
Dane z Chrome UX Report (realni uzytkownicy) Dane z Chrome UX Report (realni użytkownicy)
</h2> </h2>
<div style="background: var(--surface); padding: var(--spacing-lg); border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-bottom: var(--spacing-xl);"> <div style="background: var(--surface); padding: var(--spacing-lg); border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-bottom: var(--spacing-xl);">
<p style="font-size: var(--font-size-xs); color: var(--text-tertiary); margin: 0 0 var(--spacing-md) 0;">Metryki p75 z realnych sesji uzytkownikow Chrome (ostatnie 28 dni)</p> <p style="font-size: var(--font-size-xs); color: var(--text-tertiary); margin: 0 0 var(--spacing-md) 0;">Metryki p75 z realnych sesji użytkowników Chrome (ostatnie 28 dni)</p>
<div class="metrics-grid"> <div class="metrics-grid">
{% set crux_lcp = seo_data.crux_lcp_ms %} {% set crux_lcp = seo_data.crux_lcp_ms %}
{% set crux_lcp_class = 'good' if crux_lcp <= 2500 else ('medium' if crux_lcp <= 4000 else 'poor') %} {% set crux_lcp_class = 'good' if crux_lcp <= 2500 else ('medium' if crux_lcp <= 4000 else 'poor') %}
@ -1058,11 +1058,11 @@
<p style="font-size: var(--font-size-xs); color: var(--text-tertiary); margin: 0 0 var(--spacing-md) 0;">Dane z Google Search za ostatnie {{ seo_data.gsc_period_days or 28 }} dni</p> <p style="font-size: var(--font-size-xs); color: var(--text-tertiary); margin: 0 0 var(--spacing-md) 0;">Dane z Google Search za ostatnie {{ seo_data.gsc_period_days or 28 }} dni</p>
<div class="metrics-grid"> <div class="metrics-grid">
<div class="metric-card"> <div class="metric-card">
<div class="metric-name">Klikniecia</div> <div class="metric-name">Kliknięcia</div>
<div class="metric-value">{{ '{:,}'.format(seo_data.gsc_clicks)|replace(',', ' ') }}</div> <div class="metric-value">{{ '{:,}'.format(seo_data.gsc_clicks)|replace(',', ' ') }}</div>
</div> </div>
<div class="metric-card"> <div class="metric-card">
<div class="metric-name">Wyswietlenia</div> <div class="metric-name">Wyświetlenia</div>
<div class="metric-value">{{ '{:,}'.format(seo_data.gsc_impressions)|replace(',', ' ') }}</div> <div class="metric-value">{{ '{:,}'.format(seo_data.gsc_impressions)|replace(',', ' ') }}</div>
</div> </div>
{% if seo_data.gsc_ctr is not none %} {% if seo_data.gsc_ctr is not none %}
@ -1073,7 +1073,7 @@
{% endif %} {% endif %}
{% if seo_data.gsc_avg_position is not none %} {% if seo_data.gsc_avg_position is not none %}
<div class="metric-card"> <div class="metric-card">
<div class="metric-name">Srednia pozycja</div> <div class="metric-name">Średnia pozycja</div>
<div class="metric-value">{{ '%.1f'|format(seo_data.gsc_avg_position) }}</div> <div class="metric-value">{{ '%.1f'|format(seo_data.gsc_avg_position) }}</div>
</div> </div>
{% endif %} {% endif %}
@ -1086,8 +1086,8 @@
<thead> <thead>
<tr style="border-bottom: 2px solid var(--border-color);"> <tr style="border-bottom: 2px solid var(--border-color);">
<th style="text-align: left; padding: 8px 12px; font-weight: 600;">Zapytanie</th> <th style="text-align: left; padding: 8px 12px; font-weight: 600;">Zapytanie</th>
<th style="text-align: right; padding: 8px 12px; font-weight: 600;">Klikniecia</th> <th style="text-align: right; padding: 8px 12px; font-weight: 600;">Kliknięcia</th>
<th style="text-align: right; padding: 8px 12px; font-weight: 600;">Wyswietlenia</th> <th style="text-align: right; padding: 8px 12px; font-weight: 600;">Wyświetlenia</th>
<th style="text-align: right; padding: 8px 12px; font-weight: 600;">CTR</th> <th style="text-align: right; padding: 8px 12px; font-weight: 600;">CTR</th>
<th style="text-align: right; padding: 8px 12px; font-weight: 600;">Pozycja</th> <th style="text-align: right; padding: 8px 12px; font-weight: 600;">Pozycja</th>
</tr> </tr>
@ -1122,16 +1122,16 @@
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4.5c-.77-.833-2.694-.833-3.464 0L3.34 16.5c-.77.833.192 2.5 1.732 2.5z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4.5c-.77-.833-2.694-.833-3.464 0L3.34 16.5c-.77.833.192 2.5 1.732 2.5z"/>
</svg> </svg>
<div> <div>
<p style="margin: 0 0 4px 0; font-weight: 600; color: #92400e; font-size: var(--font-size-sm);">Konto polaczone, ale brak danych</p> <p style="margin: 0 0 4px 0; font-weight: 600; color: #92400e; font-size: var(--font-size-sm);">Konto połączone, ale brak danych</p>
<p style="margin: 0; color: #78350f; font-size: var(--font-size-xs);">Twoja strona moze nie byc jeszcze dodana do Google Search Console. Wykonaj ponizsze kroki:</p> <p style="margin: 0; color: #78350f; font-size: var(--font-size-xs);">Twoja strona może nie być jeszcze dodana do Google Search Console. Wykonaj poniższe kroki:</p>
</div> </div>
</div> </div>
<ol style="margin: 0; padding-left: 20px; color: var(--text-secondary); font-size: var(--font-size-xs); line-height: 1.8;"> <ol style="margin: 0; padding-left: 20px; color: var(--text-secondary); font-size: var(--font-size-xs); line-height: 1.8;">
<li>Wejdz na <a href="https://search.google.com/search-console" target="_blank" rel="noopener" style="color: #4285f4; font-weight: 500;">search.google.com/search-console</a></li> <li>Wejdź na <a href="https://search.google.com/search-console" target="_blank" rel="noopener" style="color: #4285f4; font-weight: 500;">search.google.com/search-console</a></li>
<li>Kliknij <strong>Dodaj wlasciwosc</strong> i wpisz adres strony: <code style="background: #f3f4f6; padding: 2px 6px; border-radius: 4px;">{{ company.website or '' }}</code></li> <li>Kliknij <strong>Dodaj właściwość</strong> i wpisz adres strony: <code style="background: #f3f4f6; padding: 2px 6px; border-radius: 4px;">{{ company.website or '' }}</code></li>
<li>Zweryfikuj wlasciwosc (najlatwiej przez <strong>rekord DNS TXT</strong> lub <strong>tag HTML</strong>)</li> <li>Zweryfikuj właściwość (najłatwiej przez <strong>rekord DNS TXT</strong> lub <strong>tag HTML</strong>)</li>
<li>Poczekaj 2-3 dni az Google zbierze pierwsze dane</li> <li>Poczekaj 2-3 dni aż Google zbierze pierwsze dane</li>
<li>Uruchom ponownie audyt SEO — dane pojawia sie tutaj automatycznie</li> <li>Uruchom ponownie audyt SEO — dane pojawią się tutaj automatycznie</li>
</ol> </ol>
</div> </div>
{% else %} {% else %}
@ -1140,8 +1140,8 @@
<svg width="32" height="32" fill="none" stroke="#9ca3af" viewBox="0 0 24 24" style="margin-bottom: var(--spacing-sm);"> <svg width="32" height="32" fill="none" stroke="#9ca3af" viewBox="0 0 24 24" style="margin-bottom: var(--spacing-sm);">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/>
</svg> </svg>
<p style="color: var(--text-secondary); margin: 0 0 var(--spacing-sm) 0; font-size: var(--font-size-sm);">Polacz Google Search Console aby zobaczyc dane o widocznosci w wyszukiwarce</p> <p style="color: var(--text-secondary); margin: 0 0 var(--spacing-sm) 0; font-size: var(--font-size-sm);">Połącz Google Search Console aby zobaczyć dane o widoczności w wyszukiwarce</p>
<a href="/konto/integracje" style="display: inline-block; padding: 8px 20px; background: #4285f4; color: white; border-radius: var(--radius-md); text-decoration: none; font-size: var(--font-size-xs); font-weight: 500;">Polacz Search Console</a> <a href="/konto/integracje" style="display: inline-block; padding: 8px 20px; background: #4285f4; color: white; border-radius: var(--radius-md); text-decoration: none; font-size: var(--font-size-xs); font-weight: 500;">Połącz Search Console</a>
</div> </div>
{% endif %} {% endif %}
@ -1164,7 +1164,7 @@
</div> </div>
<div> <div>
<div style="font-size: var(--font-size-lg); font-weight: 600; color: {% if lscore >= 70 %}#10b981{% elif lscore >= 40 %}#f59e0b{% else %}#ef4444{% endif %};"> <div style="font-size: var(--font-size-lg); font-weight: 600; color: {% if lscore >= 70 %}#10b981{% elif lscore >= 40 %}#f59e0b{% else %}#ef4444{% endif %};">
{% if lscore >= 70 %}Dobry Local SEO{% elif lscore >= 40 %}Przecietny Local SEO{% else %}Slaby Local SEO{% endif %} {% if lscore >= 70 %}Dobry Local SEO{% elif lscore >= 40 %}Przeciętny Local SEO{% else %}Słaby Local SEO{% endif %}
</div> </div>
<p style="font-size: var(--font-size-sm); color: var(--text-secondary); margin: 0;">Ocena optymalizacji pod lokalne wyszukiwanie</p> <p style="font-size: var(--font-size-sm); color: var(--text-secondary); margin: 0;">Ocena optymalizacji pod lokalne wyszukiwanie</p>
</div> </div>
@ -1182,7 +1182,7 @@
</div> </div>
<div style="display: flex; align-items: center; gap: var(--spacing-sm); padding: var(--spacing-sm); border-radius: var(--radius); background: {{ '#dcfce7' if seo_data.has_local_keywords else '#fee2e2' }};"> <div style="display: flex; align-items: center; gap: var(--spacing-sm); padding: var(--spacing-sm); border-radius: var(--radius); background: {{ '#dcfce7' if seo_data.has_local_keywords else '#fee2e2' }};">
<span style="color: {{ '#10b981' if seo_data.has_local_keywords else '#ef4444' }};">{{ '✓' if seo_data.has_local_keywords else '✗' }}</span> <span style="color: {{ '#10b981' if seo_data.has_local_keywords else '#ef4444' }};">{{ '✓' if seo_data.has_local_keywords else '✗' }}</span>
<span style="font-size: var(--font-size-sm);">Lokalne slowa kluczowe</span> <span style="font-size: var(--font-size-sm);">Lokalne słowa kluczowe</span>
</div> </div>
{% if seo_data.nap_on_website %} {% if seo_data.nap_on_website %}
<div style="display: flex; align-items: center; gap: var(--spacing-sm); padding: var(--spacing-sm); border-radius: var(--radius); background: #dcfce7;"> <div style="display: flex; align-items: center; gap: var(--spacing-sm); padding: var(--spacing-sm); border-radius: var(--radius); background: #dcfce7;">
@ -1199,7 +1199,7 @@
{% if seo_data.local_keywords_found %} {% if seo_data.local_keywords_found %}
<div style="margin-top: var(--spacing-md);"> <div style="margin-top: var(--spacing-md);">
<span style="font-size: var(--font-size-sm); font-weight: 600; color: var(--text-primary);">Znalezione slowa kluczowe:</span> <span style="font-size: var(--font-size-sm); font-weight: 600; color: var(--text-primary);">Znalezione słowa kluczowe:</span>
<div style="margin-top: var(--spacing-xs); display: flex; flex-wrap: wrap; gap: var(--spacing-xs);"> <div style="margin-top: var(--spacing-xs); display: flex; flex-wrap: wrap; gap: var(--spacing-xs);">
{% for kw in seo_data.local_keywords_found[:10] %} {% for kw in seo_data.local_keywords_found[:10] %}
<span style="padding: 2px 8px; background: #dbeafe; color: #1e40af; border-radius: var(--radius-sm); font-size: var(--font-size-xs);">{{ kw }}</span> <span style="padding: 2px 8px; background: #dbeafe; color: #1e40af; border-radius: var(--radius-sm); font-size: var(--font-size-xs);">{{ kw }}</span>
@ -1221,7 +1221,7 @@
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg> </svg>
</div> </div>
<div class="metric-name">Swiezosc tresci</div> <div class="metric-name">Świeżość treści</div>
<div class="metric-value {{ fresh_class }}">{{ fresh }}</div> <div class="metric-value {{ fresh_class }}">{{ fresh }}</div>
</div> </div>
{% if seo_data.last_modified_date %} {% if seo_data.last_modified_date %}
@ -1261,7 +1261,7 @@
<a href="{{ citation.listing_url }}" target="_blank" rel="noopener" style="font-size: var(--font-size-xs); color: var(--primary);">Link</a> <a href="{{ citation.listing_url }}" target="_blank" rel="noopener" style="font-size: var(--font-size-xs); color: var(--primary);">Link</a>
{% endif %} {% endif %}
{% elif citation.status == 'incorrect' %} {% elif citation.status == 'incorrect' %}
<span style="font-size: var(--font-size-xs); color: #f59e0b; padding: 2px 6px; background: #fef3c7; border-radius: var(--radius-sm);">Bledne dane</span> <span style="font-size: var(--font-size-xs); color: #f59e0b; padding: 2px 6px; background: #fef3c7; border-radius: var(--radius-sm);">Błędne dane</span>
{% else %} {% else %}
<span style="font-size: var(--font-size-xs); color: #ef4444; padding: 2px 6px; background: #fee2e2; border-radius: var(--radius-sm);">Nie znaleziono</span> <span style="font-size: var(--font-size-xs); color: #ef4444; padding: 2px 6px; background: #fee2e2; border-radius: var(--radius-sm);">Nie znaleziono</span>
{% endif %} {% endif %}
@ -1277,7 +1277,7 @@
<svg width="24" height="24" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg width="24" height="24" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 8h10M7 12h4m1 8l-4-4H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-3l-4 4z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 8h10M7 12h4m1 8l-4-4H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-3l-4 4z"/>
</svg> </svg>
Meta Tagi i Tresc Meta Tagi i Treść
</h2> </h2>
<div style="background: var(--surface); padding: var(--spacing-lg); border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-bottom: var(--spacing-xl);"> <div style="background: var(--surface); padding: var(--spacing-lg); border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-bottom: var(--spacing-xl);">
@ -1287,7 +1287,7 @@
<div style="margin-bottom: var(--spacing-md);"> <div style="margin-bottom: var(--spacing-md);">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--spacing-xs);"> <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--spacing-xs);">
<span style="font-size: var(--font-size-sm); font-weight: 600; color: var(--text-primary);">Meta Title</span> <span style="font-size: var(--font-size-sm); font-weight: 600; color: var(--text-primary);">Meta Title</span>
<span style="font-size: var(--font-size-xs); padding: 2px 8px; border-radius: var(--radius-sm); background: {{ '#dcfce7' if title_status == 'good' else ('#fef3c7' if title_status == 'medium' else '#fee2e2') }}; color: {{ '#10b981' if title_status == 'good' else ('#f59e0b' if title_status == 'medium' else '#ef4444') }};">{{ title_len }} znakow {% if title_status == 'good' %}(idealnie){% elif title_len < 50 %}(za krotki){% else %}(za dlugi){% endif %}</span> <span style="font-size: var(--font-size-xs); padding: 2px 8px; border-radius: var(--radius-sm); background: {{ '#dcfce7' if title_status == 'good' else ('#fef3c7' if title_status == 'medium' else '#fee2e2') }}; color: {{ '#10b981' if title_status == 'good' else ('#f59e0b' if title_status == 'medium' else '#ef4444') }};">{{ title_len }} znaków {% if title_status == 'good' %}(idealnie){% elif title_len < 50 %}(za krótki){% else %}(za ugi){% endif %}</span>
</div> </div>
<div style="padding: var(--spacing-sm); background: var(--bg-tertiary); border-radius: var(--radius); font-size: var(--font-size-sm); color: var(--text-secondary); word-break: break-word;">{{ seo_data.meta_title }}</div> <div style="padding: var(--spacing-sm); background: var(--bg-tertiary); border-radius: var(--radius); font-size: var(--font-size-sm); color: var(--text-secondary); word-break: break-word;">{{ seo_data.meta_title }}</div>
</div> </div>
@ -1299,7 +1299,7 @@
<div style="margin-bottom: var(--spacing-md);"> <div style="margin-bottom: var(--spacing-md);">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--spacing-xs);"> <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--spacing-xs);">
<span style="font-size: var(--font-size-sm); font-weight: 600; color: var(--text-primary);">Meta Description</span> <span style="font-size: var(--font-size-sm); font-weight: 600; color: var(--text-primary);">Meta Description</span>
<span style="font-size: var(--font-size-xs); padding: 2px 8px; border-radius: var(--radius-sm); background: {{ '#dcfce7' if desc_status == 'good' else ('#fef3c7' if desc_status == 'medium' else '#fee2e2') }}; color: {{ '#10b981' if desc_status == 'good' else ('#f59e0b' if desc_status == 'medium' else '#ef4444') }};">{{ desc_len }} znakow {% if desc_status == 'good' %}(idealnie){% elif desc_len < 150 %}(za krotki){% else %}(za dlugi){% endif %}</span> <span style="font-size: var(--font-size-xs); padding: 2px 8px; border-radius: var(--radius-sm); background: {{ '#dcfce7' if desc_status == 'good' else ('#fef3c7' if desc_status == 'medium' else '#fee2e2') }}; color: {{ '#10b981' if desc_status == 'good' else ('#f59e0b' if desc_status == 'medium' else '#ef4444') }};">{{ desc_len }} znaków {% if desc_status == 'good' %}(idealnie){% elif desc_len < 150 %}(za krótki){% else %}(za ugi){% endif %}</span>
</div> </div>
<div style="padding: var(--spacing-sm); background: var(--bg-tertiary); border-radius: var(--radius); font-size: var(--font-size-sm); color: var(--text-secondary); word-break: break-word;">{{ seo_data.meta_description }}</div> <div style="padding: var(--spacing-sm); background: var(--bg-tertiary); border-radius: var(--radius); font-size: var(--font-size-sm); color: var(--text-secondary); word-break: break-word;">{{ seo_data.meta_description }}</div>
</div> </div>
@ -1311,7 +1311,7 @@
{% set lt = seo_data.load_time_ms %} {% set lt = seo_data.load_time_ms %}
{% set lt_status = 'good' if lt < 1000 else ('medium' if lt < 3000 else 'poor') %} {% set lt_status = 'good' if lt < 1000 else ('medium' if lt < 3000 else 'poor') %}
<div style="padding: var(--spacing-sm); background: var(--bg-tertiary); border-radius: var(--radius); text-align: center;"> <div style="padding: var(--spacing-sm); background: var(--bg-tertiary); border-radius: var(--radius); text-align: center;">
<div style="font-size: var(--font-size-xs); color: var(--text-tertiary);">Czas ladowania</div> <div style="font-size: var(--font-size-xs); color: var(--text-tertiary);">Czas ładowania</div>
<div style="font-size: var(--font-size-lg); font-weight: 700; color: {{ '#10b981' if lt_status == 'good' else ('#f59e0b' if lt_status == 'medium' else '#ef4444') }};">{{ '%.1f'|format(lt / 1000) }}s</div> <div style="font-size: var(--font-size-lg); font-weight: 700; color: {{ '#10b981' if lt_status == 'good' else ('#f59e0b' if lt_status == 'medium' else '#ef4444') }};">{{ '%.1f'|format(lt / 1000) }}s</div>
</div> </div>
{% endif %} {% endif %}
@ -1320,7 +1320,7 @@
{% set wc = seo_data.word_count_homepage %} {% set wc = seo_data.word_count_homepage %}
{% set wc_status = 'good' if wc >= 300 else ('medium' if wc >= 100 else 'poor') %} {% set wc_status = 'good' if wc >= 300 else ('medium' if wc >= 100 else 'poor') %}
<div style="padding: var(--spacing-sm); background: var(--bg-tertiary); border-radius: var(--radius); text-align: center;"> <div style="padding: var(--spacing-sm); background: var(--bg-tertiary); border-radius: var(--radius); text-align: center;">
<div style="font-size: var(--font-size-xs); color: var(--text-tertiary);">Liczba slow</div> <div style="font-size: var(--font-size-xs); color: var(--text-tertiary);">Liczba słów</div>
<div style="font-size: var(--font-size-lg); font-weight: 700; color: {{ '#10b981' if wc_status == 'good' else ('#f59e0b' if wc_status == 'medium' else '#ef4444') }};">{{ wc }}</div> <div style="font-size: var(--font-size-lg); font-weight: 700; color: {{ '#10b981' if wc_status == 'good' else ('#f59e0b' if wc_status == 'medium' else '#ef4444') }};">{{ wc }}</div>
</div> </div>
{% endif %} {% endif %}
@ -1343,7 +1343,7 @@
{% if seo_data.has_ssl is not none %} {% if seo_data.has_ssl is not none %}
<div style="display: flex; align-items: center; gap: var(--spacing-sm); padding: var(--spacing-sm); border-radius: var(--radius); background: {{ '#dcfce7' if seo_data.has_ssl else '#fee2e2' }};"> <div style="display: flex; align-items: center; gap: var(--spacing-sm); padding: var(--spacing-sm); border-radius: var(--radius); background: {{ '#dcfce7' if seo_data.has_ssl else '#fee2e2' }};">
<span style="color: {{ '#10b981' if seo_data.has_ssl else '#ef4444' }};">{{ '✓' if seo_data.has_ssl else '✗' }}</span> <span style="color: {{ '#10b981' if seo_data.has_ssl else '#ef4444' }};">{{ '✓' if seo_data.has_ssl else '✗' }}</span>
<span style="font-size: var(--font-size-sm);">Certyfikat SSL{% if seo_data.has_ssl and seo_data.ssl_expires_at %} (wazny do {{ seo_data.ssl_expires_at.strftime('%d.%m.%Y') }}){% endif %}</span> <span style="font-size: var(--font-size-sm);">Certyfikat SSL{% if seo_data.has_ssl and seo_data.ssl_expires_at %} (ważny do {{ seo_data.ssl_expires_at.strftime('%d.%m.%Y') }}){% endif %}</span>
</div> </div>
{% endif %} {% endif %}
@ -1379,7 +1379,7 @@
{% set h1_ok = seo_data.h1_count == 1 %} {% set h1_ok = seo_data.h1_count == 1 %}
<div style="display: flex; align-items: center; gap: var(--spacing-sm); padding: var(--spacing-sm); border-radius: var(--radius); background: {{ '#dcfce7' if h1_ok else '#fef3c7' }};"> <div style="display: flex; align-items: center; gap: var(--spacing-sm); padding: var(--spacing-sm); border-radius: var(--radius); background: {{ '#dcfce7' if h1_ok else '#fef3c7' }};">
<span style="color: {{ '#10b981' if h1_ok else '#f59e0b' }};">{{ '✓' if h1_ok else '⚠' }}</span> <span style="color: {{ '#10b981' if h1_ok else '#f59e0b' }};">{{ '✓' if h1_ok else '⚠' }}</span>
<span style="font-size: var(--font-size-sm);">H1: {{ seo_data.h1_count }}{% if not h1_ok %} (powinien byc 1){% endif %}{% if seo_data.h2_count is not none %}, H2: {{ seo_data.h2_count }}{% endif %}{% if seo_data.h3_count is not none %}, H3: {{ seo_data.h3_count }}{% endif %}</span> <span style="font-size: var(--font-size-sm);">H1: {{ seo_data.h1_count }}{% if not h1_ok %} (powinien być 1){% endif %}{% if seo_data.h2_count is not none %}, H2: {{ seo_data.h2_count }}{% endif %}{% if seo_data.h3_count is not none %}, H3: {{ seo_data.h3_count }}{% endif %}</span>
</div> </div>
{% endif %} {% endif %}
@ -1423,7 +1423,7 @@
{% if seo_data.is_indexable is not none %} {% if seo_data.is_indexable is not none %}
<div style="display: flex; align-items: center; gap: var(--spacing-sm); padding: var(--spacing-sm); border-radius: var(--radius); background: {{ '#dcfce7' if seo_data.is_indexable else '#fee2e2' }};"> <div style="display: flex; align-items: center; gap: var(--spacing-sm); padding: var(--spacing-sm); border-radius: var(--radius); background: {{ '#dcfce7' if seo_data.is_indexable else '#fee2e2' }};">
<span style="color: {{ '#10b981' if seo_data.is_indexable else '#ef4444' }};">{{ '✓' if seo_data.is_indexable else '✗' }}</span> <span style="color: {{ '#10b981' if seo_data.is_indexable else '#ef4444' }};">{{ '✓' if seo_data.is_indexable else '✗' }}</span>
<span style="font-size: var(--font-size-sm);">Indeksowalnosc{% if not seo_data.is_indexable and seo_data.noindex_reason %} ({{ seo_data.noindex_reason }}){% endif %}</span> <span style="font-size: var(--font-size-sm);">Indeksowalność{% if not seo_data.is_indexable and seo_data.noindex_reason %} ({{ seo_data.noindex_reason }}){% endif %}</span>
</div> </div>
{% endif %} {% endif %}
@ -1465,7 +1465,7 @@
{% if seo_data.h1_text %} {% if seo_data.h1_text %}
<div style="margin-top: var(--spacing-md); padding: var(--spacing-sm); background: var(--bg-tertiary); border-radius: var(--radius); font-size: var(--font-size-sm);"> <div style="margin-top: var(--spacing-md); padding: var(--spacing-sm); background: var(--bg-tertiary); border-radius: var(--radius); font-size: var(--font-size-sm);">
<span style="font-weight: 600; color: var(--text-primary);">Tytul H1:</span> <span style="font-weight: 600; color: var(--text-primary);">Tytuł H1:</span>
<span style="color: var(--text-secondary);">{{ seo_data.h1_text }}</span> <span style="color: var(--text-secondary);">{{ seo_data.h1_text }}</span>
</div> </div>
{% endif %} {% endif %}
@ -1478,7 +1478,7 @@
<svg width="24" height="24" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg width="24" height="24" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"/>
</svg> </svg>
Naglowki bezpieczenstwa Nagłówki bezpieczeństwa
</h2> </h2>
<div style="background: var(--surface); padding: var(--spacing-lg); border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-bottom: var(--spacing-xl);"> <div style="background: var(--surface); padding: var(--spacing-lg); border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-bottom: var(--spacing-xl);">
@ -1486,7 +1486,7 @@
<div style="display: flex; align-items: center; gap: var(--spacing-md); margin-bottom: var(--spacing-md);"> <div style="display: flex; align-items: center; gap: var(--spacing-md); margin-bottom: var(--spacing-md);">
<div style="font-size: var(--font-size-xl); font-weight: 700; color: {{ '#10b981' if sec_count == 4 else ('#f59e0b' if sec_count >= 2 else '#ef4444') }};">{{ sec_count }}/4</div> <div style="font-size: var(--font-size-xl); font-weight: 700; color: {{ '#10b981' if sec_count == 4 else ('#f59e0b' if sec_count >= 2 else '#ef4444') }};">{{ sec_count }}/4</div>
<div style="font-size: var(--font-size-sm); color: var(--text-secondary);"> <div style="font-size: var(--font-size-sm); color: var(--text-secondary);">
{% if sec_count == 4 %}Wszystkie naglowki bezpieczenstwa skonfigurowane{% elif sec_count >= 2 %}Czesciowa ochrona — brakuje {{ 4 - sec_count }} naglowkow{% else %}Slaba ochrona — wymagana konfiguracja{% endif %} {% if sec_count == 4 %}Wszystkie nagłówki bezpieczeństwa skonfigurowane{% elif sec_count >= 2 %}Częściowa ochrona — brakuje {{ 4 - sec_count }} nagłówków{% else %}Słaba ochrona — wymagana konfiguracja{% endif %}
</div> </div>
</div> </div>
<div style="display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--spacing-sm);"> <div style="display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--spacing-sm);">
@ -1516,7 +1516,7 @@
<svg width="24" height="24" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg width="24" height="24" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"/>
</svg> </svg>
Optymalizacja obrazow Optymalizacja obrazów
</h2> </h2>
<div style="background: var(--surface); padding: var(--spacing-lg); border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-bottom: var(--spacing-xl);"> <div style="background: var(--surface); padding: var(--spacing-lg); border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-bottom: var(--spacing-xl);">
@ -1525,7 +1525,7 @@
<div style="display: flex; align-items: center; gap: var(--spacing-lg); margin-bottom: var(--spacing-md);"> <div style="display: flex; align-items: center; gap: var(--spacing-lg); margin-bottom: var(--spacing-md);">
<div> <div>
<div style="font-size: var(--font-size-xl); font-weight: 700; color: {{ '#10b981' if ratio_class == 'good' else ('#f59e0b' if ratio_class == 'medium' else '#ef4444') }};">{{ '%.0f'|format(ratio) }}%</div> <div style="font-size: var(--font-size-xl); font-weight: 700; color: {{ '#10b981' if ratio_class == 'good' else ('#f59e0b' if ratio_class == 'medium' else '#ef4444') }};">{{ '%.0f'|format(ratio) }}%</div>
<div style="font-size: var(--font-size-sm); color: var(--text-secondary);">nowoczesnych formatow</div> <div style="font-size: var(--font-size-sm); color: var(--text-secondary);">nowoczesnych formatów</div>
</div> </div>
<div style="flex: 1;"> <div style="flex: 1;">
<div style="height: 12px; background: #e5e7eb; border-radius: 6px; overflow: hidden;"> <div style="height: 12px; background: #e5e7eb; border-radius: 6px; overflow: hidden;">
@ -1552,7 +1552,7 @@
</svg> </svg>
<h2>Brak danych audytu SEO</h2> <h2>Brak danych audytu SEO</h2>
{% if company.website %} {% if company.website %}
<p>Nie przeprowadzono jeszcze audytu SEO dla strony tej firmy. Uruchom audyt, aby sprawdzic optymalizacje strony.</p> <p>Nie przeprowadzono jeszcze audytu SEO dla strony tej firmy. Uruchom audyt, aby sprawdzić optymalizację strony.</p>
{% if can_audit %} {% if can_audit %}
<button class="btn btn-primary" onclick="runAudit()"> <button class="btn btn-primary" onclick="runAudit()">
<svg width="20" height="20" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg width="20" height="20" fill="none" stroke="currentColor" viewBox="0 0 24 24">
@ -1562,9 +1562,9 @@
</button> </button>
{% endif %} {% endif %}
{% else %} {% else %}
<p>Ta firma nie ma zdefiniowanej strony WWW. Dodaj adres strony w profilu firmy, aby moc przeprowadzic audyt SEO.</p> <p>Ta firma nie ma zdefiniowanej strony WWW. Dodaj adres strony w profilu firmy, aby móc przeprowadzić audyt SEO.</p>
<a href="{{ url_for('company_detail', company_id=company.id) }}" class="btn btn-outline"> <a href="{{ url_for('company_detail', company_id=company.id) }}" class="btn btn-outline">
Przejdz do profilu firmy Przejdź do profilu firmy
</a> </a>
{% endif %} {% endif %}
</div> </div>
@ -1581,7 +1581,7 @@
<div class="loading-content"> <div class="loading-content">
<div class="loading-header"> <div class="loading-header">
<h3>Audyt SEO w toku...</h3> <h3>Audyt SEO w toku...</h3>
<p>Analiza strony moze potrwac do 30 sekund</p> <p>Analiza strony może potrwać do 30 sekund</p>
</div> </div>
<div class="loading-steps" id="loadingSteps"> <div class="loading-steps" id="loadingSteps">
<div class="loading-step" id="step-fetch"> <div class="loading-step" id="step-fetch">
@ -1590,7 +1590,7 @@
</div> </div>
<div class="loading-step" id="step-onpage"> <div class="loading-step" id="step-onpage">
<div class="step-icon pending"><svg width="18" height="18" fill="none" stroke="currentColor" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" stroke-width="2"/></svg></div> <div class="step-icon pending"><svg width="18" height="18" fill="none" stroke="currentColor" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" stroke-width="2"/></svg></div>
<span class="step-text pending">Analiza on-page SEO (meta tagi, naglowki, obrazy)</span> <span class="step-text pending">Analiza on-page SEO (meta tagi, nagłówki, obrazy)</span>
</div> </div>
<div class="loading-step" id="step-technical"> <div class="loading-step" id="step-technical">
<div class="step-icon pending"><svg width="18" height="18" fill="none" stroke="currentColor" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" stroke-width="2"/></svg></div> <div class="step-icon pending"><svg width="18" height="18" fill="none" stroke="currentColor" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" stroke-width="2"/></svg></div>
@ -1606,11 +1606,11 @@
</div> </div>
<div class="loading-step" id="step-citations"> <div class="loading-step" id="step-citations">
<div class="step-icon pending"><svg width="18" height="18" fill="none" stroke="currentColor" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" stroke-width="2"/></svg></div> <div class="step-icon pending"><svg width="18" height="18" fill="none" stroke="currentColor" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" stroke-width="2"/></svg></div>
<span class="step-text pending">Sprawdzanie katalogow firm</span> <span class="step-text pending">Sprawdzanie katalogów firm</span>
</div> </div>
<div class="loading-step" id="step-freshness"> <div class="loading-step" id="step-freshness">
<div class="step-icon pending"><svg width="18" height="18" fill="none" stroke="currentColor" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" stroke-width="2"/></svg></div> <div class="step-icon pending"><svg width="18" height="18" fill="none" stroke="currentColor" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" stroke-width="2"/></svg></div>
<span class="step-text pending">Analiza aktualnosci tresci</span> <span class="step-text pending">Analiza aktualności treści</span>
</div> </div>
<div class="loading-step" id="step-gsc"> <div class="loading-step" id="step-gsc">
<div class="step-icon pending"><svg width="18" height="18" fill="none" stroke="currentColor" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" stroke-width="2"/></svg></div> <div class="step-icon pending"><svg width="18" height="18" fill="none" stroke="currentColor" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" stroke-width="2"/></svg></div>
@ -1618,7 +1618,7 @@
</div> </div>
<div class="loading-step" id="step-score"> <div class="loading-step" id="step-score">
<div class="step-icon pending"><svg width="18" height="18" fill="none" stroke="currentColor" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" stroke-width="2"/></svg></div> <div class="step-icon pending"><svg width="18" height="18" fill="none" stroke="currentColor" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" stroke-width="2"/></svg></div>
<span class="step-text pending">Obliczanie wyniku koncowego</span> <span class="step-text pending">Obliczanie wyniku końcowego</span>
</div> </div>
</div> </div>
<div class="progress-bar-container"> <div class="progress-bar-container">
@ -1639,7 +1639,7 @@
<div class="modal-title" id="modalTitle">Informacja</div> <div class="modal-title" id="modalTitle">Informacja</div>
</div> </div>
<div class="modal-body" id="modalBody"> <div class="modal-body" id="modalBody">
Tresc informacji. Treść informacji.
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button class="btn btn-primary" onclick="closeInfoModal()">OK</button> <button class="btn btn-primary" onclick="closeInfoModal()">OK</button>
@ -1658,14 +1658,14 @@ const hasGscToken = {{ 'true' if has_gsc_token else 'false' }};
============================================================ */ ============================================================ */
const seoSteps = [ const seoSteps = [
{ id: 'step-fetch', label: 'Pobieranie strony i walidacja HTTP', delay: 0 }, { id: 'step-fetch', label: 'Pobieranie strony i walidacja HTTP', delay: 0 },
{ id: 'step-onpage', label: 'Analiza on-page SEO (meta tagi, naglowki, obrazy)', delay: 2000 }, { id: 'step-onpage', label: 'Analiza on-page SEO (meta tagi, nagłówki, obrazy)', delay: 2000 },
{ id: 'step-technical', label: 'Technical SEO (robots.txt, sitemap, canonical)', delay: 5000 }, { id: 'step-technical', label: 'Technical SEO (robots.txt, sitemap, canonical)', delay: 5000 },
{ id: 'step-pagespeed', label: 'Google PageSpeed Insights', delay: 8000 }, { id: 'step-pagespeed', label: 'Google PageSpeed Insights', delay: 8000 },
{ id: 'step-local', label: 'Analiza Local SEO', delay: 18000 }, { id: 'step-local', label: 'Analiza Local SEO', delay: 18000 },
{ id: 'step-citations', label: 'Sprawdzanie katalogow firm', delay: 20000 }, { id: 'step-citations', label: 'Sprawdzanie katalogów firm', delay: 20000 },
{ id: 'step-freshness', label: 'Analiza aktualnosci tresci', delay: 25000 }, { id: 'step-freshness', label: 'Analiza aktualności treści', delay: 25000 },
{ id: 'step-gsc', label: 'Google Search Console', delay: 26000 }, { id: 'step-gsc', label: 'Google Search Console', delay: 26000 },
{ id: 'step-score', label: 'Obliczanie wyniku koncowego', delay: 28000 } { id: 'step-score', label: 'Obliczanie wyniku końcowego', delay: 28000 }
]; ];
const stepIcons = { const stepIcons = {
@ -1767,17 +1767,17 @@ function enrichStepsFromResponse(data) {
// Step 4: PageSpeed — show performance score // Step 4: PageSpeed — show performance score
if (pagespeed.performance_score !== undefined && pagespeed.performance_score !== null) { if (pagespeed.performance_score !== undefined && pagespeed.performance_score !== null) {
updateStep('step-pagespeed', 'complete', 'Wydajnosc: ' + pagespeed.performance_score + '/100'); updateStep('step-pagespeed', 'complete', 'Wydajność: ' + pagespeed.performance_score + '/100');
} }
// Step 8: GSC // Step 8: GSC
if (!hasGscToken) { if (!hasGscToken) {
updateStep('step-gsc', 'skipped', 'Google Search Console (brak polaczenia)'); updateStep('step-gsc', 'skipped', 'Google Search Console (brak połączenia)');
} }
// Step 9: Overall score // Step 9: Overall score
if (audit.overall_score !== undefined && audit.overall_score !== null) { if (audit.overall_score !== undefined && audit.overall_score !== null) {
updateStep('step-score', 'complete', 'Wynik koncowy: ' + audit.overall_score + '/100'); updateStep('step-score', 'complete', 'Wynik końcowy: ' + audit.overall_score + '/100');
} }
} }
@ -1832,12 +1832,12 @@ async function runAudit() {
enrichStepsFromResponse(data); enrichStepsFromResponse(data);
markAllComplete(); markAllComplete();
const finalScore = (data.seo_audit && data.seo_audit.overall_score) || 0; const finalScore = (data.seo_audit && data.seo_audit.overall_score) || 0;
updateStep('step-score', 'complete', 'Wynik koncowy: ' + finalScore + '/100'); updateStep('step-score', 'complete', 'Wynik końcowy: ' + finalScore + '/100');
// Wait so user can read the completed steps // Wait so user can read the completed steps
await new Promise(r => setTimeout(r, 3000)); await new Promise(r => setTimeout(r, 3000));
hideLoading(); hideLoading();
showInfoModal('Audyt zakonczony', 'Audyt SEO zostal zakonczony pomyslnie. Strona zostanie odswiezona.', true); showInfoModal('Audyt zakończony', 'Audyt SEO został zakończony pomyślnie. Strona zostanie odświeżona.', true);
setTimeout(() => location.reload(), 1500); setTimeout(() => location.reload(), 1500);
} else { } else {
// Mark current in_progress step as error // Mark current in_progress step as error
@ -1846,17 +1846,17 @@ async function runAudit() {
return el && el.querySelector('.step-icon.in_progress'); return el && el.querySelector('.step-icon.in_progress');
}); });
if (currentStep) { if (currentStep) {
updateStep(currentStep.id, 'error', data.error || 'Blad audytu'); updateStep(currentStep.id, 'error', data.error || 'Błąd audytu');
} }
await new Promise(r => setTimeout(r, 3000)); await new Promise(r => setTimeout(r, 3000));
hideLoading(); hideLoading();
showInfoModal('Blad', data.error || 'Wystapil nieznany blad podczas audytu.', false); showInfoModal('Błąd', data.error || 'Wystąpił nieznany błąd podczas audytu.', false);
if (btn) btn.disabled = false; if (btn) btn.disabled = false;
} }
} catch (error) { } catch (error) {
stopSimulation(); stopSimulation();
hideLoading(); hideLoading();
showInfoModal('Blad polaczenia', 'Nie udalo sie polaczyc z serwerem: ' + error.message, false); showInfoModal('Błąd połączenia', 'Nie udało się połączyć z serwerem: ' + error.message, false);
if (btn) btn.disabled = false; if (btn) btn.disabled = false;
} }
} }
@ -1924,9 +1924,9 @@ async function runAIAnalysis(force) {
const results = document.getElementById('aiResults'); const results = document.getElementById('aiResults');
results.innerHTML = ` results.innerHTML = `
<div style="background: #fef2f2; border: 1px solid #fecaca; padding: var(--spacing-lg); border-radius: var(--radius-lg); text-align: center;"> <div style="background: #fef2f2; border: 1px solid #fecaca; padding: var(--spacing-lg); border-radius: var(--radius-lg); text-align: center;">
<p style="color: #dc2626; font-weight: 600; margin-bottom: var(--spacing-sm);">Blad analizy AI</p> <p style="color: #dc2626; font-weight: 600; margin-bottom: var(--spacing-sm);">Błąd analizy AI</p>
<p style="color: #991b1b; font-size: var(--font-size-sm);">${escapeHtml(data.error || 'Nieznany blad')}</p> <p style="color: #991b1b; font-size: var(--font-size-sm);">${escapeHtml(data.error || 'Nieznany błąd')}</p>
<button class="btn btn-outline btn-sm" onclick="runAIAnalysis()" style="margin-top: var(--spacing-md);">Sprobuj ponownie</button> <button class="btn btn-outline btn-sm" onclick="runAIAnalysis()" style="margin-top: var(--spacing-md);">Spróbuj ponownie</button>
</div>`; </div>`;
results.style.display = 'block'; results.style.display = 'block';
} }
@ -1938,9 +1938,9 @@ async function runAIAnalysis(force) {
const results = document.getElementById('aiResults'); const results = document.getElementById('aiResults');
results.innerHTML = ` results.innerHTML = `
<div style="background: #fef2f2; border: 1px solid #fecaca; padding: var(--spacing-lg); border-radius: var(--radius-lg); text-align: center;"> <div style="background: #fef2f2; border: 1px solid #fecaca; padding: var(--spacing-lg); border-radius: var(--radius-lg); text-align: center;">
<p style="color: #dc2626; font-weight: 600; margin-bottom: var(--spacing-sm);">Blad polaczenia</p> <p style="color: #dc2626; font-weight: 600; margin-bottom: var(--spacing-sm);">Błąd połączenia</p>
<p style="color: #991b1b; font-size: var(--font-size-sm);">${escapeHtml(error.message)}</p> <p style="color: #991b1b; font-size: var(--font-size-sm);">${escapeHtml(error.message)}</p>
<button class="btn btn-outline btn-sm" onclick="runAIAnalysis()" style="margin-top: var(--spacing-md);">Sprobuj ponownie</button> <button class="btn btn-outline btn-sm" onclick="runAIAnalysis()" style="margin-top: var(--spacing-md);">Spróbuj ponownie</button>
</div>`; </div>`;
results.style.display = 'block'; results.style.display = 'block';
} }
@ -1964,7 +1964,7 @@ function renderAIResults(data) {
actionsList.innerHTML = ''; actionsList.innerHTML = '';
const actions = data.actions || []; const actions = data.actions || [];
const priorityLabels = {critical: 'KRYTYCZNE', high: 'WYSOKI', medium: 'SREDNI', low: 'NISKI'}; const priorityLabels = {critical: 'KRYTYCZNE', high: 'WYSOKI', medium: 'ŚREDNI', low: 'NISKI'};
actions.forEach((action, idx) => { actions.forEach((action, idx) => {
const card = document.createElement('div'); const card = document.createElement('div');
@ -1977,32 +1977,32 @@ function renderAIResults(data) {
card.innerHTML = ` card.innerHTML = `
<div style="display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--spacing-sm); flex-wrap: wrap; gap: var(--spacing-xs);"> <div style="display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--spacing-sm); flex-wrap: wrap; gap: var(--spacing-xs);">
<div style="display: flex; align-items: center; gap: var(--spacing-sm);"> <div style="display: flex; align-items: center; gap: var(--spacing-sm);">
<span class="ai-priority-badge ${action.priority || 'medium'}">${priorityLabels[action.priority] || 'SREDNI'}</span> <span class="ai-priority-badge ${action.priority || 'medium'}">${priorityLabels[action.priority] || 'ŚREDNI'}</span>
<span class="ai-action-title" style="font-weight: 600; color: var(--text-primary);">${escapeHtml(action.title || '')}</span> <span class="ai-action-title" style="font-weight: 600; color: var(--text-primary);">${escapeHtml(action.title || '')}</span>
</div> </div>
</div> </div>
<p style="color: var(--text-secondary); font-size: var(--font-size-sm); margin-bottom: var(--spacing-sm);">${escapeHtml(action.description || '')}</p> <p style="color: var(--text-secondary); font-size: var(--font-size-sm); margin-bottom: var(--spacing-sm);">${escapeHtml(action.description || '')}</p>
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-md); margin-bottom: var(--spacing-sm);"> <div style="display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-md); margin-bottom: var(--spacing-sm);">
<div> <div>
<div style="font-size: var(--font-size-xs); color: var(--text-tertiary); margin-bottom: 2px;">Wplyw: ${impact}/10</div> <div style="font-size: var(--font-size-xs); color: var(--text-tertiary); margin-bottom: 2px;">Wpływ: ${impact}/10</div>
<div class="ai-score-bar"><div class="ai-score-bar-fill impact" style="width: ${impact * 10}%;"></div></div> <div class="ai-score-bar"><div class="ai-score-bar-fill impact" style="width: ${impact * 10}%;"></div></div>
</div> </div>
<div> <div>
<div style="font-size: var(--font-size-xs); color: var(--text-tertiary); margin-bottom: 2px;">Wysilek: ${effort}/10</div> <div style="font-size: var(--font-size-xs); color: var(--text-tertiary); margin-bottom: 2px;">Wysiłek: ${effort}/10</div>
<div class="ai-score-bar"><div class="ai-score-bar-fill effort" style="width: ${effort * 10}%;"></div></div> <div class="ai-score-bar"><div class="ai-score-bar-fill effort" style="width: ${effort * 10}%;"></div></div>
</div> </div>
</div> </div>
<div class="ai-action-buttons"> <div class="ai-action-buttons">
<button class="btn btn-outline btn-sm" onclick="generateContent('${action.action_type}', ${idx})"> <button class="btn btn-outline btn-sm" onclick="generateContent('${action.action_type}', ${idx})">
<svg width="14" height="14" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"/></svg> <svg width="14" height="14" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"/></svg>
Wygeneruj tresc Wygeneruj treść
</button> </button>
<button class="btn btn-outline btn-sm" onclick="markAction(${idx}, 'implemented')" style="color: #10b981; border-color: #10b981;"> <button class="btn btn-outline btn-sm" onclick="markAction(${idx}, 'implemented')" style="color: #10b981; border-color: #10b981;">
<svg width="14" height="14" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/></svg> <svg width="14" height="14" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/></svg>
Zrobione Zrobione
</button> </button>
<button class="btn btn-outline btn-sm" onclick="markAction(${idx}, 'dismissed')" style="color: var(--text-tertiary); border-color: var(--border);"> <button class="btn btn-outline btn-sm" onclick="markAction(${idx}, 'dismissed')" style="color: var(--text-tertiary); border-color: var(--border);">
Odrzuc Odrzuć
</button> </button>
</div> </div>
<div id="ai-content-${idx}" style="display: none;"></div> <div id="ai-content-${idx}" style="display: none;"></div>
@ -2030,7 +2030,7 @@ async function generateContent(actionType, idx) {
return; return;
} }
container.innerHTML = '<div style="padding: var(--spacing-md); color: var(--text-secondary); font-size: var(--font-size-sm);">Generowanie tresci...</div>'; container.innerHTML = '<div style="padding: var(--spacing-md); color: var(--text-secondary); font-size: var(--font-size-sm);">Generowanie treści...</div>';
container.style.display = 'block'; container.style.display = 'block';
try { try {
@ -2071,15 +2071,15 @@ async function generateContent(actionType, idx) {
} else { } else {
container.innerHTML = ` container.innerHTML = `
<div style="padding: var(--spacing-sm); background: #fef2f2; border-radius: var(--radius-sm); margin-top: var(--spacing-sm);"> <div style="padding: var(--spacing-sm); background: #fef2f2; border-radius: var(--radius-sm); margin-top: var(--spacing-sm);">
<span style="color: #dc2626;">${escapeHtml(data.error || 'Blad generowania')}</span> <span style="color: #dc2626;">${escapeHtml(data.error || 'Błąd generowania')}</span>
<button class="btn btn-outline btn-sm" onclick="generateContent('${actionType}', ${idx})" style="margin-left: var(--spacing-sm);">Ponow</button> <button class="btn btn-outline btn-sm" onclick="generateContent('${actionType}', ${idx})" style="margin-left: var(--spacing-sm);">Ponów</button>
</div>`; </div>`;
} }
} catch (error) { } catch (error) {
container.innerHTML = ` container.innerHTML = `
<div style="padding: var(--spacing-sm); background: #fef2f2; border-radius: var(--radius-sm); margin-top: var(--spacing-sm);"> <div style="padding: var(--spacing-sm); background: #fef2f2; border-radius: var(--radius-sm); margin-top: var(--spacing-sm);">
<span style="color: #dc2626;">${escapeHtml(error.message)}</span> <span style="color: #dc2626;">${escapeHtml(error.message)}</span>
<button class="btn btn-outline btn-sm" onclick="generateContent('${actionType}', ${idx})" style="margin-left: var(--spacing-sm);">Ponow</button> <button class="btn btn-outline btn-sm" onclick="generateContent('${actionType}', ${idx})" style="margin-left: var(--spacing-sm);">Ponów</button>
</div>`; </div>`;
} }
} }

View File

@ -658,7 +658,7 @@
<svg width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 8h2a2 2 0 012 2v6a2 2 0 01-2 2h-2v4l-4-4H9a1.994 1.994 0 01-1.414-.586m0 0L11 14h4a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2v4l.586-.586z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 8h2a2 2 0 012 2v6a2 2 0 01-2 2h-2v4l-4-4H9a1.994 1.994 0 01-1.414-.586m0 0L11 14h4a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2v4l.586-.586z"/>
</svg> </svg>
<span>Analiza obecnosci w mediach spolecznosciowych</span> <span>Analiza obecności w mediach społecznościowych</span>
</div> </div>
</div> </div>
<div class="header-actions"> <div class="header-actions">
@ -690,26 +690,26 @@
<div class="score-details"> <div class="score-details">
<div class="score-category" style="color: {% if score >= 90 %}#10b981{% elif score >= 70 %}#84cc16{% elif score >= 50 %}#f59e0b{% elif score >= 30 %}#f97316{% else %}#ef4444{% endif %};"> <div class="score-category" style="color: {% if score >= 90 %}#10b981{% elif score >= 70 %}#84cc16{% elif score >= 50 %}#f59e0b{% elif score >= 30 %}#f97316{% else %}#ef4444{% endif %};">
{% if score >= 90 %} {% if score >= 90 %}
Doskonala obecnosc w Social Media Doskonała obecność w Social Media
{% elif score >= 70 %} {% elif score >= 70 %}
Dobra obecnosc w Social Media Dobra obecność w Social Media
{% elif score >= 50 %} {% elif score >= 50 %}
Przecietna obecnosc w Social Media Przeciętna obecność w Social Media
{% elif score >= 30 %} {% elif score >= 30 %}
Obecnosc wymaga rozbudowy Obecność wymaga rozbudowy
{% else %} {% else %}
Slaba obecnosc w Social Media Słaba obecność w Social Media
{% endif %} {% endif %}
</div> </div>
<p class="score-description"> <p class="score-description">
{% if score >= 80 %} {% if score >= 80 %}
Firma jest obecna na wiekszosci waznych platform spolecznosciowych. Utrzymuj aktywnosc i rozwijaj zaangazowanie. Firma jest obecna na większości ważnych platform społecznościowych. Utrzymuj aktywność i rozwijaj zaangażowanie.
{% elif score >= 60 %} {% elif score >= 60 %}
Firma ma dobra obecnosc w social media. Rozważ dodanie brakujacych platform dla pelniejszego zasiegu. Firma ma dobrą obecność w social media. Rozważ dodanie brakujących platform dla pełniejszego zasięgu.
{% elif score >= 40 %} {% elif score >= 40 %}
Firma jest obecna na kilku platformach. Warto rozszerzyc obecnosc o kolejne kanaly komunikacji. Firma jest obecna na kilku platformach. Warto rozszerzyć obecność o kolejne kanały komunikacji.
{% else %} {% else %}
Firma ma ograniczona obecnosc w social media. Zalecamy utworzenie profili na kluczowych platformach. Firma ma ograniczoną obecność w social media. Zalecamy utworzenie profili na kluczowych platformach.
{% endif %} {% endif %}
</p> </p>
<div class="platforms-summary"> <div class="platforms-summary">
@ -723,7 +723,7 @@
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
</svg> </svg>
<span>{{ social_data.total_platforms - social_data.platforms_count }} brakujacych</span> <span>{{ social_data.total_platforms - social_data.platforms_count }} brakujących</span>
</div> </div>
</div> </div>
</div> </div>
@ -845,19 +845,19 @@
</div> </div>
{% if profile.check_status == 'needs_verification' %} {% if profile.check_status == 'needs_verification' %}
<div style="margin: 6px 0; padding: 8px 12px; background: #fef3c7; border-left: 3px solid #f59e0b; border-radius: 4px; font-size: 12px; color: #92400e;"> <div style="margin: 6px 0; padding: 8px 12px; background: #fef3c7; border-left: 3px solid #f59e0b; border-radius: 4px; font-size: 12px; color: #92400e;">
<strong>Do weryfikacji</strong> — link do profilu wymaga recznego sprawdzenia. Profil moze byc nieaktywny lub wskazywac na niewlasciwe konto. <strong>Do weryfikacji</strong> — link do profilu wymaga ręcznego sprawdzenia. Profil może być nieaktywny lub wskazywać na niewłaściwe konto.
</div> </div>
{% endif %} {% endif %}
{% if platform == 'facebook' and 'profile.php?id=' in (profile.url or '') %} {% if platform == 'facebook' and 'profile.php?id=' in (profile.url or '') %}
<div style="margin: 6px 0; padding: 8px 12px; background: #fef3c7; border-left: 3px solid #f59e0b; border-radius: 4px; font-size: 12px; color: #92400e;"> <div style="margin: 6px 0; padding: 8px 12px; background: #fef3c7; border-left: 3px solid #f59e0b; border-radius: 4px; font-size: 12px; color: #92400e;">
<strong>Adres profilu zawiera numeryczne ID</strong> zamiast nazwy firmy. Zalecamy ustawienie niestandardowej nazwy uzytkownika (np. facebook.com/NazwaFirmy) w ustawieniach strony na Facebooku. <strong>Adres profilu zawiera numeryczne ID</strong> zamiast nazwy firmy. Zalecamy ustawienie niestandardowej nazwy użytkownika (np. facebook.com/NazwaFirmy) w ustawieniach strony na Facebooku.
</div> </div>
{% endif %} {% endif %}
{% if profile.source %} {% if profile.source %}
<div style="display: flex; align-items: center; gap: var(--spacing-xs); margin-bottom: var(--spacing-xs);"> <div style="display: flex; align-items: center; gap: var(--spacing-xs); margin-bottom: var(--spacing-xs);">
<span style="font-size: var(--font-size-xs); color: var(--text-tertiary);">Zrodlo:</span> <span style="font-size: var(--font-size-xs); color: var(--text-tertiary);">Źródło:</span>
<span style="font-size: var(--font-size-xs); padding: 1px 6px; border-radius: var(--radius-sm); background: #f3f4f6; color: #6b7280;"> <span style="font-size: var(--font-size-xs); padding: 1px 6px; border-radius: var(--radius-sm); background: #f3f4f6; color: #6b7280;">
{% if profile.source == 'website_scrape' %}Ze strony WWW{% elif profile.source == 'brave_search' %}Wyszukiwarka{% elif profile.source == 'manual' %}Recznie{% elif profile.source == 'facebook_api' %}Facebook API{% else %}{{ profile.source }}{% endif %} {% if profile.source == 'website_scrape' %}Ze strony WWW{% elif profile.source == 'brave_search' %}Wyszukiwarka{% elif profile.source == 'manual' %}Ręcznie{% elif profile.source == 'facebook_api' %}Facebook API{% else %}{{ profile.source }}{% endif %}
</span> </span>
</div> </div>
{% endif %} {% endif %}
@ -875,7 +875,7 @@
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"/>
</svg> </svg>
{{ '{:,}'.format(profile.followers_count).replace(',', ' ') }} obserwujacych {{ '{:,}'.format(profile.followers_count).replace(',', ' ') }} obserwujących
</div> </div>
{% endif %} {% endif %}
{% if profile.followers_history and profile.followers_history|length > 1 %} {% if profile.followers_history and profile.followers_history|length > 1 %}
@ -916,7 +916,7 @@
</div> </div>
{% endif %} {% endif %}
{% if profile.has_profile_photo %} {% if profile.has_profile_photo %}
<div class="platform-meta-item" title="Ma zdjecie profilowe"> <div class="platform-meta-item" title="Ma zdjęcie profilowe">
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"/>
</svg> </svg>
@ -924,7 +924,7 @@
</div> </div>
{% endif %} {% endif %}
{% if profile.has_cover_photo %} {% if profile.has_cover_photo %}
<div class="platform-meta-item" title="Ma zdjecie w tle"> <div class="platform-meta-item" title="Ma zdjęcie w tle">
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"/>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 13a3 3 0 11-6 0 3 3 0 016 0z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 13a3 3 0 11-6 0 3 3 0 016 0z"/>
@ -937,11 +937,11 @@
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9.5a2 2 0 00-2-2h-2"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9.5a2 2 0 00-2-2h-2"/>
</svg> </svg>
{{ profile.posts_count_30d }} postow/30d {{ profile.posts_count_30d }} postów/30d
</div> </div>
{% endif %} {% endif %}
{% if profile.engagement_rate is not none %} {% if profile.engagement_rate is not none %}
<div class="platform-meta-item" title="Wskaznik zaangazowania"> <div class="platform-meta-item" title="Wskaźnik zaangażowania">
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"/>
</svg> </svg>
@ -953,7 +953,7 @@
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/>
</svg> </svg>
{{ profile.posts_count_365d }} postow/rok {{ profile.posts_count_365d }} postów/rok
</div> </div>
{% endif %} {% endif %}
{% if profile.last_post_date %} {% if profile.last_post_date %}
@ -965,7 +965,7 @@
</div> </div>
{% endif %} {% endif %}
{% if profile.posting_frequency_score is not none %} {% if profile.posting_frequency_score is not none %}
<div class="platform-meta-item" title="Czestosc postowania: {{ profile.posting_frequency_score }}/10"> <div class="platform-meta-item" title="Częstość postowania: {{ profile.posting_frequency_score }}/10">
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/>
</svg> </svg>
@ -998,7 +998,7 @@
{% if profile and profile.profile_completeness_score is not none %} {% if profile and profile.profile_completeness_score is not none %}
<div style="margin-top: var(--spacing-sm);"> <div style="margin-top: var(--spacing-sm);">
<div style="display: flex; justify-content: space-between; font-size: var(--font-size-xs); color: var(--text-tertiary); margin-bottom: 4px;"> <div style="display: flex; justify-content: space-between; font-size: var(--font-size-xs); color: var(--text-tertiary); margin-bottom: 4px;">
<span>Kompletnosc profilu</span> <span>Kompletność profilu</span>
<span>{{ profile.profile_completeness_score }}%</span> <span>{{ profile.profile_completeness_score }}%</span>
</div> </div>
<div style="height: 6px; background: var(--border); border-radius: 3px; overflow: hidden;"> <div style="height: 6px; background: var(--border); border-radius: 3px; overflow: hidden;">
@ -1027,7 +1027,7 @@
<svg width="24" height="24" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg width="24" height="24" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"/>
</svg> </svg>
Porownanie platform Porównanie platform
</h2> </h2>
<div style="background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; margin-bottom: var(--spacing-xl);"> <div style="background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; margin-bottom: var(--spacing-xl);">
@ -1036,10 +1036,10 @@
<thead> <thead>
<tr style="background: var(--bg-tertiary);"> <tr style="background: var(--bg-tertiary);">
<th style="padding: var(--spacing-sm) var(--spacing-md); text-align: left; font-weight: 600; color: var(--text-primary);">Platforma</th> <th style="padding: var(--spacing-sm) var(--spacing-md); text-align: left; font-weight: 600; color: var(--text-primary);">Platforma</th>
<th style="padding: var(--spacing-sm) var(--spacing-md); text-align: right; font-weight: 600; color: var(--text-primary);">Obserwujacy</th> <th style="padding: var(--spacing-sm) var(--spacing-md); text-align: right; font-weight: 600; color: var(--text-primary);">Obserwujący</th>
<th style="padding: var(--spacing-sm) var(--spacing-md); text-align: right; font-weight: 600; color: var(--text-primary);">Engagement</th> <th style="padding: var(--spacing-sm) var(--spacing-md); text-align: right; font-weight: 600; color: var(--text-primary);">Engagement</th>
<th style="padding: var(--spacing-sm) var(--spacing-md); text-align: right; font-weight: 600; color: var(--text-primary);">Posty (30d)</th> <th style="padding: var(--spacing-sm) var(--spacing-md); text-align: right; font-weight: 600; color: var(--text-primary);">Posty (30d)</th>
<th style="padding: var(--spacing-sm) var(--spacing-md); text-align: right; font-weight: 600; color: var(--text-primary);">Kompletnosc</th> <th style="padding: var(--spacing-sm) var(--spacing-md); text-align: right; font-weight: 600; color: var(--text-primary);">Kompletność</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -1090,7 +1090,7 @@
<div class="recommendation-item"> <div class="recommendation-item">
<div class="recommendation-icon priority-high">!</div> <div class="recommendation-icon priority-high">!</div>
<div class="recommendation-text"> <div class="recommendation-text">
<strong>Facebook</strong> - Najpopularniejsza platforma w Polsce. Zalozenie strony firmowej pozwoli dotrzec do szerokiego grona klientow. <strong>Facebook</strong> - Najpopularniejsza platforma w Polsce. Założenie strony firmowej pozwoli dotrzeć do szerokiego grona klientów.
</div> </div>
</div> </div>
{% endif %} {% endif %}
@ -1108,7 +1108,7 @@
<div class="recommendation-item"> <div class="recommendation-item">
<div class="recommendation-icon priority-medium">!</div> <div class="recommendation-icon priority-medium">!</div>
<div class="recommendation-text"> <div class="recommendation-text">
<strong>Instagram</strong> - Swietna platforma do prezentacji wizualnej firmy. Szczegolnie wazna dla firm z produktami/uslugami wizualnymi. <strong>Instagram</strong> - Świetna platforma do prezentacji wizualnej firmy. Szczególnie ważna dla firm z produktami/usługami wizualnymi.
</div> </div>
</div> </div>
{% endif %} {% endif %}
@ -1117,7 +1117,7 @@
<div class="recommendation-item"> <div class="recommendation-item">
<div class="recommendation-icon priority-medium">!</div> <div class="recommendation-icon priority-medium">!</div>
<div class="recommendation-text"> <div class="recommendation-text">
<strong>YouTube</strong> - Druga najwieksza wyszukiwarka na swiecie. Video content buduje zaufanie i pokazuje ekspertyze. <strong>YouTube</strong> - Druga największa wyszukiwarka na świecie. Video content buduje zaufanie i pokazuje ekspertyzę.
</div> </div>
</div> </div>
{% endif %} {% endif %}
@ -1126,7 +1126,7 @@
<div class="recommendation-item"> <div class="recommendation-item">
<div class="recommendation-icon priority-low">!</div> <div class="recommendation-icon priority-low">!</div>
<div class="recommendation-text"> <div class="recommendation-text">
<strong>TikTok</strong> - Najszybciej rosnaca platforma. Warto rozwazyc jesli celujecie w mlodszych odbiorców. <strong>TikTok</strong> - Najszybciej rosnąca platforma. Warto rozważyć jeśli celujecie w młodszych odbiorców.
</div> </div>
</div> </div>
{% endif %} {% endif %}
@ -1135,7 +1135,7 @@
<div class="recommendation-item"> <div class="recommendation-item">
<div class="recommendation-icon priority-low">!</div> <div class="recommendation-icon priority-low">!</div>
<div class="recommendation-text"> <div class="recommendation-text">
<strong>X (Twitter)</strong> - Platforma do szybkiej komunikacji i budowania wizerunku eksperta. Przydatna w branzy tech/media. <strong>X (Twitter)</strong> - Platforma do szybkiej komunikacji i budowania wizerunku eksperta. Przydatna w branży tech/media.
</div> </div>
</div> </div>
{% endif %} {% endif %}
@ -1158,7 +1158,7 @@
<div class="recommendation-item"> <div class="recommendation-item">
<div class="recommendation-icon priority-high">!</div> <div class="recommendation-icon priority-high">!</div>
<div class="recommendation-text"> <div class="recommendation-text">
<strong>Facebook - zmien adres profilu</strong> - Twoj profil na Facebooku uzywa numerycznego ID zamiast nazwy firmy. Klienci latwiej zapamietaja adres typu <em>facebook.com/NazwaFirmy</em>. Aby to zmienic: Ustawienia strony na Facebooku &rarr; Ogolne &rarr; Nazwa uzytkownika &rarr; wpisz nazwe firmy. <strong>Facebook - zmień adres profilu</strong> - Twój profil na Facebooku używa numerycznego ID zamiast nazwy firmy. Klienci łatwiej zapamiętają adres typu <em>facebook.com/NazwaFirmy</em>. Aby to zmienić: Ustawienia strony na Facebooku &rarr; Ogólne &rarr; Nazwa użytkownika &rarr; wpisz nazwę firmy.
</div> </div>
</div> </div>
</div> </div>
@ -1175,7 +1175,7 @@
<div class="loading-content"> <div class="loading-content">
<div class="loading-header"> <div class="loading-header">
<h3>Audyt Social Media</h3> <h3>Audyt Social Media</h3>
<p>Szukam profili w mediach spolecznosciowych...</p> <p>Szukam profili w mediach społecznościowych...</p>
</div> </div>
<div class="loading-steps" id="loadingSteps"> <div class="loading-steps" id="loadingSteps">
<!-- Step 1: Scan Website --> <!-- Step 1: Scan Website -->
@ -1183,7 +1183,7 @@
<div class="step-icon in_progress"> <div class="step-icon in_progress">
<div class="step-spinner"></div> <div class="step-spinner"></div>
</div> </div>
<span class="step-text in_progress">Skanuje strone WWW <span class="source-tag website">WWW</span></span> <span class="step-text in_progress">Skanuję stronę WWW <span class="source-tag website">WWW</span></span>
</div> </div>
<!-- Step 2: Facebook --> <!-- Step 2: Facebook -->
@ -1263,7 +1263,7 @@
<circle cx="12" cy="12" r="10" stroke-width="2"/> <circle cx="12" cy="12" r="10" stroke-width="2"/>
</svg> </svg>
</div> </div>
<span class="step-text pending">Zapisuje wyniki</span> <span class="step-text pending">Zapisuję wyniki</span>
</div> </div>
</div> </div>
</div> </div>
@ -1278,7 +1278,7 @@
</svg> </svg>
</div> </div>
<div class="modal-title" id="modalTitle">Sukces</div> <div class="modal-title" id="modalTitle">Sukces</div>
<div class="modal-description" id="modalDescription">Operacja zakonczona pomyslnie.</div> <div class="modal-description" id="modalDescription">Operacja zakończona pomyślnie.</div>
<button class="modal-btn" onclick="closeModal()">OK</button> <button class="modal-btn" onclick="closeModal()">OK</button>
</div> </div>
</div> </div>
@ -1386,7 +1386,7 @@ async function animatePlatformSteps(foundPlatforms, googleData) {
const delay = 400; // ms between steps - slower for readability const delay = 400; // ms between steps - slower for readability
// Website scan complete // Website scan complete
updateStep('step-website', 'complete', 'Skanowanie strony WWW zakonczone <span class="source-tag website">WWW</span>'); updateStep('step-website', 'complete', 'Skanowanie strony WWW zakończone <span class="source-tag website">WWW</span>');
await new Promise(r => setTimeout(r, delay)); await new Promise(r => setTimeout(r, delay));
// Process each platform // Process each platform
@ -1450,7 +1450,7 @@ async function runAudit() {
await animatePlatformSteps(foundPlatforms, googleData); await animatePlatformSteps(foundPlatforms, googleData);
// Save step // Save step
updateStep('step-save', 'in_progress', 'Zapisuje wyniki do bazy...'); updateStep('step-save', 'in_progress', 'Zapisuję wyniki do bazy...');
await new Promise(r => setTimeout(r, 400)); await new Promise(r => setTimeout(r, 400));
if (response.ok && data.success) { if (response.ok && data.success) {
@ -1460,18 +1460,18 @@ async function runAudit() {
// Wait longer for user to see complete results // Wait longer for user to see complete results
await new Promise(r => setTimeout(r, 4000)); await new Promise(r => setTimeout(r, 4000));
hideLoading(); hideLoading();
showModal('Audyt zakonczony', `Znaleziono ${data.profiles_found || 0} profili social media. Strona zostanie odswiezona.`, true); showModal('Audyt zakończony', `Znaleziono ${data.profiles_found || 0} profili social media. Strona zostanie odświeżona.`, true);
setTimeout(() => location.reload(), 2000); setTimeout(() => location.reload(), 2000);
} else { } else {
updateStep('step-save', 'error', 'Blad zapisu: ' + (data.error || 'nieznany blad')); updateStep('step-save', 'error', 'Błąd zapisu: ' + (data.error || 'nieznany błąd'));
await new Promise(r => setTimeout(r, 4000)); await new Promise(r => setTimeout(r, 4000));
hideLoading(); hideLoading();
showModal('Blad', data.error || 'Wystapil nieznany blad podczas audytu.', false); showModal('Błąd', data.error || 'Wystąpił nieznany błąd podczas audytu.', false);
if (btn) btn.disabled = false; if (btn) btn.disabled = false;
} }
} catch (error) { } catch (error) {
hideLoading(); hideLoading();
showModal('Blad polaczenia', 'Nie udalo sie polaczyc z serwerem: ' + error.message, false); showModal('Błąd połączenia', 'Nie udało się połączyć z serwerem: ' + error.message, false);
if (btn) btn.disabled = false; if (btn) btn.disabled = false;
} }
} }
@ -1545,9 +1545,9 @@ async function runAIAnalysis(force) {
const results = document.getElementById('aiResults'); const results = document.getElementById('aiResults');
results.innerHTML = ` results.innerHTML = `
<div style="background: #fef2f2; border: 1px solid #fecaca; padding: var(--spacing-lg); border-radius: var(--radius-lg); text-align: center;"> <div style="background: #fef2f2; border: 1px solid #fecaca; padding: var(--spacing-lg); border-radius: var(--radius-lg); text-align: center;">
<p style="color: #dc2626; font-weight: 600; margin-bottom: var(--spacing-sm);">Blad analizy AI</p> <p style="color: #dc2626; font-weight: 600; margin-bottom: var(--spacing-sm);">Błąd analizy AI</p>
<p style="color: #991b1b; font-size: var(--font-size-sm);">${escapeHtml(data.error || 'Nieznany blad')}</p> <p style="color: #991b1b; font-size: var(--font-size-sm);">${escapeHtml(data.error || 'Nieznany błąd')}</p>
<button class="btn btn-outline btn-sm" onclick="runAIAnalysis()" style="margin-top: var(--spacing-md);">Sprobuj ponownie</button> <button class="btn btn-outline btn-sm" onclick="runAIAnalysis()" style="margin-top: var(--spacing-md);">Spróbuj ponownie</button>
</div>`; </div>`;
results.style.display = 'block'; results.style.display = 'block';
} }
@ -1559,9 +1559,9 @@ async function runAIAnalysis(force) {
const results = document.getElementById('aiResults'); const results = document.getElementById('aiResults');
results.innerHTML = ` results.innerHTML = `
<div style="background: #fef2f2; border: 1px solid #fecaca; padding: var(--spacing-lg); border-radius: var(--radius-lg); text-align: center;"> <div style="background: #fef2f2; border: 1px solid #fecaca; padding: var(--spacing-lg); border-radius: var(--radius-lg); text-align: center;">
<p style="color: #dc2626; font-weight: 600; margin-bottom: var(--spacing-sm);">Blad polaczenia</p> <p style="color: #dc2626; font-weight: 600; margin-bottom: var(--spacing-sm);">Błąd połączenia</p>
<p style="color: #991b1b; font-size: var(--font-size-sm);">${escapeHtml(error.message)}</p> <p style="color: #991b1b; font-size: var(--font-size-sm);">${escapeHtml(error.message)}</p>
<button class="btn btn-outline btn-sm" onclick="runAIAnalysis()" style="margin-top: var(--spacing-md);">Sprobuj ponownie</button> <button class="btn btn-outline btn-sm" onclick="runAIAnalysis()" style="margin-top: var(--spacing-md);">Spróbuj ponownie</button>
</div>`; </div>`;
results.style.display = 'block'; results.style.display = 'block';
} }
@ -1585,7 +1585,7 @@ function renderAIResults(data) {
actionsList.innerHTML = ''; actionsList.innerHTML = '';
const actions = data.actions || []; const actions = data.actions || [];
const priorityLabels = {critical: 'KRYTYCZNE', high: 'WYSOKI', medium: 'SREDNI', low: 'NISKI'}; const priorityLabels = {critical: 'KRYTYCZNE', high: 'WYSOKI', medium: 'ŚREDNI', low: 'NISKI'};
actions.forEach((action, idx) => { actions.forEach((action, idx) => {
const impact = action.impact_score || 5; const impact = action.impact_score || 5;
@ -1596,31 +1596,31 @@ function renderAIResults(data) {
card.innerHTML = ` card.innerHTML = `
<div style="display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--spacing-sm); flex-wrap: wrap; gap: var(--spacing-xs);"> <div style="display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--spacing-sm); flex-wrap: wrap; gap: var(--spacing-xs);">
<div style="display: flex; align-items: center; gap: var(--spacing-sm);"> <div style="display: flex; align-items: center; gap: var(--spacing-sm);">
<span class="ai-priority-badge ${action.priority || 'medium'}">${priorityLabels[action.priority] || 'SREDNI'}</span> <span class="ai-priority-badge ${action.priority || 'medium'}">${priorityLabels[action.priority] || 'ŚREDNI'}</span>
<span class="ai-action-title" style="font-weight: 600; color: var(--text-primary);">${escapeHtml(action.title || '')}</span> <span class="ai-action-title" style="font-weight: 600; color: var(--text-primary);">${escapeHtml(action.title || '')}</span>
</div> </div>
</div> </div>
<p style="color: var(--text-secondary); font-size: var(--font-size-sm); margin-bottom: var(--spacing-sm);">${escapeHtml(action.description || '')}</p> <p style="color: var(--text-secondary); font-size: var(--font-size-sm); margin-bottom: var(--spacing-sm);">${escapeHtml(action.description || '')}</p>
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-md); margin-bottom: var(--spacing-sm);"> <div style="display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-md); margin-bottom: var(--spacing-sm);">
<div> <div>
<div style="font-size: var(--font-size-xs); color: var(--text-tertiary); margin-bottom: 2px;">Wplyw: ${impact}/10</div> <div style="font-size: var(--font-size-xs); color: var(--text-tertiary); margin-bottom: 2px;">Wpływ: ${impact}/10</div>
<div class="ai-score-bar"><div class="ai-score-bar-fill impact" style="width: ${impact * 10}%;"></div></div> <div class="ai-score-bar"><div class="ai-score-bar-fill impact" style="width: ${impact * 10}%;"></div></div>
</div> </div>
<div> <div>
<div style="font-size: var(--font-size-xs); color: var(--text-tertiary); margin-bottom: 2px;">Wysilek: ${effort}/10</div> <div style="font-size: var(--font-size-xs); color: var(--text-tertiary); margin-bottom: 2px;">Wysiłek: ${effort}/10</div>
<div class="ai-score-bar"><div class="ai-score-bar-fill effort" style="width: ${effort * 10}%;"></div></div> <div class="ai-score-bar"><div class="ai-score-bar-fill effort" style="width: ${effort * 10}%;"></div></div>
</div> </div>
</div> </div>
<div class="ai-action-buttons"> <div class="ai-action-buttons">
<button class="btn btn-outline btn-sm" onclick="generateContent('${action.action_type}', ${idx})"> <button class="btn btn-outline btn-sm" onclick="generateContent('${action.action_type}', ${idx})">
<svg width="14" height="14" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"/></svg> <svg width="14" height="14" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"/></svg>
Wygeneruj tresc Wygeneruj treść
</button> </button>
<button class="btn btn-outline btn-sm" onclick="markAction(${idx}, 'implemented')" style="color: #10b981; border-color: #10b981;"> <button class="btn btn-outline btn-sm" onclick="markAction(${idx}, 'implemented')" style="color: #10b981; border-color: #10b981;">
<svg width="14" height="14" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/></svg> <svg width="14" height="14" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/></svg>
Zrobione Zrobione
</button> </button>
<button class="btn btn-outline btn-sm" onclick="markAction(${idx}, 'dismissed')" style="color: var(--text-tertiary); border-color: var(--border);">Odrzuc</button> <button class="btn btn-outline btn-sm" onclick="markAction(${idx}, 'dismissed')" style="color: var(--text-tertiary); border-color: var(--border);">Odrzuć</button>
</div> </div>
<div id="ai-content-${idx}" style="display: none;"></div> <div id="ai-content-${idx}" style="display: none;"></div>
`; `;
@ -1642,7 +1642,7 @@ async function generateContent(actionType, idx) {
container.style.display = container.style.display === 'none' ? 'block' : 'none'; container.style.display = container.style.display === 'none' ? 'block' : 'none';
return; return;
} }
container.innerHTML = '<div style="padding: var(--spacing-md); color: var(--text-secondary); font-size: var(--font-size-sm);">Generowanie tresci...</div>'; container.innerHTML = '<div style="padding: var(--spacing-md); color: var(--text-secondary); font-size: var(--font-size-sm);">Generowanie treści...</div>';
container.style.display = 'block'; container.style.display = 'block';
try { try {
const response = await fetch('/api/audit/generate-content', { const response = await fetch('/api/audit/generate-content', {
@ -1667,15 +1667,15 @@ async function generateContent(actionType, idx) {
} else { } else {
container.innerHTML = ` container.innerHTML = `
<div style="padding: var(--spacing-sm); background: #fef2f2; border-radius: var(--radius-sm); margin-top: var(--spacing-sm);"> <div style="padding: var(--spacing-sm); background: #fef2f2; border-radius: var(--radius-sm); margin-top: var(--spacing-sm);">
<span style="color: #dc2626;">${escapeHtml(data.error || 'Blad generowania')}</span> <span style="color: #dc2626;">${escapeHtml(data.error || 'Błąd generowania')}</span>
<button class="btn btn-outline btn-sm" onclick="generateContent('${actionType}', ${idx})" style="margin-left: var(--spacing-sm);">Ponow</button> <button class="btn btn-outline btn-sm" onclick="generateContent('${actionType}', ${idx})" style="margin-left: var(--spacing-sm);">Ponów</button>
</div>`; </div>`;
} }
} catch (error) { } catch (error) {
container.innerHTML = ` container.innerHTML = `
<div style="padding: var(--spacing-sm); background: #fef2f2; border-radius: var(--radius-sm); margin-top: var(--spacing-sm);"> <div style="padding: var(--spacing-sm); background: #fef2f2; border-radius: var(--radius-sm); margin-top: var(--spacing-sm);">
<span style="color: #dc2626;">${escapeHtml(error.message)}</span> <span style="color: #dc2626;">${escapeHtml(error.message)}</span>
<button class="btn btn-outline btn-sm" onclick="generateContent('${actionType}', ${idx})" style="margin-left: var(--spacing-sm);">Ponow</button> <button class="btn btn-outline btn-sm" onclick="generateContent('${actionType}', ${idx})" style="margin-left: var(--spacing-sm);">Ponów</button>
</div>`; </div>`;
} }
} }