Publiczna aplikacja fdmtech.pl: renderer CMS, formularz audytu, szablony i logotypy
This commit is contained in:
@@ -0,0 +1,156 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
// FDMTech home — fragment demo (bez <main>, bez ID cms-content). Renderer opakowuje
|
||||
// ten fragment w <main id="cms-content">. Wyłącznie jawne demo "/" przy APP_DEMO=true.
|
||||
$v = static fn(string $k): string => (string) ($formValues[$k] ?? '');
|
||||
$err = static fn(string $k): string => (string) ($formErrors[$k] ?? '');
|
||||
$demo = !empty($isDemo);
|
||||
$blocked = $demo || ($formStatus ?? 'idle') === 'unavailable' || ($formStatus ?? 'idle') === 'limited';
|
||||
?>
|
||||
<section class="hero on-dark" aria-labelledby="hero-title">
|
||||
<div class="hero-inner">
|
||||
<div>
|
||||
<h1 id="hero-title">Porządek w pomiarach Twojej produkcji</h1>
|
||||
<p class="hero-lede">FDMTech buduje BlackBox Sensory, licznik produkcji przy maszynie. Zlicza sztuki z czujników, zapisuje je z czasem i pokazuje, kiedy maszyna pracuje, a kiedy stoi.</p>
|
||||
<p class="hero-actions">
|
||||
<a class="btn btn-primary" href="/kontakt">Zapytaj o bezpłatny audyt</a>
|
||||
<a class="btn btn-ghost" href="#pomiary">Zobacz, co mierzy BlackBox</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="counter-panel" role="img" aria-label="Panel licznika z przykładowymi odczytami demonstracyjnymi">
|
||||
<svg class="signal" viewBox="0 0 300 90" aria-hidden="true" focusable="false">
|
||||
<rect x="2" y="2" width="296" height="86" rx="10" fill="none" stroke="#D7F171" stroke-width="2" opacity="0.5"/>
|
||||
<path class="trace" d="M12 55 H80 L100 25 L125 75 L150 45 H200 L215 60 L235 40 H288" fill="none" stroke="#D7F171" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<div class="counter-row">
|
||||
<div class="counter-cell"><b>1 024</b><span>szt. w sesji*</span></div>
|
||||
<div class="counter-cell"><b class="num">750</b><span>szt./h tempa*</span></div>
|
||||
<div class="counter-cell"><b>PRACUJE</b><span>status*</span></div>
|
||||
</div>
|
||||
<span class="demo-tag">* liczby demonstracyjne</span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="wrap">
|
||||
<section class="section" id="pomiary" aria-labelledby="pomiary-title">
|
||||
<h2 id="pomiary-title">Co mierzy BlackBox</h2>
|
||||
<p>BlackBox Sensory zlicza impulsy z czujników przy maszynie i zamienia je na sztuki. Z pomiaru powstają liczba produkcji, tempo, czas pracy i przestoje. Poniżej zakres pomiarowy, nie obietnica efektu.</p>
|
||||
<ul class="measure-list">
|
||||
<li>
|
||||
<h3><svg width="22" height="22" viewBox="0 0 22 22" aria-hidden="true" focusable="false"><path d="M4 6h12l-2.5 3.5L16 13H4zM16 6l4-3M6 16h12" fill="none" stroke="#102C32" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/></svg>Liczba sztuk</h3>
|
||||
<p>Impulsy z czujnika optycznego lub enkodera, przeliczone na sztuki. Licznik całkowity i licznik sesji.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h3><svg width="22" height="22" viewBox="0 0 22 22" aria-hidden="true" focusable="false"><circle cx="11" cy="11" r="8" fill="none" stroke="#102C32" stroke-width="2.2"/><path d="M11 6.5V11l3 2.5" fill="none" stroke="#102C32" stroke-width="2.2" stroke-linecap="round"/></svg>Takt i tempo</h3>
|
||||
<p>Odstępy między impulsami dają takt maszyny i tempo w sztukach na godzinę, do porównania z normą.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h3><svg width="22" height="22" viewBox="0 0 22 22" aria-hidden="true" focusable="false"><path d="M7 4v14M17 4v14M4 9h4M4 13h4M14 9h4M14 13h4" fill="none" stroke="#102C32" stroke-width="2.2" stroke-linecap="round"/></svg>Praca i przestoje</h3>
|
||||
<p>Strumień impulsów rozróżnia pracę od postoju. Przerwy w sygnale trafiają do rejestru z czasem trwania.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h3><svg width="22" height="22" viewBox="0 0 22 22" aria-hidden="true" focusable="false"><rect x="3" y="5" width="16" height="12" rx="2" fill="none" stroke="#102C32" stroke-width="2.2"/><path d="M7 10h8M7 13.5h5" stroke="#102C32" stroke-width="2.2" stroke-linecap="round"/></svg>Znacznik czasu</h3>
|
||||
<p>Każdy odczyt niesie czas, więc wracasz do konkretnej zmiany, godziny i nakładu.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section class="section" aria-labelledby="druk-title">
|
||||
<div class="print-grid">
|
||||
<div>
|
||||
<h2 id="druk-title">Drukarnie i powtarzalna produkcja książek</h2>
|
||||
<p>Książka wraca na maszynę po miesiącach. Ten sam tytuł, ten sam nakład — porównaj tempo i przestoje z poprzednim razem zamiast zgadywać, czy „idzie jak zwykle”.</p>
|
||||
<ul>
|
||||
<li>Ten sam zestaw pomiarów dla pierwszego nakładu i dodruku.</li>
|
||||
<li>Liczba sztuk i tempo z czasem, do wpięcia we własną dokumentację partii.</li>
|
||||
<li>Rozmowa o audycie zaczyna się od Twoich potrzeb, nie od cennika.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="specimen">
|
||||
<table>
|
||||
<caption>Fragment licznika — dane demonstracyjne</caption>
|
||||
<thead><tr><th scope="col">Sesja</th><th scope="col">Czas (UTC)</th><th scope="col">Sztuki</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td>№ 1022*</td><td>10:00</td><td>1 204 szt.*</td></tr>
|
||||
<tr><td>№ 1023*</td><td>10:05</td><td>1 318 szt.*</td></tr>
|
||||
<tr><td>№ 1024*</td><td>10:10</td><td>1 402 szt.*</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="audit-band on-dark" aria-labelledby="audyt-title">
|
||||
<div>
|
||||
<h2 id="audyt-title">Bezpłatny audyt</h2>
|
||||
<p>Opowiedz, co produkujesz i co chcesz sprawdzać. Oddzwaniamy z propozycją rozmowy. Zapytanie trafia do zespołu FDMTech przez formularz na stronie kontaktowej.</p>
|
||||
</div>
|
||||
<a class="btn btn-primary" href="/kontakt">Przejdź do formularza</a>
|
||||
</section>
|
||||
|
||||
<section class="section" aria-labelledby="form-title">
|
||||
<div class="inquiry-grid">
|
||||
<div class="inquiry-form">
|
||||
<h2 id="form-title">Napisz do nas</h2>
|
||||
<?php if (($formNotice ?? null) !== null && $formNotice !== '') : ?>
|
||||
<p class="form-notice" role="status"><?= $e($formNotice) ?></p>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($formErrors)) : ?>
|
||||
<div class="form-alert" role="alert">
|
||||
<p><strong>Sprawdź formularz</strong></p>
|
||||
<ul>
|
||||
<?php foreach ($formErrors as $message) : ?>
|
||||
<li><?= $e($message) ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<form method="post" action="<?= $e($formAction ?? '/inquiries') ?>">
|
||||
<input type="hidden" name="_csrf" value="<?= $e($csrfToken ?? '') ?>">
|
||||
<input type="hidden" name="source" value="home">
|
||||
<div hidden aria-hidden="true"><label>Twoja strona<input name="website" tabindex="-1" autocomplete="off"></label></div>
|
||||
<div class="field">
|
||||
<label for="home-name">Imię i nazwisko</label>
|
||||
<input type="text" id="home-name" name="name" maxlength="160" autocomplete="name" required value="<?= $e($v('name')) ?>"<?= $err('name') !== '' ? ' aria-invalid="true" aria-describedby="home-name-err"' : '' ?>>
|
||||
<?php if ($err('name') !== '') : ?><p class="field-error" id="home-name-err"><?= $e($err('name')) ?></p><?php endif; ?>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="home-email">E-mail</label>
|
||||
<input type="email" id="home-email" name="email" maxlength="254" autocomplete="email" required value="<?= $e($v('email')) ?>"<?= $err('email') !== '' ? ' aria-invalid="true" aria-describedby="home-email-err"' : '' ?>>
|
||||
<?php if ($err('email') !== '') : ?><p class="field-error" id="home-email-err"><?= $e($err('email')) ?></p><?php endif; ?>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="home-company">Firma (opcjonalnie)</label>
|
||||
<input type="text" id="home-company" name="company" maxlength="200" autocomplete="organization" value="<?= $e($v('company')) ?>">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="home-phone">Telefon (opcjonalnie)</label>
|
||||
<input type="tel" id="home-phone" name="phone" maxlength="60" autocomplete="tel" value="<?= $e($v('phone')) ?>">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="home-message">Wiadomość</label>
|
||||
<textarea id="home-message" name="message" rows="6" maxlength="10000" required<?= $err('message') !== '' ? ' aria-invalid="true" aria-describedby="home-message-err"' : '' ?>><?= $e($v('message')) ?></textarea>
|
||||
<?php if ($err('message') !== '') : ?><p class="field-error" id="home-message-err"><?= $e($err('message')) ?></p><?php endif; ?>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="consent" for="home-consent"><input type="checkbox" id="home-consent" name="consent" value="1" required<?= ($v('consent') === '1' ? ' checked' : '') ?>>Zgadzam się na kontakt i przetwarzanie podanych danych w celu obsługi tego zapytania.</label>
|
||||
<?php if ($err('consent') !== '') : ?><p class="field-error"><?= $e($err('consent')) ?></p><?php endif; ?>
|
||||
</div>
|
||||
<p class="fine-print">Potwierdzenie dotyczy zapisu w systemie.<?= ($smtpStatus ?? 'disabled') === 'disabled' ? ' Automatyczne wiadomości e-mail są wyłączone.' : '' ?><?php if ($demo) : ?> Tryb demonstracyjny nie zapisuje ani nie wysyła zgłoszeń.<?php endif; ?></p>
|
||||
<button class="btn btn-primary" type="submit"<?= $blocked ? ' disabled' : '' ?>>Wyślij zapytanie</button>
|
||||
</form>
|
||||
</div>
|
||||
<aside class="contact-card on-dark" aria-labelledby="kontakt-title">
|
||||
<h2 id="kontakt-title">Kontakt</h2>
|
||||
<address>
|
||||
FDMTech Bartosz Pulchny<br>
|
||||
Krakowska 67/1, 71-017 Szczecin<br>
|
||||
NIP 852-251-80-36<br>
|
||||
tel. <a href="tel:+48533873555">533 873 555</a>
|
||||
</address>
|
||||
<p>Pełny formularz znajdziesz na stronie <a href="/kontakt">Kontakt</a>.<?= ($site['name'] ?? '') !== '' ? ' Zespół ' . $e($site['name']) . ' odpowiada na zapisane zapytania.' : '' ?></p>
|
||||
</aside>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
// FDMTech layout — własność projektanta. Pełny dokument, nawigacja i kontakt z $site.
|
||||
// Wszystkie teksty, atrybuty, meta i URL przez $e. Surowe: wyłącznie $content i $cmsStyleTag.
|
||||
$nav = is_array($site['navigation'] ?? null) ? $site['navigation'] : [];
|
||||
$currentPath = ($page['slug'] ?? '') === 'home' || ($page['slug'] ?? '') === '' ? '/' : '/' . ($page['slug'] ?? '');
|
||||
$isError = ($statusCode ?? 200) >= 400;
|
||||
?><!doctype html>
|
||||
<html lang="pl">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><?= $e($meta['title'] ?? 'FDMTech') ?></title>
|
||||
<meta name="description" content="<?= $e($meta['description'] ?? '') ?>">
|
||||
<meta name="robots" content="<?= $e($meta['robots'] ?? 'noindex, nofollow') ?>">
|
||||
<?php if (($meta['canonical'] ?? '') !== '') : ?>
|
||||
<link rel="canonical" href="<?= $e($meta['canonical']) ?>">
|
||||
<?php endif; ?>
|
||||
<link rel="stylesheet" href="/assets/css/site.css">
|
||||
<?= $cmsStyleTag ?>
|
||||
<link rel="icon" type="image/svg+xml" href="/assets/img/logo-pulse.svg">
|
||||
</head>
|
||||
<body class="<?= $isError ? 'is-error' : 'is-ok' ?>"<?= !empty($isDemo) ? ' data-demo="true"' : '' ?>>
|
||||
<a class="skip-link" href="#cms-content">Przejdź do treści</a>
|
||||
<header class="site-header on-dark">
|
||||
<div class="header-inner">
|
||||
<a class="brand" href="/" aria-label="FDMTech — strona główna">
|
||||
<svg width="40" height="40" viewBox="0 0 56 56" role="img" aria-hidden="true" focusable="false">
|
||||
<rect x="2" y="2" width="52" height="52" rx="10" fill="#0B2025" stroke="#D7F171" stroke-width="2"/>
|
||||
<path d="M10 34 H22 L27 18 L33 44 L38 28 H46" fill="none" stroke="#D7F171" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<circle cx="46" cy="34" r="2.6" fill="#D7F171"/>
|
||||
</svg>
|
||||
<span class="brand-name"><?= $e($site['name'] ?? 'FDMTech') ?></span>
|
||||
</a>
|
||||
<button class="nav-toggle" type="button" data-nav-toggle aria-expanded="false" aria-controls="site-nav">Menu</button>
|
||||
<nav class="site-nav" id="site-nav" data-open="false" aria-label="Nawigacja główna">
|
||||
<ul>
|
||||
<?php foreach ($nav as $item) : ?>
|
||||
<?php
|
||||
$label = (string) ($item['label'] ?? '');
|
||||
$url = (string) ($item['url'] ?? '');
|
||||
if ($label === '' || $url === '') continue;
|
||||
$active = $url === $currentPath ? ' aria-current="page"' : '';
|
||||
?>
|
||||
<li><a href="<?= $e($url) ?>"<?= $active ?>><?= $e($label) ?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
<div class="nav-scrim" data-nav-scrim hidden></div>
|
||||
|
||||
<?= $content ?>
|
||||
|
||||
<footer class="site-footer on-dark">
|
||||
<div class="footer-inner">
|
||||
<div>
|
||||
<h2><?= $e($site['name'] ?? 'FDMTech') ?></h2>
|
||||
<address>
|
||||
FDMTech Bartosz Pulchny<br>
|
||||
Krakowska 67/1, 71-017 Szczecin<br>
|
||||
NIP 852-251-80-36<br>
|
||||
tel. <a href="tel:+48533873555">533 873 555</a><?php if (($site['contact_phone'] ?? '') !== '') : ?><br>Kontakt z serwisu: <?= $e($site['contact_phone']) ?><?php endif; ?><?php if (($site['contact_email'] ?? '') !== '') : ?><br>E-mail z serwisu: <a href="mailto:<?= $e($site['contact_email']) ?>"><?= $e($site['contact_email']) ?></a><?php endif; ?>
|
||||
</address>
|
||||
</div>
|
||||
<nav aria-label="Nawigacja w stopce">
|
||||
<ul>
|
||||
<?php foreach ($nav as $item) : ?>
|
||||
<?php
|
||||
$label = (string) ($item['label'] ?? '');
|
||||
$url = (string) ($item['url'] ?? '');
|
||||
if ($label === '' || $url === '') continue;
|
||||
?>
|
||||
<li><a href="<?= $e($url) ?>"><?= $e($label) ?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="footer-base">
|
||||
<span>© <span data-year>2026</span> <?= $e($site['name'] ?? 'FDMTech') ?>. Właściciel serwisu: FDMTech Bartosz Pulchny.</span>
|
||||
<span>BlackBox Sensory to nazwa produktu FDMTech.</span>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="/assets/js/site.js" nonce="<?= $e($nonce ?? '') ?>" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user