PluginProbe ʕ •ᴥ•ʔ
Hostinger Reach – AI-Powered Email Marketing for WordPress / 1.7.1
Hostinger Reach – AI-Powered Email Marketing for WordPress v1.7.1
1.7.2 1.7.1 1.7.0 1.6.0 1.5.9 1.5.8 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.0 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 trunk 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6
hostinger-reach / frontend / vue / components / Hero.vue
hostinger-reach / frontend / vue / components Last commit date
Modals 1 month ago skeletons 5 months ago ActionButton.vue 5 months ago ActionButtonsSection.vue 5 months ago Banner.vue 3 months ago FAQ.vue 5 months ago FormItem.vue 2 months ago FormsSection.vue 11 months ago Hero.vue 1 month ago Integrations.vue 4 months ago Pagination.vue 10 months ago PluginEntriesTable.vue 4 months ago PluginEntry.vue 5 months ago PluginExpansion.vue 8 months ago ReachContactsSummary.vue 2 weeks ago SyncStatusLabel.vue 6 months ago Tabs.vue 9 months ago Toggle.vue 10 months ago UsageCard.vue 10 months ago UsageCardsRow.vue 1 year ago UsageCardsSection.vue 1 year ago WooCommerce.vue 2 weeks ago WooCommerceEntriesTable.vue 4 months ago
Hero.vue
365 lines
1 <script setup lang="ts">
2 import { computed } from 'vue';
3
4 import reachBackgroundImage from '@/assets/images/backgrounds/reach-welcome-background.png';
5 import reachBackgroundImageMobile from '@/assets/images/backgrounds/reach-welcome-background-mobile.png';
6 import reachLogo from '@/assets/images/icons/reach-logo.svg';
7 import { useReachUrls } from '@/composables/useReachUrls';
8 import { translate } from '@/utils/translate';
9
10 const { reachBaseDomain } = useReachUrls();
11
12 const reachDashboardUrl = computed(() => `https://${reachBaseDomain.value}`);
13
14 interface Props {
15 isConnectedToAnotherSite?: boolean;
16 isButtonLoading?: boolean;
17 domain: string;
18 onGetStarted: () => void;
19 onManualApiKeyClick?: () => void;
20 }
21
22 const props = withDefaults(defineProps<Props>(), {
23 isConnectedToAnotherSite: false,
24 isButtonLoading: false,
25 onManualApiKeyClick: () => {}
26 });
27 </script>
28
29 <template>
30 <section class="hero" role="main" aria-labelledby="hero-heading">
31 <header class="hero__header">
32 <div class="hero__header-content">
33 <div class="hero__header-brand">
34 <img :src="reachLogo" :alt="translate('hostinger_reach_header_logo_alt')" class="hero__header-logo" />
35 </div>
36 <HButton
37 variant="outline"
38 target="_blank"
39 color="neutral"
40 size="small"
41 icon-append="ic-launch-16"
42 :to="reachDashboardUrl"
43 >
44 {{ translate('hostinger_reach_header_go_to_reach_button') }}
45 </HButton>
46 </div>
47 </header>
48
49 <HCard border-radius="20px" padding="0" border-color="neutral--200">
50 <div class="hero__image">
51 <img
52 :src="reachBackgroundImage"
53 :alt="translate('hostinger_reach_hero_background_alt')"
54 role="img"
55 style="display: none"
56 />
57 <img
58 :src="reachBackgroundImageMobile"
59 :alt="translate('hostinger_reach_hero_background_alt')"
60 class="hero__background"
61 role="img"
62 />
63 </div>
64 <div
65 style="
66 background-image: url('/wp-content/plugins/hostinger-reach/frontend/dist/assets/reach-welcome-background.png');
67 "
68 class="hero__content"
69 >
70 <div class="hero__content-wrapper">
71 <HText id="hero-heading" as="h1" variant="heading-1">
72 {{ translate('hostinger_reach_welcome_view_title') }}
73 </HText>
74 <HText id="hero-description" as="p" variant="body-2 h-mb-24">
75 {{ translate('hostinger_reach_welcome_view_description') }}
76 </HText>
77 <template v-if="!isConnectedToAnotherSite">
78 <div class="hero__actions">
79 <HButton
80 color="primary"
81 size="small"
82 :is-loading="props.isButtonLoading"
83 aria-describedby="hero-description"
84 :aria-label="translate('hostinger_reach_welcome_view_start_button')"
85 @click="onGetStarted"
86 >
87 {{ translate('hostinger_reach_welcome_view_start_button') }}
88 </HButton>
89 <HButton variant="text" color="neutral" size="small" @click="onManualApiKeyClick">
90 {{ translate('hostinger_reach_api_key_modal_link') }}
91 </HButton>
92 </div>
93 </template>
94 </div>
95 </div>
96 <div class="hero__footer" role="contentinfo" aria-label="Site information">
97 <HIcon class="h-mr-8" name="ic-globe-16" color="neutral--300" aria-hidden="true" />
98 <HText as="p" variant="body-2-bold" color="neutral--500">
99 {{ domain }}
100 </HText>
101 </div>
102 </HCard>
103 </section>
104 </template>
105
106 <style scoped lang="scss">
107 .hero {
108 display: flex;
109 align-items: center;
110 flex-direction: column;
111 max-width: 780px;
112 margin: 40px auto 16px auto;
113
114 @media (max-width: 1024px) {
115 max-width: 90%;
116 margin: 32px auto 16px auto;
117 }
118
119 @media (max-width: 768px) {
120 flex-direction: column;
121 text-align: left;
122 padding: 24px 16px;
123 gap: 32px;
124 margin: 20px auto 16px auto;
125 }
126
127 @media (max-width: 480px) {
128 padding: 16px 8px;
129 gap: 24px;
130 margin: 16px auto 12px auto;
131 }
132
133 &__banner {
134 display: flex;
135 width: 100%;
136 align-items: center;
137 justify-content: space-between;
138 gap: 16px;
139
140 @media (max-width: 768px) {
141 flex-direction: column;
142 align-items: flex-start;
143 gap: 12px;
144 }
145
146 @media (max-width: 480px) {
147 gap: 8px;
148 }
149 }
150
151 &__banner-content {
152 display: flex;
153 flex-direction: column;
154 gap: 4px;
155
156 @media (max-width: 768px) {
157 width: 100%;
158 }
159 }
160
161 &__content {
162 flex: 1;
163 padding: 28px;
164 width: 100%;
165 border-radius: 20px;
166 background-size: cover;
167 background-position: right;
168 background-repeat: no-repeat;
169
170 @media (max-width: 768px) {
171 padding: 24px 24px 0;
172 background: none;
173 border-radius: 0;
174 }
175 }
176
177 &__image {
178 width: 100%;
179 display: flex;
180 justify-content: center;
181 position: relative;
182 overflow: hidden;
183 margin-bottom: 0;
184 border-bottom: 1px solid var(--neutral--50);
185
186 @media (min-width: 768px) {
187 display: none;
188 }
189 }
190
191 &__background {
192 width: 100%;
193 height: auto;
194 border-top-right-radius: 20px;
195 border-top-left-radius: 20px;
196 border-bottom-right-radius: 0;
197 border-bottom-left-radius: 0;
198 }
199
200 &__content-wrapper {
201 display: flex;
202 flex-direction: column;
203 gap: 10px;
204
205 @media (min-width: 768px) {
206 width: 50%;
207 max-width: 345px;
208 }
209 }
210
211 &__actions {
212 display: flex;
213 align-items: center;
214 gap: 12px;
215 }
216
217 &__manual-link {
218 appearance: none;
219 background: transparent;
220 border: 0;
221 color: var(--primary--500);
222 cursor: pointer;
223 font: inherit;
224 text-decoration: underline;
225 }
226
227 &__api-key-box {
228 display: flex;
229 flex-direction: column;
230 gap: 8px;
231 max-width: 420px;
232 }
233
234 &__api-key-label {
235 color: var(--neutral--700);
236 font-weight: 600;
237 }
238
239 &__api-key-input {
240 width: 100%;
241 border: 1px solid var(--neutral--200);
242 border-radius: 8px;
243 padding: 8px 12px;
244 font-size: 14px;
245 }
246
247 &__api-actions {
248 display: flex;
249 gap: 12px;
250 align-items: center;
251 }
252
253 &__footer {
254 width: 100%;
255 display: flex;
256 align-items: center;
257 padding: 16px 24px 20px 24px;
258 border-bottom-left-radius: 20px;
259 background: var(--neutral--50);
260 border-bottom-right-radius: 20px;
261
262 @media (max-width: 768px) {
263 padding: 16px;
264 }
265 }
266
267 &__header {
268 width: 100%;
269 margin-bottom: 20px;
270
271 @media (max-width: 768px) {
272 padding: 0 12px;
273 margin-bottom: 16px;
274 }
275
276 @media (max-width: 480px) {
277 padding: 0 8px;
278 margin-bottom: 12px;
279 }
280 }
281
282 &__warning-snackbar {
283 display: flex;
284 align-items: center;
285 }
286
287 &__header-content {
288 display: flex;
289 justify-content: space-between;
290 align-items: center;
291 width: 100%;
292
293 @media (max-width: 768px) {
294 flex-direction: column;
295 gap: 16px;
296 align-items: flex-start;
297 }
298
299 @media (max-width: 480px) {
300 gap: 12px;
301 }
302
303 :deep(.h-button-v2) {
304 @media (max-width: 768px) {
305 width: 100%;
306 }
307 }
308 }
309
310 &__header-brand {
311 display: flex;
312 align-items: center;
313 gap: 12px;
314
315 @media (max-width: 480px) {
316 gap: 8px;
317 }
318 }
319
320 &__header-logo {
321 height: 28px;
322 width: auto;
323
324 @media (max-width: 768px) {
325 height: 24px;
326 }
327
328 @media (max-width: 480px) {
329 height: 20px;
330 }
331 }
332
333 &__header-title {
334 margin-bottom: 12px;
335 color: var(--neutral--700);
336 }
337
338 &__warning-snackbar {
339 margin-bottom: 24px;
340 }
341 }
342
343 :deep(.h-card) {
344 width: 100%;
345 }
346
347 :deep(.h-notification-row) {
348 border: 1px solid #ffd28c;
349 @media (max-width: 768px) {
350 padding: 0;
351 }
352 }
353
354 @media (max-width: 320px) {
355 .hero {
356 padding: 12px 4px;
357 gap: 20px;
358
359 &__content {
360 padding: 12px 12px 0px 12px;
361 }
362 }
363 }
364 </style>
365