@promakeai/cli 0.0.5 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +214 -135
- package/dist/registry/about-page.json +5 -3
- package/dist/registry/about-section.json +2 -2
- package/dist/registry/announcement-bar.json +43 -0
- package/dist/registry/api.json +55 -0
- package/dist/registry/auth-core.json +43 -0
- package/dist/registry/auth.json +70 -0
- package/dist/registry/bento-grid-section.json +1 -1
- package/dist/registry/blog-list-page.json +3 -2
- package/dist/registry/blog-section.json +2 -2
- package/dist/registry/cart-drawer.json +1 -1
- package/dist/registry/cart-page.json +5 -4
- package/dist/registry/case-study-page.json +48 -0
- package/dist/registry/category-section.json +1 -1
- package/dist/registry/checkout-page.json +7 -5
- package/dist/registry/coming-soon-page-minimal.json +45 -0
- package/dist/registry/coming-soon-page.json +47 -0
- package/dist/registry/contact-info-grid.json +2 -2
- package/dist/registry/contact-page-centered.json +2 -2
- package/dist/registry/contact-page-map-overlay.json +4 -3
- package/dist/registry/contact-page-map-split.json +4 -3
- package/dist/registry/contact-page-split.json +3 -3
- package/dist/registry/contact-page.json +5 -3
- package/dist/registry/cookie-consent.json +43 -0
- package/dist/registry/cookies-page.json +4 -2
- package/dist/registry/cta-section.json +2 -2
- package/dist/registry/db.json +129 -0
- package/dist/registry/docs/about-page.md +5 -0
- package/dist/registry/docs/announcement-bar.md +38 -0
- package/dist/registry/docs/auth-core.md +64 -0
- package/dist/registry/docs/blog-list-page.md +1 -0
- package/dist/registry/docs/cart-page.md +1 -0
- package/dist/registry/docs/case-study-page.md +39 -0
- package/dist/registry/docs/checkout-page.md +3 -1
- package/dist/registry/docs/coming-soon-page-minimal.md +32 -0
- package/dist/registry/docs/coming-soon-page.md +37 -0
- package/dist/registry/docs/contact-page-map-overlay.md +2 -2
- package/dist/registry/docs/contact-page-map-split.md +2 -2
- package/dist/registry/docs/contact-page.md +5 -0
- package/dist/registry/docs/cookie-consent.md +37 -0
- package/dist/registry/docs/cookies-page.md +5 -0
- package/dist/registry/docs/ecommerce-core.md +4 -3
- package/dist/registry/docs/forgot-password-page-split.md +45 -0
- package/dist/registry/docs/forgot-password-page.md +46 -0
- package/dist/registry/docs/header-ecommerce.md +2 -0
- package/dist/registry/docs/hero-carousel.md +37 -0
- package/dist/registry/docs/landing-page-app.md +43 -0
- package/dist/registry/docs/landing-page-saas.md +41 -0
- package/dist/registry/docs/login-page-split.md +13 -4
- package/dist/registry/docs/login-page.md +17 -4
- package/dist/registry/docs/logo-cloud.md +33 -0
- package/dist/registry/docs/masonry-grid.md +37 -0
- package/dist/registry/docs/my-orders-page.md +44 -0
- package/dist/registry/docs/order-confirmation-page.md +41 -0
- package/dist/registry/docs/portfolio-page.md +38 -0
- package/dist/registry/docs/pricing-page.md +38 -0
- package/dist/registry/docs/privacy-page.md +5 -0
- package/dist/registry/docs/product-quick-view.md +37 -0
- package/dist/registry/docs/products-page.md +1 -0
- package/dist/registry/docs/reading-progress.md +31 -0
- package/dist/registry/docs/register-page-split.md +45 -0
- package/dist/registry/docs/register-page.md +46 -0
- package/dist/registry/docs/reset-password-page-split.md +45 -0
- package/dist/registry/docs/reset-password-page.md +36 -0
- package/dist/registry/docs/share-buttons.md +37 -0
- package/dist/registry/docs/team-page.md +38 -0
- package/dist/registry/docs/terms-page.md +5 -0
- package/dist/registry/docs/timeline-section.md +37 -0
- package/dist/registry/docs/video-hero.md +41 -0
- package/dist/registry/ecommerce-core.json +18 -2
- package/dist/registry/empty-page.json +1 -1
- package/dist/registry/faq-categorized.json +2 -2
- package/dist/registry/faq-simple.json +2 -2
- package/dist/registry/favorites-blog-block.json +1 -1
- package/dist/registry/favorites-ecommerce-block.json +1 -1
- package/dist/registry/feature-section.json +2 -2
- package/dist/registry/featured-products.json +1 -1
- package/dist/registry/footer-detailed.json +1 -1
- package/dist/registry/footer-minimal.json +3 -3
- package/dist/registry/footer.json +2 -2
- package/dist/registry/forgot-password-page-split.json +50 -0
- package/dist/registry/forgot-password-page.json +51 -0
- package/dist/registry/header-ecommerce.json +4 -2
- package/dist/registry/header-mega.json +2 -2
- package/dist/registry/header-minimal.json +1 -1
- package/dist/registry/header-simple.json +1 -1
- package/dist/registry/hero-carousel.json +45 -0
- package/dist/registry/hero-cta.json +2 -2
- package/dist/registry/hero-gradient.json +2 -2
- package/dist/registry/hero-profile.json +1 -1
- package/dist/registry/hero.json +2 -2
- package/dist/registry/index.json +24 -1
- package/dist/registry/landing-page-app.json +47 -0
- package/dist/registry/landing-page-saas.json +47 -0
- package/dist/registry/login-page-split.json +11 -7
- package/dist/registry/login-page.json +4 -4
- package/dist/registry/logo-cloud.json +41 -0
- package/dist/registry/masonry-grid.json +43 -0
- package/dist/registry/my-orders-page.json +52 -0
- package/dist/registry/order-confirmation-page.json +49 -0
- package/dist/registry/orders-list-block.json +1 -1
- package/dist/registry/payment-success-block.json +1 -1
- package/dist/registry/portfolio-page.json +45 -0
- package/dist/registry/post-detail-block.json +1 -1
- package/dist/registry/pricing-page.json +47 -0
- package/dist/registry/pricing-section.json +2 -2
- package/dist/registry/privacy-page.json +4 -2
- package/dist/registry/product-detail-block.json +1 -1
- package/dist/registry/product-quick-view.json +46 -0
- package/dist/registry/products-page.json +5 -4
- package/dist/registry/reading-progress.json +43 -0
- package/dist/registry/register-page-split.json +50 -0
- package/dist/registry/register-page.json +51 -0
- package/dist/registry/related-posts-block.json +1 -1
- package/dist/registry/reset-password-page-split.json +50 -0
- package/dist/registry/reset-password-page.json +39 -0
- package/dist/registry/share-buttons.json +46 -0
- package/dist/registry/team-page.json +47 -0
- package/dist/registry/terms-page.json +4 -2
- package/dist/registry/testimonials-carousel.json +2 -2
- package/dist/registry/testimonials-grid.json +2 -2
- package/dist/registry/timeline-section.json +43 -0
- package/dist/registry/video-hero.json +42 -0
- package/package.json +1 -1
- package/template/index.html +5 -5
- package/template/src/App.tsx +7 -24
- package/template/src/components/GoogleAnalytics.tsx +34 -0
- package/template/src/components/Layout.tsx +1 -5
- package/template/src/components/ScriptInjector.tsx +62 -0
- package/template/src/constants/constants.json +8 -2
- package/template/src/index.css +1 -0
- package/template/src/lang/en/index.json +1 -28
- package/template/src/lang/tr/index.json +1 -28
- package/template/src/pages/Index.tsx +1 -98
- package/template/src/components/Footer.tsx +0 -100
- package/template/src/components/Header.tsx +0 -79
- package/template/src/components/Hero.tsx +0 -69
- package/template/src/modules/api/USAGE.md +0 -515
- package/template/src/modules/api/customer-client.ts +0 -20
- package/template/src/modules/api/get-error-message.ts +0 -18
- package/template/src/modules/api/validation/en.json +0 -29
- package/template/src/modules/api/validation/tr.json +0 -29
- package/template/src/modules/auth/USAGE.md +0 -248
- package/template/src/modules/auth/auth-header-menu.tsx +0 -123
- package/template/src/modules/auth/auth-store.ts +0 -57
- package/template/src/modules/auth/forgot-password-page.tsx +0 -371
- package/template/src/modules/auth/login-page.tsx +0 -183
- package/template/src/modules/auth/register-page.tsx +0 -252
- package/template/src/modules/auth/use-auth.ts +0 -273
- package/template/src/modules/db/adapters/IDataAdapter.ts +0 -26
- package/template/src/modules/db/adapters/SqliteAdapter.ts +0 -364
- package/template/src/modules/db/adapters/index.ts +0 -2
- package/template/src/modules/db/config.ts +0 -59
- package/template/src/modules/db/core/DataManager.ts +0 -125
- package/template/src/modules/db/core/types.ts +0 -101
- package/template/src/modules/db/index.ts +0 -42
- package/template/src/modules/db/react/QueryProvider.tsx +0 -16
- package/template/src/modules/db/react/index.ts +0 -23
- package/template/src/modules/db/react/queryClient.ts +0 -64
- package/template/src/modules/db/react/useRepository.ts +0 -400
- package/template/src/modules/db/utils/parsers.ts +0 -96
|
@@ -1,106 +1,9 @@
|
|
|
1
|
-
import { Link } from "react-router";
|
|
2
|
-
import { Button } from "@/components/ui/button";
|
|
3
1
|
import { Layout } from "@/components/Layout";
|
|
4
|
-
import { useTranslation } from "react-i18next";
|
|
5
|
-
import { Hero } from "@/components/Hero";
|
|
6
|
-
import { usePageTitle } from "@/hooks/use-page-title";
|
|
7
2
|
|
|
8
3
|
const Index = () => {
|
|
9
|
-
const { t } = useTranslation("index");
|
|
10
|
-
usePageTitle({ title: t("home", "Home") });
|
|
11
|
-
|
|
12
4
|
return (
|
|
13
5
|
<Layout>
|
|
14
|
-
|
|
15
|
-
<Hero />
|
|
16
|
-
{/* About Preview */}
|
|
17
|
-
<section className="py-20 bg-muted/30">
|
|
18
|
-
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
19
|
-
<div className="grid grid-cols-1 lg:grid-cols-2 gap-12 items-center">
|
|
20
|
-
<div>
|
|
21
|
-
<h2 className="text-3xl lg:text-4xl font-bold mb-6 text-foreground">
|
|
22
|
-
{t("mainHeading", "Your Business Title Here")}
|
|
23
|
-
</h2>
|
|
24
|
-
<p className="text-lg text-muted-foreground mb-6">
|
|
25
|
-
{t(
|
|
26
|
-
"mainDescription",
|
|
27
|
-
"This is where your main business description will appear. AI will customize this content based on your specific industry and services.",
|
|
28
|
-
)}
|
|
29
|
-
</p>
|
|
30
|
-
<div className="space-y-4 mb-8">
|
|
31
|
-
<div className="flex items-center gap-3">
|
|
32
|
-
<div className="w-2 h-2 bg-primary rounded-full"></div>
|
|
33
|
-
<span className="text-foreground">
|
|
34
|
-
{t("feature1", "Key feature or benefit #1")}
|
|
35
|
-
</span>
|
|
36
|
-
</div>
|
|
37
|
-
<div className="flex items-center gap-3">
|
|
38
|
-
<div className="w-2 h-2 bg-primary rounded-full"></div>
|
|
39
|
-
<span className="text-foreground">
|
|
40
|
-
{t("feature2", "Key feature or benefit #2")}
|
|
41
|
-
</span>
|
|
42
|
-
</div>
|
|
43
|
-
<div className="flex items-center gap-3">
|
|
44
|
-
<div className="w-2 h-2 bg-primary rounded-full"></div>
|
|
45
|
-
<span className="text-foreground">
|
|
46
|
-
{t("feature3", "Key feature or benefit #3")}
|
|
47
|
-
</span>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
<div className="flex gap-4">
|
|
51
|
-
<Button asChild>
|
|
52
|
-
<Link to="/about">{t("learnMore", "Learn More")}</Link>
|
|
53
|
-
</Button>
|
|
54
|
-
<Button variant="outline" asChild>
|
|
55
|
-
<Link to="/contact">{t("getStarted", "Get Started")}</Link>
|
|
56
|
-
</Button>
|
|
57
|
-
</div>
|
|
58
|
-
</div>
|
|
59
|
-
<div>
|
|
60
|
-
<div className="aspect-square bg-gradient-to-br from-primary/10 to-primary/5 rounded-2xl overflow-hidden">
|
|
61
|
-
<img
|
|
62
|
-
src="/images/placeholder.png"
|
|
63
|
-
alt={t("companyImage", "Business Solutions")}
|
|
64
|
-
className="w-full h-full object-cover"
|
|
65
|
-
/>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
70
|
-
</section>
|
|
71
|
-
|
|
72
|
-
{/* CTA Section */}
|
|
73
|
-
<section className="py-20 bg-primary text-primary-foreground">
|
|
74
|
-
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center">
|
|
75
|
-
<h2 className="text-3xl lg:text-4xl font-bold mb-6">
|
|
76
|
-
{t("readyToStart", "Ready to Start Your Project?")}
|
|
77
|
-
</h2>
|
|
78
|
-
<p className="text-xl opacity-90 max-w-2xl mx-auto mb-8">
|
|
79
|
-
{t(
|
|
80
|
-
"ctaDescription",
|
|
81
|
-
"Let's discuss your needs and create a solution that drives results for your business.",
|
|
82
|
-
)}
|
|
83
|
-
</p>
|
|
84
|
-
<div className="flex flex-col sm:flex-row gap-4 justify-center">
|
|
85
|
-
<Button
|
|
86
|
-
size="lg"
|
|
87
|
-
variant="secondary"
|
|
88
|
-
className="px-8 py-4 text-lg"
|
|
89
|
-
asChild
|
|
90
|
-
>
|
|
91
|
-
<Link to="/contact">{t("getFreeQuote", "Get Free Quote")}</Link>
|
|
92
|
-
</Button>
|
|
93
|
-
<Button
|
|
94
|
-
size="lg"
|
|
95
|
-
variant="outline"
|
|
96
|
-
className="px-8 py-4 text-lg border-primary-foreground text-primary-foreground bg-transparent hover:bg-primary-foreground hover:text-primary transition-all duration-300"
|
|
97
|
-
asChild
|
|
98
|
-
>
|
|
99
|
-
<Link to="/about">{t("learnAboutUs", "Learn About Us")}</Link>
|
|
100
|
-
</Button>
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
</section>
|
|
6
|
+
<div></div>
|
|
104
7
|
</Layout>
|
|
105
8
|
);
|
|
106
9
|
};
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { useMemo } from "react";
|
|
2
|
-
import { Link } from "react-router";
|
|
3
|
-
import { Facebook, Twitter, Instagram, Linkedin } from "lucide-react";
|
|
4
|
-
import constants from "@/constants/constants.json";
|
|
5
|
-
import { useTranslation } from "react-i18next";
|
|
6
|
-
|
|
7
|
-
const socialIcons: Record<string, React.ElementType> = {
|
|
8
|
-
facebook: Facebook,
|
|
9
|
-
twitter: Twitter,
|
|
10
|
-
instagram: Instagram,
|
|
11
|
-
linkedin: Linkedin,
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export function Footer() {
|
|
15
|
-
const { t } = useTranslation("footer");
|
|
16
|
-
|
|
17
|
-
const socialLinks = useMemo(() => {
|
|
18
|
-
const socialMedia = constants?.socialMedia as
|
|
19
|
-
| Record<string, string>
|
|
20
|
-
| undefined;
|
|
21
|
-
if (!socialMedia) return [];
|
|
22
|
-
return Object.entries(socialMedia)
|
|
23
|
-
.filter(([platform, url]) => url && socialIcons[platform])
|
|
24
|
-
.map(([platform, url]) => ({
|
|
25
|
-
platform,
|
|
26
|
-
url,
|
|
27
|
-
Icon: socialIcons[platform],
|
|
28
|
-
}));
|
|
29
|
-
}, []);
|
|
30
|
-
|
|
31
|
-
// Loading state
|
|
32
|
-
if (!constants) {
|
|
33
|
-
return (
|
|
34
|
-
<footer className="bg-muted/30 border-t">
|
|
35
|
-
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
|
36
|
-
<div className="animate-pulse text-center">
|
|
37
|
-
<div className="h-4 bg-muted rounded w-48 mx-auto"></div>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
</footer>
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
return (
|
|
45
|
-
<footer className="bg-muted/30 border-t">
|
|
46
|
-
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
|
47
|
-
{/* Centered Content */}
|
|
48
|
-
<div className="text-center space-y-4">
|
|
49
|
-
{/* Social Media Links */}
|
|
50
|
-
{socialLinks.length > 0 && (
|
|
51
|
-
<div className="flex justify-center gap-2">
|
|
52
|
-
{socialLinks.map(({ platform, url, Icon }) => (
|
|
53
|
-
<a
|
|
54
|
-
key={platform}
|
|
55
|
-
href={url}
|
|
56
|
-
target="_blank"
|
|
57
|
-
rel="noopener noreferrer"
|
|
58
|
-
className="h-9 w-9 flex items-center justify-center rounded-md text-muted-foreground hover:text-primary hover:bg-accent transition-colors"
|
|
59
|
-
>
|
|
60
|
-
<Icon className="h-4 w-4" />
|
|
61
|
-
</a>
|
|
62
|
-
))}
|
|
63
|
-
</div>
|
|
64
|
-
)}
|
|
65
|
-
|
|
66
|
-
{/* Copyright */}
|
|
67
|
-
<div>
|
|
68
|
-
<p className="text-sm text-muted-foreground">
|
|
69
|
-
{t("copyright", {
|
|
70
|
-
siteName: constants?.site?.name,
|
|
71
|
-
})}
|
|
72
|
-
</p>
|
|
73
|
-
</div>
|
|
74
|
-
|
|
75
|
-
{/* Legal Links */}
|
|
76
|
-
<div className="flex flex-wrap justify-center gap-6">
|
|
77
|
-
<Link
|
|
78
|
-
to="/privacy"
|
|
79
|
-
className="text-sm text-muted-foreground hover:text-primary transition-colors"
|
|
80
|
-
>
|
|
81
|
-
{t("privacyPolicy", "Privacy")}
|
|
82
|
-
</Link>
|
|
83
|
-
<Link
|
|
84
|
-
to="/terms"
|
|
85
|
-
className="text-sm text-muted-foreground hover:text-primary transition-colors"
|
|
86
|
-
>
|
|
87
|
-
{t("termsOfService", "Terms")}
|
|
88
|
-
</Link>
|
|
89
|
-
<Link
|
|
90
|
-
to="/cookies"
|
|
91
|
-
className="text-sm text-muted-foreground hover:text-primary transition-colors"
|
|
92
|
-
>
|
|
93
|
-
{t("cookiePolicy", "Cookies")}
|
|
94
|
-
</Link>
|
|
95
|
-
</div>
|
|
96
|
-
</div>
|
|
97
|
-
</div>
|
|
98
|
-
</footer>
|
|
99
|
-
);
|
|
100
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { useState } from "react";
|
|
2
|
-
import { Link } from "react-router";
|
|
3
|
-
import { Menu } from "lucide-react";
|
|
4
|
-
import { Button } from "@/components/ui/button";
|
|
5
|
-
import {
|
|
6
|
-
Sheet,
|
|
7
|
-
SheetHeader,
|
|
8
|
-
SheetTitle,
|
|
9
|
-
SheetContent,
|
|
10
|
-
SheetTrigger,
|
|
11
|
-
} from "@/components/ui/sheet";
|
|
12
|
-
import { Logo } from "@/components/Logo";
|
|
13
|
-
import { useTranslation } from "react-i18next";
|
|
14
|
-
|
|
15
|
-
export function Header() {
|
|
16
|
-
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
|
|
17
|
-
const { t } = useTranslation("header");
|
|
18
|
-
|
|
19
|
-
const navigation = [
|
|
20
|
-
{ name: t("home", "Home"), href: "/" },
|
|
21
|
-
{ name: t("about", "About"), href: "/about" },
|
|
22
|
-
{ name: t("contact", "Contact"), href: "/contact" },
|
|
23
|
-
];
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<header className="sticky top-0 z-50 w-full border-b border-border/20 bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
|
|
27
|
-
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
28
|
-
<div className="flex h-16 sm:h-20 items-center justify-between">
|
|
29
|
-
{/* Logo */}
|
|
30
|
-
<div className="flex-shrink-0 min-w-0">
|
|
31
|
-
<Logo size="sm" className="text-base sm:text-xl lg:text-2xl" />
|
|
32
|
-
</div>
|
|
33
|
-
|
|
34
|
-
{/* Desktop Navigation - Right Aligned */}
|
|
35
|
-
<nav className="hidden lg:flex items-center space-x-8">
|
|
36
|
-
{navigation.map((item) => (
|
|
37
|
-
<Link
|
|
38
|
-
key={item.name}
|
|
39
|
-
to={item.href}
|
|
40
|
-
className="text-base font-medium transition-colors hover:text-primary relative group py-2"
|
|
41
|
-
>
|
|
42
|
-
{item.name}
|
|
43
|
-
<span className="absolute -bottom-1 left-0 w-0 h-0.5 bg-primary transition-all duration-300 group-hover:w-full"></span>
|
|
44
|
-
</Link>
|
|
45
|
-
))}
|
|
46
|
-
</nav>
|
|
47
|
-
|
|
48
|
-
{/* Mobile Menu - Right Aligned */}
|
|
49
|
-
<div className="lg:hidden flex-shrink-0">
|
|
50
|
-
<Sheet open={mobileMenuOpen} onOpenChange={setMobileMenuOpen}>
|
|
51
|
-
<SheetTrigger asChild>
|
|
52
|
-
<Button variant="ghost" size="icon">
|
|
53
|
-
<Menu className="h-5 w-5" />
|
|
54
|
-
</Button>
|
|
55
|
-
</SheetTrigger>
|
|
56
|
-
<SheetContent side="right" className="w-[300px] sm:w-[400px]">
|
|
57
|
-
<SheetHeader>
|
|
58
|
-
<SheetTitle>{t("menu")}</SheetTitle>
|
|
59
|
-
</SheetHeader>
|
|
60
|
-
<div className="flex flex-col space-y-4 mt-8">
|
|
61
|
-
{navigation.map((item) => (
|
|
62
|
-
<Link
|
|
63
|
-
key={item.name}
|
|
64
|
-
to={item.href}
|
|
65
|
-
className="text-lg font-medium hover:text-primary transition-colors"
|
|
66
|
-
onClick={() => setMobileMenuOpen(false)}
|
|
67
|
-
>
|
|
68
|
-
{item.name}
|
|
69
|
-
</Link>
|
|
70
|
-
))}
|
|
71
|
-
</div>
|
|
72
|
-
</SheetContent>
|
|
73
|
-
</Sheet>
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
</header>
|
|
78
|
-
);
|
|
79
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { useTranslation } from "react-i18next";
|
|
2
|
-
import constants from "@/constants/constants.json";
|
|
3
|
-
export function Hero() {
|
|
4
|
-
const { t } = useTranslation("hero");
|
|
5
|
-
|
|
6
|
-
if (!constants) {
|
|
7
|
-
return (
|
|
8
|
-
<section className="relative overflow-hidden bg-gradient-to-br from-background via-muted/20 to-background">
|
|
9
|
-
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16 lg:py-24 relative">
|
|
10
|
-
<div className="text-center space-y-8">
|
|
11
|
-
<div className="animate-pulse">
|
|
12
|
-
<div className="h-16 bg-muted rounded w-96 mx-auto mb-4"></div>
|
|
13
|
-
<div className="h-6 bg-muted rounded w-64 mx-auto mb-8"></div>
|
|
14
|
-
<div className="h-12 bg-muted rounded w-32 mx-auto"></div>
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
</div>
|
|
18
|
-
</section>
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
<section className="relative min-h-[60vh] flex items-center overflow-hidden bg-gradient-to-br from-background via-muted/10 to-background">
|
|
24
|
-
{/* Background Image */}
|
|
25
|
-
<div className="absolute inset-0">
|
|
26
|
-
{/* Background image will be placed here */}
|
|
27
|
-
<img
|
|
28
|
-
src="/images/hero-bg.jpg"
|
|
29
|
-
alt="Hero Background"
|
|
30
|
-
className="w-full h-full object-cover"
|
|
31
|
-
onError={(e) => {
|
|
32
|
-
// Hide broken image and keep gradient background
|
|
33
|
-
e.currentTarget.style.display = "none";
|
|
34
|
-
}}
|
|
35
|
-
/>
|
|
36
|
-
|
|
37
|
-
{/* Dark overlay for text readability */}
|
|
38
|
-
<div className="absolute inset-0 bg-gradient-to-r from-black/60 via-black/30 to-transparent"></div>
|
|
39
|
-
|
|
40
|
-
{/* Fallback gradient background */}
|
|
41
|
-
<div className="absolute inset-0 bg-gradient-to-r from-primary/5 via-transparent to-primary/5"></div>
|
|
42
|
-
</div>
|
|
43
|
-
|
|
44
|
-
{/* Content - Left Aligned with better contrast */}
|
|
45
|
-
<div className="w-full max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10">
|
|
46
|
-
<div className="max-w-2xl text-left">
|
|
47
|
-
{/* Main Headline */}
|
|
48
|
-
<div className="space-y-6 mb-8">
|
|
49
|
-
<h1 className="text-4xl md:text-5xl lg:text-6xl font-bold leading-normal text-white drop-shadow-lg pb-1">
|
|
50
|
-
<span>{t("discover", "Discover")} </span>
|
|
51
|
-
<span className="bg-gradient-to-r from-primary to-primary/80 bg-clip-text text-transparent">
|
|
52
|
-
{t("amazing", "Inspiring")}
|
|
53
|
-
</span>
|
|
54
|
-
<br />
|
|
55
|
-
<span>{t("content", "Stories")}</span>
|
|
56
|
-
</h1>
|
|
57
|
-
|
|
58
|
-
<p className="text-xl text-white/90 max-w-lg leading-relaxed drop-shadow-md">
|
|
59
|
-
{t(
|
|
60
|
-
"subtitle",
|
|
61
|
-
"Dive into a world of captivating narratives, expert insights, and thought-provoking content that inspires and educates.",
|
|
62
|
-
)}
|
|
63
|
-
</p>
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
</section>
|
|
68
|
-
);
|
|
69
|
-
}
|