2024-02-12 05:46:39 +04:00
|
|
|
---
|
2024-02-18 07:40:53 +04:00
|
|
|
// Importing necessary components
|
2024-04-17 18:25:49 +04:00
|
|
|
import Meta from "@components/Meta.astro";
|
2024-06-29 03:40:52 +04:00
|
|
|
import Navbar from "@components/sections/navbar&footer/Navbar.astro";
|
2024-06-29 03:38:42 +04:00
|
|
|
import FooterSection from "@components/sections/navbar&footer/FooterSection.astro";
|
2024-04-17 18:25:49 +04:00
|
|
|
import { SITE } from "@data/constants";
|
2024-02-13 05:50:53 +04:00
|
|
|
|
2024-03-26 01:13:16 +04:00
|
|
|
// Setting expected props
|
2024-03-27 17:25:34 -05:00
|
|
|
const { title = SITE.title, meta, structuredData, lang = "en" } = Astro.props;
|
2024-02-12 05:46:39 +04:00
|
|
|
|
2024-02-18 07:40:53 +04:00
|
|
|
// Interface to type-check the properties
|
2024-02-12 05:46:39 +04:00
|
|
|
interface Props {
|
|
|
|
|
title?: string;
|
2024-02-14 22:56:43 +04:00
|
|
|
meta?: string;
|
2024-02-19 17:41:42 +04:00
|
|
|
structuredData?: object;
|
2024-03-25 22:39:36 +04:00
|
|
|
lang?: string;
|
2024-02-12 05:46:39 +04:00
|
|
|
}
|
|
|
|
|
---
|
|
|
|
|
|
2024-02-18 07:40:53 +04:00
|
|
|
<!--
|
|
|
|
|
This is the main structure for the page.
|
|
|
|
|
We set the language of the page to English and add classes for scrollbar and scroll behavior.
|
|
|
|
|
-->
|
2024-03-26 01:13:16 +04:00
|
|
|
<html lang={lang} class="scrollbar-hide lenis lenis-smooth scroll-pt-16">
|
2024-02-12 05:46:39 +04:00
|
|
|
<head>
|
2024-02-18 07:40:53 +04:00
|
|
|
<!-- Adding metadata to the HTML document -->
|
2024-02-19 17:41:42 +04:00
|
|
|
<Meta meta={meta} structuredData={structuredData} />
|
2024-02-18 07:40:53 +04:00
|
|
|
<!-- Define the title of the page -->
|
2024-02-14 05:47:32 +04:00
|
|
|
<title>{title}</title>
|
2024-02-12 05:46:39 +04:00
|
|
|
<script is:inline>
|
2024-02-18 07:40:53 +04:00
|
|
|
// Script to handle dark mode. It will check if the theme is stored in localStorage or if dark theme is preferred by system settings
|
2024-02-12 05:46:39 +04:00
|
|
|
if (
|
|
|
|
|
localStorage.getItem("hs_theme") === "dark" ||
|
|
|
|
|
(!("hs_theme" in localStorage) &&
|
|
|
|
|
window.matchMedia("(prefers-color-scheme: dark)").matches)
|
|
|
|
|
) {
|
|
|
|
|
document.documentElement.classList.add("dark");
|
|
|
|
|
} else {
|
|
|
|
|
document.documentElement.classList.remove("dark");
|
|
|
|
|
}
|
|
|
|
|
</script>
|
2024-06-21 19:09:44 +04:00
|
|
|
<script>
|
|
|
|
|
import "@scripts/lenisSmoothScroll.js";
|
2024-02-16 19:27:15 +04:00
|
|
|
</script>
|
2025-01-05 02:50:58 +01:00
|
|
|
<script defer data-domain="achat-maison-albi.fr" src="https://plausible.io/js/script.outbound-links.js"></script>
|
2024-02-12 05:46:39 +04:00
|
|
|
</head>
|
|
|
|
|
<body
|
|
|
|
|
class="bg-neutral-200 selection:bg-yellow-400 selection:text-neutral-700 dark:bg-neutral-800"
|
|
|
|
|
>
|
2024-02-18 07:40:53 +04:00
|
|
|
<!--
|
|
|
|
|
Setting up the main structure of the page.
|
|
|
|
|
The Navbar is placed at the top, with a slot for the main content and FooterSection at the bottom.
|
|
|
|
|
-->
|
2024-02-12 05:46:39 +04:00
|
|
|
<div class="mx-auto max-w-screen-2xl px-4 sm:px-6 lg:px-8">
|
2024-02-13 05:50:53 +04:00
|
|
|
<Navbar />
|
2024-02-19 09:36:37 +04:00
|
|
|
<main>
|
2024-03-26 01:13:16 +04:00
|
|
|
<slot />
|
2024-02-19 09:36:37 +04:00
|
|
|
</main>
|
2024-02-12 05:46:39 +04:00
|
|
|
</div>
|
2024-02-13 05:50:53 +04:00
|
|
|
<FooterSection />
|
2024-02-12 05:46:39 +04:00
|
|
|
<style>
|
2024-06-21 19:09:44 +04:00
|
|
|
/* CSS rules for the page scrollbar */
|
2024-02-12 05:46:39 +04:00
|
|
|
.scrollbar-hide::-webkit-scrollbar {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.scrollbar-hide {
|
|
|
|
|
-ms-overflow-style: none;
|
|
|
|
|
scrollbar-width: none;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|