folderweb/app/default/templates/base.php
Ruben d937ca6166 Add page template with metadata display and copyright translation
Add support for language translations in footer

Add page template to template resolution logic
2025-10-02 20:16:52 +02:00

29 lines
1 KiB
PHP

<!DOCTYPE html>
<html lang="<?= $currentLang ?? 'en' ?>">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="<?= file_exists(dirname(dirname(__DIR__)) . '/custom/styles/base.css') ? '/app/styles/base.css' : '/app/default-styles/base.css' ?>">
<title><?= htmlspecialchars($pageTitle ?? 'Site') ?></title>
</head>
<body>
<header>
<h1><a href="/">Webfolder demo</a></h1>
<?php if (!empty($navigation)): ?>
<nav>
<ul>
<?php foreach ($navigation as $item): ?>
<li><a href="<?= htmlspecialchars($item['url']) ?>"><?= htmlspecialchars($item['title']) ?></a></li>
<?php endforeach; ?>
</ul>
</nav>
<?php endif; ?>
</header>
<main>
<?= $content ?>
</main>
<footer>
<p>&copy; <?= date('Y') ?> <?= htmlspecialchars($translations['footer_copyright'] ?? '') ?></p>
</footer>
</body>
</html>