Remove hero section styles Add CSS reset and variables Improve typography and layout Update base template with CSS versioning Restructure list templates with semantic HTML Add proper container classes Improve code organization and readability
65 lines
2.5 KiB
PHP
65 lines
2.5 KiB
PHP
<?php
|
|
$customCssPath = dirname(__DIR__, 2) . '/custom/styles/base.css';
|
|
$defaultCssPath = __DIR__ . '/../styles/styles.css';
|
|
if (file_exists($customCssPath)) {
|
|
$cssUrl = '/app/styles/base.css';
|
|
$cssHash = hash_file('md5', $customCssPath);
|
|
} else {
|
|
$cssUrl = '/app/default-styles/styles.css';
|
|
$cssHash = hash_file('md5', $defaultCssPath);
|
|
}
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="<?= htmlspecialchars($currentLang ?? 'en') ?>">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title><?= htmlspecialchars($pageTitle ?? 'FolderWeb') ?></title>
|
|
<?php if (!empty($metaDescription)): ?>
|
|
<meta name="description" content="<?= htmlspecialchars($metaDescription) ?>">
|
|
<?php endif; ?>
|
|
<?php if (!empty($socialImageUrl)): ?>
|
|
<meta property="og:image" content="<?= htmlspecialchars($socialImageUrl) ?>">
|
|
<?php endif; ?>
|
|
<link rel="stylesheet" href="<?= $cssUrl ?>?v=<?= $cssHash ?>">
|
|
<?php if (!empty($pageCssUrl)): ?>
|
|
<link rel="stylesheet" href="<?= htmlspecialchars($pageCssUrl) ?>?v=<?= htmlspecialchars($pageCssHash ?? '') ?>">
|
|
<?php endif; ?>
|
|
<?php if (!empty($feedUrl)): ?>
|
|
<link rel="alternate" type="application/atom+xml" title="<?= htmlspecialchars($pageTitle ?? 'Feed') ?>" href="<?= htmlspecialchars($feedUrl) ?>">
|
|
<?php endif; ?>
|
|
</head>
|
|
<body>
|
|
<header class="contain">
|
|
<div>
|
|
<nav>
|
|
<a href="<?= htmlspecialchars($langPrefix ?? '') ?>/"><?= htmlspecialchars($translations['home'] ?? $homeLabel ?? 'Home') ?></a>
|
|
<?php if (!empty($navigation)): ?>
|
|
<?php foreach ($navigation as $item): ?>
|
|
<a href="<?= htmlspecialchars($item['url']) ?>"><?= htmlspecialchars($item['title']) ?></a>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
</nav>
|
|
<?php if (!empty($languageUrls) && count($languageUrls) > 1): ?>
|
|
<nav class="language-switcher" aria-label="Language">
|
|
<?php foreach ($languageUrls as $lang => $url): ?>
|
|
<a href="<?= htmlspecialchars($url) ?>" <?= ($lang === $currentLang) ? 'aria-current="true"' : '' ?>><?= htmlspecialchars(strtoupper($lang)) ?></a>
|
|
<?php endforeach; ?>
|
|
</nav>
|
|
<?php endif; ?>
|
|
</div>
|
|
</header>
|
|
|
|
<main>
|
|
<?= $wrappedContent ?? $content ?>
|
|
</main>
|
|
|
|
<footer class="contain">
|
|
<p>Generated in <?= number_format((microtime(true) - $_SERVER['REQUEST_TIME_FLOAT']) * 1000, 2) ?>ms</p>
|
|
</footer>
|
|
|
|
<?php if (!empty($pageJsUrl)): ?>
|
|
<script defer src="<?= htmlspecialchars($pageJsUrl) ?>?v=<?= htmlspecialchars($pageJsHash ?? '') ?>"></script>
|
|
<?php endif; ?>
|
|
</body>
|
|
</html>
|