HelpCenter.vue 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. <template>
  2. <div class="min-h-screen bg-background flex flex-col">
  3. <Header />
  4. <main class="flex-grow pt-24 pb-20">
  5. <div class="container mx-auto px-4 py-12">
  6. <div class="max-w-6xl mx-auto">
  7. <!-- Header -->
  8. <div class="mb-12">
  9. <h1 class="text-4xl md:text-5xl font-display font-bold text-foreground mb-4">
  10. {{ t("footer.help") }}
  11. </h1>
  12. <p class="text-lg text-foreground/60">
  13. {{ t("help.subtitle") }}
  14. </p>
  15. </div>
  16. <!-- Search -->
  17. <div class="mb-12">
  18. <div class="relative max-w-2xl mx-auto">
  19. <input
  20. type="text"
  21. v-model="searchQuery"
  22. :placeholder="t('help.search.placeholder')"
  23. class="w-full px-6 py-4 pl-12 border border-gray-300 rounded-xl focus:outline-none focus:border-primary"
  24. />
  25. <svg class="absolute left-4 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  26. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
  27. </svg>
  28. </div>
  29. </div>
  30. <!-- Categories -->
  31. <div class="mb-12">
  32. <h2 class="text-2xl font-display font-bold text-foreground mb-8">
  33. {{ t("help.categories.title") }}
  34. </h2>
  35. <div class="grid md:grid-cols-2 lg:grid-cols-4 gap-6">
  36. <router-link
  37. to="/help/ordering"
  38. class="bg-gray-50 rounded-xl p-6 hover:bg-primary/5 hover:border-primary/30 border border-transparent transition-all"
  39. >
  40. <div class="w-12 h-12 bg-primary/10 rounded-lg flex items-center justify-center mb-4">
  41. <svg class="w-6 h-6 text-primary" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  42. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2" />
  43. </svg>
  44. </div>
  45. <h3 class="text-lg font-display font-bold text-foreground mb-2">
  46. {{ t("help.categories.ordering.title") }}
  47. </h3>
  48. <p class="text-sm text-foreground/70">
  49. {{ t("help.categories.ordering.description") }}
  50. </p>
  51. </router-link>
  52. <router-link
  53. to="/help/pricing"
  54. class="bg-gray-50 rounded-xl p-6 hover:bg-primary/5 hover:border-primary/30 border border-transparent transition-all"
  55. >
  56. <div class="w-12 h-12 bg-primary/10 rounded-lg flex items-center justify-center mb-4">
  57. <svg class="w-6 h-6 text-primary" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  58. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
  59. </svg>
  60. </div>
  61. <h3 class="text-lg font-display font-bold text-foreground mb-2">
  62. {{ t("help.categories.pricing.title") }}
  63. </h3>
  64. <p class="text-sm text-foreground/70">
  65. {{ t("help.categories.pricing.description") }}
  66. </p>
  67. </router-link>
  68. <router-link
  69. to="/help/shipping"
  70. class="bg-gray-50 rounded-xl p-6 hover:bg-primary/5 hover:border-primary/30 border border-transparent transition-all"
  71. >
  72. <div class="w-12 h-12 bg-primary/10 rounded-lg flex items-center justify-center mb-4">
  73. <svg class="w-6 h-6 text-primary" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  74. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4" />
  75. </svg>
  76. </div>
  77. <h3 class="text-lg font-display font-bold text-foreground mb-2">
  78. {{ t("help.categories.shipping.title") }}
  79. </h3>
  80. <p class="text-sm text-foreground/70">
  81. {{ t("help.categories.shipping.description") }}
  82. </p>
  83. </router-link>
  84. <router-link
  85. to="/help/technical"
  86. class="bg-gray-50 rounded-xl p-6 hover:bg-primary/5 hover:border-primary/30 border border-transparent transition-all"
  87. >
  88. <div class="w-12 h-12 bg-primary/10 rounded-lg flex items-center justify-center mb-4">
  89. <svg class="w-6 h-6 text-primary" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  90. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4" />
  91. </svg>
  92. </div>
  93. <h3 class="text-lg font-display font-bold text-foreground mb-2">
  94. {{ t("help.categories.technical.title") }}
  95. </h3>
  96. <p class="text-sm text-foreground/70">
  97. {{ t("help.categories.technical.description") }}
  98. </p>
  99. </router-link>
  100. </div>
  101. </div>
  102. <!-- FAQ -->
  103. <div class="mb-12">
  104. <h2 class="text-2xl font-display font-bold text-foreground mb-8">
  105. {{ t("help.faq.title") }}
  106. </h2>
  107. <div class="space-y-4">
  108. <div
  109. v-for="(faq, index) in filteredFaqs"
  110. :key="index"
  111. class="border border-gray-200 rounded-xl overflow-hidden"
  112. >
  113. <button
  114. @click="toggleFaq(index)"
  115. class="w-full px-6 py-4 text-left flex items-center justify-between hover:bg-gray-50 transition-colors"
  116. >
  117. <span class="font-display font-bold text-foreground">
  118. {{ faq.question }}
  119. </span>
  120. <svg
  121. class="w-5 h-5 text-gray-400 transition-transform duration-200"
  122. :class="{ 'rotate-180': openFaqs[index] }"
  123. fill="none"
  124. stroke="currentColor"
  125. viewBox="0 0 24 24"
  126. >
  127. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" />
  128. </svg>
  129. </button>
  130. <div
  131. v-if="openFaqs[index]"
  132. class="px-6 py-4 border-t border-gray-200 bg-gray-50"
  133. >
  134. <p class="text-foreground/70">
  135. {{ faq.answer }}
  136. </p>
  137. </div>
  138. </div>
  139. </div>
  140. </div>
  141. <!-- Contact Support -->
  142. <div class="bg-primary/5 rounded-2xl p-8 text-center">
  143. <h2 class="text-2xl font-display font-bold text-foreground mb-4">
  144. {{ t("help.contact.title") }}
  145. </h2>
  146. <p class="text-foreground/70 mb-6 max-w-2xl mx-auto">
  147. {{ t("help.contact.description") }}
  148. </p>
  149. <div class="flex flex-col sm:flex-row gap-4 justify-center">
  150. <router-link
  151. to="/contact"
  152. class="inline-flex items-center justify-center px-6 py-3 bg-primary text-white font-bold rounded-lg hover:bg-primary/90 transition-colors"
  153. >
  154. {{ t("help.contact.button") }}
  155. </router-link>
  156. <a
  157. href="mailto:support@radionica3d.me"
  158. class="inline-flex items-center justify-center px-6 py-3 border border-gray-300 text-foreground font-bold rounded-lg hover:bg-gray-50 transition-colors"
  159. >
  160. {{ t("help.contact.email") }}
  161. </a>
  162. </div>
  163. </div>
  164. </div>
  165. </main>
  166. <Footer />
  167. </div>
  168. </template>
  169. <script setup lang="ts">
  170. import { ref, computed } from "vue";
  171. import { useI18n } from "vue-i18n";
  172. import Header from "@/components/Header.vue";
  173. import Footer from "@/components/Footer.vue";
  174. const { t } = useI18n();
  175. const searchQuery = ref("");
  176. const openFaqs = ref<boolean[]>([]);
  177. const faqs = [
  178. {
  179. question: t("help.faq.q1.question"),
  180. answer: t("help.faq.q1.answer"),
  181. },
  182. {
  183. question: t("help.faq.q2.question"),
  184. answer: t("help.faq.q2.answer"),
  185. },
  186. {
  187. question: t("help.faq.q3.question"),
  188. answer: t("help.faq.q3.answer"),
  189. },
  190. {
  191. question: t("help.faq.q4.question"),
  192. answer: t("help.faq.q4.answer"),
  193. },
  194. {
  195. question: t("help.faq.q5.question"),
  196. answer: t("help.faq.q5.answer"),
  197. },
  198. ];
  199. const filteredFaqs = computed(() => {
  200. if (!searchQuery.value.trim()) return faqs;
  201. const query = searchQuery.value.toLowerCase();
  202. return faqs.filter(faq =>
  203. faq.question.toLowerCase().includes(query) ||
  204. faq.answer.toLowerCase().includes(query)
  205. );
  206. });
  207. const toggleFaq = (index: number) => {
  208. openFaqs.value[index] = !openFaqs.value[index];
  209. };
  210. </script>