168 lines
4.0 KiB
Vue
168 lines
4.0 KiB
Vue
<template>
|
|
<div class="support">
|
|
<section class="page-hero">
|
|
<div class="container">
|
|
<h1>Поддержка</h1>
|
|
<p class="body-text--white">Мы всегда готовы помочь</p>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="section">
|
|
<div class="container">
|
|
<div class="support__content">
|
|
<h2>Часто задаваемые вопросы</h2>
|
|
<div class="support__faq">
|
|
<div
|
|
v-for="(faq, i) in faqs"
|
|
:key="i"
|
|
class="support__faq-item"
|
|
>
|
|
<button
|
|
class="support__faq-question"
|
|
@click="toggleFaq(i)"
|
|
>
|
|
{{ faq.question }}
|
|
<svg
|
|
width="20" height="20" viewBox="0 0 24 24" fill="none"
|
|
:class="{ 'support__faq-arrow--open': openFaqs.includes(i) }"
|
|
class="support__faq-arrow"
|
|
>
|
|
<path d="M6 9l6 6 6-6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
|
</svg>
|
|
</button>
|
|
<div v-if="openFaqs.includes(i)" class="support__faq-answer">
|
|
<p class="body-text--gray">{{ faq.answer }}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="support__contact">
|
|
<h3>Не нашли ответ?</h3>
|
|
<p class="body-text--gray">Напишите нам на info@yalarba.ru</p>
|
|
<a href="mailto:info@yalarba.ru" class="btn btn--primary btn--md">
|
|
Написать
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
definePageMeta({
|
|
title: 'Поддержка',
|
|
})
|
|
|
|
interface FaqItem {
|
|
question: string
|
|
answer: string
|
|
}
|
|
|
|
const faqs: FaqItem[] = [
|
|
{
|
|
question: 'Как зарегистрироваться на платформе?',
|
|
answer: 'Нажмите "Регистрация" в правом верхнем углу, заполните форму и подтвердите email.',
|
|
},
|
|
{
|
|
question: 'Как найти достопримечательность?',
|
|
answer: 'Используйте поиск на главной странице или перейдите в раздел "Поиск".',
|
|
},
|
|
{
|
|
question: 'Как оставить отзыв?',
|
|
answer: 'Перейдите на страницу объекта и нажмите "Оставить отзыв".',
|
|
},
|
|
]
|
|
|
|
const openFaqs = ref<number[]>([])
|
|
|
|
function toggleFaq(i: number) {
|
|
const idx = openFaqs.value.indexOf(i)
|
|
if (idx === -1) {
|
|
openFaqs.value.push(i)
|
|
} else {
|
|
openFaqs.value.splice(idx, 1)
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.page-hero {
|
|
background: var(--color-primary);
|
|
padding: 60px 0;
|
|
text-align: center;
|
|
color: var(--color-text-white);
|
|
}
|
|
|
|
.page-hero h1 {
|
|
color: var(--color-text-white);
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.support__content {
|
|
max-width: 720px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.support__content h2 {
|
|
margin-bottom: 32px;
|
|
}
|
|
|
|
.support__faq {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
margin-bottom: 48px;
|
|
}
|
|
|
|
.support__faq-item {
|
|
border: 1px solid var(--color-stroke);
|
|
border-radius: var(--radius-sm);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.support__faq-question {
|
|
width: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 16px;
|
|
font-family: var(--font-body);
|
|
font-size: var(--font-size-body);
|
|
font-weight: var(--font-weight-medium);
|
|
color: var(--color-text-black);
|
|
text-align: left;
|
|
background: none;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.support__faq-arrow {
|
|
transition: transform var(--transition-fast);
|
|
flex-shrink: 0;
|
|
color: var(--color-text-gray);
|
|
}
|
|
|
|
.support__faq-arrow--open {
|
|
transform: rotate(180deg);
|
|
}
|
|
|
|
.support__faq-answer {
|
|
padding: 0 16px 16px;
|
|
}
|
|
|
|
.support__contact {
|
|
text-align: center;
|
|
padding: 40px;
|
|
background: var(--color-bg-gray);
|
|
border-radius: var(--radius-md);
|
|
}
|
|
|
|
.support__contact h3 {
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.support__contact p {
|
|
margin-bottom: 24px;
|
|
}
|
|
</style>
|