Spaces:
Running
Running
axeronis commited on
Commit ·
fc39787
1
Parent(s): 7b6f027
feat: landing v4 - replace CSS dashboard with 3D isometric asset, reduce neon glow
Browse files- backend/app/api/landing.py +67 -0
- backend/app/main.py +2 -1
- backend/app/models/__init__.py +4 -0
- backend/app/models/landing.py +24 -0
- backend/app/schemas/landing.py +21 -0
- frontend/app/admin/page.tsx +4 -1
- frontend/app/page.tsx +30 -81
- frontend/components/admin/LandingTab.tsx +138 -142
- frontend/lib/api/landing.ts +25 -0
- frontend/public/hero-3d.png +3 -0
backend/app/api/landing.py
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from fastapi import APIRouter, Depends, HTTPException, status
|
| 2 |
+
from sqlmodel import select
|
| 3 |
+
from sqlalchemy.ext.asyncio import AsyncSession
|
| 4 |
+
from app.core.database import get_session
|
| 5 |
+
from app.models.landing import LandingConfig
|
| 6 |
+
from app.schemas.landing import LandingConfigResponse, LandingConfigUpdate
|
| 7 |
+
from app.api.auth import get_current_user, get_current_admin
|
| 8 |
+
from app.models.user import User, UserRole
|
| 9 |
+
|
| 10 |
+
router = APIRouter()
|
| 11 |
+
|
| 12 |
+
@router.get("/config", response_model=LandingConfigResponse)
|
| 13 |
+
async def get_landing_config(session: AsyncSession = Depends(get_session)):
|
| 14 |
+
"""
|
| 15 |
+
Get landing page configuration. Public endpoint.
|
| 16 |
+
Creates default config if none exists.
|
| 17 |
+
"""
|
| 18 |
+
result = await session.exec(select(LandingConfig))
|
| 19 |
+
config = result.first()
|
| 20 |
+
|
| 21 |
+
if not config:
|
| 22 |
+
# Create default config
|
| 23 |
+
config = LandingConfig(
|
| 24 |
+
trust_logos=['TechCorp', 'StartupHub', 'GrowthLab', 'SalesForce', 'Microsoft'],
|
| 25 |
+
hero_title='ПРОДАВАЙТЕ УМНЕЕ.',
|
| 26 |
+
hero_subtitle='Ваш AI-двигатель продаж.',
|
| 27 |
+
show_chat_demo=True,
|
| 28 |
+
show_pricing=True
|
| 29 |
+
)
|
| 30 |
+
session.add(config)
|
| 31 |
+
await session.commit()
|
| 32 |
+
await session.refresh(config)
|
| 33 |
+
|
| 34 |
+
return config
|
| 35 |
+
|
| 36 |
+
@router.put("/config", response_model=LandingConfigResponse)
|
| 37 |
+
async def update_landing_config(
|
| 38 |
+
config_in: LandingConfigUpdate,
|
| 39 |
+
current_user: User = Depends(get_current_user),
|
| 40 |
+
session: AsyncSession = Depends(get_session)
|
| 41 |
+
):
|
| 42 |
+
"""
|
| 43 |
+
Update landing page configuration. Only for admins/owners.
|
| 44 |
+
"""
|
| 45 |
+
# Allow OWNER or superuser
|
| 46 |
+
if current_user.role != UserRole.OWNER and not current_user.is_superuser:
|
| 47 |
+
raise HTTPException(
|
| 48 |
+
status_code=status.HTTP_403_FORBIDDEN,
|
| 49 |
+
detail="Not authorized to edit landing settings"
|
| 50 |
+
)
|
| 51 |
+
|
| 52 |
+
result = await session.exec(select(LandingConfig))
|
| 53 |
+
config = result.first()
|
| 54 |
+
|
| 55 |
+
if not config:
|
| 56 |
+
config = LandingConfig()
|
| 57 |
+
|
| 58 |
+
# Update fields
|
| 59 |
+
config_data = config_in.model_dump(exclude_unset=True)
|
| 60 |
+
for key, value in config_data.items():
|
| 61 |
+
setattr(config, key, value)
|
| 62 |
+
|
| 63 |
+
session.add(config)
|
| 64 |
+
await session.commit()
|
| 65 |
+
await session.refresh(config)
|
| 66 |
+
|
| 67 |
+
return config
|
backend/app/main.py
CHANGED
|
@@ -7,7 +7,7 @@ from app.core.config import settings
|
|
| 7 |
from app.core.database import init_pgvector
|
| 8 |
from app.core.logging import configure_logging, get_logger
|
| 9 |
from app.middleware.request_id import RequestIDMiddleware
|
| 10 |
-
from app.api import webhook, leads, knowledge, channels, auth, tenants, analytics, chats, playbook, billing, ai_training, crm, admin, team, telegram_webhook, partners, notifications, products, bookings, jobs, system, meta_webhooks, voice, google_calendar, websocket_voice, oauth
|
| 11 |
|
| 12 |
# ... (omitted lines)
|
| 13 |
|
|
@@ -193,6 +193,7 @@ app.include_router(oauth.router, prefix="/api/v1") # OAuth for Meta Embedded Si
|
|
| 193 |
app.include_router(voice.router, prefix="/api/v1/voice", tags=["Voice"])
|
| 194 |
app.include_router(websocket_voice.router, prefix="/ws/voice", tags=["Voice Stream"])
|
| 195 |
app.include_router(google_calendar.router, prefix="/api/v1/google-calendar", tags=["Google Calendar"])
|
|
|
|
| 196 |
|
| 197 |
|
| 198 |
@app.on_event("startup")
|
|
|
|
| 7 |
from app.core.database import init_pgvector
|
| 8 |
from app.core.logging import configure_logging, get_logger
|
| 9 |
from app.middleware.request_id import RequestIDMiddleware
|
| 10 |
+
from app.api import webhook, leads, knowledge, channels, auth, tenants, analytics, chats, playbook, billing, ai_training, crm, admin, team, telegram_webhook, partners, notifications, products, bookings, jobs, system, meta_webhooks, voice, google_calendar, websocket_voice, oauth, landing
|
| 11 |
|
| 12 |
# ... (omitted lines)
|
| 13 |
|
|
|
|
| 193 |
app.include_router(voice.router, prefix="/api/v1/voice", tags=["Voice"])
|
| 194 |
app.include_router(websocket_voice.router, prefix="/ws/voice", tags=["Voice Stream"])
|
| 195 |
app.include_router(google_calendar.router, prefix="/api/v1/google-calendar", tags=["Google Calendar"])
|
| 196 |
+
app.include_router(landing.router, prefix="/api/v1/landing", tags=["Landing Page"])
|
| 197 |
|
| 198 |
|
| 199 |
@app.on_event("startup")
|
backend/app/models/__init__.py
CHANGED
|
@@ -18,6 +18,7 @@ from app.models.booking import Service, Availability, Appointment, AppointmentSt
|
|
| 18 |
from app.models.ai_training import AIFeedback, AITrainingExample, AILearningRule, FeedbackType, TrainingStatus
|
| 19 |
from app.models.crm_integration import CRMIntegration, CRMSyncLog, CRMFieldMapping, LeadCRMLink, CRMType, SyncDirection, SyncStatus
|
| 20 |
from app.models.order import Order, OrderItem, OrderStatus
|
|
|
|
| 21 |
|
| 22 |
__all__ = [
|
| 23 |
# Tenant
|
|
@@ -79,4 +80,7 @@ __all__ = [
|
|
| 79 |
"CRMType",
|
| 80 |
"SyncDirection",
|
| 81 |
"SyncStatus",
|
|
|
|
|
|
|
|
|
|
| 82 |
]
|
|
|
|
| 18 |
from app.models.ai_training import AIFeedback, AITrainingExample, AILearningRule, FeedbackType, TrainingStatus
|
| 19 |
from app.models.crm_integration import CRMIntegration, CRMSyncLog, CRMFieldMapping, LeadCRMLink, CRMType, SyncDirection, SyncStatus
|
| 20 |
from app.models.order import Order, OrderItem, OrderStatus
|
| 21 |
+
from app.models.landing import LandingConfig
|
| 22 |
|
| 23 |
__all__ = [
|
| 24 |
# Tenant
|
|
|
|
| 80 |
"CRMType",
|
| 81 |
"SyncDirection",
|
| 82 |
"SyncStatus",
|
| 83 |
+
|
| 84 |
+
# Landing
|
| 85 |
+
"LandingConfig",
|
| 86 |
]
|
backend/app/models/landing.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from sqlmodel import SQLModel, Field
|
| 2 |
+
from typing import Optional, List
|
| 3 |
+
from uuid import UUID, uuid4
|
| 4 |
+
from datetime import datetime
|
| 5 |
+
from sqlalchemy import Column, JSON
|
| 6 |
+
|
| 7 |
+
class LandingConfig(SQLModel, table=True):
|
| 8 |
+
"""Configuration for the public landing page."""
|
| 9 |
+
__tablename__ = "landing_config"
|
| 10 |
+
|
| 11 |
+
id: UUID = Field(default_factory=uuid4, primary_key=True)
|
| 12 |
+
|
| 13 |
+
# Trust Section - List of company names
|
| 14 |
+
trust_logos: List[str] = Field(default=[], sa_column=Column(JSON))
|
| 15 |
+
|
| 16 |
+
# Hero Section
|
| 17 |
+
hero_title: Optional[str] = Field(default=None)
|
| 18 |
+
hero_subtitle: Optional[str] = Field(default=None)
|
| 19 |
+
|
| 20 |
+
# Feature Flags
|
| 21 |
+
show_chat_demo: bool = Field(default=True)
|
| 22 |
+
show_pricing: bool = Field(default=True)
|
| 23 |
+
|
| 24 |
+
updated_at: datetime = Field(default_factory=datetime.utcnow)
|
backend/app/schemas/landing.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from pydantic import BaseModel
|
| 2 |
+
from typing import List, Optional
|
| 3 |
+
from uuid import UUID
|
| 4 |
+
from datetime import datetime
|
| 5 |
+
|
| 6 |
+
class LandingConfigBase(BaseModel):
|
| 7 |
+
trust_logos: List[str] = []
|
| 8 |
+
hero_title: Optional[str] = None
|
| 9 |
+
hero_subtitle: Optional[str] = None
|
| 10 |
+
show_chat_demo: bool = True
|
| 11 |
+
show_pricing: bool = True
|
| 12 |
+
|
| 13 |
+
class LandingConfigUpdate(LandingConfigBase):
|
| 14 |
+
pass
|
| 15 |
+
|
| 16 |
+
class LandingConfigResponse(LandingConfigBase):
|
| 17 |
+
id: UUID
|
| 18 |
+
updated_at: datetime
|
| 19 |
+
|
| 20 |
+
class Config:
|
| 21 |
+
from_attributes = True
|
frontend/app/admin/page.tsx
CHANGED
|
@@ -3,13 +3,14 @@
|
|
| 3 |
import { useState, useEffect } from 'react'
|
| 4 |
import { useAuth } from '@/contexts/AuthContext'
|
| 5 |
import { useToast } from '@/contexts/ToastContext'
|
| 6 |
-
import { Shield, ShieldAlert, LayoutDashboard, Users, UserCog, Megaphone, Settings, BarChart3 } from 'lucide-react'
|
| 7 |
|
| 8 |
// Tabs
|
| 9 |
import AnalyticsTab from '@/components/admin/AnalyticsTab'
|
| 10 |
import UsersTab from '@/components/admin/UsersTab'
|
| 11 |
import PartnersTab from '@/components/admin/PartnersTab'
|
| 12 |
import AnnouncementsTab from '@/components/admin/AnnouncementsTab'
|
|
|
|
| 13 |
|
| 14 |
export default function AdminPanelPage() {
|
| 15 |
const { user } = useAuth()
|
|
@@ -41,6 +42,7 @@ export default function AdminPanelPage() {
|
|
| 41 |
{ id: 'users', label: 'Пользователи', icon: Users },
|
| 42 |
{ id: 'partners', label: 'Партнеры', icon: UserCog },
|
| 43 |
{ id: 'announcements', label: 'Объявления', icon: Megaphone },
|
|
|
|
| 44 |
]
|
| 45 |
|
| 46 |
return (
|
|
@@ -83,6 +85,7 @@ export default function AdminPanelPage() {
|
|
| 83 |
{activeTab === 'users' && <UsersTab />}
|
| 84 |
{activeTab === 'partners' && <PartnersTab />}
|
| 85 |
{activeTab === 'announcements' && <AnnouncementsTab />}
|
|
|
|
| 86 |
</div>
|
| 87 |
</div>
|
| 88 |
)
|
|
|
|
| 3 |
import { useState, useEffect } from 'react'
|
| 4 |
import { useAuth } from '@/contexts/AuthContext'
|
| 5 |
import { useToast } from '@/contexts/ToastContext'
|
| 6 |
+
import { Shield, ShieldAlert, LayoutDashboard, Users, UserCog, Megaphone, Settings, BarChart3, Globe } from 'lucide-react'
|
| 7 |
|
| 8 |
// Tabs
|
| 9 |
import AnalyticsTab from '@/components/admin/AnalyticsTab'
|
| 10 |
import UsersTab from '@/components/admin/UsersTab'
|
| 11 |
import PartnersTab from '@/components/admin/PartnersTab'
|
| 12 |
import AnnouncementsTab from '@/components/admin/AnnouncementsTab'
|
| 13 |
+
import LandingTab from '@/components/admin/LandingTab'
|
| 14 |
|
| 15 |
export default function AdminPanelPage() {
|
| 16 |
const { user } = useAuth()
|
|
|
|
| 42 |
{ id: 'users', label: 'Пользователи', icon: Users },
|
| 43 |
{ id: 'partners', label: 'Партнеры', icon: UserCog },
|
| 44 |
{ id: 'announcements', label: 'Объявления', icon: Megaphone },
|
| 45 |
+
{ id: 'landing', label: 'Лендинг', icon: Globe },
|
| 46 |
]
|
| 47 |
|
| 48 |
return (
|
|
|
|
| 85 |
{activeTab === 'users' && <UsersTab />}
|
| 86 |
{activeTab === 'partners' && <PartnersTab />}
|
| 87 |
{activeTab === 'announcements' && <AnnouncementsTab />}
|
| 88 |
+
{activeTab === 'landing' && <LandingTab />}
|
| 89 |
</div>
|
| 90 |
</div>
|
| 91 |
)
|
frontend/app/page.tsx
CHANGED
|
@@ -97,18 +97,19 @@ export default function HomePage() {
|
|
| 97 |
return (
|
| 98 |
<div className="min-h-screen bg-[#050510] overflow-x-hidden selection:bg-indigo-500/30 text-white font-sans">
|
| 99 |
|
| 100 |
-
{/* Background Ambience */}
|
| 101 |
<div className="fixed inset-0 z-0 pointer-events-none">
|
| 102 |
-
<div className="absolute top-[-20%] left-[-10%] w-[50%] h-[50%] bg-indigo-900/
|
| 103 |
-
<div className="absolute bottom-[-20%] right-[-10%] w-[50%] h-[50%] bg-purple-900/
|
| 104 |
</div>
|
| 105 |
|
| 106 |
{/* 1. NAVBAR - Removed right button */}
|
| 107 |
-
<nav className="fixed top-0 left-0 right-0 z-50 border-b border-white/5 bg-[#050510]/
|
| 108 |
<div className="max-w-7xl mx-auto px-6 h-20 flex items-center justify-between">
|
| 109 |
<Link href="/" className="flex items-center gap-3 group">
|
| 110 |
<div className="relative">
|
| 111 |
-
|
|
|
|
| 112 |
<img src="/logo-v2.png" alt="MicroFunnel" className="w-8 h-8 relative z-10" />
|
| 113 |
</div>
|
| 114 |
<span className="text-xl font-bold tracking-wide">MicroFunnel</span>
|
|
@@ -140,7 +141,7 @@ export default function HomePage() {
|
|
| 140 |
<h1 className="text-5xl md:text-7xl font-black text-white leading-[1.1] mb-6 tracking-tight">
|
| 141 |
ВАШ AI-СОТРУДНИК <br />
|
| 142 |
РАБОТАЕТ <br />
|
| 143 |
-
<span className="text-transparent bg-clip-text bg-gradient-to-r from-cyan-400
|
| 144 |
24/7
|
| 145 |
</span>
|
| 146 |
</h1>
|
|
@@ -157,9 +158,10 @@ export default function HomePage() {
|
|
| 157 |
<div className="flex flex-col sm:flex-row gap-5 items-start">
|
| 158 |
<Link
|
| 159 |
href="/register"
|
| 160 |
-
className="group relative px-8 py-4 bg-white text-black font-black text-lg rounded-xl transition-all hover:scale-105 hover:shadow-
|
| 161 |
>
|
| 162 |
-
|
|
|
|
| 163 |
<span className="flex items-center gap-2">
|
| 164 |
Попробовать бесплатно <ArrowRight className="w-5 h-5 group-hover:translate-x-1 transition-transform" />
|
| 165 |
</span>
|
|
@@ -172,89 +174,36 @@ export default function HomePage() {
|
|
| 172 |
</div>
|
| 173 |
</motion.div>
|
| 174 |
|
| 175 |
-
{/* Hero Visual -
|
| 176 |
<motion.div
|
| 177 |
-
initial={{ opacity: 0, y: 40
|
| 178 |
-
animate={{ opacity: 1, y: 0
|
| 179 |
-
transition={{ duration: 1, delay: 0.2
|
| 180 |
-
className="relative lg:h-[
|
| 181 |
>
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
<
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
<div className="w-full h-full flex flex-col">
|
| 191 |
-
{/* Top Bar */}
|
| 192 |
-
<div className="h-10 border-b border-white/5 flex items-center px-4 justify-between bg-[#131426]">
|
| 193 |
-
<div className="flex gap-2">
|
| 194 |
-
<div className="w-3 h-3 rounded-full bg-red-500/80" />
|
| 195 |
-
<div className="w-3 h-3 rounded-full bg-yellow-500/80" />
|
| 196 |
-
<div className="w-3 h-3 rounded-full bg-green-500/80" />
|
| 197 |
-
</div>
|
| 198 |
-
<div className="text-[10px] text-slate-600 font-mono">MicroFunnel Dashboard</div>
|
| 199 |
-
</div>
|
| 200 |
-
|
| 201 |
-
{/* Main Area */}
|
| 202 |
-
<div className="flex-1 p-4 grid grid-cols-12 gap-4 bg-[#0B0C15]">
|
| 203 |
-
{/* Sidebar */}
|
| 204 |
-
<div className="col-span-3 space-y-2">
|
| 205 |
-
<div className="h-7 w-full bg-indigo-500/20 rounded border border-indigo-500/30 flex items-center px-2 text-[10px] text-indigo-300 font-bold">Dashboard</div>
|
| 206 |
-
{[1, 2, 3].map(i => (
|
| 207 |
-
<div key={i} className="h-7 w-full hover:bg-white/5 rounded flex items-center px-2 text-[10px] text-slate-600 transition-colors cursor-default">Menu {i}</div>
|
| 208 |
-
))}
|
| 209 |
-
</div>
|
| 210 |
-
|
| 211 |
-
{/* Content */}
|
| 212 |
-
<div className="col-span-9 space-y-4">
|
| 213 |
-
{/* Stats */}
|
| 214 |
-
<div className="grid grid-cols-3 gap-3">
|
| 215 |
-
{[
|
| 216 |
-
{ label: 'Leads', val: '1,240', color: 'text-indigo-400' },
|
| 217 |
-
{ label: 'Sales', val: '$45k', color: 'text-emerald-400' },
|
| 218 |
-
{ label: 'Rate', val: '14.2%', color: 'text-purple-400' }
|
| 219 |
-
].map((stat, i) => (
|
| 220 |
-
<div key={i} className="bg-[#151621] p-3 rounded-lg border border-white/5">
|
| 221 |
-
<div className="text-[9px] text-slate-500 uppercase tracking-wider mb-0.5">{stat.label}</div>
|
| 222 |
-
<div className={`text-lg font-black ${stat.color}`}>{stat.val}</div>
|
| 223 |
-
</div>
|
| 224 |
-
))}
|
| 225 |
-
</div>
|
| 226 |
-
{/* Chart */}
|
| 227 |
-
<div className="h-24 bg-[#151621] rounded-lg border border-white/5 p-3 flex items-end justify-between gap-1 overflow-hidden relative">
|
| 228 |
-
<div className="absolute inset-0 bg-gradient-to-t from-indigo-500/5 to-transparent" />
|
| 229 |
-
{[30, 45, 35, 60, 55, 80, 70, 90, 100, 85, 60].map((h, i) => (
|
| 230 |
-
<motion.div
|
| 231 |
-
key={i}
|
| 232 |
-
initial={{ height: 0 }}
|
| 233 |
-
animate={{ height: `${h}%` }}
|
| 234 |
-
transition={{ duration: 1, delay: i * 0.1 }}
|
| 235 |
-
className="w-full bg-indigo-500/50 hover:bg-indigo-400 rounded-t-sm transition-colors"
|
| 236 |
-
/>
|
| 237 |
-
))}
|
| 238 |
-
</div>
|
| 239 |
-
</div>
|
| 240 |
-
</div>
|
| 241 |
-
</div>
|
| 242 |
-
</div>
|
| 243 |
</motion.div>
|
| 244 |
</div>
|
| 245 |
</section>
|
| 246 |
|
| 247 |
{/* 3. COMPANIES MARQUEE - Slow scroll */}
|
| 248 |
-
<section className="py-8 border-y border-white/5 bg-white/[0.
|
| 249 |
<div className="relative w-full flex overflow-hidden">
|
| 250 |
<div className="flex animate-marquee-slow gap-16 min-w-full">
|
| 251 |
{[...TRUST_LOGOS, ...TRUST_LOGOS].map((logo, i) => (
|
| 252 |
-
<span key={i} className="text-xl font-bold text-slate-
|
| 253 |
))}
|
| 254 |
</div>
|
| 255 |
<div className="flex animate-marquee-slow gap-16 min-w-full absolute top-0 left-full">
|
| 256 |
{[...TRUST_LOGOS, ...TRUST_LOGOS].map((logo, i) => (
|
| 257 |
-
<span key={i} className="text-xl font-bold text-slate-
|
| 258 |
))}
|
| 259 |
</div>
|
| 260 |
</div>
|
|
@@ -264,10 +213,10 @@ export default function HomePage() {
|
|
| 264 |
<section id="features" className="py-32 relative">
|
| 265 |
<div className="max-w-7xl mx-auto px-6">
|
| 266 |
<div className="text-center mb-20">
|
| 267 |
-
<div className="text-cyan-
|
| 268 |
<h2 className="text-4xl md:text-5xl font-black text-white mb-6">
|
| 269 |
11 причин выбрать <br />
|
| 270 |
-
<span className="text-
|
| 271 |
</h2>
|
| 272 |
<p className="text-slate-400 max-w-2xl mx-auto">
|
| 273 |
Мы объединили лучшие технологии для создания идеального AI-продавца.
|
|
@@ -282,9 +231,9 @@ export default function HomePage() {
|
|
| 282 |
whileInView={{ opacity: 1, y: 0 }}
|
| 283 |
viewport={{ once: true }}
|
| 284 |
transition={{ delay: i * 0.05 }}
|
| 285 |
-
className={`p-
|
| 286 |
>
|
| 287 |
-
<div className="w-10 h-10 rounded-lg bg-
|
| 288 |
<CheckCircle className="w-5 h-5" />
|
| 289 |
</div>
|
| 290 |
<h3 className="text-lg font-bold text-white mb-2">{feat.title}</h3>
|
|
|
|
| 97 |
return (
|
| 98 |
<div className="min-h-screen bg-[#050510] overflow-x-hidden selection:bg-indigo-500/30 text-white font-sans">
|
| 99 |
|
| 100 |
+
{/* Background Ambience - Reduced Glow */}
|
| 101 |
<div className="fixed inset-0 z-0 pointer-events-none">
|
| 102 |
+
<div className="absolute top-[-20%] left-[-10%] w-[50%] h-[50%] bg-indigo-900/10 blur-[100px] rounded-full" />
|
| 103 |
+
<div className="absolute bottom-[-20%] right-[-10%] w-[50%] h-[50%] bg-purple-900/5 blur-[100px] rounded-full" />
|
| 104 |
</div>
|
| 105 |
|
| 106 |
{/* 1. NAVBAR - Removed right button */}
|
| 107 |
+
<nav className="fixed top-0 left-0 right-0 z-50 border-b border-white/5 bg-[#050510]/90 backdrop-blur-md">
|
| 108 |
<div className="max-w-7xl mx-auto px-6 h-20 flex items-center justify-between">
|
| 109 |
<Link href="/" className="flex items-center gap-3 group">
|
| 110 |
<div className="relative">
|
| 111 |
+
{/* Reduced logo glow */}
|
| 112 |
+
<div className="absolute inset-0 bg-cyan-500 blur-md opacity-10 group-hover:opacity-30 transition-opacity" />
|
| 113 |
<img src="/logo-v2.png" alt="MicroFunnel" className="w-8 h-8 relative z-10" />
|
| 114 |
</div>
|
| 115 |
<span className="text-xl font-bold tracking-wide">MicroFunnel</span>
|
|
|
|
| 141 |
<h1 className="text-5xl md:text-7xl font-black text-white leading-[1.1] mb-6 tracking-tight">
|
| 142 |
ВАШ AI-СОТРУДНИК <br />
|
| 143 |
РАБОТАЕТ <br />
|
| 144 |
+
<span className="text-transparent bg-clip-text bg-gradient-to-r from-cyan-400 to-indigo-500">
|
| 145 |
24/7
|
| 146 |
</span>
|
| 147 |
</h1>
|
|
|
|
| 158 |
<div className="flex flex-col sm:flex-row gap-5 items-start">
|
| 159 |
<Link
|
| 160 |
href="/register"
|
| 161 |
+
className="group relative px-8 py-4 bg-white text-black font-black text-lg rounded-xl transition-all hover:scale-105 hover:shadow-lg"
|
| 162 |
>
|
| 163 |
+
{/* Reduced button glow */}
|
| 164 |
+
<div className="absolute inset-0 rounded-xl bg-gradient-to-r from-cyan-400 via-blue-500 to-purple-500 opacity-0 group-hover:opacity-50 transition-opacity blur-lg -z-10" />
|
| 165 |
<span className="flex items-center gap-2">
|
| 166 |
Попробовать бесплатно <ArrowRight className="w-5 h-5 group-hover:translate-x-1 transition-transform" />
|
| 167 |
</span>
|
|
|
|
| 174 |
</div>
|
| 175 |
</motion.div>
|
| 176 |
|
| 177 |
+
{/* Hero Visual - 3D Image */}
|
| 178 |
<motion.div
|
| 179 |
+
initial={{ opacity: 0, y: 40 }}
|
| 180 |
+
animate={{ opacity: 1, y: 0 }}
|
| 181 |
+
transition={{ duration: 1, delay: 0.2 }}
|
| 182 |
+
className="relative lg:h-[600px] flex items-center justify-center pointer-events-none"
|
| 183 |
>
|
| 184 |
+
{/* Reduced background blob behind image */}
|
| 185 |
+
<div className="absolute inset-0 bg-gradient-to-tr from-cyan-600/10 via-blue-600/10 to-purple-600/10 blur-[60px] rounded-full opacity-50" />
|
| 186 |
+
|
| 187 |
+
<img
|
| 188 |
+
src="/hero-3d.png"
|
| 189 |
+
alt="MicroFunnel 3D Dashboard"
|
| 190 |
+
className="relative w-full h-auto object-contain drop-shadow-2xl transform hover:scale-105 transition-transform duration-700"
|
| 191 |
+
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 192 |
</motion.div>
|
| 193 |
</div>
|
| 194 |
</section>
|
| 195 |
|
| 196 |
{/* 3. COMPANIES MARQUEE - Slow scroll */}
|
| 197 |
+
<section className="py-8 border-y border-white/5 bg-white/[0.01] overflow-hidden">
|
| 198 |
<div className="relative w-full flex overflow-hidden">
|
| 199 |
<div className="flex animate-marquee-slow gap-16 min-w-full">
|
| 200 |
{[...TRUST_LOGOS, ...TRUST_LOGOS].map((logo, i) => (
|
| 201 |
+
<span key={i} className="text-xl font-bold text-slate-700 whitespace-nowrap opacity-60 uppercase tracking-widest">{logo}</span>
|
| 202 |
))}
|
| 203 |
</div>
|
| 204 |
<div className="flex animate-marquee-slow gap-16 min-w-full absolute top-0 left-full">
|
| 205 |
{[...TRUST_LOGOS, ...TRUST_LOGOS].map((logo, i) => (
|
| 206 |
+
<span key={i} className="text-xl font-bold text-slate-700 whitespace-nowrap opacity-60 uppercase tracking-widest">{logo}</span>
|
| 207 |
))}
|
| 208 |
</div>
|
| 209 |
</div>
|
|
|
|
| 213 |
<section id="features" className="py-32 relative">
|
| 214 |
<div className="max-w-7xl mx-auto px-6">
|
| 215 |
<div className="text-center mb-20">
|
| 216 |
+
<div className="text-cyan-500 font-bold mb-4 tracking-wider uppercase text-sm">Решение найдено</div>
|
| 217 |
<h2 className="text-4xl md:text-5xl font-black text-white mb-6">
|
| 218 |
11 причин выбрать <br />
|
| 219 |
+
<span className="text-white">MicroFunnel</span>
|
| 220 |
</h2>
|
| 221 |
<p className="text-slate-400 max-w-2xl mx-auto">
|
| 222 |
Мы объединили лучшие технологии для создания идеального AI-продавца.
|
|
|
|
| 231 |
whileInView={{ opacity: 1, y: 0 }}
|
| 232 |
viewport={{ once: true }}
|
| 233 |
transition={{ delay: i * 0.05 }}
|
| 234 |
+
className={`p-6 rounded-2xl border border-white/5 bg-[#0B0C15] hover:border-indigo-500/20 transition-all hover:bg-[#10111A] ${i === 0 || i === 3 ? 'lg:col-span-2' : ''}`}
|
| 235 |
>
|
| 236 |
+
<div className="w-10 h-10 rounded-lg bg-indigo-500/10 flex items-center justify-center mb-4 text-indigo-400">
|
| 237 |
<CheckCircle className="w-5 h-5" />
|
| 238 |
</div>
|
| 239 |
<h3 className="text-lg font-bold text-white mb-2">{feat.title}</h3>
|
frontend/components/admin/LandingTab.tsx
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
|
|
| 1 |
|
| 2 |
import { useState, useEffect } from 'react'
|
| 3 |
-
import {
|
| 4 |
import { useToast } from '@/contexts/ToastContext'
|
|
|
|
| 5 |
|
| 6 |
export default function LandingTab() {
|
| 7 |
-
const [
|
| 8 |
-
const [
|
|
|
|
|
|
|
| 9 |
const toast = useToast()
|
| 10 |
|
| 11 |
useEffect(() => {
|
|
@@ -14,171 +18,163 @@ export default function LandingTab() {
|
|
| 14 |
|
| 15 |
const loadConfig = async () => {
|
| 16 |
try {
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
if (res.ok) {
|
| 21 |
-
setLandingConfig(await res.json())
|
| 22 |
-
}
|
| 23 |
} catch (error) {
|
| 24 |
-
|
|
|
|
|
|
|
| 25 |
}
|
| 26 |
}
|
| 27 |
|
| 28 |
-
const
|
| 29 |
-
|
| 30 |
try {
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
'Content-Type': 'application/json',
|
| 35 |
-
'Authorization': `Bearer ${localStorage.getItem('auth_token')}`
|
| 36 |
-
},
|
| 37 |
-
body: JSON.stringify(landingConfig)
|
| 38 |
-
})
|
| 39 |
-
if (res.ok) {
|
| 40 |
-
toast.success('Успех', 'Настройки сохранены')
|
| 41 |
-
} else {
|
| 42 |
-
toast.error('Ошибка', 'Не удалось сохранить')
|
| 43 |
-
}
|
| 44 |
} catch (error) {
|
| 45 |
-
toast.error('Ошибка', '
|
| 46 |
} finally {
|
| 47 |
-
|
| 48 |
}
|
| 49 |
}
|
| 50 |
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
|
| 57 |
return (
|
| 58 |
-
<div className="
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
</
|
| 64 |
-
<
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
</div>
|
| 69 |
|
| 70 |
-
<div className="
|
| 71 |
-
{/*
|
| 72 |
-
<div>
|
| 73 |
-
<
|
| 74 |
-
|
| 75 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
</div>
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
</div>
|
| 108 |
-
</div>
|
| 109 |
-
</div>
|
| 110 |
-
))}
|
| 111 |
</div>
|
| 112 |
</div>
|
| 113 |
|
| 114 |
-
{/*
|
| 115 |
-
<div>
|
| 116 |
-
<
|
| 117 |
-
|
| 118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
</div>
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
newConfig.companies[index].name = e.target.value
|
| 129 |
-
setLandingConfig(newConfig)
|
| 130 |
-
}}
|
| 131 |
-
placeholder="Название"
|
| 132 |
-
className="flex-1 px-3 py-2 bg-slate-900 border border-white/10 rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-indigo-500/50"
|
| 133 |
-
/>
|
| 134 |
-
<input
|
| 135 |
-
type="text"
|
| 136 |
-
value={company.logo}
|
| 137 |
-
onChange={(e) => {
|
| 138 |
-
const newConfig = { ...landingConfig }
|
| 139 |
-
newConfig.companies[index].logo = e.target.value
|
| 140 |
-
setLandingConfig(newConfig)
|
| 141 |
-
}}
|
| 142 |
-
placeholder="URL Логотипа"
|
| 143 |
-
className="flex-1 px-3 py-2 bg-slate-900 border border-white/10 rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-indigo-500/50"
|
| 144 |
-
/>
|
| 145 |
<button
|
| 146 |
-
onClick={() =>
|
| 147 |
-
|
| 148 |
-
newConfig.companies.splice(index, 1)
|
| 149 |
-
setLandingConfig(newConfig)
|
| 150 |
-
}}
|
| 151 |
-
className="text-red-400 hover:bg-red-500/20 p-2 rounded-lg transition-colors"
|
| 152 |
>
|
| 153 |
-
<X className="w-
|
| 154 |
</button>
|
| 155 |
</div>
|
| 156 |
))}
|
| 157 |
-
<button
|
| 158 |
-
onClick={() => {
|
| 159 |
-
const newConfig = { ...landingConfig }
|
| 160 |
-
if (!newConfig.companies) newConfig.companies = []
|
| 161 |
-
newConfig.companies.push({ name: '', logo: '' })
|
| 162 |
-
setLandingConfig(newConfig)
|
| 163 |
-
}}
|
| 164 |
-
className="px-4 py-3 border-2 border-dashed border-white/20 rounded-xl text-slate-400 hover:border-indigo-500/50 hover:text-indigo-400 transition-colors w-full"
|
| 165 |
-
>
|
| 166 |
-
+ Добавить компанию
|
| 167 |
-
</button>
|
| 168 |
</div>
|
| 169 |
</div>
|
| 170 |
-
|
| 171 |
-
{/* Save Button */}
|
| 172 |
-
<div className="pt-6 border-t border-white/10 flex justify-end">
|
| 173 |
-
<button
|
| 174 |
-
onClick={saveConfig}
|
| 175 |
-
disabled={savingConfig}
|
| 176 |
-
className="flex items-center gap-2 px-8 py-3 bg-indigo-600 hover:bg-indigo-500 text-white font-bold rounded-xl transition-colors disabled:opacity-50"
|
| 177 |
-
>
|
| 178 |
-
<Save className="w-5 h-5" />
|
| 179 |
-
{savingConfig ? 'Сохранение...' : 'Сохранить изменения'}
|
| 180 |
-
</button>
|
| 181 |
-
</div>
|
| 182 |
</div>
|
| 183 |
</div>
|
| 184 |
)
|
|
|
|
| 1 |
+
'use client'
|
| 2 |
|
| 3 |
import { useState, useEffect } from 'react'
|
| 4 |
+
import { landingApi, LandingConfig } from '@/lib/api/landing'
|
| 5 |
import { useToast } from '@/contexts/ToastContext'
|
| 6 |
+
import { Save, Plus, X, Globe, Eye, EyeOff } from 'lucide-react'
|
| 7 |
|
| 8 |
export default function LandingTab() {
|
| 9 |
+
const [config, setConfig] = useState<LandingConfig | null>(null)
|
| 10 |
+
const [isLoading, setIsLoading] = useState(true)
|
| 11 |
+
const [isSaving, setIsSaving] = useState(false)
|
| 12 |
+
const [newLogo, setNewLogo] = useState('')
|
| 13 |
const toast = useToast()
|
| 14 |
|
| 15 |
useEffect(() => {
|
|
|
|
| 18 |
|
| 19 |
const loadConfig = async () => {
|
| 20 |
try {
|
| 21 |
+
setIsLoading(true)
|
| 22 |
+
const data = await landingApi.getConfig()
|
| 23 |
+
setConfig(data)
|
|
|
|
|
|
|
|
|
|
| 24 |
} catch (error) {
|
| 25 |
+
toast.error('Ошибка загрузки', 'Не удалось получить настройки лендинга')
|
| 26 |
+
} finally {
|
| 27 |
+
setIsLoading(false)
|
| 28 |
}
|
| 29 |
}
|
| 30 |
|
| 31 |
+
const handleSave = async () => {
|
| 32 |
+
if (!config) return
|
| 33 |
try {
|
| 34 |
+
setIsSaving(true)
|
| 35 |
+
await landingApi.updateConfig(config)
|
| 36 |
+
toast.success('Сохранено', 'Настройки лендинга обновлены')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
} catch (error) {
|
| 38 |
+
toast.error('Ошибка сохранения', 'Не удалось сохранить настройки')
|
| 39 |
} finally {
|
| 40 |
+
setIsSaving(false)
|
| 41 |
}
|
| 42 |
}
|
| 43 |
|
| 44 |
+
const addLogo = () => {
|
| 45 |
+
if (!newLogo.trim() || !config) return
|
| 46 |
+
setConfig({
|
| 47 |
+
...config,
|
| 48 |
+
trust_logos: [...config.trust_logos, newLogo.trim()]
|
| 49 |
+
})
|
| 50 |
+
setNewLogo('')
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
const removeLogo = (index: number) => {
|
| 54 |
+
if (!config) return
|
| 55 |
+
const newLogos = [...config.trust_logos]
|
| 56 |
+
newLogos.splice(index, 1)
|
| 57 |
+
setConfig({ ...config, trust_logos: newLogos })
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
if (isLoading) return <div className="text-white">Загрузка...</div>
|
| 61 |
+
if (!config) return <div className="text-red-400">Ошибка данных</div>
|
| 62 |
|
| 63 |
return (
|
| 64 |
+
<div className="space-y-8 max-w-4xl">
|
| 65 |
+
<div className="flex items-center justify-between">
|
| 66 |
+
<h2 className="text-xl font-bold text-white flex items-center gap-2">
|
| 67 |
+
<Globe className="w-5 h-5 text-indigo-400" />
|
| 68 |
+
Настройки Лендинга
|
| 69 |
+
</h2>
|
| 70 |
+
<button
|
| 71 |
+
onClick={handleSave}
|
| 72 |
+
disabled={isSaving}
|
| 73 |
+
className="flex items-center gap-2 px-4 py-2 bg-indigo-600 hover:bg-indigo-500 disabled:opacity-50 text-white rounded-lg font-bold transition-all"
|
| 74 |
+
>
|
| 75 |
+
<Save className="w-4 h-4" />
|
| 76 |
+
{isSaving ? 'Сохранение...' : 'Сохранить изменения'}
|
| 77 |
+
</button>
|
| 78 |
</div>
|
| 79 |
|
| 80 |
+
<div className="grid gap-6">
|
| 81 |
+
{/* Hero Section */}
|
| 82 |
+
<div className="bg-[#151621] border border-white/5 rounded-2xl p-6">
|
| 83 |
+
<h3 className="text-lg font-bold text-white mb-4">Главный экран</h3>
|
| 84 |
+
<div className="space-y-4">
|
| 85 |
+
<div>
|
| 86 |
+
<label className="block text-sm text-slate-400 mb-1">Заголовок Hero (Опционально)</label>
|
| 87 |
+
<input
|
| 88 |
+
type="text"
|
| 89 |
+
value={config.hero_title || ''}
|
| 90 |
+
onChange={(e) => setConfig({ ...config, hero_title: e.target.value })}
|
| 91 |
+
placeholder="ПРОДАВАЙТЕ УМНЕЕ"
|
| 92 |
+
className="w-full bg-[#0B0C15] border border-white/10 rounded-lg px-4 py-2 text-white placeholder-slate-600 focus:border-indigo-500 outline-none"
|
| 93 |
+
/>
|
| 94 |
+
</div>
|
| 95 |
+
<div>
|
| 96 |
+
<label className="block text-sm text-slate-400 mb-1">Подзаголовок Hero (Опционально)</label>
|
| 97 |
+
<input
|
| 98 |
+
type="text"
|
| 99 |
+
value={config.hero_subtitle || ''}
|
| 100 |
+
onChange={(e) => setConfig({ ...config, hero_subtitle: e.target.value })}
|
| 101 |
+
placeholder="Ваш AI-двигатель продаж..."
|
| 102 |
+
className="w-full bg-[#0B0C15] border border-white/10 rounded-lg px-4 py-2 text-white placeholder-slate-600 focus:border-indigo-500 outline-none"
|
| 103 |
+
/>
|
| 104 |
+
</div>
|
| 105 |
</div>
|
| 106 |
+
</div>
|
| 107 |
+
|
| 108 |
+
{/* Visibility Toggles */}
|
| 109 |
+
<div className="bg-[#151621] border border-white/5 rounded-2xl p-6">
|
| 110 |
+
<h3 className="text-lg font-bold text-white mb-4">Видимость блоков</h3>
|
| 111 |
+
<div className="grid sm:grid-cols-2 gap-4">
|
| 112 |
+
<label className="flex items-center justify-between p-4 bg-[#0B0C15] rounded-xl border border-white/5 cursor-pointer hover:border-white/10">
|
| 113 |
+
<span className="flex items-center gap-2 text-white font-medium">
|
| 114 |
+
{config.show_chat_demo ? <Eye className="w-4 h-4 text-emerald-400" /> : <EyeOff className="w-4 h-4 text-slate-500" />}
|
| 115 |
+
Демо-чат
|
| 116 |
+
</span>
|
| 117 |
+
<input
|
| 118 |
+
type="checkbox"
|
| 119 |
+
checked={config.show_chat_demo}
|
| 120 |
+
onChange={(e) => setConfig({ ...config, show_chat_demo: e.target.checked })}
|
| 121 |
+
className="w-5 h-5 accent-indigo-500"
|
| 122 |
+
/>
|
| 123 |
+
</label>
|
| 124 |
+
<label className="flex items-center justify-between p-4 bg-[#0B0C15] rounded-xl border border-white/5 cursor-pointer hover:border-white/10">
|
| 125 |
+
<span className="flex items-center gap-2 text-white font-medium">
|
| 126 |
+
{config.show_pricing ? <Eye className="w-4 h-4 text-emerald-400" /> : <EyeOff className="w-4 h-4 text-slate-500" />}
|
| 127 |
+
Блок цен
|
| 128 |
+
</span>
|
| 129 |
+
<input
|
| 130 |
+
type="checkbox"
|
| 131 |
+
checked={config.show_pricing}
|
| 132 |
+
onChange={(e) => setConfig({ ...config, show_pricing: e.target.checked })}
|
| 133 |
+
className="w-5 h-5 accent-indigo-500"
|
| 134 |
+
/>
|
| 135 |
+
</label>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 136 |
</div>
|
| 137 |
</div>
|
| 138 |
|
| 139 |
+
{/* Company Logos */}
|
| 140 |
+
<div className="bg-[#151621] border border-white/5 rounded-2xl p-6">
|
| 141 |
+
<h3 className="text-lg font-bold text-white mb-4">Логотипы компаний (Infinite Marquee)</h3>
|
| 142 |
+
<p className="text-sm text-slate-400 mb-4">Добавьте названия компаний, которые будут отображаться в бегущей строке.</p>
|
| 143 |
+
|
| 144 |
+
<div className="flex gap-2 mb-4">
|
| 145 |
+
<input
|
| 146 |
+
type="text"
|
| 147 |
+
value={newLogo}
|
| 148 |
+
onChange={(e) => setNewLogo(e.target.value)}
|
| 149 |
+
onKeyDown={(e) => e.key === 'Enter' && addLogo()}
|
| 150 |
+
placeholder="Название компании (например: Tesla)"
|
| 151 |
+
className="flex-1 bg-[#0B0C15] border border-white/10 rounded-lg px-4 py-2 text-white placeholder-slate-600 focus:border-indigo-500 outline-none"
|
| 152 |
+
/>
|
| 153 |
+
<button
|
| 154 |
+
onClick={addLogo}
|
| 155 |
+
className="p-2 bg-indigo-600 hover:bg-indigo-500 rounded-lg text-white transition-colors"
|
| 156 |
+
>
|
| 157 |
+
<Plus className="w-5 h-5" />
|
| 158 |
+
</button>
|
| 159 |
</div>
|
| 160 |
+
|
| 161 |
+
<div className="flex flex-wrap gap-2">
|
| 162 |
+
{config.trust_logos.length === 0 && (
|
| 163 |
+
<div className="text-slate-500 text-sm italic py-2">Список пуст</div>
|
| 164 |
+
)}
|
| 165 |
+
{config.trust_logos.map((logo, index) => (
|
| 166 |
+
<div key={index} className="flex items-center gap-2 px-3 py-1.5 bg-[#0B0C15] border border-white/10 rounded-lg group">
|
| 167 |
+
<span className="text-sm text-white font-medium">{logo}</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 168 |
<button
|
| 169 |
+
onClick={() => removeLogo(index)}
|
| 170 |
+
className="text-slate-500 hover:text-red-400 transition-colors"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 171 |
>
|
| 172 |
+
<X className="w-3 h-3" />
|
| 173 |
</button>
|
| 174 |
</div>
|
| 175 |
))}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 176 |
</div>
|
| 177 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 178 |
</div>
|
| 179 |
</div>
|
| 180 |
)
|
frontend/lib/api/landing.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import api from '@/lib/api'
|
| 2 |
+
|
| 3 |
+
export interface LandingConfig {
|
| 4 |
+
id?: string
|
| 5 |
+
trust_logos: string[]
|
| 6 |
+
hero_title?: string
|
| 7 |
+
hero_subtitle?: string
|
| 8 |
+
show_chat_demo: boolean
|
| 9 |
+
show_pricing: boolean
|
| 10 |
+
updated_at?: string
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
export const landingApi = {
|
| 14 |
+
// Public
|
| 15 |
+
getConfig: async (): Promise<LandingConfig> => {
|
| 16 |
+
const { data } = await api.get('/landing/config')
|
| 17 |
+
return data
|
| 18 |
+
},
|
| 19 |
+
|
| 20 |
+
// Admin only
|
| 21 |
+
updateConfig: async (config: Partial<LandingConfig>): Promise<LandingConfig> => {
|
| 22 |
+
const { data } = await api.put('/landing/config', config)
|
| 23 |
+
return data
|
| 24 |
+
}
|
| 25 |
+
}
|
frontend/public/hero-3d.png
ADDED
|
Git LFS Details
|