first commit
This commit is contained in:
commit
af43d08e90
41 changed files with 5197 additions and 0 deletions
49
frontend/src/layouts/Layout.astro
Normal file
49
frontend/src/layouts/Layout.astro
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
---
|
||||
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>
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue