Files
WebWizard/src/Templates/base.php
2026-06-15 04:30:46 +02:00

88 lines
2.3 KiB
PHP

<?php
/**
* @var array $project
* @var string $content
*/
$seo = $project['content']['generated']['seo'] ?? [];
$identity = $project['wizard_data']['identity'] ?? [];
$contact = $project['wizard_data']['contact'] ?? [];
$visuals = $project['wizard_data']['visuals'] ?? [];
$assets = $project['wizard_data']['assets'] ?? [];
// Helper function for safe output
if (!function_exists('e')) {
function e($value) {
return htmlspecialchars((string)($value ?? ''), ENT_QUOTES, 'UTF-8');
}
}
?>
<!DOCTYPE html>
<html lang="sk">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?= e($seo['title'] ?? $identity['business_name'] ?? 'Môj Web') ?></title>
<meta name="description" content="<?= e($seo['description'] ?? '') ?>">
<!-- Open Graph -->
<meta property="og:title" content="<?= e($seo['title'] ?? '') ?>">
<meta property="og:description" content="<?= e($seo['description'] ?? '') ?>">
<meta property="og:type" content="website">
<!-- Assets -->
<link rel="stylesheet" href="assets/css/site.css">
<style>
:root {
<?php if (!empty($visuals['palette'])): ?>
/* Palette overrides will go here in later steps */
<?php endif; ?>
}
</style>
</head>
<body>
<header>
<nav>
<div class="container">
<div class="logo">
<?php if (!empty($assets['logo'])): ?>
<img src="<?= e($assets['logo']) ?>" alt="<?= e($identity['business_name']) ?>">
<?php else: ?>
<strong><?= e($identity['business_name']) ?></strong>
<?php endif; ?>
</div>
<ul class="nav-links">
<!-- Navigation will be dynamic in later steps -->
</ul>
</div>
</nav>
</header>
<main id="content">
<?= $content ?>
</main>
<footer>
<div class="container">
<div class="footer-grid">
<div class="footer-info">
<h4><?= e($identity['business_name']) ?></h4>
<p><?= e($identity['tagline']) ?></p>
</div>
<div class="footer-contact">
<p><?= e($contact['email']) ?></p>
<p><?= e($contact['phone']) ?></p>
<p><?= e($contact['address']) ?>, <?= e($contact['city']) ?></p>
</div>
</div>
<div class="footer-bottom">
<p>&copy; <?= date('Y') ?> <?= e($identity['business_name']) ?>. Všetky práva vyhradené.</p>
</div>
</div>
</footer>
</body>
</html>