| 1 |
<script setup lang="ts"> |
| 2 |
import { RouterView } from "vue-router"; |
| 3 |
import Modals from "@/components/Modals/Base/Modals.vue"; |
| 4 |
import Wrapper from "@/layouts/Wrapper.vue"; |
| 5 |
import { useRoute } from "vue-router"; |
| 6 |
import { computed } from "vue"; |
| 7 |
import {EditSiteButton, HeaderButton, PreviewSiteButton} from "@/types"; |
| 8 |
|
| 9 |
const route = useRoute(); |
| 10 |
|
| 11 |
const headerTitle = computed(() => { |
| 12 |
return route.meta.title as string; |
| 13 |
}); |
| 14 |
|
| 15 |
const headerButton = computed(() => { |
| 16 |
return route.meta.headerButton as HeaderButton; |
| 17 |
}); |
| 18 |
|
| 19 |
const previewSiteButton = computed(() => { |
| 20 |
return route.meta.previewSiteButton as PreviewSiteButton; |
| 21 |
}); |
| 22 |
|
| 23 |
const editSiteButton = computed(() => { |
| 24 |
return route.meta.editSiteButton as EditSiteButton; |
| 25 |
}); |
| 26 |
|
| 27 |
</script> |
| 28 |
|
| 29 |
<template> |
| 30 |
<div> |
| 31 |
<div id="overhead-button" /> |
| 32 |
<Wrapper :title="headerTitle" :header-button="headerButton" :preview-site-button="previewSiteButton" :edit-site-button="editSiteButton"> |
| 33 |
<RouterView v-slot="{ Component }"> |
| 34 |
<Component :is="Component" /> |
| 35 |
</RouterView> |
| 36 |
</Wrapper> |
| 37 |
<Modals /> |
| 38 |
</div> |
| 39 |
</template> |
| 40 |
|
| 41 |
<style lang="scss" scoped> |
| 42 |
:deep(.h-button-v2) { |
| 43 |
&:hover { |
| 44 |
cursor: pointer; |
| 45 |
} |
| 46 |
} |
| 47 |
#overhead-button { |
| 48 |
position: absolute; |
| 49 |
right: 0; |
| 50 |
padding: 40px; |
| 51 |
z-index: 2; |
| 52 |
|
| 53 |
@media (max-width: 576px) { |
| 54 |
padding: 16px; |
| 55 |
} |
| 56 |
} |
| 57 |
</style> |
| 58 |
|