Poprawki wizualne

This commit is contained in:
Flatlogic Bot 2026-04-11 19:41:26 +00:00
parent 76c13be9e9
commit 7692520efb
5 changed files with 92 additions and 6 deletions

View File

@ -406,6 +406,12 @@ function diagnostic_email_escape(?string $value): string
return htmlspecialchars((string)$value, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
}
function diagnostic_email_brand_marker_html(): string
{
return '<div style="display:inline-block;padding:8px 14px;border-radius:999px;background:rgba(255,255,255,0.16);border:1px solid rgba(255,255,255,0.22);font-size:12px;font-weight:800;letter-spacing:0.16em;text-transform:uppercase;color:#ffffff;">DOKTOR <span style="color:#ff9c57;">BIZNES</span></div>'
. '<div style="margin:14px 0 10px;font-size:13px;line-height:1.5;color:rgba(255,255,255,0.88);font-weight:600;">Gdy Twój biznes potrzebuje trafnej diagnozy</div>';
}
function diagnostic_email_document(string $subject, string $preheader, string $contentHtml): string
{
$safeSubject = diagnostic_email_escape($subject);
@ -417,9 +423,10 @@ function diagnostic_email_document(string $subject, string $preheader, string $c
. '<div style="display:none;max-height:0;overflow:hidden;opacity:0;color:transparent;">' . $safePreheader . '</div>'
. '<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="width:100%;border-collapse:collapse;background-color:#f3f4f6;">'
. '<tr><td align="center" style="padding:24px 12px;">'
. '<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="max-width:680px;width:100%;border-collapse:collapse;background-color:#ffffff;border:1px solid #e5e7eb;border-radius:20px;overflow:hidden;box-shadow:0 12px 32px rgba(15,23,42,0.08);">'
. '<tr><td style="padding:32px 32px 12px;background:linear-gradient(135deg,#111827 0%,#1f2937 100%);color:#ffffff;">'
. '<div style="font-size:12px;letter-spacing:0.12em;text-transform:uppercase;opacity:0.72;margin-bottom:12px;">Przegląd procesów</div>'
. '<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="max-width:680px;width:100%;border-collapse:collapse;background-color:#ffffff;border:1px solid #d8e3f3;border-radius:20px;overflow:hidden;box-shadow:0 12px 32px rgba(15,23,42,0.08);">'
. '<tr><td style="padding:32px 32px 18px;background:linear-gradient(135deg,#38a7e8 0%,#1d88d4 46%,#0e5fb5 100%);color:#ffffff;">'
. diagnostic_email_brand_marker_html()
. '<div style="font-size:12px;letter-spacing:0.12em;text-transform:uppercase;opacity:0.82;margin-bottom:12px;">Przegląd procesów</div>'
. '<div style="font-size:28px;line-height:1.2;font-weight:700;">' . $safeSubject . '</div>'
. '</td></tr>'
. '<tr><td style="padding:32px;">' . $contentHtml . '</td></tr>'
@ -446,7 +453,7 @@ function diagnostic_email_list(array $items, string $accentColor = '#111827'): s
{
$html = '<ul style="margin:0;padding:0 0 0 20px;color:#374151;font-size:15px;line-height:1.7;">';
foreach ($items as $item) {
$html .= '<li style="margin:0 0 10px;"><span style="color:' . diagnostic_email_escape($accentColor) . ';"></span> ' . diagnostic_email_escape((string)$item) . '</li>';
$html .= '<li style="margin:0 0 10px;color:' . diagnostic_email_escape($accentColor) . ';"><span style="color:#374151;">' . diagnostic_email_escape((string)$item) . '</span></li>';
}
return $html . '</ul>';
}
@ -696,6 +703,9 @@ function diagnostic_build_report_text(array $attempt, array $copy): string
{
$result = $attempt['result'] ?? [];
$lines = [];
$lines[] = 'DOKTOR BIZNES';
$lines[] = 'Gdy Twój biznes potrzebuje trafnej diagnozy';
$lines[] = '';
$lines[] = (string)($copy['subject'] ?? 'Raport z diagnozy dojrzałości procesowej');
$lines[] = 'Wynik: ' . ($result['segment_label'] ?? 'Diagnoza zakończona') . ' (' . (int)($result['percentage_score'] ?? 0) . '%)';
$lines[] = '';
@ -735,12 +745,35 @@ function diagnostic_strip_legacy_report_cta(array $package): array
'',
$html
) ?? $html;
$html = str_replace(
'background:linear-gradient(135deg,#111827 0%,#1f2937 100%);color:#ffffff;',
'background:linear-gradient(135deg,#38a7e8 0%,#1d88d4 46%,#0e5fb5 100%);color:#ffffff;',
$html
);
$html = preg_replace(
'~<li style="margin:0 0 10px;"><span style="color:[^"]*;">•</span>\s*([^<].*?)</li>~u',
'<li style="margin:0 0 10px;color:#111827;"><span style="color:#374151;">$1</span></li>',
$html
) ?? $html;
if (strpos($html, 'DOKTOR <span style="color:#ff9c57;">BIZNES</span>') === false) {
$html = preg_replace(
'~(<tr><td style="padding:32px 32px (?:12|18)px;background:[^"]*;color:#ffffff;">)~u',
'$1' . diagnostic_email_brand_marker_html(),
$html,
1
) ?? $html;
}
}
if ($text !== '') {
$text = preg_replace('/^.*omówić wynik z zespołem.*$/miu', '', $text) ?? $text;
$text = preg_replace('/
{3,}/', "\n\n", $text) ?? $text;
if ((function_exists('mb_stripos') ? mb_stripos($text, 'DOKTOR BIZNES', 0, 'UTF-8') : stripos($text, 'DOKTOR BIZNES')) === false) {
$text = "DOKTOR BIZNES
Gdy Twój biznes potrzebuje trafnej diagnozy
" . ltrim($text);
}
$text = preg_replace('/\n{3,}/', "\n\n", $text) ?? $text;
$text = trim($text);
}

View File

@ -1,3 +1,15 @@
@media (max-width: 767.98px) {
.doctor-biznes-badge {
width: 100%;
border-radius: 1rem;
}
.doctor-biznes-badge__tagline {
font-size: 0.82rem;
}
}
:root {
--bg: #f5f6f8;
--surface: #ffffff;
@ -155,6 +167,43 @@ h6 {
background: var(--surface-muted);
}
.doctor-biznes-badge {
display: inline-flex;
flex-wrap: wrap;
align-items: center;
gap: 0.7rem;
padding: 0.65rem 1rem;
border-radius: 999px;
color: #ffffff;
background: linear-gradient(135deg, #38a7e8 0%, #1d88d4 46%, #0e5fb5 100%);
box-shadow: 0 10px 28px rgba(14, 95, 181, 0.18);
}
.doctor-biznes-badge--compact {
padding: 0.5rem 0.85rem;
}
.doctor-biznes-badge__label {
font-size: 0.78rem;
line-height: 1;
font-weight: 800;
letter-spacing: 0.16em;
text-transform: uppercase;
white-space: nowrap;
}
.doctor-biznes-badge__label em {
color: #ff9c57;
font-style: normal;
}
.doctor-biznes-badge__tagline {
font-size: 0.9rem;
line-height: 1.4;
color: rgba(255, 255, 255, 0.9);
}
.feature-list,
.rank-list,
.answer-review-list {

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 KiB

View File

@ -183,6 +183,7 @@ $meta = diagnostic_meta('Diagnoza dojrzałości procesowej', 'Profesjonalna diag
<section class="surface-card p-4 p-lg-5 mb-4">
<div class="row g-4 align-items-center">
<div class="col-lg-7">
<div class="doctor-biznes-badge mb-3"><span class="doctor-biznes-badge__label">DOKTOR <em>BIZNES</em></span><span class="doctor-biznes-badge__tagline">Gdy Twój biznes potrzebuje trafnej diagnozy</span></div>
<div class="eyebrow mb-3">Narzędzie diagnostyczne</div>
<h1 class="page-title mb-3"><?= htmlspecialchars($definition['quiz']['title']) ?></h1>
<p class="lead text-secondary mb-4"><?= htmlspecialchars($definition['quiz']['subtitle']) ?></p>
@ -262,6 +263,7 @@ $meta = diagnostic_meta('Diagnoza dojrzałości procesowej', 'Profesjonalna diag
<section class="surface-card p-4 p-lg-5 mb-4">
<div class="d-flex flex-column flex-lg-row justify-content-between gap-3 align-items-lg-center mb-4">
<div>
<div class="doctor-biznes-badge doctor-biznes-badge--compact mb-3"><span class="doctor-biznes-badge__label">DOKTOR <em>BIZNES</em></span><span class="doctor-biznes-badge__tagline">Diagnoza operacyjna</span></div>
<div class="eyebrow mb-2"><?= htmlspecialchars($currentQuestion['section_name']) ?></div>
<h1 class="page-title mb-2"><?= htmlspecialchars($currentQuestion['text']) ?></h1>
<p class="text-secondary mb-0">Pytanie <?= $currentStep ?> z <?= $totalQuestions ?>. Odpowiedz zgodnie z aktualnym stanem organizacji, a nie stanem docelowym.</p>
@ -301,6 +303,7 @@ $meta = diagnostic_meta('Diagnoza dojrzałości procesowej', 'Profesjonalna diag
<section class="surface-card p-4 p-lg-5 mb-4">
<div class="d-flex flex-column flex-lg-row justify-content-between gap-4 align-items-lg-start mb-4">
<div>
<div class="doctor-biznes-badge doctor-biznes-badge--compact mb-3"><span class="doctor-biznes-badge__label">DOKTOR <em>BIZNES</em></span><span class="doctor-biznes-badge__tagline">Podsumowanie diagnozy</span></div>
<div class="eyebrow mb-3">Podsumowanie diagnozy</div>
<h1 class="page-title mb-2"><?= htmlspecialchars($result['segment_label'] ?? 'Diagnoza zakończona') ?></h1>
<p class="lead text-secondary mb-0"><?= htmlspecialchars($result['segment_summary'] ?? '') ?></p>

View File

@ -42,6 +42,7 @@ $meta = diagnostic_meta('Diagnoza dojrzałości procesowej', 'Profesjonalne narz
<div class="container py-lg-4">
<div class="row g-4 align-items-center">
<div class="col-lg-7">
<div class="doctor-biznes-badge mb-3"><span class="doctor-biznes-badge__label">DOKTOR <em>BIZNES</em></span><span class="doctor-biznes-badge__tagline">Gdy Twój biznes potrzebuje trafnej diagnozy</span></div>
<span class="pill-badge mb-3">Narzędzie dla firm B2B i zespołów operacyjnych</span>
<h1 class="display-title mb-4">Sprawdź, na ile procesy w Twojej firmie gotowe do wzrostu.</h1>
<p class="lead text-secondary mb-3">To narzędzie pomaga właścicielom firm, dyrektorom zarządzającym i liderom operacyjnym szybko ocenić dojrzałość operacyjną organizacji, wskazać obszary chaosu i ustalić priorytety zmian.</p>