49 lines
1.3 KiB
Text
49 lines
1.3 KiB
Text
---
|
|
import '@styles/global.css';
|
|
import Header from "@components/layout/header/Header.astro";
|
|
import Footer from "@components/layout/footer/Footer.astro";
|
|
import ConsultationModal from "@components/base/ConsultationModal.astro";
|
|
---
|
|
|
|
<!doctype html>
|
|
<html lang="ru">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width" />
|
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
<link rel="icon" href="/favicon.ico" />
|
|
<title>Автоюрист в Сургуте</title>
|
|
</head>
|
|
<body>
|
|
<Header />
|
|
<slot />
|
|
<Footer />
|
|
<ConsultationModal />
|
|
|
|
<script>
|
|
// Клиентский скрипт для открытия модального окна
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
const btn = document.getElementById('consultation-btn');
|
|
|
|
btn?.addEventListener('click', () => {
|
|
window.dispatchEvent(new CustomEvent('open-modal', {
|
|
detail: 'consultation-modal'
|
|
}));
|
|
});
|
|
});
|
|
|
|
// Для Astro View Transitions
|
|
document.addEventListener('astro:page-load', () => {
|
|
const btn = document.getElementById('consultation-btn');
|
|
|
|
btn?.addEventListener('click', () => {
|
|
window.dispatchEvent(new CustomEvent('open-modal', {
|
|
detail: 'consultation-modal'
|
|
}));
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|
|
|