Poprawki z logo

This commit is contained in:
Flatlogic Bot 2026-04-11 19:54:45 +00:00
parent 7692520efb
commit 9926836594
7 changed files with 135 additions and 50 deletions

View File

@ -115,7 +115,7 @@ $notificationConfig = diagnostic_admin_is_authenticated() ? diagnostic_admin_not
<header class="site-header border-bottom bg-white sticky-top">
<nav class="navbar navbar-expand-lg navbar-light py-3">
<div class="container">
<a class="navbar-brand fw-semibold text-dark" href="/">Przegląd procesów</a>
<?= diagnostic_brand_logo_anchor('navbar-brand doctor-biznes-logo-link--nav') ?>
<div class="d-flex align-items-center gap-2 ms-auto">
<a class="btn btn-sm btn-outline-dark" href="/diagnostic.php">Diagnoza</a>
<?php if (diagnostic_admin_is_authenticated()): ?>

View File

@ -87,6 +87,59 @@ function diagnostic_meta(string $pageTitle, ?string $fallbackDescription = null)
];
}
function diagnostic_brand_home_url(): string
{
return 'https://doktorbiznes.pl/';
}
function diagnostic_brand_logo_public_path(): string
{
return '/assets/pasted-20260411-194222-a875bba4.png';
}
function diagnostic_brand_logo_file_path(): string
{
return __DIR__ . '/../assets/pasted-20260411-194222-a875bba4.png';
}
function diagnostic_brand_logo_alt(): string
{
return 'DoktorBiznes.pl — Gdy Twój biznes potrzebuje trafnej diagnozy';
}
function diagnostic_brand_logo_anchor(string $className = '', bool $openInNewTab = true): string
{
$classes = trim('doctor-biznes-logo-link ' . preg_replace('/[^a-zA-Z0-9_\- ]+/', '', $className));
$target = $openInNewTab ? ' target="_blank" rel="noopener noreferrer"' : '';
return '<a class="' . diagnostic_email_escape($classes) . '" href="' . diagnostic_email_escape(diagnostic_brand_home_url()) . '"' . $target . ' aria-label="Przejdź do bloga DoktorBiznes.pl">'
. '<img class="doctor-biznes-logo" src="' . diagnostic_email_escape(diagnostic_brand_logo_public_path()) . '" alt="' . diagnostic_email_escape(diagnostic_brand_logo_alt()) . '" width="391" height="121">'
. '</a>';
}
function diagnostic_brand_logo_email_src(): string
{
static $src = null;
if ($src !== null) {
return $src;
}
$path = diagnostic_brand_logo_file_path();
if (!is_file($path) || !is_readable($path)) {
$src = '';
return $src;
}
$data = file_get_contents($path);
if ($data === false || $data === '') {
$src = '';
return $src;
}
$src = 'data:image/png;base64,' . base64_encode($data);
return $src;
}
function diagnostic_flat_questions(): array
{
$definition = diagnostic_quiz_definition();
@ -408,8 +461,16 @@ function diagnostic_email_escape(?string $value): string
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>';
$src = diagnostic_brand_logo_email_src();
if ($src === '') {
return '<div style="display:inline-block;font-size:24px;line-height:1.2;font-weight:800;color:#ffffff;">DoktorBiznes<span style="color:#ff9c57;">.pl</span></div>';
}
return '<div style="margin:0 0 14px;">'
. '<a href="' . diagnostic_email_escape(diagnostic_brand_home_url()) . '" style="display:inline-block;text-decoration:none;" aria-label="Przejdź do bloga DoktorBiznes.pl">'
. '<img src="' . diagnostic_email_escape($src) . '" alt="' . diagnostic_email_escape(diagnostic_brand_logo_alt()) . '" width="235" height="73" style="display:block;width:235px;max-width:100%;height:auto;border:0;">'
. '</a>'
. '</div>';
}
function diagnostic_email_document(string $subject, string $preheader, string $contentHtml): string
@ -424,10 +485,8 @@ function diagnostic_email_document(string $subject, string $preheader, string $c
. '<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 #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;">'
. '<tr><td style="padding:32px;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>'
. '<tr><td style="padding:0 32px 32px;color:#6b7280;font-size:13px;line-height:1.6;">Ta wiadomość została wygenerowana automatycznie przez narzędzie diagnozy dojrzałości procesowej.</td></tr>'
@ -703,8 +762,8 @@ 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[] = 'DoktorBiznes.pl';
$lines[] = diagnostic_brand_home_url();
$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) . '%)';
@ -755,9 +814,43 @@ function diagnostic_strip_legacy_report_cta(array $package): array
'<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(
'~<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>\s*~u',
'',
$html,
1
) ?? $html;
$html = preg_replace(
'~<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>\s*~u',
'',
$html,
1
) ?? $html;
$html = preg_replace(
'~<div style="font-size:12px;letter-spacing:0\.12em;text-transform:uppercase;opacity:(?:0\.72|0\.82);margin-bottom:12px;">Przegląd procesów</div>\s*~u',
'',
$html,
1
) ?? $html;
$html = str_replace(
'<tr><td style="padding:32px 32px 12px;background:linear-gradient(135deg,#38a7e8 0%,#1d88d4 46%,#0e5fb5 100%);color:#ffffff;">',
'<tr><td style="padding:32px;background:linear-gradient(135deg,#38a7e8 0%,#1d88d4 46%,#0e5fb5 100%);color:#ffffff;">',
$html
);
$html = str_replace(
'<tr><td style="padding:32px 32px 18px;background:linear-gradient(135deg,#38a7e8 0%,#1d88d4 46%,#0e5fb5 100%);color:#ffffff;">',
'<tr><td style="padding:32px;background:linear-gradient(135deg,#38a7e8 0%,#1d88d4 46%,#0e5fb5 100%);color:#ffffff;">',
$html
);
$html = preg_replace(
'~(<tr><td style="padding:32px;background:[^"]*;color:#ffffff;">)(?:\s*<div[^>]*>\s*</div>)*~u',
'$1' . diagnostic_email_brand_marker_html(),
$html,
1
) ?? $html;
if (strpos($html, 'Przejdź do bloga DoktorBiznes.pl') === false) {
$html = preg_replace(
'~(<tr><td style="padding:32px 32px (?:12|18)px;background:[^"]*;color:#ffffff;">)~u',
'~(<tr><td style="padding:32px(?: 32px (?:12|18)px)?;background:[^"]*;color:#ffffff;">)~u',
'$1' . diagnostic_email_brand_marker_html(),
$html,
1
@ -767,12 +860,11 @@ function diagnostic_strip_legacy_report_cta(array $package): array
if ($text !== '') {
$text = preg_replace('/^.*omówić wynik z zespołem.*$/miu', '', $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('/^DOKTOR BIZNES\s*$/miu', '', $text) ?? $text;
$text = preg_replace('/^DoktorBiznes\.pl\s*$/miu', '', $text) ?? $text;
$text = preg_replace('/^Gdy Twój biznes potrzebuje trafnej diagnozy\s*$/miu', '', $text) ?? $text;
$text = preg_replace('~^https?://(?:www\.)?doktorbiznes\.pl/?\s*$~miu', '', $text) ?? $text;
$text = 'DoktorBiznes.pl' . "\n" . diagnostic_brand_home_url() . "\n\n" . ltrim($text);
$text = preg_replace('/\n{3,}/', "\n\n", $text) ?? $text;
$text = trim($text);
}

View File

@ -1,12 +1,12 @@
@media (max-width: 767.98px) {
.doctor-biznes-badge {
.doctor-biznes-logo-link {
width: 100%;
border-radius: 1rem;
max-width: 100%;
}
.doctor-biznes-badge__tagline {
font-size: 0.82rem;
.doctor-biznes-logo {
width: min(320px, 100%);
}
}
@ -168,40 +168,35 @@ h6 {
}
.doctor-biznes-badge {
.doctor-biznes-logo-link {
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);
max-width: 100%;
text-decoration: none;
transition: transform 0.18s ease, opacity 0.18s ease;
}
.doctor-biznes-badge--compact {
padding: 0.5rem 0.85rem;
.doctor-biznes-logo-link:hover {
opacity: 0.96;
transform: translateY(-1px);
}
.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-logo-link--nav {
flex-shrink: 1;
}
.doctor-biznes-badge__label em {
color: #ff9c57;
font-style: normal;
.doctor-biznes-logo-link--compact .doctor-biznes-logo {
width: min(260px, 100%);
}
.doctor-biznes-badge__tagline {
font-size: 0.9rem;
line-height: 1.4;
color: rgba(255, 255, 255, 0.9);
.doctor-biznes-logo {
display: block;
width: min(391px, 100%);
height: auto;
}
.doctor-biznes-logo-link--nav .doctor-biznes-logo {
width: min(250px, 100%);
}
.feature-list,

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -163,7 +163,7 @@ $meta = diagnostic_meta('Diagnoza dojrzałości procesowej', 'Profesjonalna diag
<header class="site-header border-bottom bg-white sticky-top">
<nav class="navbar navbar-expand-lg navbar-light py-3">
<div class="container">
<a class="navbar-brand fw-semibold text-dark" href="/">Przegląd procesów</a>
<?= diagnostic_brand_logo_anchor('navbar-brand doctor-biznes-logo-link--nav') ?>
<div class="d-flex align-items-center gap-2 ms-auto">
<a class="btn btn-sm btn-dark" href="/diagnostic.php<?= $attempt ? '?reset=1' : '' ?>"><?= $attempt ? 'Rozpocznij od nowa' : 'Rozpocznij diagnozę' ?></a>
</div>
@ -183,7 +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>
<?= diagnostic_brand_logo_anchor('mb-3') ?>
<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>
@ -263,7 +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>
<?= diagnostic_brand_logo_anchor('mb-3 doctor-biznes-logo-link--compact') ?>
<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>
@ -303,7 +303,6 @@ $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

@ -29,7 +29,7 @@ $meta = diagnostic_meta('Diagnoza dojrzałości procesowej', 'Profesjonalne narz
<header class="site-header border-bottom sticky-top">
<nav class="navbar navbar-expand-lg navbar-light py-3">
<div class="container">
<a class="navbar-brand fw-semibold text-dark" href="/">Przegląd procesów</a>
<?= diagnostic_brand_logo_anchor('navbar-brand doctor-biznes-logo-link--nav') ?>
<div class="d-flex align-items-center gap-2 ms-auto">
<a class="btn btn-sm btn-dark" href="/diagnostic.php">Rozpocznij diagnozę</a>
</div>
@ -42,7 +42,6 @@ $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>