Contact.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. <template>
  2. <div class="min-h-screen bg-white">
  3. <div class="container mx-auto px-4 py-12">
  4. <div class="max-w-6xl mx-auto">
  5. <!-- Header -->
  6. <div class="mb-12">
  7. <h1 class="text-4xl md:text-5xl font-display font-bold text-foreground mb-4">
  8. {{ t("footer.contact") }}
  9. </h1>
  10. <p class="text-lg text-foreground/60">
  11. {{ t("contact.subtitle") }}
  12. </p>
  13. </div>
  14. <div class="grid lg:grid-cols-2 gap-12">
  15. <!-- Contact Information -->
  16. <div>
  17. <h2 class="text-2xl font-display font-bold text-foreground mb-8">
  18. {{ t("contact.info.title") }}
  19. </h2>
  20. <div class="space-y-6">
  21. <!-- Email -->
  22. <div class="flex items-start gap-4">
  23. <div class="w-10 h-10 bg-primary/10 rounded-lg flex items-center justify-center flex-shrink-0">
  24. <svg class="w-5 h-5 text-primary" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  25. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" />
  26. </svg>
  27. </div>
  28. <div>
  29. <h3 class="font-display font-bold text-foreground mb-1">
  30. {{ t("contact.info.email.title") }}
  31. </h3>
  32. <a href="mailto:hello@radionica3d.com" class="text-foreground/70 hover:text-primary transition-colors">
  33. hello@radionica3d.com
  34. </a>
  35. <p class="text-sm text-foreground/60 mt-1">
  36. {{ t("contact.info.email.description") }}
  37. </p>
  38. </div>
  39. </div>
  40. <!-- Location -->
  41. <div class="flex items-start gap-4">
  42. <div class="w-10 h-10 bg-primary/10 rounded-lg flex items-center justify-center flex-shrink-0">
  43. <svg class="w-5 h-5 text-primary" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  44. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" />
  45. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z" />
  46. </svg>
  47. </div>
  48. <div>
  49. <h3 class="font-display font-bold text-foreground mb-1">
  50. {{ t("contact.info.location.title") }}
  51. </h3>
  52. <p class="text-foreground/70">
  53. Herceg Novi, Montenegro
  54. </p>
  55. <p class="text-sm text-foreground/60 mt-1">
  56. {{ t("contact.info.location.description") }}
  57. </p>
  58. </div>
  59. </div>
  60. <!-- Hours -->
  61. <div class="flex items-start gap-4">
  62. <div class="w-10 h-10 bg-primary/10 rounded-lg flex items-center justify-center flex-shrink-0">
  63. <svg class="w-5 h-5 text-primary" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  64. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" />
  65. </svg>
  66. </div>
  67. <div>
  68. <h3 class="font-display font-bold text-foreground mb-1">
  69. {{ t("contact.info.hours.title") }}
  70. </h3>
  71. <p class="text-foreground/70">
  72. {{ t("contact.info.hours.schedule") }}
  73. </p>
  74. <p class="text-sm text-foreground/60 mt-1">
  75. {{ t("contact.info.hours.description") }}
  76. </p>
  77. </div>
  78. </div>
  79. <!-- Social Media -->
  80. <div class="flex items-start gap-4">
  81. <div class="w-10 h-10 bg-primary/10 rounded-lg flex items-center justify-center flex-shrink-0">
  82. <svg class="w-5 h-5 text-primary" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  83. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 13.255A23.931 23.931 0 0112 15c-3.183 0-6.22-.62-9-1.745M16 6V4a2 2 0 00-2-2h-4a2 2 0 00-2 2v2m4 6h.01M5 20h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" />
  84. </svg>
  85. </div>
  86. <div>
  87. <h3 class="font-display font-bold text-foreground mb-1">
  88. {{ t("contact.info.social.title") }}
  89. </h3>
  90. <div class="flex gap-4 mt-2">
  91. <a href="#" class="text-foreground/70 hover:text-primary transition-colors">
  92. {{ t("contact.info.social.linkedin") }}
  93. </a>
  94. <a href="#" class="text-foreground/70 hover:text-primary transition-colors">
  95. {{ t("contact.info.social.instagram") }}
  96. </a>
  97. <a href="#" class="text-foreground/70 hover:text-primary transition-colors">
  98. {{ t("contact.info.social.facebook") }}
  99. </a>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. <!-- Map Placeholder -->
  105. <div class="mt-8 bg-gray-100 rounded-xl h-64 flex items-center justify-center">
  106. <p class="text-foreground/60">
  107. {{ t("contact.map.placeholder") }}
  108. </p>
  109. </div>
  110. </div>
  111. <!-- Contact Form -->
  112. <div>
  113. <h2 class="text-2xl font-display font-bold text-foreground mb-8">
  114. {{ t("contact.form.title") }}
  115. </h2>
  116. <form @submit.prevent="handleSubmit" class="space-y-6">
  117. <!-- Name -->
  118. <div>
  119. <label class="block text-sm font-bold text-foreground mb-2">
  120. {{ t("contact.form.name.label") }}
  121. </label>
  122. <input
  123. type="text"
  124. v-model="form.name"
  125. :placeholder="t('contact.form.name.placeholder')"
  126. class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:border-primary"
  127. required
  128. />
  129. </div>
  130. <!-- Email -->
  131. <div>
  132. <label class="block text-sm font-bold text-foreground mb-2">
  133. {{ t("contact.form.email.label") }}
  134. </label>
  135. <input
  136. type="email"
  137. v-model="form.email"
  138. :placeholder="t('contact.form.email.placeholder')"
  139. class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:border-primary"
  140. required
  141. />
  142. </div>
  143. <!-- Subject -->
  144. <div>
  145. <label class="block text-sm font-bold text-foreground mb-2">
  146. {{ t("contact.form.subject.label") }}
  147. </label>
  148. <select
  149. v-model="form.subject"
  150. class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:border-primary"
  151. required
  152. >
  153. <option value="">{{ t("contact.form.subject.placeholder") }}</option>
  154. <option value="general">{{ t("contact.form.subject.options.general") }}</option>
  155. <option value="quote">{{ t("contact.form.subject.options.quote") }}</option>
  156. <option value="support">{{ t("contact.form.subject.options.support") }}</option>
  157. <option value="careers">{{ t("contact.form.subject.options.careers") }}</option>
  158. <option value="other">{{ t("contact.form.subject.options.other") }}</option>
  159. </select>
  160. </div>
  161. <!-- Message -->
  162. <div>
  163. <label class="block text-sm font-bold text-foreground mb-2">
  164. {{ t("contact.form.message.label") }}
  165. </label>
  166. <textarea
  167. v-model="form.message"
  168. :placeholder="t('contact.form.message.placeholder')"
  169. rows="6"
  170. class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:border-primary resize-none"
  171. required
  172. ></textarea>
  173. </div>
  174. <!-- File Upload -->
  175. <div>
  176. <label class="block text-sm font-bold text-foreground mb-2">
  177. {{ t("contact.form.file.label") }}
  178. </label>
  179. <div class="border-2 border-dashed border-gray-300 rounded-lg p-6 text-center hover:border-primary/50 transition-colors">
  180. <input
  181. type="file"
  182. ref="fileInput"
  183. @change="handleFileUpload"
  184. class="hidden"
  185. accept=".stl,.obj,.step,.3mf"
  186. />
  187. <div class="mb-3">
  188. <svg class="w-12 h-12 text-gray-400 mx-auto" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  189. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12" />
  190. </svg>
  191. </div>
  192. <p class="text-foreground/70 mb-2">
  193. {{ t("contact.form.file.description") }}
  194. </p>
  195. <button
  196. type="button"
  197. @click="$refs.fileInput.click()"
  198. class="px-4 py-2 bg-gray-100 text-foreground font-bold rounded-lg hover:bg-gray-200 transition-colors"
  199. >
  200. {{ t("contact.form.file.button") }}
  201. </button>
  202. <p v-if="form.file" class="text-sm text-foreground/60 mt-3">
  203. {{ t("contact.form.file.selected", { fileName: form.file.name }) }}
  204. </p>
  205. </div>
  206. </div>
  207. <!-- Submit Button -->
  208. <button
  209. type="submit"
  210. :disabled="isSubmitting"
  211. class="w-full px-6 py-4 bg-primary text-white font-bold rounded-lg hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
  212. >
  213. {{ isSubmitting ? t("contact.form.submitting") : t("contact.form.submit") }}
  214. </button>
  215. </form>
  216. </div>
  217. </div>
  218. </div>
  219. </div>
  220. </div>
  221. </template>
  222. <script setup lang="ts">
  223. import { ref } from "vue";
  224. import { useI18n } from "vue-i18n";
  225. const { t } = useI18n();
  226. const form = ref({
  227. name: "",
  228. email: "",
  229. subject: "",
  230. message: "",
  231. file: null as File | null,
  232. });
  233. const isSubmitting = ref(false);
  234. const handleFileUpload = (event: Event) => {
  235. const input = event.target as HTMLInputElement;
  236. if (input.files && input.files[0]) {
  237. form.value.file = input.files[0];
  238. }
  239. };
  240. const handleSubmit = async () => {
  241. isSubmitting.value = true;
  242. // Simulate API call
  243. await new Promise(resolve => setTimeout(resolve, 1500));
  244. alert(t("contact.form.success"));
  245. form.value = { name: "", email: "", subject: "", message: "", file: null };
  246. isSubmitting.value = false;
  247. };
  248. </script>