PluginProbe
Hostinger Tools / 3.0.46
Hostinger Tools v3.0.46
3.0.78 3.0.77 3.0.76 3.0.75 3.0.74 3.0.73 3.0.72 3.0.71 3.0.70 3.0.69 3.0.68 3.0.67 3.0.66 1.8.1 1.8.2 1.8.3 1.9.1 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 All 109 releases
hostinger / vue-frontend / src / layouts / Wrapper.vue

Wrapper.vue in Hostinger Tools 3.0.46, at vue-frontend/src/layouts/Wrapper.vue

114 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <script lang="ts" setup>
2 import PluginSplitNotice from "@/components/PluginSplitNotice.vue";
3 import { HeaderButton, PreviewSiteButton, EditSiteButton } from "@/types";
4 import Button from "@/components/Button/Button.vue";
5 import { useGeneralStoreData } from "@/stores";
6
7 const { siteUrl, editSiteUrl } = useGeneralStoreData();
8
9 type Props = {
10 title?: string;
11 headerButton?: HeaderButton;
12 previewSiteButton?: PreviewSiteButton;
13 editSiteButton?: EditSiteButton;
14 };
15
16 const props = defineProps<Props>();
17 </script>
18
19 <template>
20 <div class="wrapper">
21 <div class="wrapper__content">
22 <PluginSplitNotice class="h-mb-20" />
23 <div class="wrapper__header">
24 <h1 v-if="props.title" class="text-heading-1">{{ props.title }}</h1>
25 <div class="wrapper__buttons-wrapper">
26 <Button
27 class="wrapper__button"
28 v-if="headerButton"
29 @click="headerButton?.onClick"
30 :to="headerButton?.href"
31 size="small"
32 variant="outline"
33 :target="headerButton.href ? '_blank' : undefined"
34 icon-append="icon-launch"
35 >{{ headerButton.text }}</Button
36 >
37 <Button
38 class="wrapper__button"
39 v-if="previewSiteButton && siteUrl"
40 @click="previewSiteButton?.onClick"
41 :to="siteUrl"
42 size="small"
43 variant="outline"
44 :target="siteUrl ? '_blank' : undefined"
45 icon-prepend="icon-visibility"
46 >{{ previewSiteButton.text }}</Button
47 >
48 <Button
49 class="wrapper__button"
50 v-if="editSiteButton && editSiteUrl"
51 @click="headerButton?.onClick"
52 :to="editSiteUrl"
53 size="small"
54 variant="outline"
55 :target="editSiteUrl ? '_blank' : undefined"
56 icon-prepend="icon-launch"
57 >{{ editSiteButton.text }}</Button
58 >
59 </div>
60 </div>
61 <slot />
62 </div>
63 </div>
64 </template>
65
66 <style lang="scss" scoped>
67 .wrapper {
68 padding: 48px;
69 display: flex;
70 flex-direction: column;
71 align-items: center;
72 justify-content: center;
73 text-align: left;
74 min-height: calc(100vh - var(--header-height));
75
76 @media (max-width: 768px) {
77 padding-right: 10px;
78 padding-left: 0px;
79 }
80
81 &__buttons-wrapper {
82 display: flex;
83
84 @media (max-width: 500px) {
85 width: 100%;
86 flex-wrap: wrap;
87 }
88 }
89
90 &__header {
91 display: flex;
92 justify-content: space-between;
93 align-items: center;
94 flex-wrap: wrap;
95 }
96
97 &__button {
98 background-color: var(--white);
99 margin-left: 10px;
100 display: flex;
101 flex-wrap: nowrap;
102
103 @media (max-width: 500px) {
104 margin: 5px 0;
105 }
106 }
107
108 &__content {
109 max-width: 740px;
110 width: 100%;
111 }
112 }
113 </style>
114