astro_avtourist/frontend/src/layouts/Layout.astro

53 lines
1.4 KiB
Text
Raw Normal View History

2026-03-31 22:53:39 +05:00
---
import '@styles/global.css';
2026-03-31 22:53:39 +05:00
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" />
<!-- Yandex верификация -->
<meta name="yandex-verification" content="be3edfd138348e43" />
2026-03-31 22:53:39 +05:00
<title>Автоюрист в Сургуте</title>
</head>
<body>
<Header />
<slot />
<Footer />
<ConsultationModal />
</body>
</html>
<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>
2026-03-31 22:53:39 +05:00