volpe/_includes/base.njk

63 lines
No EOL
2.1 KiB
Text

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Volpe{% if title %} | {{ title }}{% endif %}</title>
{% if description %}
<meta name="description" content="{{ description }}">
{% endif %}
{# Critical CSS inlined for faster initial render #}
<style>
:root {
--primary-color: #2c3e50;
--secondary-color: #3498db;
--text-color: #333;
--background-color: #fff;
--border-color: #ddd;
--code-background: #f5f5f5;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
line-height: 1.6;
color: var(--text-color);
background-color: var(--background-color);
max-width: 800px;
margin: 0 auto;
padding: 2rem;
}
header { margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); }
header nav a { color: var(--primary-color); text-decoration: none; font-weight: bold; font-size: 1.2rem; }
main { min-height: calc(100vh - 200px); }
h1, h2, h3 { color: var(--primary-color); margin: 1.5rem 0 1rem; }
h1 { font-size: 2rem; }
footer { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border-color); text-align: center; color: #666; font-size: 0.9rem; }
</style>
{# Preload full stylesheet with cache-busted filename #}
<link rel="preload" href="{{ 'style.css' | cssHash }}" as="style">
<link rel="stylesheet" href="{{ 'style.css' | cssHash }}">
{# Defer prism.css - only needed for syntax highlighting #}
<link rel="preload" href="{{ 'prism.css' | cssHash }}" as="style">
<link rel="stylesheet" href="{{ 'prism.css' | cssHash }}" media="print" onload="this.media='all'">
<noscript><link rel="stylesheet" href="{{ 'prism.css' | cssHash }}"></noscript>
</head>
<body>
<header>
<nav>
<a href="/">Home</a>
</nav>
</header>
<main>
{{ content | safe }}
</main>
<footer>
<p>&copy; {{ page.date.getFullYear() }} Volpe</p>
</footer>
</body>
</html>