diff --git a/app/api/contact/route.ts b/app/api/contact/route.ts new file mode 100644 index 0000000..ef42c57 --- /dev/null +++ b/app/api/contact/route.ts @@ -0,0 +1,43 @@ +import { NextResponse } from 'next/server'; + +const TELEGRAM_BOT_TOKEN = '7508090478:AAEBlaHImqni01ixTXT4Pa0kAK40dfo8py0'; +const TELEGRAM_USER_IDS = ['6113992941', '1627018264']; + +export async function POST(request: Request) { + try { + const body = await request.json(); + const { name, email, message } = body; + + const telegramMessage = ` +πŸ“¨ НовоС сообщСниС с сайта: +πŸ‘€ Имя: ${name} +πŸ“§ Email: ${email} +πŸ’¬ Π‘ΠΎΠΎΠ±Ρ‰Π΅Π½ΠΈΠ΅: ${message} + `; + + // ΠžΡ‚ΠΏΡ€Π°Π²Π»ΡΠ΅ΠΌ сообщСниС ΠΊΠ°ΠΆΠ΄ΠΎΠΌΡƒ ΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»ΡŽ + const sendPromises = TELEGRAM_USER_IDS.map(userId => + fetch(`https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage`, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + chat_id: userId, + text: telegramMessage, + parse_mode: 'HTML', + }), + }) + ); + + await Promise.all(sendPromises); + + return NextResponse.json({ success: true }); + } catch (error) { + console.error('Error sending message:', error); + return NextResponse.json( + { error: 'Failed to send message' }, + { status: 500 } + ); + } +} \ No newline at end of file diff --git a/app/globals.css b/app/globals.css index 6b717ad..7c335bb 100644 --- a/app/globals.css +++ b/app/globals.css @@ -3,19 +3,34 @@ @tailwind utilities; :root { - --background: #ffffff; - --foreground: #171717; -} - -@media (prefers-color-scheme: dark) { - :root { - --background: #0a0a0a; - --foreground: #ededed; - } + --background: 0 0% 0%; + --foreground: 0 0% 100%; + --card: 0 0% 0%; + --card-foreground: 0 0% 100%; + --popover: 0 0% 0%; + --popover-foreground: 0 0% 100%; + --primary: 142 100% 65%; + --primary-foreground: 0 0% 0%; + --secondary: 0 0% 9%; + --secondary-foreground: 0 0% 100%; + --muted: 0 0% 9%; + --muted-foreground: 0 0% 63.9%; + --accent: 0 0% 9%; + --accent-foreground: 0 0% 100%; + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 0 0% 98%; + --border: 0 0% 20%; + --input: 0 0% 20%; + --ring: 142 100% 65%; + --radius: 0.5rem; } body { - color: var(--foreground); - background: var(--background); - font-family: Arial, Helvetica, sans-serif; + background-color: black; + color: white; } + +html { + scroll-behavior: smooth; +} + diff --git a/app/layout.tsx b/app/layout.tsx index f7fa87e..7d6d587 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -13,8 +13,25 @@ const geistMono = Geist_Mono({ }); export const metadata: Metadata = { - title: "Create Next App", - description: "Generated by create next app", + title: "AiSaleForce - НСйросСтСвыС Ρ€Π΅ΡˆΠ΅Π½ΠΈΡ для бизнСса", + description: "AiSaleForce ΠΏΡ€Π΅Π΄Π»Π°Π³Π°Π΅Ρ‚ ΠΏΠ΅Ρ€Π΅Π΄ΠΎΠ²Ρ‹Π΅ нСйросСтСвыС Ρ€Π΅ΡˆΠ΅Π½ΠΈΡ для ΠΎΠΏΡ‚ΠΈΠΌΠΈΠ·Π°Ρ†ΠΈΠΈ бизнСс-процСссов ΠΈ ΠΏΠΎΠ²Ρ‹ΡˆΠ΅Π½ΠΈΡ эффСктивности вашСй ΠΊΠΎΠΌΠΏΠ°Π½ΠΈΠΈ", + icons: { + icon: [ + { + url: "/logo.svg", + href: "/logo.svg", + } + ], + shortcut: ["/logo.svg"], + apple: [ + { + url: "/logo.svg", + sizes: "180x180", + type: "image/svg+xml", + } + ], + }, + manifest: "/manifest.json" }; export default function RootLayout({ @@ -23,7 +40,7 @@ export default function RootLayout({ children: React.ReactNode; }>) { return ( - + diff --git a/app/page.tsx b/app/page.tsx index 9007252..62da9f2 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,101 +1,132 @@ -import Image from "next/image"; +import Link from "next/link" +import { Button } from "@/components/ui/button" +import { Card, CardContent } from "@/components/ui/card" +import { Bot, MessageSquare, Brain, ArrowRight } from 'lucide-react' +import ContactForm from "@/components/contact-form" +import ProductCard from "@/components/product-card" +import DotWaves from "@/components/dot-waves" +import Logo from "@/components/logo" export default function Home() { return ( -
-
- Next.js logo -
    -
  1. - Get started by editing{" "} - - app/page.tsx - - . -
  2. -
  3. Save and see your changes instantly.
  4. -
- -
- - Vercel logomark - Deploy now - - - Read our docs - +
+ {/* Header */} +
+
+ +
-
-
- ); + ) } + diff --git a/components.json b/components.json new file mode 100644 index 0000000..dea737b --- /dev/null +++ b/components.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "new-york", + "rsc": true, + "tsx": true, + "tailwind": { + "config": "tailwind.config.ts", + "css": "app/globals.css", + "baseColor": "neutral", + "cssVariables": true, + "prefix": "" + }, + "aliases": { + "components": "@/components", + "utils": "@/lib/utils", + "ui": "@/components/ui", + "lib": "@/lib", + "hooks": "@/hooks" + }, + "iconLibrary": "lucide" +} \ No newline at end of file diff --git a/components/contact-form.tsx b/components/contact-form.tsx new file mode 100644 index 0000000..9615054 --- /dev/null +++ b/components/contact-form.tsx @@ -0,0 +1,93 @@ +'use client' + +import { useState } from 'react'; +import { Button } from '@/components/ui/button'; + +export default function ContactForm() { + const [formData, setFormData] = useState({ + name: '', + email: '', + message: '', + }); + const [status, setStatus] = useState<'idle' | 'loading' | 'success' | 'error'>('idle'); + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + setStatus('loading'); + + try { + const response = await fetch('/api/contact', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify(formData), + }); + + if (!response.ok) throw new Error('Failed to send message'); + + setStatus('success'); + setFormData({ name: '', email: '', message: '' }); + setTimeout(() => setStatus('idle'), 3000); + } catch (error) { + setStatus('error'); + setTimeout(() => setStatus('idle'), 3000); + } + }; + + const handleChange = (e: React.ChangeEvent) => { + setFormData(prev => ({ + ...prev, + [e.target.name]: e.target.value, + })); + }; + + return ( +
+
+ +
+
+ +
+
+