assets
1 year ago
components
9 months ago
composables
9 months ago
layouts
9 months ago
repositories
9 months ago
router
9 months ago
scss
9 months ago
stores
9 months ago
types
5 months ago
utils
9 months ago
views
4 months ago
App.vue
9 months ago
eslint.config.mjs
9 months ago
main.ts
9 months ago
vue-shim.d.ts
9 months ago
App.vue
58 lines
| 1 | <script setup lang="ts"> |
| 2 | import { computed } from "vue"; |
| 3 | import { RouterView, useRoute } from "vue-router"; |
| 4 | |
| 5 | import Modals from "@/components/Modals/Base/Modals.vue"; |
| 6 | import Wrapper from "@/layouts/Wrapper.vue"; |
| 7 | import { EditSiteButton, HeaderButton, PreviewSiteButton } from "@/types"; |
| 8 | |
| 9 | const route = useRoute(); |
| 10 | |
| 11 | const headerTitle = computed(() => route.meta.title as string); |
| 12 | |
| 13 | const headerButton = computed(() => route.meta.headerButton as HeaderButton); |
| 14 | |
| 15 | const previewSiteButton = computed( |
| 16 | () => route.meta.previewSiteButton as PreviewSiteButton |
| 17 | ); |
| 18 | |
| 19 | const editSiteButton = computed( |
| 20 | () => route.meta.editSiteButton as EditSiteButton |
| 21 | ); |
| 22 | </script> |
| 23 | |
| 24 | <template> |
| 25 | <div> |
| 26 | <div id="overhead-button" /> |
| 27 | <Wrapper |
| 28 | :title="headerTitle" |
| 29 | :header-button="headerButton" |
| 30 | :preview-site-button="previewSiteButton" |
| 31 | :edit-site-button="editSiteButton" |
| 32 | > |
| 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 |