feat(audit): Complete audit templates with missing UI fields
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Social: cover photo, yearly posts, posting frequency, content types, profile description GBP: recent reviews list, keyword analysis, avg response time SEO: Core Web Vitals (LCP/FID/CLS), Technical SEO checklist Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9966c53f57
commit
c9c7c192cd
@ -12,7 +12,7 @@ from flask_login import current_user, login_required
|
||||
|
||||
from database import (
|
||||
SessionLocal, Company, CompanyWebsiteAnalysis,
|
||||
CompanySocialMedia, ITAudit
|
||||
CompanySocialMedia, ITAudit, CompanyCitation, GBPReview
|
||||
)
|
||||
from . import bp
|
||||
|
||||
@ -76,6 +76,11 @@ def seo_audit_dashboard(slug):
|
||||
CompanyWebsiteAnalysis.company_id == company.id
|
||||
).order_by(CompanyWebsiteAnalysis.seo_audited_at.desc()).first()
|
||||
|
||||
# Get citations for this company
|
||||
citations = db.query(CompanyCitation).filter(
|
||||
CompanyCitation.company_id == company.id
|
||||
).order_by(CompanyCitation.directory_name).all() if analysis else []
|
||||
|
||||
# Build SEO data dict if analysis exists
|
||||
seo_data = None
|
||||
if analysis and analysis.seo_audited_at:
|
||||
@ -86,7 +91,45 @@ def seo_audit_dashboard(slug):
|
||||
'best_practices_score': analysis.pagespeed_best_practices_score,
|
||||
'audited_at': analysis.seo_audited_at,
|
||||
'audit_version': analysis.seo_audit_version,
|
||||
'url': analysis.website_url
|
||||
'url': analysis.website_url,
|
||||
# Local SEO fields
|
||||
'local_seo_score': analysis.local_seo_score,
|
||||
'has_local_business_schema': analysis.has_local_business_schema,
|
||||
'local_business_schema_fields': analysis.local_business_schema_fields,
|
||||
'nap_on_website': analysis.nap_on_website,
|
||||
'has_google_maps_embed': analysis.has_google_maps_embed,
|
||||
'has_local_keywords': analysis.has_local_keywords,
|
||||
'local_keywords_found': analysis.local_keywords_found,
|
||||
'citations_count': analysis.citations_count,
|
||||
'content_freshness_score': analysis.content_freshness_score,
|
||||
'last_modified_date': analysis.last_modified_date,
|
||||
# Core Web Vitals
|
||||
'lcp_ms': analysis.largest_contentful_paint_ms,
|
||||
'fid_ms': analysis.first_input_delay_ms,
|
||||
'cls': float(analysis.cumulative_layout_shift) if analysis.cumulative_layout_shift is not None else None,
|
||||
# Heading structure
|
||||
'h1_count': analysis.h1_count,
|
||||
'h1_text': analysis.h1_text,
|
||||
'h2_count': analysis.h2_count,
|
||||
'h3_count': analysis.h3_count,
|
||||
# Image SEO
|
||||
'total_images': analysis.total_images,
|
||||
'images_without_alt': analysis.images_without_alt,
|
||||
# Links
|
||||
'internal_links_count': analysis.internal_links_count,
|
||||
'external_links_count': analysis.external_links_count,
|
||||
'broken_links_count': analysis.broken_links_count,
|
||||
# SSL
|
||||
'has_ssl': analysis.has_ssl,
|
||||
'ssl_expires_at': analysis.ssl_expires_at,
|
||||
# Analytics
|
||||
'has_google_analytics': analysis.has_google_analytics,
|
||||
'has_google_tag_manager': analysis.has_google_tag_manager,
|
||||
# Social sharing
|
||||
'has_og_tags': analysis.has_og_tags,
|
||||
'has_twitter_cards': analysis.has_twitter_cards,
|
||||
# Citations list
|
||||
'citations': [{'directory_name': c.directory_name, 'listing_url': c.listing_url, 'status': c.status, 'nap_accurate': c.nap_accurate} for c in citations],
|
||||
}
|
||||
|
||||
# Determine if user can run audit (user with company edit rights)
|
||||
@ -161,7 +204,20 @@ def social_audit_dashboard(slug):
|
||||
'page_name': profile.page_name,
|
||||
'followers_count': profile.followers_count,
|
||||
'verified_at': profile.verified_at,
|
||||
'last_checked_at': profile.last_checked_at
|
||||
'last_checked_at': profile.last_checked_at,
|
||||
# Enhanced audit fields
|
||||
'has_profile_photo': profile.has_profile_photo,
|
||||
'has_cover_photo': profile.has_cover_photo,
|
||||
'has_bio': profile.has_bio,
|
||||
'profile_description': profile.profile_description,
|
||||
'posts_count_30d': profile.posts_count_30d,
|
||||
'posts_count_365d': profile.posts_count_365d,
|
||||
'last_post_date': profile.last_post_date,
|
||||
'posting_frequency_score': profile.posting_frequency_score,
|
||||
'engagement_rate': profile.engagement_rate,
|
||||
'content_types': profile.content_types,
|
||||
'profile_completeness_score': profile.profile_completeness_score,
|
||||
'followers_history': profile.followers_history,
|
||||
}
|
||||
|
||||
# Calculate score (platforms with profiles / total platforms)
|
||||
@ -239,6 +295,11 @@ def gbp_audit_dashboard(slug):
|
||||
# Get latest audit for this company
|
||||
audit = gbp_get_company_audit(db, company.id)
|
||||
|
||||
# Get recent reviews for this company
|
||||
recent_reviews = db.query(GBPReview).filter(
|
||||
GBPReview.company_id == company.id
|
||||
).order_by(GBPReview.publish_time.desc()).limit(5).all() if audit else []
|
||||
|
||||
# If no audit exists, we still render the page (template handles this)
|
||||
# The user can trigger an audit from the dashboard
|
||||
|
||||
@ -250,6 +311,7 @@ def gbp_audit_dashboard(slug):
|
||||
return render_template('gbp_audit.html',
|
||||
company=company,
|
||||
audit=audit,
|
||||
recent_reviews=recent_reviews,
|
||||
can_audit=can_audit,
|
||||
gbp_audit_available=GBP_AUDIT_AVAILABLE,
|
||||
gbp_audit_version=GBP_AUDIT_VERSION
|
||||
|
||||
@ -1107,6 +1107,298 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if audit.review_count and audit.review_count > 0 %}
|
||||
<!-- Reviews Analysis Section -->
|
||||
<div class="fields-section">
|
||||
<h2 class="section-title">
|
||||
<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="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>
|
||||
Analiza opinii
|
||||
</h2>
|
||||
<div class="fields-grid">
|
||||
<!-- Review Response Rate -->
|
||||
{% if audit.review_response_rate is not none %}
|
||||
<div class="field-card {{ 'complete' if audit.review_response_rate >= 80 else ('partial' if audit.review_response_rate >= 40 else 'missing') }}">
|
||||
<div class="field-header">
|
||||
<span class="field-name">Odpowiedzi na opinie</span>
|
||||
<span class="field-status-badge {{ 'complete' if audit.review_response_rate >= 80 else ('partial' if audit.review_response_rate >= 40 else 'missing') }}">
|
||||
{{ '%.0f'|format(audit.review_response_rate) }}%
|
||||
</span>
|
||||
</div>
|
||||
<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
|
||||
</div>
|
||||
<div class="field-score">
|
||||
<div class="field-score-bar">
|
||||
<div class="field-score-fill {{ 'complete' if audit.review_response_rate >= 80 else ('partial' if audit.review_response_rate >= 40 else 'missing') }}" style="width: {{ audit.review_response_rate }}%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Review Sentiment -->
|
||||
{% if audit.review_sentiment %}
|
||||
{% set sentiment = audit.review_sentiment %}
|
||||
<div class="field-card complete">
|
||||
<div class="field-header">
|
||||
<span class="field-name">Sentyment opinii</span>
|
||||
</div>
|
||||
<div class="field-value">
|
||||
<div style="display: flex; gap: var(--spacing-md); margin-top: var(--spacing-xs);">
|
||||
<span style="color: #10b981;">{{ sentiment.get('positive', 0) }} pozytywnych</span>
|
||||
<span style="color: #f59e0b;">{{ sentiment.get('neutral', 0) }} neutralnych</span>
|
||||
<span style="color: #ef4444;">{{ sentiment.get('negative', 0) }} negatywnych</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Recent Reviews -->
|
||||
{% if audit.reviews_30d is not none %}
|
||||
<div class="field-card {{ 'complete' if audit.reviews_30d >= 3 else ('partial' if audit.reviews_30d >= 1 else 'missing') }}">
|
||||
<div class="field-header">
|
||||
<span class="field-name">Nowe opinie (30 dni)</span>
|
||||
<span class="field-status-badge {{ 'complete' if audit.reviews_30d >= 3 else ('partial' if audit.reviews_30d >= 1 else 'missing') }}">
|
||||
{{ audit.reviews_30d }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Review Keywords -->
|
||||
{% if audit.review_keywords %}
|
||||
<div class="field-card complete">
|
||||
<div class="field-header">
|
||||
<span class="field-name">Slowa kluczowe z opinii</span>
|
||||
</div>
|
||||
<div class="field-value">
|
||||
{% for keyword in audit.review_keywords[:8] %}
|
||||
<span style="display: inline-block; padding: 2px 8px; margin: 2px; background: #dbeafe; color: #1e40af; border-radius: var(--radius-sm); font-size: var(--font-size-xs);">{{ keyword }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if recent_reviews and recent_reviews|length > 0 %}
|
||||
<!-- Recent Reviews Section -->
|
||||
<div class="fields-section">
|
||||
<h2 class="section-title">
|
||||
<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="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"/>
|
||||
</svg>
|
||||
Ostatnie opinie ({{ recent_reviews|length }})
|
||||
</h2>
|
||||
<div style="display: flex; flex-direction: column; gap: var(--spacing-sm);">
|
||||
{% for review in recent_reviews %}
|
||||
<div class="field-card {{ 'complete' if review.sentiment == 'positive' else ('partial' if review.sentiment == 'neutral' else 'missing') }}">
|
||||
<div class="field-header">
|
||||
<span class="field-name">
|
||||
{% for i in range(review.rating) %}
|
||||
<span style="color: #f59e0b;">★</span>
|
||||
{% endfor %}
|
||||
{% for i in range(5 - review.rating) %}
|
||||
<span style="color: #d1d5db;">★</span>
|
||||
{% endfor %}
|
||||
</span>
|
||||
<div style="display: flex; align-items: center; gap: var(--spacing-xs);">
|
||||
{% if review.sentiment %}
|
||||
<span class="field-status-badge {{ 'complete' if review.sentiment == 'positive' else ('partial' if review.sentiment == 'neutral' else 'missing') }}">
|
||||
{{ 'Pozytywna' if review.sentiment == 'positive' else ('Neutralna' if review.sentiment == 'neutral' else 'Negatywna') }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if review.has_owner_response %}
|
||||
<span style="display: inline-flex; align-items: center; gap: 2px; font-size: 11px; padding: 2px 8px; background: #dbeafe; color: #1e40af; border-radius: var(--radius-sm);">
|
||||
<svg width="12" height="12" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"/></svg>
|
||||
Odpowiedz
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between; font-size: var(--font-size-xs); color: var(--text-tertiary); margin-bottom: var(--spacing-xs);">
|
||||
<span>{{ review.author_name or 'Anonim' }}</span>
|
||||
<span>{{ review.publish_time.strftime('%d.%m.%Y') if review.publish_time else '' }}</span>
|
||||
</div>
|
||||
{% if review.text %}
|
||||
<div class="field-value">{{ review.text[:200] }}{% if review.text|length > 200 %}...{% endif %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if audit.description_keywords or audit.avg_review_response_days is not none %}
|
||||
<!-- Keyword & Response Time Analysis -->
|
||||
<div class="fields-section">
|
||||
<h2 class="section-title">
|
||||
<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"/>
|
||||
</svg>
|
||||
Analiza dodatkowa
|
||||
</h2>
|
||||
<div class="fields-grid">
|
||||
{% if audit.avg_review_response_days is not none %}
|
||||
{% set resp_days = audit.avg_review_response_days %}
|
||||
<div class="field-card {{ 'complete' if resp_days <= 2 else ('partial' if resp_days <= 7 else 'missing') }}">
|
||||
<div class="field-header">
|
||||
<span class="field-name">
|
||||
<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"/>
|
||||
</svg>
|
||||
Sredni czas odpowiedzi
|
||||
</span>
|
||||
<span class="field-status-badge {{ 'complete' if resp_days <= 2 else ('partial' if resp_days <= 7 else 'missing') }}">
|
||||
{{ '%.1f'|format(resp_days) }} dni
|
||||
</span>
|
||||
</div>
|
||||
<div class="field-value">
|
||||
{% if resp_days <= 2 %}
|
||||
Doskonaly czas reakcji na opinie klientow
|
||||
{% elif resp_days <= 7 %}
|
||||
Dobry czas reakcji — postaraj sie odpowiadac w ciagu 1-2 dni
|
||||
{% else %}
|
||||
Dlugi czas odpowiedzi — klienci oczekuja szybszej reakcji
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if audit.description_keywords %}
|
||||
<div class="field-card complete">
|
||||
<div class="field-header">
|
||||
<span class="field-name">
|
||||
<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"/>
|
||||
</svg>
|
||||
Slowa kluczowe w opisie
|
||||
</span>
|
||||
</div>
|
||||
<div class="field-value">
|
||||
{% for keyword in audit.description_keywords[:10] %}
|
||||
<span style="display: inline-block; padding: 2px 8px; margin: 2px; background: #e0e7ff; color: #3730a3; border-radius: var(--radius-sm); font-size: var(--font-size-xs);">{{ keyword }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if audit.keyword_density_score is not none %}
|
||||
<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;">
|
||||
<span>Gestosc slow kluczowych</span>
|
||||
<span>{{ audit.keyword_density_score }}/10</span>
|
||||
</div>
|
||||
<div style="height: 6px; background: var(--border); border-radius: 3px; overflow: hidden;">
|
||||
<div style="height: 100%; width: {{ audit.keyword_density_score * 10 }}%; border-radius: 3px; background: {% if audit.keyword_density_score >= 7 %}#10b981{% elif audit.keyword_density_score >= 4 %}#f59e0b{% else %}#ef4444{% endif %};"></div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if audit.nap_consistent is not none %}
|
||||
<!-- NAP Consistency Section -->
|
||||
<div class="fields-section">
|
||||
<h2 class="section-title">
|
||||
<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"/>
|
||||
</svg>
|
||||
Spojnosc NAP (Nazwa / Adres / Telefon)
|
||||
</h2>
|
||||
{% if audit.nap_consistent %}
|
||||
<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.
|
||||
</div>
|
||||
{% 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);">
|
||||
Wykryto roznice miedzy wizytowka Google a strona WWW firmy.
|
||||
</div>
|
||||
{% if audit.nap_issues %}
|
||||
<div class="fields-grid">
|
||||
{% for issue in audit.nap_issues %}
|
||||
<div class="field-card missing">
|
||||
<div class="field-header">
|
||||
<span class="field-name">{{ issue.field|capitalize }}</span>
|
||||
<span class="field-status-badge missing">Rozbieznosc</span>
|
||||
</div>
|
||||
<div class="field-value">
|
||||
<div><strong>Google:</strong> {{ issue.gbp or 'Brak' }}</div>
|
||||
<div><strong>Strona WWW:</strong> {{ issue.website or 'Brak' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if audit.has_posts is not none or audit.attributes %}
|
||||
<!-- Activity & Attributes -->
|
||||
<div class="fields-section">
|
||||
<h2 class="section-title">
|
||||
<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"/>
|
||||
</svg>
|
||||
Aktywnosc i atrybuty
|
||||
</h2>
|
||||
<div class="fields-grid">
|
||||
{% if audit.has_posts is not none %}
|
||||
<div class="field-card {{ 'complete' if audit.has_posts else 'missing' }}">
|
||||
<div class="field-header">
|
||||
<span class="field-name">Posty w Google</span>
|
||||
<span class="field-status-badge {{ 'complete' if audit.has_posts else 'missing' }}">{{ 'Aktywne' if audit.has_posts else 'Brak' }}</span>
|
||||
</div>
|
||||
{% if audit.posts_count_30d %}
|
||||
<div class="field-value">{{ audit.posts_count_30d }} postow w ostatnich 30 dniach</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if audit.has_qa is not none %}
|
||||
<div class="field-card {{ 'complete' if audit.has_qa else 'partial' }}">
|
||||
<div class="field-header">
|
||||
<span class="field-name">Pytania i odpowiedzi</span>
|
||||
<span class="field-status-badge {{ 'complete' if audit.has_qa else 'partial' }}">{{ audit.qa_count or 0 }}</span>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if audit.has_products is not none %}
|
||||
<div class="field-card {{ 'complete' if audit.has_products else 'partial' }}">
|
||||
<div class="field-header">
|
||||
<span class="field-name">Produkty / Menu</span>
|
||||
<span class="field-status-badge {{ 'complete' if audit.has_products else 'partial' }}">{{ 'Dodane' if audit.has_products else 'Brak' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if audit.has_special_hours is not none %}
|
||||
<div class="field-card {{ 'complete' if audit.has_special_hours else 'partial' }}">
|
||||
<div class="field-header">
|
||||
<span class="field-name">Godziny specjalne</span>
|
||||
<span class="field-status-badge {{ 'complete' if audit.has_special_hours else 'partial' }}">{{ 'Ustawione' if audit.has_special_hours else 'Brak' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% 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>
|
||||
<div style="display: flex; flex-wrap: wrap; gap: var(--spacing-sm);">
|
||||
{% 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);">
|
||||
{{ category|capitalize }}: {{ count }}
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Recommendations Section -->
|
||||
{% if audit.recommendations %}
|
||||
<div class="recommendations-section">
|
||||
|
||||
@ -558,6 +558,269 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if seo_data.lcp_ms is not none or seo_data.fid_ms is not none or seo_data.cls is not none %}
|
||||
<!-- Core Web Vitals -->
|
||||
<h2 class="section-title">
|
||||
<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"/>
|
||||
</svg>
|
||||
Core Web Vitals
|
||||
</h2>
|
||||
|
||||
<div class="metrics-grid">
|
||||
{% if seo_data.lcp_ms is not none %}
|
||||
{% set lcp = seo_data.lcp_ms %}
|
||||
{% set lcp_class = 'good' if lcp < 2500 else ('medium' if lcp < 4000 else 'poor') %}
|
||||
<div class="metric-card {{ lcp_class }}">
|
||||
<div class="metric-icon {{ lcp_class }}">
|
||||
<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"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="metric-name">LCP</div>
|
||||
<div class="metric-value {{ lcp_class }}">{{ '%.1f'|format(lcp / 1000) }}s</div>
|
||||
<div style="font-size: var(--font-size-xs); color: var(--text-tertiary); margin-top: 4px;">Largest Contentful Paint</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if seo_data.fid_ms is not none %}
|
||||
{% set fid = seo_data.fid_ms %}
|
||||
{% set fid_class = 'good' if fid < 100 else ('medium' if fid < 300 else 'poor') %}
|
||||
<div class="metric-card {{ fid_class }}">
|
||||
<div class="metric-icon {{ fid_class }}">
|
||||
<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="M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="metric-name">FID</div>
|
||||
<div class="metric-value {{ fid_class }}">{{ fid }}ms</div>
|
||||
<div style="font-size: var(--font-size-xs); color: var(--text-tertiary); margin-top: 4px;">First Input Delay</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if seo_data.cls is not none %}
|
||||
{% set cls = seo_data.cls %}
|
||||
{% set cls_class = 'good' if cls < 0.1 else ('medium' if cls < 0.25 else 'poor') %}
|
||||
<div class="metric-card {{ cls_class }}">
|
||||
<div class="metric-icon {{ cls_class }}">
|
||||
<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 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="metric-name">CLS</div>
|
||||
<div class="metric-value {{ cls_class }}">{{ '%.3f'|format(cls) }}</div>
|
||||
<div style="font-size: var(--font-size-xs); color: var(--text-tertiary); margin-top: 4px;">Cumulative Layout Shift</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if seo_data.local_seo_score is not none %}
|
||||
<!-- Local SEO Section -->
|
||||
<h2 class="section-title">
|
||||
<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.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"/>
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z"/>
|
||||
</svg>
|
||||
Local SEO
|
||||
</h2>
|
||||
|
||||
{% set lscore = seo_data.local_seo_score %}
|
||||
<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="display: flex; align-items: center; gap: var(--spacing-lg); margin-bottom: var(--spacing-lg);">
|
||||
<div style="width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; color: {% if lscore >= 70 %}#10b981{% elif lscore >= 40 %}#f59e0b{% else %}#ef4444{% endif %}; background: conic-gradient({% if lscore >= 70 %}#10b981{% elif lscore >= 40 %}#f59e0b{% else %}#ef4444{% endif %} calc({{ lscore }} * 3.6deg), #e2e8f0 0deg); position: relative;">
|
||||
<span style="position: absolute; width: 64px; height: 64px; border-radius: 50%; background: var(--surface);"></span>
|
||||
<span style="position: relative; z-index: 1;">{{ lscore }}</span>
|
||||
</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 %};">
|
||||
{% if lscore >= 70 %}Dobry Local SEO{% elif lscore >= 40 %}Przecietny Local SEO{% else %}Slaby Local SEO{% endif %}
|
||||
</div>
|
||||
<p style="font-size: var(--font-size-sm); color: var(--text-secondary); margin: 0;">Ocena optymalizacji pod lokalne wyszukiwanie</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Local SEO Checklist -->
|
||||
<div style="display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--spacing-sm);">
|
||||
<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_business_schema else '#fee2e2' }};">
|
||||
<span style="color: {{ '#10b981' if seo_data.has_local_business_schema else '#ef4444' }};">{{ '✓' if seo_data.has_local_business_schema else '✗' }}</span>
|
||||
<span style="font-size: var(--font-size-sm);">Schema.org LocalBusiness</span>
|
||||
</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_google_maps_embed else '#fee2e2' }};">
|
||||
<span style="color: {{ '#10b981' if seo_data.has_google_maps_embed else '#ef4444' }};">{{ '✓' if seo_data.has_google_maps_embed else '✗' }}</span>
|
||||
<span style="font-size: var(--font-size-sm);">Mapa Google na stronie</span>
|
||||
</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' }};">
|
||||
<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>
|
||||
</div>
|
||||
{% 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;">
|
||||
<span style="color: #10b981;">✓</span>
|
||||
<span style="font-size: var(--font-size-sm);">NAP na stronie (Nazwa, Adres, Telefon)</span>
|
||||
</div>
|
||||
{% else %}
|
||||
<div style="display: flex; align-items: center; gap: var(--spacing-sm); padding: var(--spacing-sm); border-radius: var(--radius); background: #fee2e2;">
|
||||
<span style="color: #ef4444;">✗</span>
|
||||
<span style="font-size: var(--font-size-sm);">NAP na stronie (Nazwa, Adres, Telefon)</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if seo_data.local_keywords_found %}
|
||||
<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>
|
||||
<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] %}
|
||||
<span style="padding: 2px 8px; background: #dbeafe; color: #1e40af; border-radius: var(--radius-sm); font-size: var(--font-size-xs);">{{ kw }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if seo_data.content_freshness_score is not none %}
|
||||
<!-- Content Freshness -->
|
||||
<div class="metrics-grid" style="margin-bottom: var(--spacing-xl);">
|
||||
{% set fresh = seo_data.content_freshness_score %}
|
||||
{% set fresh_class = 'good' if fresh >= 70 else ('medium' if fresh >= 40 else 'poor') %}
|
||||
<div class="metric-card {{ fresh_class }}">
|
||||
<div class="metric-icon {{ fresh_class }}">
|
||||
<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="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="metric-name">Swiezosc tresci</div>
|
||||
<div class="metric-value {{ fresh_class }}">{{ fresh }}</div>
|
||||
</div>
|
||||
{% if seo_data.last_modified_date %}
|
||||
<div class="metric-card medium">
|
||||
<div class="metric-icon medium">
|
||||
<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="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>
|
||||
</div>
|
||||
<div class="metric-name">Ostatnia modyfikacja</div>
|
||||
<div class="metric-value medium" style="font-size: var(--font-size-lg);">{{ seo_data.last_modified_date.strftime('%d.%m.%Y') }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if seo_data.citations and seo_data.citations|length > 0 %}
|
||||
<!-- Local Citations Section -->
|
||||
<h2 class="section-title">
|
||||
<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="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"/>
|
||||
</svg>
|
||||
Cytacje lokalne ({{ seo_data.citations_count or seo_data.citations|length }})
|
||||
</h2>
|
||||
|
||||
<div style="background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; margin-bottom: var(--spacing-xl);">
|
||||
{% for citation in seo_data.citations %}
|
||||
<div style="display: flex; align-items: center; justify-content: space-between; padding: var(--spacing-sm) var(--spacing-md); border-bottom: 1px solid var(--border); {% if loop.last %}border-bottom: none;{% endif %}">
|
||||
<div style="display: flex; align-items: center; gap: var(--spacing-sm);">
|
||||
<div style="width: 8px; height: 8px; border-radius: 50%; background: {{ '#10b981' if citation.status == 'found' else ('#f59e0b' if citation.status == 'incorrect' else '#ef4444') }};"></div>
|
||||
<span style="font-size: var(--font-size-sm); font-weight: 500;">{{ citation.directory_name }}</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; gap: var(--spacing-sm);">
|
||||
{% if citation.status == 'found' %}
|
||||
<span style="font-size: var(--font-size-xs); color: #10b981; padding: 2px 6px; background: #dcfce7; border-radius: var(--radius-sm);">Znaleziono</span>
|
||||
{% if citation.listing_url %}
|
||||
<a href="{{ citation.listing_url }}" target="_blank" rel="noopener" style="font-size: var(--font-size-xs); color: var(--primary);">Link</a>
|
||||
{% endif %}
|
||||
{% 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>
|
||||
{% else %}
|
||||
<span style="font-size: var(--font-size-xs); color: #ef4444; padding: 2px 6px; background: #fee2e2; border-radius: var(--radius-sm);">Nie znaleziono</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if seo_data.has_ssl is not none or seo_data.has_google_analytics is not none or seo_data.h1_count is not none or seo_data.total_images is not none %}
|
||||
<!-- Technical SEO Checklist -->
|
||||
<h2 class="section-title">
|
||||
<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"/>
|
||||
</svg>
|
||||
Technical SEO
|
||||
</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="display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--spacing-sm);">
|
||||
{% 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' }};">
|
||||
<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>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if seo_data.has_google_analytics 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_google_analytics else '#fee2e2' }};">
|
||||
<span style="color: {{ '#10b981' if seo_data.has_google_analytics else '#ef4444' }};">{{ '✓' if seo_data.has_google_analytics else '✗' }}</span>
|
||||
<span style="font-size: var(--font-size-sm);">Google Analytics</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if seo_data.has_google_tag_manager 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_google_tag_manager else '#fee2e2' }};">
|
||||
<span style="color: {{ '#10b981' if seo_data.has_google_tag_manager else '#ef4444' }};">{{ '✓' if seo_data.has_google_tag_manager else '✗' }}</span>
|
||||
<span style="font-size: var(--font-size-sm);">Google Tag Manager</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if seo_data.has_og_tags 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_og_tags else '#fee2e2' }};">
|
||||
<span style="color: {{ '#10b981' if seo_data.has_og_tags else '#ef4444' }};">{{ '✓' if seo_data.has_og_tags else '✗' }}</span>
|
||||
<span style="font-size: var(--font-size-sm);">Open Graph Tags</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if seo_data.has_twitter_cards 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_twitter_cards else '#fee2e2' }};">
|
||||
<span style="color: {{ '#10b981' if seo_data.has_twitter_cards else '#ef4444' }};">{{ '✓' if seo_data.has_twitter_cards else '✗' }}</span>
|
||||
<span style="font-size: var(--font-size-sm);">Twitter Cards</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if seo_data.h1_count is not none %}
|
||||
{% 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' }};">
|
||||
<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>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if seo_data.total_images is not none %}
|
||||
{% set alt_ok = (seo_data.images_without_alt or 0) == 0 %}
|
||||
<div style="display: flex; align-items: center; gap: var(--spacing-sm); padding: var(--spacing-sm); border-radius: var(--radius); background: {{ '#dcfce7' if alt_ok else '#fef3c7' }};">
|
||||
<span style="color: {{ '#10b981' if alt_ok else '#f59e0b' }};">{{ '✓' if alt_ok else '⚠' }}</span>
|
||||
<span style="font-size: var(--font-size-sm);">Obrazy: {{ seo_data.total_images }}{% if not alt_ok %} ({{ seo_data.images_without_alt }} bez alt){% else %} (wszystkie z alt){% endif %}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if seo_data.internal_links_count is not none or seo_data.external_links_count is not none %}
|
||||
{% set broken = seo_data.broken_links_count or 0 %}
|
||||
<div style="display: flex; align-items: center; gap: var(--spacing-sm); padding: var(--spacing-sm); border-radius: var(--radius); background: {{ '#dcfce7' if broken == 0 else '#fee2e2' }};">
|
||||
<span style="color: {{ '#10b981' if broken == 0 else '#ef4444' }};">{{ '✓' if broken == 0 else '✗' }}</span>
|
||||
<span style="font-size: var(--font-size-sm);">Linki: {{ seo_data.internal_links_count or 0 }} wew., {{ seo_data.external_links_count or 0 }} zew.{% if broken > 0 %}, {{ broken }} uszkodzonych{% endif %}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% 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);">
|
||||
<span style="font-weight: 600; color: var(--text-primary);">Tytul H1:</span>
|
||||
<span style="color: var(--text-secondary);">{{ seo_data.h1_text }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
<!-- No Audit State -->
|
||||
<div class="no-audit-state">
|
||||
|
||||
@ -761,24 +761,35 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
<span class="platform-name">{{ platform_names.get(platform, platform|title) }}</span>
|
||||
<span class="platform-status {% if profile and profile.check_status == 'needs_verification' %}needs-verification{% elif profile %}active{% else %}inactive{% endif %}">
|
||||
{% if profile and profile.check_status == 'needs_verification' %}
|
||||
{% if profile and profile.check_status == 'needs_verification' %}
|
||||
<span class="platform-status needs-verification">
|
||||
<svg width="12" height="12" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<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 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z"/>
|
||||
</svg>
|
||||
Do weryfikacji
|
||||
{% elif profile %}
|
||||
</span>
|
||||
{% elif profile and profile.last_post_date and (now - profile.last_post_date).days < 90 %}
|
||||
<span class="platform-status active">
|
||||
<svg width="12" height="12" 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>
|
||||
Aktywny
|
||||
{% else %}
|
||||
</span>
|
||||
{% elif profile %}
|
||||
<span class="platform-status" style="background: var(--bg-secondary); color: var(--text-secondary);">
|
||||
<svg width="12" height="12" 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>
|
||||
Znaleziony
|
||||
</span>
|
||||
{% else %}
|
||||
<span class="platform-status inactive">
|
||||
<svg width="12" height="12" 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"/>
|
||||
</svg>
|
||||
Brak profilu
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="platform-details">
|
||||
{% if profile %}
|
||||
@ -823,7 +834,105 @@
|
||||
{{ profile.verified_at.strftime('%d.%m.%Y') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if profile.has_bio %}
|
||||
<div class="platform-meta-item" title="Ma opis profilu">
|
||||
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h7"/>
|
||||
</svg>
|
||||
Opis
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if profile.has_profile_photo %}
|
||||
<div class="platform-meta-item" title="Ma zdjecie profilowe">
|
||||
<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"/>
|
||||
</svg>
|
||||
Avatar
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if profile.has_cover_photo %}
|
||||
<div class="platform-meta-item" title="Ma zdjecie w tle">
|
||||
<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="M15 13a3 3 0 11-6 0 3 3 0 016 0z"/>
|
||||
</svg>
|
||||
Cover
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if profile.posts_count_30d is not none and profile.posts_count_30d > 0 %}
|
||||
<div class="platform-meta-item" title="Posty w ostatnich 30 dniach">
|
||||
<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"/>
|
||||
</svg>
|
||||
{{ profile.posts_count_30d }} postow/30d
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if profile.engagement_rate is not none %}
|
||||
<div class="platform-meta-item" title="Wskaznik zaangazowania">
|
||||
<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"/>
|
||||
</svg>
|
||||
{{ '%.1f'|format(profile.engagement_rate) }}% engage
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if profile.posts_count_365d is not none and profile.posts_count_365d > 0 %}
|
||||
<div class="platform-meta-item" title="Posty w ostatnim roku">
|
||||
<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"/>
|
||||
</svg>
|
||||
{{ profile.posts_count_365d }} postow/rok
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if profile.last_post_date %}
|
||||
<div class="platform-meta-item" title="Ostatni post">
|
||||
<svg 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"/>
|
||||
</svg>
|
||||
Ostatni: {{ profile.last_post_date.strftime('%d.%m.%Y') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if profile.posting_frequency_score is not none %}
|
||||
<div class="platform-meta-item" title="Czestosc postowania: {{ profile.posting_frequency_score }}/10">
|
||||
<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"/>
|
||||
</svg>
|
||||
<span style="padding: 1px 6px; border-radius: 3px; font-size: 10px; font-weight: 600; background: {% if profile.posting_frequency_score >= 7 %}#dcfce7; color: #166534{% elif profile.posting_frequency_score >= 4 %}#fef3c7; color: #92400e{% else %}#fee2e2; color: #991b1b{% endif %};">{{ profile.posting_frequency_score }}/10</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if profile.content_types and profile.content_types is mapping %}
|
||||
{% for ctype, ccount in profile.content_types.items() %}
|
||||
<div class="platform-meta-item" title="{{ ctype|capitalize }}: {{ ccount }}">
|
||||
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
{% if ctype == 'videos' or ctype == 'video' %}
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"/>
|
||||
{% else %}
|
||||
<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"/>
|
||||
{% endif %}
|
||||
</svg>
|
||||
{{ ctype|capitalize }}: {{ ccount }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if profile.profile_description %}
|
||||
<div class="platform-meta-item" title="{{ profile.profile_description }}" style="max-width: 200px;">
|
||||
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
|
||||
</svg>
|
||||
<span style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">{{ profile.profile_description[:80] }}{% if profile.profile_description|length > 80 %}...{% endif %}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if profile and profile.profile_completeness_score is not none %}
|
||||
<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;">
|
||||
<span>Kompletnosc profilu</span>
|
||||
<span>{{ profile.profile_completeness_score }}%</span>
|
||||
</div>
|
||||
<div style="height: 6px; background: var(--border); border-radius: 3px; overflow: hidden;">
|
||||
<div style="height: 100%; width: {{ profile.profile_completeness_score }}%; border-radius: 3px; background: {% if profile.profile_completeness_score >= 80 %}#10b981{% elif profile.profile_completeness_score >= 50 %}#f59e0b{% else %}#ef4444{% endif %};"></div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<p class="platform-missing-text">Nie znaleziono profilu na tej platformie</p>
|
||||
{% endif %}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user