feat: enhance README and TODO documentation, implement mobile menu functionality in Header component

- Updated README.md with project details, quick start instructions, and tech stack.
- Expanded TODO.md to reflect current project status and backlog items, including Linear ticket synchronization.
- Added mobile menu toggle functionality in Header component with corresponding tests for user interactions.
- Configured Next.js for Docker deployment and optimized build settings.
This commit is contained in:
Do Siki
2025-09-05 17:28:52 +02:00
parent 578a85ec1a
commit b0df8dd182
50 changed files with 7758 additions and 67 deletions
+20
View File
@@ -0,0 +1,20 @@
import { siteConfig } from '@/config/site'
import type { Metadata } from 'next'
export const metadata: Metadata = {
title: `Kapcsolat | ${siteConfig.general.name}`,
description: 'Vegye fel velünk a kapcsolatot! Segítünk minden IT kérdésében. Email, telefon és online űrlap is rendelkezésére áll.',
openGraph: {
title: `Kapcsolat | ${siteConfig.general.name}`,
description: 'Vegye fel velünk a kapcsolatot! Segítünk minden IT kérdésében.',
url: `${siteConfig.general.url}/kapcsolat`,
},
}
export default function ContactLayout({
children,
}: {
children: React.ReactNode
}) {
return children
}
+334
View File
@@ -0,0 +1,334 @@
'use client'
import { siteConfig } from '@/config/site'
import { useState } from 'react'
export default function ContactPage() {
const [formData, setFormData] = useState({
name: '',
email: '',
subject: '',
message: '',
gdprConsent: false
})
const [isSubmitting, setIsSubmitting] = useState(false)
const [submitStatus, setSubmitStatus] = useState<'idle' | 'success' | 'error'>('idle')
const [errors, setErrors] = useState<Record<string, string>>({})
const validateForm = () => {
const newErrors: Record<string, string> = {}
if (!formData.name.trim()) {
newErrors.name = 'A név megadása kötelező'
}
if (!formData.email.trim()) {
newErrors.email = 'Az email cím megadása kötelező'
} else if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(formData.email)) {
newErrors.email = 'Érvénytelen email cím formátum'
}
if (!formData.subject.trim()) {
newErrors.subject = 'A tárgy megadása kötelező'
}
if (!formData.message.trim()) {
newErrors.message = 'Az üzenet megadása kötelező'
} else if (formData.message.trim().length < 10) {
newErrors.message = 'Az üzenet legalább 10 karakter hosszú legyen'
}
if (!formData.gdprConsent) {
newErrors.gdprConsent = 'Az adatkezelési tájékoztató elfogadása kötelező'
}
setErrors(newErrors)
return Object.keys(newErrors).length === 0
}
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault()
if (!validateForm()) {
return
}
setIsSubmitting(true)
setSubmitStatus('idle')
try {
const response = await fetch('/api/contact', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(formData),
})
if (response.ok) {
setSubmitStatus('success')
setFormData({
name: '',
email: '',
subject: '',
message: '',
gdprConsent: false
})
} else {
setSubmitStatus('error')
}
} catch (error) {
console.error('Form submission error:', error)
setSubmitStatus('error')
} finally {
setIsSubmitting(false)
}
}
const handleInputChange = (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
const { name, value, type } = e.target
setFormData(prev => ({
...prev,
[name]: type === 'checkbox' ? (e.target as HTMLInputElement).checked : value
}))
// Clear error when user starts typing
if (errors[name]) {
setErrors(prev => ({ ...prev, [name]: '' }))
}
}
return (
<div className="space-y-16 py-8">
{/* Hero Section */}
<section className="bg-gradient-to-r from-blue-50 to-indigo-50 py-16">
<div className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center">
<h1 className="text-4xl md:text-5xl font-bold text-gray-900 mb-6">
Kapcsolat
</h1>
<p className="text-xl text-gray-600 leading-relaxed">
Vegye fel velünk a kapcsolatot! Szívesen segítünk minden IT kérdésében.
</p>
</div>
</section>
<div className="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="grid grid-cols-1 lg:grid-cols-2 gap-12">
{/* Contact Form */}
<div>
<div className="bg-white rounded-xl shadow-sm border border-gray-200 p-8">
<h2 className="text-2xl font-bold text-gray-900 mb-6">
Küldjön üzenetet
</h2>
{submitStatus === 'success' && (
<div className="mb-6 p-4 bg-green-50 border border-green-200 rounded-md">
<p className="text-green-800">
Köszönjük üzenetét! Hamarosan felvesszük Önnel a kapcsolatot.
</p>
</div>
)}
{submitStatus === 'error' && (
<div className="mb-6 p-4 bg-red-50 border border-red-200 rounded-md">
<p className="text-red-800">
Hiba történt az üzenet küldése során. Kérjük, próbálja újra vagy írjon közvetlenül a {siteConfig.contact.email} címre.
</p>
</div>
)}
<form onSubmit={handleSubmit} className="space-y-6">
<div>
<label htmlFor="name" className="block text-sm font-medium text-gray-700 mb-1">
Név *
</label>
<input
type="text"
id="name"
name="name"
value={formData.name}
onChange={handleInputChange}
className={`w-full px-3 py-2 border rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 ${
errors.name ? 'border-red-300' : 'border-gray-300'
}`}
placeholder="Az Ön neve"
/>
{errors.name && <p className="mt-1 text-sm text-red-600">{errors.name}</p>}
</div>
<div>
<label htmlFor="email" className="block text-sm font-medium text-gray-700 mb-1">
Email cím *
</label>
<input
type="email"
id="email"
name="email"
value={formData.email}
onChange={handleInputChange}
className={`w-full px-3 py-2 border rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 ${
errors.email ? 'border-red-300' : 'border-gray-300'
}`}
placeholder="pelda@email.hu"
/>
{errors.email && <p className="mt-1 text-sm text-red-600">{errors.email}</p>}
</div>
<div>
<label htmlFor="subject" className="block text-sm font-medium text-gray-700 mb-1">
Tárgy *
</label>
<input
type="text"
id="subject"
name="subject"
value={formData.subject}
onChange={handleInputChange}
className={`w-full px-3 py-2 border rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 ${
errors.subject ? 'border-red-300' : 'border-gray-300'
}`}
placeholder="Miben segíthetünk?"
/>
{errors.subject && <p className="mt-1 text-sm text-red-600">{errors.subject}</p>}
</div>
<div>
<label htmlFor="message" className="block text-sm font-medium text-gray-700 mb-1">
Üzenet *
</label>
<textarea
id="message"
name="message"
rows={5}
value={formData.message}
onChange={handleInputChange}
className={`w-full px-3 py-2 border rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 ${
errors.message ? 'border-red-300' : 'border-gray-300'
}`}
placeholder="Írja le részletesen kérését vagy kérdését..."
/>
{errors.message && <p className="mt-1 text-sm text-red-600">{errors.message}</p>}
</div>
<div>
<label className="flex items-start space-x-3">
<input
type="checkbox"
name="gdprConsent"
checked={formData.gdprConsent}
onChange={handleInputChange}
className="mt-1 h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500"
/>
<span className="text-sm text-gray-700">
Elfogadom az <a href="/adatkezelesi-tajekoztato" className="text-blue-600 hover:text-blue-700 underline">adatkezelési tájékoztatót</a> és hozzájárulok személyes adataim kezeléséhez a kapcsolatfelvétel céljából. *
</span>
</label>
{errors.gdprConsent && <p className="mt-1 text-sm text-red-600">{errors.gdprConsent}</p>}
</div>
<button
type="submit"
disabled={isSubmitting}
className="w-full bg-blue-600 hover:bg-blue-700 disabled:bg-blue-400 text-white font-medium py-3 px-4 rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2"
>
{isSubmitting ? 'Küldés...' : 'Üzenet küldése'}
</button>
</form>
</div>
</div>
{/* Contact Information */}
<div className="space-y-8">
<div className="bg-white rounded-xl shadow-sm border border-gray-200 p-8">
<h2 className="text-2xl font-bold text-gray-900 mb-6">
Elérhetőségek
</h2>
<div className="space-y-6">
<div className="flex items-start space-x-4">
<div className="w-10 h-10 bg-blue-100 rounded-lg flex items-center justify-center flex-shrink-0">
<span className="text-lg"></span>
</div>
<div>
<h3 className="font-semibold text-gray-900 mb-1">Email</h3>
<a
href={`mailto:${siteConfig.contact.email}`}
className="text-blue-600 hover:text-blue-700"
>
{siteConfig.contact.email}
</a>
<p className="text-sm text-gray-600 mt-1">
24 órán belül válaszolunk
</p>
</div>
</div>
<div className="flex items-start space-x-4">
<div className="w-10 h-10 bg-blue-100 rounded-lg flex items-center justify-center flex-shrink-0">
<span className="text-lg">🏢</span>
</div>
<div>
<h3 className="font-semibold text-gray-900 mb-1">Cég</h3>
<p className="text-gray-700">{siteConfig.general.name}</p>
<p className="text-sm text-gray-600">{siteConfig.contact.address}</p>
</div>
</div>
<div className="flex items-start space-x-4">
<div className="w-10 h-10 bg-blue-100 rounded-lg flex items-center justify-center flex-shrink-0">
<span className="text-lg">🌐</span>
</div>
<div>
<h3 className="font-semibold text-gray-900 mb-1">Webmail hozzáférés</h3>
<a
href={siteConfig.hero.cta.primary.href}
target="_blank"
rel="noopener noreferrer"
className="text-blue-600 hover:text-blue-700"
>
Webmail belépés
</a>
<p className="text-sm text-gray-600 mt-1">
Ügyfeleink számára
</p>
</div>
</div>
</div>
</div>
{/* FAQ */}
<div className="bg-gray-50 rounded-xl p-8">
<h2 className="text-xl font-bold text-gray-900 mb-6">
Gyakori kérdések
</h2>
<div className="space-y-4">
<div>
<h3 className="font-semibold text-gray-900 mb-2">Milyen gyorsan válaszolnak?</h3>
<p className="text-gray-600 text-sm">
Email üzenetekre 24 órán belül, sürgős esetekben telefonon is elérhetők vagyunk.
</p>
</div>
<div>
<h3 className="font-semibold text-gray-900 mb-2">Van ingyenes konzultáció?</h3>
<p className="text-gray-600 text-sm">
Igen! Az első konzultáció mindig ingyenes, hogy megismerjük az Ön igényeit.
</p>
</div>
<div>
<h3 className="font-semibold text-gray-900 mb-2">Milyen fizetési módokat fogadnak el?</h3>
<p className="text-gray-600 text-sm">
Banki átutalás, PayPal és kártyás fizetés is lehetséges.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
)
}