feat: add contacts from cms
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
import { Phone, Mail, MapPin, Clock } from 'lucide-react'
|
||||
import { SiteContactItems } from '../components/SiteContactItems'
|
||||
import type { SiteConfigContact } from '../lib/cms/contact/types'
|
||||
|
||||
export function Contact() {
|
||||
export interface ContactProps {
|
||||
contacts: readonly SiteConfigContact[]
|
||||
}
|
||||
|
||||
export function Contact({ contacts }: ContactProps) {
|
||||
return (
|
||||
<section className="py-4 bg-gray-50">
|
||||
<div className="max-w-225 mx-auto px-6">
|
||||
@@ -77,25 +82,11 @@ export function Contact() {
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{/* Контакты компактно */}
|
||||
<div className="mt-12 flex flex-wrap justify-center gap-8 text-sm text-gray-600">
|
||||
<a href="tel:+74951234567" className="flex items-center gap-2 hover:text-blue-600 transition-colors">
|
||||
<Phone className="w-4 h-4" />
|
||||
<span>+7 (495) 123-45-67</span>
|
||||
</a>
|
||||
<a href="mailto:info@softclick.ru" className="flex items-center gap-2 hover:text-blue-600 transition-colors">
|
||||
<Mail className="w-4 h-4" />
|
||||
<span>info@softclick.ru</span>
|
||||
</a>
|
||||
<div className="flex items-center gap-2">
|
||||
<MapPin className="w-4 h-4" />
|
||||
<span>Москва, Пресненская наб., 12</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<Clock className="w-4 h-4" />
|
||||
<span>Пн-Пт 9:00–18:00</span>
|
||||
</div>
|
||||
</div>
|
||||
<SiteContactItems
|
||||
contacts={contacts}
|
||||
variant="inline"
|
||||
className="mt-12 flex flex-wrap justify-center gap-8 text-sm text-gray-600"
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
import { Mail, Phone, MapPin, Send, Hash, Code, Video } from 'lucide-react'
|
||||
import { Send, Video } from 'lucide-react'
|
||||
|
||||
export function Footer() {
|
||||
import { SiteContactItems } from '../components/SiteContactItems'
|
||||
import type { SiteConfigContact } from '../lib/cms/contact/types'
|
||||
|
||||
export interface FooterProps {
|
||||
contacts: readonly SiteConfigContact[]
|
||||
}
|
||||
|
||||
export function Footer({ contacts }: FooterProps) {
|
||||
return (
|
||||
<footer className="bg-gray-900 text-gray-400 pt-20 pb-10 border-t border-gray-800">
|
||||
<div className="max-w-400 mx-auto px-6 xl:px-12 2xl:px-16">
|
||||
@@ -103,25 +110,7 @@ export function Footer() {
|
||||
|
||||
<div>
|
||||
<h4 className="text-white mb-6">Контакты</h4>
|
||||
<ul className="space-y-4">
|
||||
<li className="flex items-start gap-3">
|
||||
<Phone className="w-5 h-5 mt-1 shrink-0 text-blue-400" />
|
||||
<div>
|
||||
<div className="text-white">+7 (495) 123-45-67</div>
|
||||
<div>Пн-Пт 9:00-18:00</div>
|
||||
</div>
|
||||
</li>
|
||||
<li className="flex items-start gap-3">
|
||||
<Mail className="w-5 h-5 mt-1 shrink-0 text-blue-400" />
|
||||
<a href="mailto:info@softclick.ru" className="hover:text-blue-400 transition-colors">
|
||||
info@softclick.ru
|
||||
</a>
|
||||
</li>
|
||||
<li className="flex items-start gap-3">
|
||||
<MapPin className="w-5 h-5 mt-1 shrink-0 text-blue-400" />
|
||||
<div>Москва, Пресненская наб., 12</div>
|
||||
</li>
|
||||
</ul>
|
||||
<SiteContactItems contacts={contacts} variant="footer" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
import { Menu, X, ChevronDown } from 'lucide-react'
|
||||
import { useState } from 'react'
|
||||
import { ContactModal } from '../components/ContactModal'
|
||||
import type { SiteConfigContact } from '../lib/cms/contact/types'
|
||||
import { navigateHomeSectionAnchor } from '../lib/scrollToHash'
|
||||
|
||||
export function Header() {
|
||||
export interface HeaderProps {
|
||||
contacts: readonly SiteConfigContact[]
|
||||
}
|
||||
|
||||
export function Header({ contacts }: HeaderProps) {
|
||||
const [isMenuOpen, setIsMenuOpen] = useState(false)
|
||||
const [isSolutionsOpen, setIsSolutionsOpen] = useState(false)
|
||||
const [isServicesOpen, setIsServicesOpen] = useState(false)
|
||||
@@ -223,7 +228,11 @@ export function Header() {
|
||||
</div>
|
||||
)}
|
||||
</nav>
|
||||
<ContactModal isOpen={isContactModalOpen} onClose={() => setIsContactModalOpen(false)} />
|
||||
<ContactModal
|
||||
isOpen={isContactModalOpen}
|
||||
onClose={() => setIsContactModalOpen(false)}
|
||||
contacts={contacts}
|
||||
/>
|
||||
</header>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user