Publiczna aplikacja fdmtech.pl: renderer CMS, formularz audytu, szablony i logotypy

This commit is contained in:
FDMTech
2026-10-09 15:22:48 +02:00
commit 48b544c6b3
32 changed files with 1914 additions and 0 deletions
+513
View File
@@ -0,0 +1,513 @@
/* FDMTech — warstwa projektanta. Jasne tło robocze, decyzyjny teal, sygnał limonki. */
:root {
--teal: #102c32;
--teal-deep: #0b2025;
--lime: #d7f171;
--lime-ink: #2a3a00;
--mist: #eef2ef;
--paper: #f7faf7;
--ink: #102c32;
--ink-soft: #2c444a;
--coral: #f47f5f;
--line: #c9d4cd;
--focus: #0b2025;
--radius: 14px;
--measure: 70ch;
--font-display: "Bricolage Grotesque", "DM Sans", Inter, system-ui, "Segoe UI", sans-serif;
--font-body: "DM Sans", Inter, system-ui, "Segoe UI", Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html {
-webkit-text-size-adjust: 100%;
scroll-behavior: smooth;
}
body {
margin: 0;
background: var(--mist);
color: var(--ink);
font-family: var(--font-body);
font-size: 1.0625rem;
line-height: 1.65;
}
h1, h2, h3 {
font-family: var(--font-display);
line-height: 1.08;
letter-spacing: -0.015em;
text-wrap: balance;
margin: 2.2em 0 0.55em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.9rem); font-weight: 800; margin-top: 0; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p, ul, ol, dl { max-width: var(--measure); }
a { color: inherit; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--lime); color: var(--teal-deep); }
:focus-visible {
outline: 3px solid var(--lime);
outline-offset: 3px;
border-radius: 4px;
}
.on-dark :focus-visible { outline-color: var(--lime); }
/* Skip link */
.skip-link {
position: absolute;
left: 1rem;
top: -4rem;
z-index: 100;
background: var(--teal);
color: var(--lime);
padding: 0.7rem 1.1rem;
border-radius: 0 0 10px 10px;
text-decoration: none;
font-weight: 700;
transition: top 0.15s ease-out;
}
.skip-link:focus { top: 0; }
/* Demo banner */
aside[role="note"] {
background: var(--teal-deep);
color: var(--lime);
text-align: center;
padding: 0.55rem 1rem;
font-size: 0.95rem;
}
/* Header */
.site-header {
background: var(--teal);
color: #f2f6f2;
}
.header-inner {
max-width: 72rem;
margin: 0 auto;
padding: 0.9rem 1.25rem;
display: flex;
align-items: center;
gap: 1rem;
}
.brand {
display: inline-flex;
align-items: center;
gap: 0.65rem;
text-decoration: none;
font-family: var(--font-display);
font-weight: 800;
font-size: 1.25rem;
letter-spacing: 0.01em;
margin-right: auto;
}
.brand svg { display: block; }
.brand-name { white-space: nowrap; }
.site-nav ul {
list-style: none;
display: flex;
gap: 0.25rem;
margin: 0;
padding: 0;
}
.site-nav a {
display: inline-block;
padding: 0.55rem 0.85rem;
border-radius: 9px;
text-decoration: none;
font-weight: 600;
}
.site-nav a:hover { background: rgba(215, 241, 113, 0.14); }
.site-nav a[aria-current="page"] {
background: var(--lime);
color: var(--teal-deep);
}
.nav-toggle {
display: none;
background: transparent;
border: 2px solid var(--lime);
color: var(--lime);
border-radius: 10px;
padding: 0.5rem 0.8rem;
font: inherit;
font-weight: 700;
cursor: pointer;
}
/* Layout shell */
.wrap {
max-width: 72rem;
margin: 0 auto;
padding: 0 1.25rem;
}
#cms-content { display: block; padding: 0 0 3rem; }
/* Hero — teal field, counter instrument on the side */
.hero {
background: var(--teal);
color: #f2f6f2;
border-radius: 0 0 26px 26px;
}
.hero-inner {
max-width: 72rem;
margin: 0 auto;
padding: 3.2rem 1.25rem 2.8rem;
display: grid;
grid-template-columns: 1.25fr 0.9fr;
gap: 2.5rem;
align-items: center;
}
.hero h1 { color: #fff; }
.hero-lede {
font-size: 1.2rem;
line-height: 1.6;
color: #dbe5dd;
max-width: 44ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }
.btn {
display: inline-block;
border-radius: 999px;
padding: 0.8rem 1.5rem;
font-weight: 700;
text-decoration: none;
border: 2px solid transparent;
cursor: pointer;
font-size: 1rem;
}
.btn-primary { background: var(--lime); color: var(--teal-deep); }
.btn-primary:hover { background: #e4fa8d; }
.btn-ghost { border-color: rgba(242, 246, 242, 0.55); color: #fff; }
.btn-ghost:hover { border-color: var(--lime); color: var(--lime); }
.counter-panel {
background: var(--teal-deep);
border: 1px solid rgba(215, 241, 113, 0.35);
border-radius: var(--radius);
padding: 1.4rem 1.4rem 1.1rem;
box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.counter-panel svg.signal { width: 100%; height: auto; display: block; }
.counter-panel svg.signal path.trace {
stroke-dasharray: 320;
stroke-dashoffset: 320;
animation: trace 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s forwards;
}
@keyframes trace { to { stroke-dashoffset: 0; } }
.counter-row {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 0.8rem;
margin-top: 1rem;
}
.counter-cell {
background: rgba(238, 242, 239, 0.06);
border: 1px solid rgba(238, 242, 239, 0.16);
border-radius: 10px;
padding: 0.7rem 0.6rem;
text-align: center;
}
.counter-cell b {
display: block;
font-family: var(--font-display);
font-variant-numeric: tabular-nums;
font-size: 1.35rem;
color: var(--lime);
}
.counter-cell span { font-size: 0.82rem; color: #c4d2c7; }
.demo-tag {
display: inline-block;
margin-top: 0.9rem;
font-size: 0.82rem;
color: var(--teal-deep);
background: var(--lime);
border-radius: 999px;
padding: 0.2rem 0.7rem;
font-weight: 700;
}
/* Sections on mist */
.section { padding: 2.6rem 0 0.4rem; }
.measure-list {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1rem 2rem;
margin: 1.4rem 0 0;
padding: 0;
list-style: none;
max-width: none;
}
.measure-list li {
background: var(--paper);
border: 1px solid var(--line);
border-radius: var(--radius);
padding: 1.1rem 1.2rem;
box-shadow: 0 10px 24px rgba(16, 44, 50, 0.08);
}
.measure-list h3 { margin: 0 0 0.35rem; display: flex; align-items: center; gap: 0.55rem; }
.measure-list h3 svg { flex: none; }
.measure-list p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.print-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 2rem;
align-items: start;
background: var(--paper);
border: 1px solid var(--line);
border-radius: 20px;
padding: clamp(1.4rem, 3vw, 2.4rem);
margin-top: 1.4rem;
}
.print-grid h2 { margin-top: 0; }
.print-grid ul { padding-left: 1.2rem; color: var(--ink-soft); }
.print-grid li + li { margin-top: 0.5rem; }
.specimen {
background: var(--teal);
color: #eef4ee;
border-radius: 12px;
padding: 1.3rem;
font-variant-numeric: tabular-nums;
}
.specimen table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.specimen caption { text-align: left; font-weight: 700; color: var(--lime); padding-bottom: 0.6rem; }
.specimen th, .specimen td {
text-align: left;
padding: 0.5rem 0.4rem;
border-top: 1px solid rgba(238, 242, 239, 0.22);
}
.specimen td:last-child, .specimen th:last-child { text-align: right; }
/* Audit band */
.audit-band {
margin-top: 2.6rem;
background: var(--teal);
color: #f2f6f2;
border-radius: 20px;
padding: clamp(1.6rem, 4vw, 2.8rem);
display: grid;
grid-template-columns: 1.3fr 0.7fr;
gap: 1.6rem;
align-items: center;
}
.audit-band h2 { margin-top: 0; color: #fff; }
.audit-band p { color: #d7e1d8; margin-bottom: 0; }
.audit-band .btn { justify-self: end; }
/* Inquiry + contact summary */
.inquiry-grid {
display: grid;
grid-template-columns: 1.2fr 0.8fr;
gap: 2rem;
margin-top: 2.4rem;
align-items: start;
}
.inquiry-form, .inquiry {
background: var(--paper);
border: 1px solid var(--line);
border-radius: 20px;
padding: clamp(1.4rem, 3vw, 2.2rem);
}
.inquiry-form h2, .inquiry h1 { margin-top: 0; }
.field { margin-top: 1rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea {
width: 100%;
border: 2px solid var(--line);
border-radius: 10px;
padding: 0.7rem 0.85rem;
font: inherit;
background: #fff;
color: var(--ink);
}
.field input:focus, .field textarea:focus {
border-color: var(--teal);
outline: 3px solid var(--lime);
outline-offset: 1px;
}
.field [aria-invalid="true"] { border-color: var(--coral); }
.field-error {
color: #7c2d12;
background: #fdeee6;
border: 1px solid var(--coral);
border-radius: 8px;
padding: 0.45rem 0.7rem;
margin: 0.45rem 0 0;
font-size: 0.95rem;
}
.form-alert {
border: 1px solid var(--coral);
background: #fdeee6;
color: #5c2008;
border-radius: 10px;
padding: 0.8rem 1rem;
}
.form-notice {
border: 1px solid var(--teal);
background: var(--mist);
border-radius: 10px;
padding: 0.8rem 1rem;
}
.consent { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.98rem; }
.consent input { width: 1.2em; height: 1.2em; margin-top: 0.25em; accent-color: var(--teal); }
button.btn-primary {
margin-top: 1.2rem;
font-family: var(--font-body);
}
button.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }
.fine-print { font-size: 0.9rem; color: var(--ink-soft); }
.contact-card {
background: var(--teal-deep);
color: #eef4ee;
border-radius: 20px;
padding: clamp(1.4rem, 3vw, 2rem);
}
.contact-card h2 { margin-top: 0; color: var(--lime); }
.contact-card address { font-style: normal; line-height: 1.7; }
.contact-card a { color: var(--lime); }
/* Footer */
.site-footer {
background: var(--teal-deep);
color: #cfdad1;
margin-top: 3rem;
}
.footer-inner {
max-width: 72rem;
margin: 0 auto;
padding: 2.4rem 1.25rem 1.6rem;
display: grid;
grid-template-columns: 1.2fr 1fr;
gap: 2rem;
}
.site-footer h2 { color: #fff; font-size: 1.1rem; margin-top: 0; }
.site-footer address { font-style: normal; line-height: 1.75; }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.site-footer a { color: var(--lime); }
.footer-base {
max-width: 72rem;
margin: 0 auto;
padding: 0 1.25rem 1.6rem;
border-top: 1px solid rgba(238, 242, 239, 0.18);
padding-top: 1rem;
font-size: 0.9rem;
display: flex;
flex-wrap: wrap;
gap: 0.5rem 1.5rem;
}
/* Formularz aplikacyjny /kontakt (znaczniki renderera View::form). */
.inquiry {
max-width: 44rem;
background: var(--paper);
border: 1px solid var(--line);
border-radius: 20px;
padding: clamp(1.4rem, 3vw, 2.2rem);
margin: 2rem auto 0;
}
.inquiry h1 { margin-top: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.inquiry form > div { margin-top: 1rem; }
.inquiry label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.inquiry input[type="text"],
.inquiry input[type="email"],
.inquiry input[type="tel"],
.inquiry textarea {
width: 100%;
border: 2px solid var(--line);
border-radius: 10px;
padding: 0.7rem 0.85rem;
font: inherit;
background: #fff;
color: var(--ink);
}
.inquiry input:focus, .inquiry textarea:focus {
border-color: var(--teal);
outline: 3px solid var(--lime);
outline-offset: 1px;
}
.inquiry input[type="checkbox"] { width: 1.2em; height: 1.2em; accent-color: var(--teal); }
.inquiry button[type="submit"] {
margin-top: 1.2rem;
border-radius: 999px;
padding: 0.8rem 1.5rem;
font: inherit;
font-weight: 700;
background: var(--lime);
color: var(--teal-deep);
border: 2px solid transparent;
cursor: pointer;
}
.inquiry button[type="submit"]:disabled { opacity: 0.55; cursor: not-allowed; }
/* Error page */
.error-card {
background: var(--paper);
border: 1px solid var(--line);
border-radius: 20px;
padding: 2rem;
margin-top: 2rem;
}
/* Responsive */
@media (max-width: 900px) {
.hero-inner { grid-template-columns: 1fr; }
.measure-list { grid-template-columns: 1fr; }
.print-grid { grid-template-columns: 1fr; }
.audit-band { grid-template-columns: 1fr; }
.audit-band .btn { justify-self: start; }
.inquiry-grid { grid-template-columns: 1fr; }
.footer-inner { grid-template-columns: 1fr; }
.nav-toggle { display: inline-block; }
.site-nav {
position: fixed;
inset: 0 0 0 auto;
width: min(20rem, 85vw);
background: var(--teal-deep);
padding: 4.5rem 1.4rem 1.4rem;
transform: translateX(105%);
transition: transform 0.22s ease-out;
z-index: 50;
box-shadow: -18px 0 44px rgba(0, 0, 0, 0.35);
}
.site-nav[data-open="true"] { transform: none; }
.site-nav ul { flex-direction: column; gap: 0.5rem; }
.site-nav a { display: block; padding: 0.8rem 1rem; }
.nav-close {
position: absolute;
top: 1rem;
right: 1rem;
}
.nav-scrim {
position: fixed;
inset: 0;
background: rgba(11, 32, 37, 0.55);
z-index: 40;
}
.nav-scrim[hidden] { display: none; }
}
@media (prefers-reduced-motion: reduce) {
html { scroll-behavior: auto; }
*, *::before, *::after {
animation-duration: 0.001s !important;
transition-duration: 0.001s !important;
}
.counter-panel svg.signal path.trace {
animation: none;
stroke-dashoffset: 0;
}
}
+10
View File
@@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 56" role="img" aria-label="FDMTech — monogram F licznika (mono)">
<g fill="none" stroke="currentColor" stroke-width="3.5">
<rect x="4" y="6" width="10" height="44" rx="2"/>
<rect x="18" y="6" width="30" height="10" rx="2"/>
<rect x="18" y="22" width="32" height="10" rx="2"/>
<circle cx="28" cy="43" r="7"/>
</g>
<circle cx="28" cy="43" r="1.8" fill="currentColor"/>
<text x="62" y="36" font-family="Bricolage Grotesque, DM Sans, Inter, system-ui, sans-serif" font-size="22" font-weight="800" letter-spacing="0.5" fill="currentColor">FDMTech</text>
</svg>

After

Width:  |  Height:  |  Size: 639 B

+9
View File
@@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 56" role="img" aria-label="FDMTech — monogram F licznika">
<rect x="4" y="6" width="10" height="44" rx="2" fill="#102C32"/>
<rect x="18" y="6" width="30" height="10" rx="2" fill="#102C32"/>
<rect x="18" y="22" width="22" height="10" rx="2" fill="#102C32"/>
<rect x="44" y="22" width="10" height="10" rx="2" fill="#D7F171" stroke="#102C32" stroke-width="2"/>
<circle cx="28" cy="43" r="7" fill="none" stroke="#102C32" stroke-width="3.5"/>
<circle cx="28" cy="43" r="1.8" fill="#F47F5F"/>
<text x="62" y="36" font-family="Bricolage Grotesque, DM Sans, Inter, system-ui, sans-serif" font-size="22" font-weight="800" letter-spacing="0.5" fill="#102C32">FDMTech</text>
</svg>

After

Width:  |  Height:  |  Size: 744 B

+8
View File
@@ -0,0 +1,8 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 56" role="img" aria-label="FDMTech — znak impulsu (mono)">
<g fill="none" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round">
<rect x="2" y="2" width="52" height="52" rx="10"/>
<path d="M10 34 H22 L27 18 L33 44 L38 28 H46"/>
</g>
<circle cx="46" cy="34" r="2.6" fill="currentColor"/>
<text x="62" y="36" font-family="Bricolage Grotesque, DM Sans, Inter, system-ui, sans-serif" font-size="22" font-weight="800" letter-spacing="0.5" fill="currentColor">FDMTech</text>
</svg>

After

Width:  |  Height:  |  Size: 585 B

+6
View File
@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 56" role="img" aria-label="FDMTech — znak impulsu">
<rect x="2" y="2" width="52" height="52" rx="10" fill="#102C32"/>
<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"/>
<text x="62" y="36" font-family="Bricolage Grotesque, DM Sans, Inter, system-ui, sans-serif" font-size="22" font-weight="800" letter-spacing="0.5" fill="#102C32">FDMTech</text>
</svg>

After

Width:  |  Height:  |  Size: 561 B

+49
View File
@@ -0,0 +1,49 @@
(() => {
"use strict";
const toggle = document.querySelector("[data-nav-toggle]");
const nav = document.getElementById("site-nav");
const scrim = document.querySelector("[data-nav-scrim]");
function setOpen(open) {
if (!nav || !toggle) return;
nav.dataset.open = open ? "true" : "false";
toggle.setAttribute("aria-expanded", open ? "true" : "false");
if (scrim) scrim.hidden = !open;
document.body.style.overflow = open ? "hidden" : "";
if (open) {
const first = nav.querySelector("a");
if (first) first.focus({ preventScroll: true });
} else {
toggle.focus({ preventScroll: true });
}
}
function isOpen() {
return !!nav && nav.dataset.open === "true";
}
if (toggle && nav) {
if (nav.dataset.open !== "true") nav.dataset.open = "false";
toggle.addEventListener("click", () => setOpen(!isOpen()));
document.addEventListener("keydown", (event) => {
if (event.key === "Escape" && isOpen()) setOpen(false);
});
}
if (scrim) scrim.addEventListener("click", () => setOpen(false));
// Active nav item for the current path (progressive enhancement only).
try {
const here = new URL(window.location.href).pathname.replace(/\/$/, "") || "/";
document.querySelectorAll(".site-nav a[href]").forEach((link) => {
const target = new URL(link.getAttribute("href"), window.location.origin).pathname.replace(/\/$/, "") || "/";
if (target === here) link.setAttribute("aria-current", "page");
});
} catch {
/* keep server-rendered navigation as is */
}
// Footer year (progressive enhancement only).
const year = document.querySelector("[data-year]");
if (year) year.textContent = String(new Date().getFullYear());
})();
+37
View File
@@ -0,0 +1,37 @@
<?php
declare(strict_types=1);
// PHP built-in server router: expose only real assets under public/assets.
if (PHP_SAPI === 'cli-server') {
$path = explode('?', $_SERVER['REQUEST_URI'] ?? '/', 2)[0];
$assetRoot = realpath(__DIR__ . '/assets');
$asset = realpath(__DIR__ . $path);
if ($assetRoot && $asset && str_starts_with($path, '/assets/') && str_starts_with($asset, $assetRoot . DIRECTORY_SEPARATOR)
&& is_file($asset) && preg_match('/\.(?:css|js|png|jpe?g|webp|gif|svg|ico|woff2?)$/i', $asset)) {
return false;
}
}
require dirname(__DIR__) . '/app/bootstrap.php';
ini_set('display_errors', '0');
try {
$config = \FDMTech\Config::load(dirname(__DIR__));
ini_set('session.use_strict_mode', '1');
ini_set('session.use_only_cookies', '1');
session_name('fdmtech_session');
session_set_cookie_params(['lifetime' => 0, 'path' => '/', 'secure' => $config->bool('SESSION_SECURE', true),
'httponly' => true, 'samesite' => 'Lax']);
if (!session_start()) {
throw new RuntimeException('Session storage unavailable');
}
$response = (new \FDMTech\Application($config))->handle($_SERVER, $_POST, $_SESSION);
session_write_close();
$response->send(($_SERVER['REQUEST_METHOD'] ?? '') === 'HEAD');
} catch (Throwable $error) {
error_log('FDMTech bootstrap failure [' . $error::class . ']');
(new \FDMTech\Response(503, '<!doctype html><html lang="pl"><meta charset="utf-8"><title>Serwis niedostępny</title><h1>Serwis jest chwilowo niedostępny</h1></html>',
['Content-Type' => 'text/html; charset=UTF-8', 'Cache-Control' => 'no-store', 'Retry-After' => '60',
'Content-Security-Policy' => "default-src 'none'; frame-ancestors 'none'; base-uri 'none'", 'X-Robots-Tag' => 'noindex, nofollow']))
->send(($_SERVER['REQUEST_METHOD'] ?? '') === 'HEAD');
}