PluginProbe ʕ •ᴥ•ʔ
Hostinger Tools / 3.0.72
Hostinger Tools v3.0.72
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 2.0.4 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.2 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 3.0.0 3.0.10 3.0.11 3.0.12 3.0.13 3.0.14 3.0.15 3.0.16 3.0.17 3.0.18 3.0.19 3.0.2 3.0.20 3.0.21 3.0.22 3.0.23 3.0.24 3.0.25 3.0.26 3.0.27 3.0.28 3.0.29 3.0.3 3.0.30 3.0.31 3.0.32 3.0.33 3.0.34 3.0.35 3.0.36 3.0.37 3.0.38 3.0.39 3.0.4 3.0.40 3.0.41 3.0.42 3.0.43 3.0.44 3.0.45 3.0.46 3.0.47 3.0.48 3.0.49 3.0.5 3.0.50 3.0.51 3.0.52 3.0.53 3.0.54 3.0.55 3.0.56 3.0.57 3.0.58 3.0.59 3.0.6 3.0.60 3.0.61 3.0.62 3.0.65 3.0.7 3.0.8 3.0.9 trunk 1.8.0
hostinger / vue-frontend / src / layouts / Wrapper.vue
hostinger / vue-frontend / src / layouts Last commit date
Wrapper.vue 9 months ago
Wrapper.vue
120 lines
1 <script lang="ts" setup>
2 import Button from "@/components/Button/Button.vue";
3 import { useGeneralStoreData } from "@/stores";
4 import { EditSiteButton, HeaderButton, PreviewSiteButton } from "@/types";
5
6 const props = defineProps<Props>();
7
8 const { siteUrl, editSiteUrl } = useGeneralStoreData();
9
10 type Props = {
11 title?: string;
12 headerButton?: HeaderButton;
13 previewSiteButton?: PreviewSiteButton;
14 editSiteButton?: EditSiteButton;
15 };
16 </script>
17
18 <template>
19 <div class="wrapper">
20 <div class="wrapper__content">
21 <div class="wrapper__header">
22 <h1
23 v-if="props.title"
24 class="text-heading-1"
25 >
26 {{ props.title }}
27 </h1>
28 <div class="wrapper__buttons-wrapper">
29 <Button
30 v-if="headerButton"
31 class="wrapper__button"
32 :to="headerButton?.href"
33 size="small"
34 variant="outline"
35 :target="headerButton.href ? '_blank' : undefined"
36 icon-append="icon-launch"
37 @click="headerButton?.onClick"
38 >
39 {{ headerButton.text }}
40 </Button>
41 <Button
42 v-if="previewSiteButton && siteUrl"
43 class="wrapper__button"
44 :to="siteUrl"
45 size="small"
46 variant="outline"
47 :target="siteUrl ? '_blank' : undefined"
48 icon-prepend="icon-visibility"
49 @click="previewSiteButton?.onClick"
50 >
51 {{ previewSiteButton.text }}
52 </Button>
53 <Button
54 v-if="editSiteButton && editSiteUrl"
55 class="wrapper__button"
56 :to="editSiteUrl"
57 size="small"
58 variant="outline"
59 :target="editSiteUrl ? '_blank' : undefined"
60 icon-prepend="icon-launch"
61 @click="editSiteButton?.onClick"
62 >
63 {{ editSiteButton.text }}
64 </Button>
65 </div>
66 </div>
67 <slot />
68 </div>
69 </div>
70 </template>
71
72 <style lang="scss" scoped>
73 .wrapper {
74 padding: 48px;
75 display: flex;
76 flex-direction: column;
77 align-items: center;
78 justify-content: center;
79 text-align: left;
80 min-height: calc(100vh - var(--header-height));
81
82 @media (max-width: 768px) {
83 padding-right: 10px;
84 padding-left: 0px;
85 }
86
87 &__buttons-wrapper {
88 display: flex;
89
90 @media (max-width: 500px) {
91 width: 100%;
92 flex-wrap: wrap;
93 }
94 }
95
96 &__header {
97 display: flex;
98 justify-content: space-between;
99 align-items: center;
100 flex-wrap: wrap;
101 }
102
103 &__button {
104 background-color: var(--white);
105 margin-left: 10px;
106 display: flex;
107 flex-wrap: nowrap;
108
109 @media (max-width: 500px) {
110 margin: 5px 0;
111 }
112 }
113
114 &__content {
115 max-width: 740px;
116 width: 100%;
117 }
118 }
119 </style>
120