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.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 / FAQ.vue
hostinger-reach / frontend / vue / components Last commit date
Modals 1 month ago skeletons 4 months ago ActionButton.vue 5 months ago ActionButtonsSection.vue 5 months ago Banner.vue 3 months ago FAQ.vue 5 months ago FormItem.vue 1 month ago FormsSection.vue 11 months ago Hero.vue 3 weeks ago Integrations.vue 4 months ago Pagination.vue 10 months ago PluginEntriesTable.vue 3 months ago PluginEntry.vue 4 months ago PluginExpansion.vue 8 months ago ReachContactsSummary.vue 1 week 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 1 week ago WooCommerceEntriesTable.vue 4 months ago
FAQ.vue
235 lines
1 <script setup lang="ts">
2 import { ref } from 'vue';
3
4 import type { FAQItem } from '@/data/faq';
5 import { translate } from '@/utils/translate';
6
7 interface Props {
8 faqData: FAQItem[];
9 }
10
11 const props = defineProps<Props>();
12
13 const expandedFAQ = ref<string | null>(null);
14
15 const toggleFAQ = (id: string) => {
16 expandedFAQ.value = expandedFAQ.value === id ? null : id;
17 };
18 </script>
19
20 <template>
21 <section class="faq" aria-labelledby="faq-heading">
22 <div class="faq__container">
23 <div class="faq__list">
24 <HText id="faq-heading" as="h2" variant="heading-2" class="faq__section-title">
25 {{ translate('hostinger_reach_faq_title') }}
26 </HText>
27 <div
28 v-for="faq in props.faqData"
29 :key="faq.id"
30 class="faq__item h-mb-8"
31 :class="{
32 'faq__item--expanded': expandedFAQ === faq.id
33 }"
34 >
35 <button
36 :id="`faq-question-${faq.id}`"
37 class="faq__question"
38 :aria-expanded="expandedFAQ === faq.id"
39 :aria-controls="`faq-answer-${faq.id}`"
40 @click="toggleFAQ(faq.id)"
41 >
42 <span class="faq__question-text">{{ faq.question }}</span>
43 <HIcon
44 :name="expandedFAQ === faq.id ? 'ic-chevron-up-24' : 'ic-chevron-down-24'"
45 size="24"
46 class="faq__icon"
47 aria-hidden="true"
48 />
49 </button>
50 <div
51 v-show="expandedFAQ === faq.id"
52 :id="`faq-answer-${faq.id}`"
53 class="faq__answer"
54 :aria-labelledby="`faq-question-${faq.id}`"
55 role="region"
56 >
57 <div v-html="faq.answer"></div>
58 </div>
59 </div>
60 </div>
61 </div>
62 </section>
63 </template>
64
65 <style scoped lang="scss">
66 .faq {
67 width: 100%;
68
69 @media (max-width: 768px) {
70 padding: 32px 16px;
71 }
72
73 @media (max-width: 480px) {
74 padding: 24px 12px;
75 }
76
77 &__section-title.h-typography {
78 margin-bottom: 16px;
79 }
80
81 &__container {
82 max-width: 100%;
83 margin: 0 auto;
84 }
85
86 &__list {
87 display: flex;
88 flex-direction: column;
89 gap: 8px;
90
91 @media (max-width: 480px) {
92 gap: 6px;
93 }
94 }
95
96 &__item {
97 background: var(--neutral--0);
98 border-radius: 16px;
99 border: 1px solid var(--neutral--200);
100 overflow: hidden;
101 transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
102
103 @media (max-width: 768px) {
104 border-radius: 12px;
105 }
106
107 @media (max-width: 480px) {
108 border-radius: 8px;
109 }
110
111 &--expanded {
112 border-color: var(--neutral--200);
113 box-shadow: 0 4px 12px rgba(103, 58, 183, 0.1);
114
115 @media (max-width: 768px) {
116 box-shadow: 0 2px 8px rgba(103, 58, 183, 0.1);
117 }
118
119 @media (max-width: 480px) {
120 box-shadow: 0 1px 6px rgba(103, 58, 183, 0.1);
121 }
122 }
123 }
124
125 &__question {
126 width: 100%;
127 display: flex;
128 align-items: center;
129 justify-content: space-between;
130 padding: 24px;
131 background: none;
132 border: none;
133 text-align: left;
134 cursor: pointer;
135 transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
136 border-bottom: 1px solid var(--neutral--200);
137
138 @media (max-width: 768px) {
139 padding: 16px 20px;
140 }
141
142 @media (max-width: 480px) {
143 padding: 12px 16px;
144 }
145 }
146
147 &__question-text {
148 font-size: 16px;
149 font-weight: 600;
150 color: var(--neutral--600);
151 line-height: 1.4;
152 flex: 1;
153 margin-right: 16px;
154
155 @media (max-width: 768px) {
156 font-size: 15px;
157 margin-right: 12px;
158 }
159
160 @media (max-width: 480px) {
161 font-size: 14px;
162 margin-right: 10px;
163 }
164 }
165
166 &__icon {
167 color: var(--neutral--400);
168 transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
169 flex-shrink: 0;
170
171 @media (max-width: 480px) {
172 width: 20px;
173 height: 20px;
174 }
175
176 .faq__item--expanded & {
177 color: var(--neutral--200);
178 }
179 }
180
181 &__answer {
182 padding: 24px;
183 animation: fadeIn 0.3s ease-in-out;
184
185 @media (max-width: 768px) {
186 padding: 0 20px 20px;
187 }
188
189 @media (max-width: 480px) {
190 padding: 0 16px 16px;
191 }
192
193 p {
194 font-size: 15px;
195 line-height: 1.6;
196 color: var(--neutral--500);
197 margin: 0;
198
199 @media (max-width: 768px) {
200 font-size: 14px;
201 }
202
203 @media (max-width: 480px) {
204 font-size: 13px;
205 }
206 }
207 }
208 }
209
210 :deep(.h-card__header) {
211 border-bottom: none;
212 padding-top: 24px;
213 padding-bottom: 0px;
214
215 @media (max-width: 768px) {
216 padding-top: 20px;
217 }
218
219 @media (max-width: 480px) {
220 padding-top: 16px;
221 }
222 }
223
224 @keyframes fadeIn {
225 from {
226 opacity: 0;
227 transform: translateY(-10px);
228 }
229 to {
230 opacity: 1;
231 transform: translateY(0);
232 }
233 }
234 </style>
235