perfect-postcode/frontend/src/index.html

43 lines
1.9 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="theme-color" content="#fafaf9" media="(prefers-color-scheme: light)" />
<meta name="theme-color" content="#0a0e1a" media="(prefers-color-scheme: dark)" />
<meta name="referrer" content="no-referrer" />
<title>Perfect Postcode - Find where to buy before browsing listings</title>
<meta name="description" content="Filter every postcode in England by budget, commute, schools, crime, noise, broadband, property prices and amenities before you start chasing viewings." />
<meta name="x-og-placeholder" content="__PERFECT_POSTCODE_OG_TAGS__" />
<script>
(function() {
var theme = localStorage.getItem('theme');
var isDark = theme === 'dark' || (!theme && window.matchMedia('(prefers-color-scheme: dark)').matches);
if (isDark) document.documentElement.classList.add('dark');
// Override theme-color when user has explicit preference
if (theme === 'dark' || theme === 'light') {
var color = theme === 'dark' ? '#0a0e1a' : '#fafaf9';
document.querySelectorAll('meta[name="theme-color"]').forEach(function(m) { m.setAttribute('content', color); });
}
})();
</script>
</head>
<body>
<div id="root"></div>
<script>
(function() {
var root = document.getElementById('root');
if (!root) return;
var prerenderPath = root.getAttribute('data-prerender-path');
if (!prerenderPath) return;
var normalize = function(path) {
return path.length > 1 ? path.replace(/\/+$/, '') : '/';
};
if (normalize(prerenderPath) !== normalize(window.location.pathname || '/')) {
root.textContent = '';
root.removeAttribute('data-prerender-path');
}
})();
</script>
</body>
</html>